I have a bitmap image with truecolor, convert it to the grayscale image for some operations. Now I want to convert the grayscale images to the bit map images with true colours, all this in matlab.
1. Use rgb2gray finction to convert RGB image or colormap to grayscale. See the matlab help. Neverthelsee you will lose information when converting grayscale back to rgb.
Other option is to convert the RGB to one of the following color spaces: Lab, or Luv or HSV. Then you can process L or V (call them L' or V') only and keeping the chromatic channels fixed. At the end you convert back from L'uv (or L'ab or V'SH) to RGB.