How to separate an image to rgb?
Ältere Kommentare anzeigen
how to divide an image into its r,g,and b colour planes,
Akzeptierte Antwort
Weitere Antworten (3)
Sailesh Sidhwani
am 25 Okt. 2018
Bearbeitet: Sailesh Sidhwani
am 29 Jul. 2019
2 Stimmen
Starting R2018b, Image Processing Toolbox has a new function "imsplit" which does exactly this: https://www.mathworks.com/help/images/ref/imsplit.html
ES
am 31 Dez. 2013
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
am 29 Jul. 2019
Bearbeitet: DGM
am 12 Feb. 2023
how about imsplit function?
[R G B] = imsplit(myImage);
Kategorien
Mehr zu Christmas / Winter finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!