avi file creation problem

1 Ansicht (letzte 30 Tage)
Maciej
Maciej am 12 Jul. 2012
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 Kommentare
Maciej
Maciej am 12 Jul. 2012
anybody?
Bill Stanton
Bill Stanton am 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

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Animation finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by