Ask Your Question

Revision history [back]

It is very simple, you just have to know that YUV is the same as YCrCb color space.

Mat original_image = imread("path_to_image");
Mat converted_image = original.clone();
cvtColor(original_image, converted_imag, CV_BGR2YCrCb);

Do mind that openCV doesn't read images in RGB order but in BGR order!

It is very simple, you just have to know that YUV is as good as the same as YCrCb color space.space, the second one is for digital tv compared to YUV being for analogue tv signals, but the results are quite similar.

Mat original_image = imread("path_to_image");
Mat converted_image = original.clone();
cvtColor(original_image, converted_imag, CV_BGR2YCrCb);

Do mind that openCV doesn't read images in RGB order but in BGR order!

It is very simple, you just have to know that YUV is as good as the same as YCrCb color space, the second one is for digital tv compared to YUV being for analogue tv signals, but the results are quite similar.

Mat original_image = imread("path_to_image");
Mat converted_image = original.clone();
cvtColor(original_image, converted_imag, converted_image, CV_BGR2YCrCb);

Do mind that openCV doesn't read images in RGB order but in BGR order!