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

1 vue (au cours des 30 derniers jours)
Chris
Chris le 7 Mar 2013
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

Réponse acceptée

Jan
Jan le 7 Mar 2013
Modifié(e) : Jan le 7 Mar 2013
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 commentaire
Chris
Chris le 8 Mar 2013
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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Graphics Performance dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by