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

2 visualizaciones (últimos 30 días)
MathWorks Support Team
MathWorks Support Team el 4 de Sept. de 2018
Respondida: MathWorks Support Team el 19 de Dic. de 2018
下記のように、Figure 上にグラフィックスを表示しています。
mesh(peaks(50));
ここで、Figure に表示されているグラフィックスを行列(データ)として取得する方法を教えてください。

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre 印刷と保存 en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Productos


Versión

R2008a

Community Treasure Hunt

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

Start Hunting!