combine yellow and cyan fluorescence channels into one image

조회 수: 13 (최근 30일)
Charles Chen
Charles Chen 2020년 9월 24일
답변: Image Analyst 2020년 9월 27일
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.

채택된 답변

Image Analyst
Image Analyst 2020년 9월 27일
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.

추가 답변 (1개)

Charles Chen
Charles Chen 2020년 9월 27일
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)

카테고리

Help CenterFile Exchange에서 Get Started with Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by