How to separate an image to rgb?
Mostrar comentarios más antiguos
how to divide an image into its r,g,and b colour planes,
Respuesta aceptada
Más respuestas (3)
Sailesh Sidhwani
el 25 de Oct. de 2018
Editada: Sailesh Sidhwani
el 29 de Jul. de 2019
2 votos
Starting R2018b, Image Processing Toolbox has a new function "imsplit" which does exactly this: https://www.mathworks.com/help/images/ref/imsplit.html
ES
el 31 de Dic. de 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
el 29 de Jul. de 2019
Editada: DGM
el 12 de Feb. de 2023
how about imsplit function?
[R G B] = imsplit(myImage);
Categorías
Más información sobre Image Processing Toolbox en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!