Suppose we have two images:
1) RGB image:
% initialize RGB image: rgbIm = zeros(100, 100, 3); rgbIm(20:80, 20:80, 1) = 1;
2) Grayscale image:
% initialize grayscale image: grayIm = zeros(100); grayIm(20:80, 20:80) = 1;
Show both of them:
figure, imshow(rgbIm), colormap('jet'), colorbar; figure, imshow(grayIm), colormap('jet'), colorbar;
As we can see, the color line in the second figure (i.e., the image in grayscale) has a general meaning. On the other hand, I cannot understand the information indicated in the color scale in the first figure.
What I would like to achieve is to display the color frame of the image in grayscale in the image corresponding to the RGB image .
This may not seem to make sense, but this is just a very minimal example that I just did to show what I would like to do in a larger project.
Any thoughts?
Thank you very much:)
EDIT1: Let me explain why I need it
Suppose I calculated some physiological parameters for a single slice of an MRI scan in certain areas of interest:

Now I want to overlay these parameters on top of the original fragment, and for this I create one RGB image:

The color palette does not make sense, and that is why I would like to display a color palette corresponding to the parametric image in the RGB image (i.e. the overlay image).
Any ideas?
Thank you for your attention.