How can I convert CMYK image to RGB?
13 次查看(过去 30 天)
显示 更早的评论
There is an example on converting RGB to CMYK image in the documentation on "Performing Profile-Based Color Space Conversions" which is as follows:
I_rgb = imread('peppers.png');
inprof = iccread('sRGB.icm');
outprof = iccread('USSheetfedCoated.icc');
C = makecform('icc',inprof,outprof);
I_cmyk = applycform(I_rgb,C);
I would like to know how I can convert CMYK image to RGB.
采纳的回答
MathWorks Support Team
2013-10-18
If the CMYK data is in the same colorspace as the USSheetfedCoated.icc profile (or if it is just to visualize the data), then it is sufficient to reverse the input and output profiles given to MAKECFORM as in the following example:
inprof = iccread('USSheetfedCoated.icc');
outprof = iccread('sRGB.icm');
C = makecform('icc',inprof,outprof);
I_rgb = applycform(I_cmyk,C);
The best results are obtained by using CMYK and RGB profiles that describe the colorspaces of the image and destination device.
1 个评论
Walter Roberson
2016-2-4
If the process were exactly reversible, it would follow that any 4 dimensional set of coordinates with finite bounds could be exactly and reversibly mapped into 3 dimensions with finite bounds. Though mind you since the produce of infinities of the real numbers is still the infinity of the real numbers, perhaps that is possible in theory...
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Color 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!