mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 08:13:04 +04:00
fixed possible video distortion problem when cap_avfoundation.mm is used to capture video (ticket #1980)
This commit is contained in:
@@ -720,7 +720,7 @@ fromConnection:(AVCaptureConnection *)connection{
|
|||||||
image->height = height;
|
image->height = height;
|
||||||
image->nChannels = 4;
|
image->nChannels = 4;
|
||||||
image->depth = IPL_DEPTH_8U;
|
image->depth = IPL_DEPTH_8U;
|
||||||
image->widthStep = rowBytes;
|
image->widthStep = (int)rowBytes;
|
||||||
image->imageData = imagedata;
|
image->imageData = imagedata;
|
||||||
image->imageSize = currSize;
|
image->imageSize = currSize;
|
||||||
|
|
||||||
@@ -731,7 +731,7 @@ fromConnection:(AVCaptureConnection *)connection{
|
|||||||
bgr_image->height = height;
|
bgr_image->height = height;
|
||||||
bgr_image->nChannels = 3;
|
bgr_image->nChannels = 3;
|
||||||
bgr_image->depth = IPL_DEPTH_8U;
|
bgr_image->depth = IPL_DEPTH_8U;
|
||||||
bgr_image->widthStep = rowBytes;
|
bgr_image->widthStep = (int)rowBytes;
|
||||||
bgr_image->imageData = bgr_imagedata;
|
bgr_image->imageData = bgr_imagedata;
|
||||||
bgr_image->imageSize = currSize;
|
bgr_image->imageSize = currSize;
|
||||||
|
|
||||||
@@ -949,7 +949,7 @@ IplImage* CvCaptureFile::retrieveFramePixelBuffer() {
|
|||||||
image->height = height;
|
image->height = height;
|
||||||
image->nChannels = 4;
|
image->nChannels = 4;
|
||||||
image->depth = IPL_DEPTH_8U;
|
image->depth = IPL_DEPTH_8U;
|
||||||
image->widthStep = width*4;
|
image->widthStep = rowBytes;
|
||||||
image->imageData = imagedata;
|
image->imageData = imagedata;
|
||||||
image->imageSize = currSize;
|
image->imageSize = currSize;
|
||||||
|
|
||||||
@@ -962,7 +962,7 @@ IplImage* CvCaptureFile::retrieveFramePixelBuffer() {
|
|||||||
bgr_image->height = height;
|
bgr_image->height = height;
|
||||||
bgr_image->nChannels = 3;
|
bgr_image->nChannels = 3;
|
||||||
bgr_image->depth = IPL_DEPTH_8U;
|
bgr_image->depth = IPL_DEPTH_8U;
|
||||||
bgr_image->widthStep = width*4;
|
bgr_image->widthStep = rowBytes;
|
||||||
bgr_image->imageData = bgr_imagedata;
|
bgr_image->imageData = bgr_imagedata;
|
||||||
bgr_image->imageSize = currSize;
|
bgr_image->imageSize = currSize;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user