How to save a figures "color"??

1 回表示 (過去 30 日間)
Nisreen Sulayman
Nisreen Sulayman 2015 年 6 月 25 日
コメント済み: Image Analyst 2015 年 6 月 25 日
I have opened 180 figure during some operation.
After closing all the figures, I opened a new one and tried to save it.... But it didn't save it in a correct way.
attached image the a sample.
How to restore defult setting for MatLab??
  1 件のコメント
Nisreen Sulayman
Nisreen Sulayman 2015 年 6 月 25 日
This is the image to be saved

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

回答 (1 件)

David
David 2015 年 6 月 25 日
From an old similar question (see http://www.mathworks.com/matlabcentral/newsreader/view_thread/83267), getframe is perhaps the most simple way to save a colorbased image by e.g.:
imID=imread('image.tif');
imagesc(imID);
axis image;
colormap('jet');
set(gca,'CLim',[0 255]); %Important!
im=getframe;
image(im.cdata);
imwrite(im.cdata,'nice_image.tif');
Note that you use the command (see "%Important" above)
set(gca,'CLim',[lower upper]);
to set your color limits (lower and upper respectively).
  3 件のコメント
Nisreen Sulayman
Nisreen Sulayman 2015 年 6 月 25 日
image in the comment is the image to be saved ... I used imwrite to save the image ... but the result was as in the question
Image Analyst
Image Analyst 2015 年 6 月 25 日
Looks like it was somehow quantized before you saved it. Just don't do that.

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

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by