Repository navigation
Support for V4L2_PIX_FMT_Y16 and setting CV_CAP_PROP_FOURCC for v4l2 - #7293
Conversation
| break; | ||
| case CV_CAP_PROP_FOURCC: | ||
| { | ||
| __u32 old_palette = capture->palette; |
There was a problem hiding this comment.
Sorry about that, IDE feature for converting indentation tabs to spaces misfired here somehow. Fixed now.
| break; | ||
| case V4L2_PIX_FMT_Y16: | ||
| if(!capture->convert_rgb){ | ||
| depth = IPL_DEPTH_16U; |
There was a problem hiding this comment.
OK, it is above: channels = v4l2_num_channels(...)
1) Cameras started with Y16 (V4L2_PIX_FMT_Y16) format via v4l2 backend will now exhibit default camera behavior, i.e. convert the 16-bit image to BGR as with all other formats. 16-bit 1-channel output will now only be produced for Y16 if CV_CAP_PROP_CONVERT_RGB is set to "false" using VideoCap::set method. 2) v4l2 videoio backend now supports setting CV_CAP_PROP_FOURCC explicitly (icvSetPropertyCAM_V4L function in cap_v4l.cpp), allowing users to manually set the codec on cameras that support multiple codecs.
|
@alalek , should be good now. |
|
Looks good to me! |
|
Hi, I changed file cap_v4l.cpp as you said, and set the property CV_CAP_PROP_CONVERT_RGB to False but it is still not working. I read 8 bits depth pixels. Thank you! |
|
@Guille129 This patch is about V2L, than means "Video for Linux". But your problem is Windows-related. |
Resolves #7194