MATLAB: How to color different pixels in an image

image analysisimage processingImage Processing Toolbox

Hello Everyone! I have a grayscale image of a mice tumor tissue. So pixel correspond to different parts of tissue have different intensities. I want to color those particular pixels according to their corresponding intensities. For ex. all those pixels that have same intensity as that of a pixel that correspond to cancer, then assign all of them with say Cyan color. How can I proceed with that.

Best Answer

You can use overlays:
Or simply make an rgb image
rgbImage = cat(3, grayImage, grayImage, grayImage);
and then assign pixels to the color you want.