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

1 Ansicht (letzte 30 Tage)
Chris
Chris am 7 Mär. 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

Akzeptierte Antwort

Jan
Jan am 7 Mär. 2013
Bearbeitet: Jan am 7 Mär. 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 Kommentar
Chris
Chris am 8 Mär. 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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Graphics Performance finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by