OpenCV default colorspace

OpenCV default colorspace

lucvosters's picture
Hi All,

I have an urgent question regarding cvQueryFrame(). I couldn't find the answer anywhere. So I hope someone here can help.

If I read a video which is encoded in e.g. YUV4:2:2 color format in OpenCV by:

cap = cvCreateFileCapture("input.avi");
IplImage *in = cvQueryFrame(cap);

Will in then always be in the BGR colorspace? Or will in be in the YUV4:4:4 colorspace?

Will OpenCV in cvQueryFrame() automatically convert any video of any colorspace into the BGR colorspace by default? Or if the encoded
video is YUV, will the colorspace after cvQueryFrame() than also be YUV?

Thanks in advance!
2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Thomas Willhalm (Intel)'s picture

Have you tried the discussion forum on OpenCV? They should be able to help you.

Login to leave a comment.