How to add colormap on an image?
45 ビュー (過去 30 日間)
古いコメントを表示
Add colormap on a .png/.jpeg image.
1 件のコメント
Rik
2021 年 12 月 7 日
A colormap only has meaning for indexed images. Are your image actually indexed? And what have you tried?
回答 (2 件)
Constantino Carlos Reyes-Aldasoro
2021 年 12 月 7 日
I guess that this is a 2 step question, you want to add a colormap and then export as a png or jpeg, try the following, read an image, display and change colormap
a=imread('moon.tif');
imagesc(a)
colormap(autumn)
Now you can export as any format you want:
print('-dpng','-r100','myImage.png')
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Colormaps についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!