Matlab如何保存被plot的图像

来源:互联网 发布:nginx 图片服务器搭建 编辑:程序博客网 时间:2024/06/05 11:26

方法一:

可以通过将imshow函数属性”Border’的值设置为’tight’,而imshow的默认值为’loose’,然后通过figure1-文件-另存为的方式将图片进行保存:

imshow(img,'Border','tight');

这里写图片描述

方法二:

imshow(img,'Border','tight');set(gcf,'color','white','paperpositionmode','auto');saveas(gcf,'exprimentLightBundles.eps','psc2');%或者imshow(img,'Border','tight');set(gcf,'color','white','paperpositionmode','auto');saveas(gcf,'example','bmp');%png等等
0 0