Filter löschen
Filter löschen

How to generate an imaging with three colors

2 Ansichten (letzte 30 Tage)
Peng
Peng am 24 Aug. 2016
Beantwortet: Image Analyst am 24 Aug. 2016
As shown in the figure, Fe is indicated by red, Zn is indicated by green, and Cu is indicated by blue. I would like to generate the big picture with three colors indicating Fe, Zn, and Cu. Now I can see clearly if these elements are overlapped or not. I have the data of Fe, Zn, and Cu in separated three matrices.

Antworten (1)

Image Analyst
Image Analyst am 24 Aug. 2016
I don't see an actual question there so I don't know what you want or what you have or don't have yet. I'm going to assume you have the component images and need the gray scale images, so just do this
rgbImage = cat(3, feImage, znImage, cuImage);
feImage, znImage, and cuImage are all 2D images. If the RGB values are floating point and outside the range 0-1 you might have to cast to uint8 before using imshow().
If they're of different ranges, you might want to run them through mat2gray() first.
rgbImage = cat(3, gray2mat(feImage), gray2mat(znImage), gray2mat(cuImage));
If that doesn't work, explain why.

Kategorien

Mehr zu Images finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by