YUV and Y'UV were used for analog encoding of color information(TV).
YCbCr was used for digital encoding of color information(images or videos).
In computers, we actually need RGB -> YCrCb
Y = (0.257 * R) + (0.504 * G) + (0.098 * B) + 16
Cr = V = (0.439 * R) - (0.368 * G) - (0.071 * B) + 128
Cb = U = -(0.148 * R) - (0.291 * G) + (0.439 * B) + 128
You can find more information from the following references.
Wikipedia: YUV
fourcc.org - RGB/YUV Pixel Conversion
xuyingpin - YUV轉換RGB算法
轉:YUY2/RGB轉換公式
沒有留言:
張貼留言