Problem using 'getframe' and 'movie' with larger data sets

1 次查看(过去 30 天)
When I use the following code and I have 'data_size' set to 10 it works fine. That is I can use 'movie' to replay the frames caputered using 'getframe' without a problem. However when I increase the value of 'data_size' to 100 I run in to a problem. When I use 'movie' on the captured frames I get a blank (black) figure!
I have tried all sorts of things, including going back to a single monitor, and explicitly specifying the 'position' of the figure used by 'getframe' and 'movie'. Any suggestions as to what is happening here?
data_size = 10;
figure1 = figure; hold off;
u = repmat([1:1:10]',data_size,10); v = u*2;
for qq = 1:10 subplot1 = subplot(1,2,1,'Parent',figure1); surf(u(qq:qq+data_size,:),'Parent',subplot1,'LineStyle','none'); subplot2 = subplot(1,2,2,'Parent',figure1); surf(v(qq:qq+data_size,:),'Parent',subplot2,'LineStyle','none'); mymovie(qq) = getframe(figure1);
end

采纳的回答

Jan
Jan 2013-3-7
编辑:Jan 2013-3-7
Try to insert a drawnow before getframe().
Another idea: Set the renderer to Painters or ZBuffer, because the OpenGL renderer can have many different problems. If this helps, but you want the OpenGL renderer, update the graphic drives and try:
opengl software
  1 个评论
Chris
Chris 2013-3-8
Give the man a cigar. The 'Drawnow' suggestion didn't work, but the Renderer suggestion did. I put the following commands in after the 'figure1= figure' command.
set(figure1,'RendererMode','manual','Renderer','zbuffer')
I also tried using the 'painters' option, but it is quite a bit slower.
Thanks again Jan, you saved me many hours.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Graphics Performance 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by