Combining channels to get rgb image (color adjustment)

26 visualizaciones (últimos 30 días)
Htet
Htet el 14 de Jun. de 2013
Editada: Image Analyst el 14 de Mayo de 2017
Hi all, I current have multiple images (>3), and am attempting to combining into channels and get an rgb image. I know how to do the basic operations. I'm having the problem of not getting the desired color when combined. For example, I want high values of the first image to show up as red. But after combining all 4 images that I have, the high values of the first image shows up as other colors. I'm just wondering if there is any "smart" way of adjusting colors rather than trial and error. Thanks!

Respuestas (2)

Image Analyst
Image Analyst el 14 de Jun. de 2013
rgbImage = cat(3, redChannelImage, greenChannelImage, blueChannelImage);
Just put whatever images you want in the proper order according to the above.
  4 comentarios
nur liyana zamri
nur liyana zamri el 14 de Mayo de 2017
why is the red,green and blue channel images in grey image?
Image Analyst
Image Analyst el 14 de Mayo de 2017
Editada: Image Analyst el 14 de Mayo de 2017
Not sure what that means - the grammar is not right. So here are some facts. Pick the one that might answer your question.
Gray images have no red, green, and blue channels.
True color RGB images can look gray and they will have red, green, and blue channels that are all exactly the same.
Once extracted from a true color RGB 3-D image, you have 3 2-D images, one for red, one for green, and one for blue. Since they have only intensity of that channel, and not color, when you display them they will be in gray scale, unless you apply a colormap to them and then they can look like any color or combination of colors. For example, you can apply a colormap to make the red channel image appear red instead of gray if you want, but it's inherently gray - you're just changing the color of how it's displayed, not the pixel values of the underlying image.
If you want 3 true color images where the red channel is in the red channel (and the green channel and blue channel are black so that the image looks only red), then see this https://www.mathworks.com/matlabcentral/answers/111104-how-to-separate-an-image-to-rgb#comment_453709

Iniciar sesión para comentar.


Htet
Htet el 14 de Jun. de 2013
Hi Image Analyst, thanks for your answer. But I do know how to create a 3-dimensional "matrix". What I need is a way to adjust colors in a controlled manner, so the high values in the red channel image show up as red, etc. Any other suggestions?

Categorías

Más información sobre Blue en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by