How to save a figures "color"??
이전 댓글 표시
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개)
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
David
2015년 6월 25일
I just realized I might have misunderstood your question: is it the black/white image you want to have saved?
Nisreen Sulayman
2015년 6월 25일
Image Analyst
2015년 6월 25일
Looks like it was somehow quantized before you saved it. Just don't do that.
카테고리
도움말 센터 및 File Exchange에서 Image Arithmetic에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
