Combining channels to get rgb image (color adjustment)
32 views (last 30 days)
Show older comments
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!
0 Comments
Answers (2)
Image Analyst
on 14 Jun 2013
rgbImage = cat(3, redChannelImage, greenChannelImage, blueChannelImage);
Just put whatever images you want in the proper order according to the above.
4 Comments
Image Analyst
on 14 May 2017
Edited: Image Analyst
on 14 May 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
See Also
Categories
Find more on Red in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!