How to separate an image to rgb?
이전 댓글 표시
how to divide an image into its r,g,and b colour planes,
채택된 답변
추가 답변 (3개)
Sailesh Sidhwani
2018년 10월 25일
편집: Sailesh Sidhwani
2019년 7월 29일
2 개 추천
Starting R2018b, Image Processing Toolbox has a new function "imsplit" which does exactly this: https://www.mathworks.com/help/images/ref/imsplit.html
ES
2013년 12월 31일
I=imread('image.jpg')
will give I (a 3d array, of size [x,y,3] )where x and y are the dimensions of the image. 3 is for R, G, and B components.
To separate out the three components, you can do a
R = reshape(I(:,:,1),[],1);
G = reshape(I(:,:,2),[],1);
B = reshape(I(:,:,3),[],1);
Negesse Tadesse
2019년 7월 29일
편집: DGM
2023년 2월 12일
how about imsplit function?
[R G B] = imsplit(myImage);
카테고리
도움말 센터 및 File Exchange에서 Christmas / Winter에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!