How to add colormap on an image?
조회 수: 59 (최근 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에서 Red에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!