I am reading a book about yuv and rgb colorspace, it told me how YCbCr come out, these steps like this:
- R, G, B is a float number ranged 0.0~1.0
- use a grayscale method to convert RGB value to Lum value: Y = kr * R + kg * G + kb * B
- get a difference value between Y and RGB
Cr = R - Y
Cg = G - Y
Cb = B - Y
the book said: Cb + Cr + Cg is a constant and so only two of the three chroma components need to be stored or transmitted since the third component can always be calculated from the other two.[1]
I don't understand it. could anyone make a explaination for me?
[1]: H.264 and MPEG-4 Video Compression - Iain E. G. Richardson - P16