How to deal with RGB to YUV conversion
Posted
by maximus
on Stack Overflow
See other posts from Stack Overflow
or by maximus
Published on 2010-05-25T14:30:14Z
Indexed on
2010/05/25
14:41 UTC
Read the original article
Hit count: 463
The formula says:
Y = 0.299 * R + 0.587 * G + 0.114 * B;
U = -0.14713 * R - 0.28886 * G + 0.436 * B;
V = 0.615 * R - 0.51499 * G - 0.10001 * B;
What if, for example, the U variable becomes negative?
U = -0.14713 * R - 0.28886 * G + 0.436 * B;
Assume maximum values for R and G (ones) and B = 0 So, I am interested in implementing this convetion function in OpenCV, So, how to deal with negative values? Using float image? anyway please explain me, may be I don't understand something..
© Stack Overflow or respective owner