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!