MATLAB: Change color of a image according to pixel value. PLEASE HELP.

colormap

I want to change gray image to RGB according to pixel values. I mean, the pixel which are having higher values will be changed to red color and pixel
which are having lower values will be changed to bluish color. Mainly I am doing a project in which I want to change a thermal gray image to a image having temperature related image like hotter part having red color and colder part will be having blue color. PLEASE HELP ME. THANKS IN ADVANCE.

Best Answer

Do something like
rgbImage = ind2rgb(grayImage, jet(256));
Related Question