出力する画像の解像度を保つ方法
58 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
宗樹 岡本
le 7 Mar 2022
Réponse apportée : Hernia Baby
le 7 Mar 2022
読み込んだ画像をimshow関数やfigureをもちいて画像を出力した時,出力される画像の解像度が処理前のものと比べて下がってしまいます.例えばprint('-r1000')のように解像度を変えるため試行錯誤したのですが,解決することができなかったのでご教授お願いします.
0 commentaires
Réponse acceptée
Hernia Baby
le 7 Mar 2022
imwrite はいかがでしょうか?
-----------------------
グラフで簡単にやりますと以下のようになります。
まずはグラフを作成します
clear,clc;
Fs = 1e3;
t = (0:1/Fs:1)';
A = 5;
f1 = 10;
x = A*sin(2*pi*f1*t);
plot(t,x)
以下でグラフの中身だけpng形式で保存します
F = getframe(gca);
imwrite(F.cdata, 'File.png');
0 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!