1. 来源的差异
yuv色彩模 型来源于rgb模型,该模型的特点是将亮度和色度分离开,从而适合于图像处理领域。
应用:basic color model used in analogue color TV broadcasting.用在模拟彩色电视广播的基本颜色模型中
YCbCr模型来源于yuv模 型。YCbCr is a scaled and offset version of the YUV color space.
应用:数字视 频,ITU-R BT.601 recommendation
我们在h.264,mpeg等编码标准中用的yuv其实是YcbCr,大家不要被名称搞混淆了。
2. 转换
yuv<-->rgb
Y'= 0.299*R' + 0.587*G' + 0.114*B' U'= -0.147*R' - 0.289*G' + 0.436*B' = 0.492*(B'- Y') V'= 0.615*R' - 0.515*G' - 0.100*B' = 0.877*(R'- Y') R' = Y' + 1.140*V' G' = Y' - 0.394*U' - 0.581*V' B' = Y' + 2.032*U'
yCbCr<-->rgb
Y’ = 0.257*R' + 0.504*G' + 0.098*B' + 16 Cb' = -0.148*R' - 0.291*G' + 0.439*B' + 128 Cr' = 0.439*R' - 0.368*G' - 0.071*B' + 128 R' = 1.164*(Y’-16) + 1.596*(Cr'-128) G' = 1.164*(Y’-16) - 0.813*(Cr'-128) - 0.392*(Cb'-128) B' = 1.164*(Y’-16) + 2.017*(Cb'-128)