![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/331328/image.png)
Image from RGB to another one
조회 수: 16 (최근 30일)
이전 댓글 표시
I have two Questions :
•1. Read the RGB image?
•2. Convert RGB color image into CMYK color image?
I solve the first one
figure
image_mat = imread('color.jpg');
imshow(image_mat)
but How can i solve the second one ?
댓글 수: 0
채택된 답변
Image Analyst
2020년 7월 13일
Did you even try the function in the link KSSV gave you? Because I did, and the attached code worked just fine.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/331328/image.png)
댓글 수: 8
Image Analyst
2020년 7월 14일
As I showed you, you can use imshow() to show the component channels. And as Walter and I have both said, displaying 3 or 4 of the cmyk channels as an RGB image makes little sense but if you want, you can obtain that gibberish by extracting the three channels you want into an rows-by-columns-by3 image and using imshow(). For more sophisticated ways of converting a multi-channel color image into a 3-channel RGB image, see the attached paper.
추가 답변 (1개)
KSSV
2020년 7월 12일
댓글 수: 10
Walter Roberson
2020년 7월 13일
image_mat = imread('baby.jpg');
inprof = iccread('srgb.icm'); outprof = iccread('USSheetfedCoated.icc');
cform = makecform('icc', inprof, outprof); %conversion from SRGB of a CRT to CMYK of a particular device
image_cmyk = applycform(image_mat, cform);
imshow(image_cmyk(:,:,1:3))
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!