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 CenterFile Exchange에서 Blue에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by