Why do I receive an error when using the ADDFRAME function in MATLAB 6.5 (R13)?
Show older comments
I am making an AVI file of a rotating image. When I use the following code to rotate my axes and capture frames:
% create an AVI object
aviobj = avifile('myAVI.avi');
% create peaks plot
surf(peaks(30))
% freezes aspect ratio properties to enable rotation
% and turn off all axis lines, tick marks, and labels
axis vis3d off;
for i = 1:30
% rotate view
view(-90-i,18);
% get frame
F = getframe;
% add frame F to aviobj
aviobj = addframe(aviobj,F);
end
% close aviobj
aviobj = close(aviobj);
I receive the following error:
??? Error using ==> avifile/addframe (ValidateFrame)
Frame must be 224 by 280.
Accepted Answer
More Answers (0)
Categories
Find more on vSLAM 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!