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:
![](http://blog.csdn.net/coloriy/article/details/file:/C:/Users/James/AppData/Local/YNote/data/foxjames@163.com/8557ab3850964299b6b2366f7b601f4e/9%7D%7Ba(h2b(c1z.png)
![](https://oscdn.geek-share.com/Uploads/Images/Content/202012/13/c400f28a51845289f939a5f7fcd9037f)
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;
RGB to YUV:
![](http://blog.csdn.net/coloriy/article/details/file:/C:/Users/James/AppData/Local/YNote/data/foxjames@163.com/8557ab3850964299b6b2366f7b601f4e/9%7D%7Ba(h2b(c1z.png)
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;
相关文章推荐
- hdu 2203 亲和串
- TCP/IP协议栈
- Installation error: INSTALL_FAILED_CPU_ABI_INCOMPATIBLE
- How To Join XLA_AE_HEADERS and RCV_TRANSACTIONS(子分类账到事务处理追溯)
- junit 报错以及解决的办法
- oracle排序时把null放在最后
- ORA-01591: 锁被未决分布式事务处理解决方案
- MIPS 五级流水线
- Uva - 10129 - Play on Words
- Android Loader机制 源码笔记(2)
- Uva - 10129 - Play on Words
- An example of how to streaming audio over network using Qt
- 日期格式转换
- 批量查询ip
- Collections
- 软件开发
- Ninject Lazy Load问题
- 排序算法基本思想
- (笔试题)合法字符串
- RequireJS 文件合并压缩