Figure に表示された内容を画​像データとして取得す​るにはどうすればよい​ですか?

3 Ansichten (letzte 30 Tage)
MathWorks Support Team
MathWorks Support Team am 4 Sep. 2018
下記のように、Figure 上にグラフィックスを表示しています。
mesh(peaks(50));
ここで、Figure に表示されているグラフィックスを行列(データ)として取得する方法を教えてください。

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 4 Sep. 2018
MATLAB の getframe 関数と frame2im 関数を使って行うことができます。
F = getframe(gcf); % フレームとして取得
[X,map] = frame2im(F); % イメージデータに変換
なお、フレーム(F)がトゥルーカラーを含む場合には、map は空となります。

Weitere Antworten (0)

Kategorien

Mehr zu 印刷と保存 finden Sie in Help Center und File Exchange

Tags

Noch keine Tags eingegeben.

Produkte


Version

R2008a

Community Treasure Hunt

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

Start Hunting!