您的位置:首页 > 其它

YUVtoRGB RGB to YUV color convert formulas - ITU 601

2015-06-17 14:55 671 查看
1. for computer system, the YUV and RGB range are [0~255] using 8bit to show.

RGB to YUV:





using the float , the RGB to YUV convert formula :

y = (65.738 * r + 129.057*g + 25.064*b) / 256 + 16;

u = (-37.945*r - 74.494*g + 112.439*b) / 256 + 128;

v = (112.439*r - 94.154*g - 18.285*b) / 256 + 128;

or

y = (0.2568*r + 0.5041*g + 0.0979*b) + 16;

u = (-0.1482*r - 0.2910*g + 0.4392*b) + 128;

v = (0.4392*r -0.3678*g - 0.0714*b) + 128;

2. YUV to RGB

r = 1.1644*y + 1.5960*v - 16;

g = 1.1644*y - 0.3918*u - 0.8130*v - 128;

b = 1.1644*y + 2.0172*u - 128;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: