Assigning color to gray image

65 ビュー (過去 30 日間)
Karina
Karina 2014 年 4 月 21 日
コメント済み: Karina 2014 年 6 月 16 日
I have a gray image (it's a flame) like the image below and I want to get something like the next image. I think I need to apply color and contour maps. But I don't know how to apply them. Thank you.

採用された回答

Image Analyst
Image Analyst 2014 年 4 月 21 日
I'd just use colormap and not mess with contours unless you know what you're doing and what you want. To pseudocolor a grayscale image an leave it as grayscale but display it as colored:
imshow(grayImage);
colormap(jet(256));
colorbar;
To convert a grayscale image into a true color RGB image and display the RGB image instead of the pseudocolored image:
rgbImage = ind2rgb(grayImage, jet(256));
imshow(rgbImage);
You don't use color bars with RGB images.
  1 件のコメント
Karina
Karina 2014 年 6 月 16 日
Thank you. That was the answer I was looking for.

サインインしてコメントする。

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2014 年 4 月 21 日
contourf(YourImageMatrix);
colormap(hot)
  1 件のコメント
Karina
Karina 2014 年 6 月 16 日
Thank you.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeModify Image Colors についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by