How can I convert CMYK image to RGB?
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 2 Okt. 2009
Kommentiert: Walter Roberson
am 4 Feb. 2016
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.
Akzeptierte Antwort
MathWorks Support Team
am 18 Okt. 2013
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 Kommentar
Walter Roberson
am 4 Feb. 2016
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...
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Color finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!