필터 지우기
필터 지우기

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

조회 수: 3 (최근 30일)
Chris
Chris 2013년 3월 7일
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