Combining channels to get rgb image (color adjustment)

28 ビュー (過去 30 日間)
Htet
Htet 2013 年 6 月 14 日
編集済み: Image Analyst 2017 年 5 月 14 日
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!

回答 (2 件)

Image Analyst
Image Analyst 2013 年 6 月 14 日
rgbImage = cat(3, redChannelImage, greenChannelImage, blueChannelImage);
Just put whatever images you want in the proper order according to the above.
  4 件のコメント
nur liyana zamri
nur liyana zamri 2017 年 5 月 14 日
why is the red,green and blue channel images in grey image?
Image Analyst
Image Analyst 2017 年 5 月 14 日
編集済み: Image Analyst 2017 年 5 月 14 日
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

サインインしてコメントする。


Htet
Htet 2013 年 6 月 14 日
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?

カテゴリ

Help Center および File ExchangeBlue についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by