why doesn't the 'getframe' work?
1 回表示 (過去 30 日間)
古いコメントを表示
c_H=figure; H_axes=axes('parent', c_H); Z= hadamard(20); figure(c_H) % pause(1) pcolor(Z) pause(1) f = getframe(H_axes); figure,image(f.cdata)
I am confused,the last picture is nothing.But if I comment the figure(c_H),the code is right. I appreciate who can tell me why.
0 件のコメント
採用された回答
Friedrich
2011 年 12 月 19 日
Hi,
seems like an openGL issue. Changing the renderer to painters or zbuffer or opengl software works:
c_H=figure;
H_axes=axes('parent',c_H);
Z= hadamard(20);
figure(c_H)
pcolor(Z)
%set(c_H,'Renderer','painters') %or
%opengl software %or
set(c_H,'renderer','zbuffer')
pause(1)
f = getframe(H_axes);
figure,image(f.cdata)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Graphics Performance についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!