Ask Your Question
0

YUV color space: modifying U and V without Y ?

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

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
1

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

How should Y be updated?

edit flag offensive delete link more

Comments

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

begueradj gravatar imagebegueradj ( 2015-03-09 10:44:43 -0600 )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 -0600 )edit

Question Tools

1 follower

Stats

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

Seen: 355 times

Last updated: Mar 09 '15