How to separate an image to rgb?
Afficher commentaires plus anciens
how to divide an image into its r,g,and b colour planes,
Réponse acceptée
Plus de réponses (3)
Sailesh Sidhwani
le 25 Oct 2018
Modifié(e) : Sailesh Sidhwani
le 29 Juil 2019
2 votes
Starting R2018b, Image Processing Toolbox has a new function "imsplit" which does exactly this: https://www.mathworks.com/help/images/ref/imsplit.html
ES
le 31 Déc 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
le 29 Juil 2019
Modifié(e) : DGM
le 12 Fév 2023
how about imsplit function?
[R G B] = imsplit(myImage);
Catégories
En savoir plus sur Christmas / Winter dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!