avi file creation problem

1 次查看(过去 30 天)
Maciej
Maciej 2012-7-12
I would like to create avi file with 3D simple animation. To do this, I am using getframe and addframe functions. The problem is the generated avi file in Media Player is motionless. I would be really appreciate for any comments.
My code:
aviobj = avifile('3Danim.avi','compression','None');
aviobj.quality = 100;
fig = figure;
plot3D % script ploting 3d figure
axis vis3d
numOfFrame = 360;
for d = 1:numOfFrame
camorbit(1,0,'data',[0 0 1])
Frame = getframe(fig);
aviobj = addframe(aviobj,Frame);
end
close(fig);
aviobj = close(aviobj);
My software: Windows 7, matlabR2011a
Regards, Maciek
  2 个评论
Bill Stanton
Bill Stanton 2012-7-19
I have the same problem. I want to create a movie of moving the camera around a 3D surface plot. The resulting movie shows the surface plot moving side to side rather than rotating around it.
for i = 1:1:45
camorbit(1,0);
pause(0.1);
M(i) = getframe;
end;
I am using R2011b (64bit) on Windows 7.
Thanks in advance for any insight. --bjs

请先登录,再进行评论。

回答(0 个)

类别

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

产品

Community Treasure Hunt

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

Start Hunting!

Translated by