Skip to content

Commit ad051cd

Browse files
committed
Fixed CAP_PROP_FORMAT evaluation in case CvCaptureCAM_V4L returns CV_16U image
1 parent a6c02af commit ad051cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/videoio/src/cap_v4l.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1636,7 +1636,7 @@ static double icvGetPropertyCAM_V4L (const CvCaptureCAM_V4L* capture,
16361636
case CV_CAP_PROP_MODE:
16371637
return capture->palette;
16381638
case CV_CAP_PROP_FORMAT:
1639-
return CV_MAKETYPE(CV_8U, capture->frame.nChannels);
1639+
return CV_MAKETYPE(IPL2CV_DEPTH(capture->frame.depth), capture->frame.nChannels);
16401640
case CV_CAP_PROP_CONVERT_RGB:
16411641
return capture->convert_rgb;
16421642
}

0 commit comments

Comments
 (0)