matlab中rgb到ycbcr的转换
我正在尝试在Matlab中编写一个函数,该函数获取unit8类的RGB图像并进行双精度转换,并将其转换为YCBCR图像。变换公式如下。
我将非常感谢任何形式的帮助。
I am trying to write a function in Matlab that takes an RGB image of class unit8 and double and converts it to a YCBCR image. The transformation formula is below.
I would be really thankful for any help of any kind.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您有权访问的话,有一个图像处理工具箱功能:RGB2YCBCR
如果您无权访问它,请按以下方法操作您可以自己进行转换:
这是显示
ycbcrImage
时获得的图像:There's an Image Processing Toolbox function for that, if you have access to it: RGB2YCBCR
If you don't have access to it, here's how you can do the conversion yourself:
And here's the image you get when you display
ycbcrImage
:“rgb2ycbcr”函数(图像处理工具箱):
路径:
MATLAB\R2013a\toolbox\images\colorspaces\rgb2ycbcr.m
代码:
"rgb2ycbcr" function (image processing toolbox):
Path :
MATLAB\R2013a\toolbox\images\colorspaces\rgb2ycbcr.m
Code :