No BSD License  

Highlights from
aviwrite

5.0

5.0 | 1 rating Rate this file 19 Downloads (last 30 days) File Size: 40.45 KB File ID: #280

aviwrite

by Michael Vick

 

27 Jun 2000

Create an .avi animation on Windows computers from within MATLAB.

| Watch this File

File Information
Description

This archive contains routines that can be used to create an .avi animation on Windows computers from within MATLAB.

'getindexedframe.m' is used in a manner identical to that of MATLAB's 'getframe' function. It grabs an image from the current figure or from a user-specified figure or axis, and encodes the image using a color table. This saves memory compared to getframe's truecolor RGB format, but limits the maximum number of colors to 256.

After recording a vector of indexed images using getindexedframe, the movie can be written to an .avi-format Windows animation file using 'aviwrite.m'.

After downloading this archive in the directory of your choice, you may use 'sinewavemovie.m' to test the functionality of getindexedframe, aviwrite, and the dynamic-link library (.dll) files they call.

This routine has been tested under MATLAB 5.3, but it is known to return an error when called from MATLAB 5.2 and previous versions. Also, if aviwrite generates movies successfully but they come out garbled, try rightclicking on the Windows desktop and setting the Color Palette to any number of colors except 'True Color'. After generating your .avi movies, you can switch back to True Color and the files should still be viewable. (Thanks to Koljonen Emmi of the Tampere University of Technology in Finland for discovering this workaround.)

MATLAB release MATLAB 5.3 (R11)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
13 Aug 2002 sebastopol pauli

compact and quick. getindexedframe is only
a bit slow than getframe.

21 Sep 2004 Hashem Tamimi

it did not work with matlab7:
>> sinewavemovie
Unable to load mex file: C:\Programme\MATLAB7\work\aviwrite\my_uint8.dll.
Das angegebene Modul wurde nicht gefunden.

??? Invalid MEX-file 'C:\Programme\MATLAB7\work\aviwrite\my_uint8.dll': Das angegebene Modul wurde nicht gefunden.

.

Error in ==> getindexedframe at 40
Frame = my_struct('cdata',my_uint8((F(M:-1:1,:))'),'colormap',my_uint8(NewMap(3:-1:1,:)));

Error in ==> sinewavemovie at 7
   M(i)=getindexedframe;

09 Nov 2004 BOUMARAF HANI

comment faire l'axe d'un programme c a partire du matlab (avec dll)je veut un exemple pour bien comprendre

21 Oct 2009 Gordon Judd

can you add the my_unit8.dll file to your zip package?
I am using Matlab 7 (R14) and get the same error as noted on 21 Sept. 2004

Thank you.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
graphics import Michael Vick 22 Oct 2008 06:35:23
graphics export Michael Vick 22 Oct 2008 06:35:23
avi animation Michael Vick 22 Oct 2008 06:35:23
utilities Michael Vick 22 Oct 2008 06:35:23

Contact us at files@mathworks.com