Change color of a image according to pixel value. PLEASE HELP.
2 次查看(过去 30 天)
显示 更早的评论
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/149965/image.bmp)
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.
0 个评论
采纳的回答
Image Analyst
2013-9-22
Do something like
rgbImage = ind2rgb(grayImage, jet(256));
4 个评论
Image Analyst
2013-9-22
That is the full code. There is nothing more. jet(256) is a colormap. A color map is a pseudocolor lookup table that gives an output RGB color for every graylevel input value. ind2rgb applies that pseudocolor lookup table to the gray image and gives the RGB image as the output. Read carefully what I said and ask if there's anything you don't understand.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Red 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!