Hi, I am working on a project where I read an image load the data into Mat data type. The I do some operations on it. All my operations are done assuming the color space is RGB (BGR as opencv stores in that way). Everuything is working fine. I was doing experiment on converting the output image to YUV format. But when I transform the output image from BGR2YUV using the following command cvtColor(img,out,CV_RGB2YCrCb); I found that the resulting image color is changed completely.
How can I change the color space from RGB to YUV without changing the colors in the image? I