avi file creation problem
1 view (last 30 days)
Show older comments
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 Comments
Bill Stanton
on 19 Jul 2012
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
Answers (0)
See Also
Categories
Find more on Animation in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!