Ask Your Question

Understanding YUV to BGR color spaces conversion

asked 2015-03-20 09:23:18 -0500

begueradj gravatar image

I read a BGR image:


I convert it to YUV color space:


Now I set U and V values of yuv image to 0:

for i in range(yuv.shape[0]):
    for j in range(yuv.shape[1]):

Now I convert yuv to BGR and display it:


The problem is that BGR is displayed totally green (Blue and Red channels are always 0 on all the pixels)

Does this mean that Y in YUV color space is saved as G in BGR when we convert an image from YUV to BGR colorspaces ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-03-20 09:35:31 -0500

updated 2015-03-20 09:37:26 -0500

No. The connection between The RGB and the YUV color space is:

image description

So when you have YUV(0,0,0) in RGB you have : 0,135,0

That is coming from the definition of the YUV color space.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-03-20 09:23:18 -0500

Seen: 15,186 times

Last updated: Mar 20 '15