How to separate an image to rgb?
Mostra commenti meno recenti
how to divide an image into its r,g,and b colour planes,
Risposta accettata
Più risposte (3)
Sailesh Sidhwani
il 25 Ott 2018
Modificato: Sailesh Sidhwani
il 29 Lug 2019
2 voti
Starting R2018b, Image Processing Toolbox has a new function "imsplit" which does exactly this: https://www.mathworks.com/help/images/ref/imsplit.html
ES
il 31 Dic 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
il 29 Lug 2019
Modificato: DGM
il 12 Feb 2023
how about imsplit function?
[R G B] = imsplit(myImage);
Categorie
Scopri di più su Christmas / Winter in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!