combine yellow and cyan fluorescence channels into one image

13 visualizzazioni (ultimi 30 giorni)
I have two fluorescence images, one in yellow channel, one in cyan channel. Both are the same size. How can I overlap them in the same image while keeping its color, so they are easy to compare?
The fluorescence image is gray scale image acquired in yellow or cyan channel.
imfuse won't keep the yellow or cyan color.

Risposta accettata

Image Analyst
Image Analyst il 27 Set 2020
Well your question was confusing, and you forgot to attach the images so we didn't really have an idea of what you were talking about.
  1. Did you use a monochrome camera with colored filters in front of the lens?
  2. Did you use a camera with a CYGM Bayer pattern filter, like CYGM Bayer Pattern Filter
  3. Did you just use a regular RGB camera and the images happened to look yellow and cyan?
  4. In the end, do you end up with an RGB image?
Assuming that somehow the answer to 4 is Yes, then you can simply average the two images:
rgbBoth = uint8((double(RGB_Yellow) + double(RGB_Cyan))/2);
Since Yellow is red + green, and cyan is green +red, if you want, you can average only the green channel and leave the red and blue alone.
[r1,g1,b1] = imsplit(RGB_Yellow);
[r2,g2,b2] = imsplit(RGB_Cyan);
aveGreen = uint8(double(g1) + double(g2))/2);
rgbBoth = cat(3, r1, aveGreen, b2);
That will make sure the red and blue channels are not divided by 2.

Più risposte (1)

Charles Chen
Charles Chen il 27 Set 2020
In case there are someone as unfamiliar to image processing as me having the similar question.
here is my solution.
function ImFP=gray2rgb(Img,ChannelColor)
%function ImFP=gray2prgb(Img,ChannelColor)
%color grayscale image according the channel color
% ImFP: pseudo colored RGB;
%
RedChannel=ChannelColor(1);
GreenChannel=ChannelColor(2);
BlueChannel=ChannelColor(3);
ImFP(:,:,1)=Img*RedChannel;
ImFP(:,:,2)=Img*GreenChannel;
ImFP(:,:,3)=Img*BlueChannel;
end
function ComFP=compositeFP(YFP,CFP)
%function ComFP=compositeFP(YFP,CFP)
%color grayscale image according the channel color
%show and combine both channels in the same image
% Red= [1 0 0]
% Green= [0 1 0]
% Blue= [0 0 1]
% Yellow=[1 1 0]
% Cyan=[0 1 1]
%
Ymap=[1 1 0];Cmap=[0 1 1];
RGB_YFP=gray2rgb(YFP, Ymap);
RGB_CFP=gray2rgb(CFP, Cmap);
ComFP=RGB_YFP+RGB_CFP;
end
imshow(ComFP)

Community Treasure Hunt

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

Start Hunting!

Translated by