MATLAB: How to convert a gray scale absorption image of interference patterns to RGB.

digital image processingimage processing

Hey, I have a gray scale absorption image of interference patterns. I want to conver it to RGB. I tried different mathods but didn't work of any. I alredy used gray2ind, ind2rgb, cat() function and like others image processing tool but none of them work for me. The gray image and RGB is attached bellow.

Best Answer

Convert it to RGB (3 color planes) like this:
rgbImage = cat(3, grayImage, grayImage, grayImage);
Now it's "color" but still gray scale because all the color channels are identical. If you want a red spot over some part of the image, then you have to say whether you just want
  1. to pseudocolor the gray scale image with a colormap,
  2. segment the gray scale image to get a binary image of the spot location and then overlay it into the graphic overlay, or if you want
  3. to "burn" the spot into the RGB image.
Related Question