0
votes

I have a microscope image with three channels (RED, GREEN and BLUE), each channel is unit 16 intensity image. I want to show each channel in a subplot (1,3), but in their color form (RGB). I figured it out that with the following command, I can all channels into one RGB image, but I want to show each channel in one subplot.

overlay=cat(3,imadjust(mat2gray(RED)),imadjust(mat2gray(GREEN)),imadjust(mat2gray(BLUE)));

Is there anyway to show/convert my intensity grayscale images into RGB format? I also found that following line can shoe each channel in RGB format but the output image is not adjusted (mostly black) and I cannot adjust it by imadjust command because it's not grayscale anymore.

red_IM = cast(cat(3, RED, zeros(size(RED)), zeros(size(RED))), class(RED));

I would appreciate if someone could help me.

Thanks

1
Can you show the histogram plot of the input channels or your red_IM plots so that one can understand the problem?user4085386

1 Answers

0
votes

you can divide into separate channels and adjust each of them:

im = im2double(imread('peppers.png'));
r = imadjust(im(:,:,1));
g = imadjust(im(:,:,2));
b = imadjust(im(:,:,3));
z = zeros(size(r),'like',r);
r = cat(3,r,z,z);
g = cat(3,z,g,z);
b = cat(3,z,z,b);
subplot(131);
imshow(r);
subplot(132);
imshow(g);
subplot(133);
imshow(b);

enter image description here