Ask Your Question

YUV color space: modifying U and V without Y ?

asked 2015-03-09 10:37:44 -0500

begueradj gravatar image

I read a picture with OpenCV and Python. I convert it from BGR to YUV color space.

Now I change the values of U and V of each pixel: will Y be automatically update ? Or have I to set it programmatically too ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-03-09 10:43:00 -0500

How should Y be updated?

edit flag offensive delete link more


I asked because I think Y depends on Y and V ?

begueradj gravatar imagebegueradj ( 2015-03-09 10:44:43 -0500 )edit

The matrix itself does not know if it is representing RGB or YUV. It just stores data. There would have to be some king of daemon running that checks if you change the data in the data-array of the cv::Mat and somehow updates the other values. (I've never really worked with YUV, but why would you store 3 dimensions if you can compute one value from the other two?)

FooBar gravatar imageFooBar ( 2015-03-09 10:48:34 -0500 )edit

Question Tools

1 follower


Asked: 2015-03-09 10:37:44 -0500

Seen: 270 times

Last updated: Mar 09 '15