画像を余白なく保存したい
38 views (last 30 days)
Show older comments
kamaboko_tarou
on 24 Jan 2024
Commented: Hiroshi Iwamura
on 27 Jan 2024
画像の保存の仕方についての質問です。
正方形となるように目盛りを設定した下の画像をファイル>名前を付けて画像を保存>fig1.pngと保存すると、保存された画像には余分な余白が付けたされてあります。正方形のまま保存する方法を教えていただきたいです。
0 Comments
Accepted Answer
Hiroshi Iwamura
on 24 Jan 2024
ax=gca;
exportgraphics(ax,'image.png')
でできると思います。
解像度も指定できます。
exportgraphics(ax,'image2.png','Resolution',90)
2 Comments
Hiroshi Iwamura
on 27 Jan 2024
座標軸をどのように作ってますか?
t=0:pi/50:2*pi;
plot(sin(t),cos(t))
axis equal
ax=gca;
exportgraphics(ax,'image.png')
I=imread('image.png');
imshow(I)
More Answers (0)
See Also
Categories
Find more on 幾何学的変換とイメージ レジストレーション in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!