How can I convert CMYK image to RGB?
12 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2009 年 10 月 2 日
コメント済み: Walter Roberson
2016 年 2 月 4 日
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!