MATLAB Function Reference Previous page   Next Page
aviread

Read Audio/Video Interleaved (AVI) file

Syntax

Description

mov = aviread(filename) reads the AVI movie filename into the MATLAB movie structure mov. If filename does not include an extension, then .avi is used. Use the movie function to view the movie mov. On UNIX, filename must be an uncompressed AVI file.

mov has two fields, cdata and colormap. The content of these fields varies depending on the type of image.

Image Type
cdata Field
colormap Field
Truecolor
Height-by-width-by-3 array
Empty
Indexed
Height-by-width array
m-by-3 array

The supported frame types are 8-bit, for indexed or grayscale images, 16-bit, for grayscale images, or 24-bit, for truecolor.

mov = aviread(filename,index) reads only the frames specified by index. index can be a single index or an array of indices into the video stream. In AVI files, the first frame has the index value 1, the second frame has the index value 2, and so on.

See also

aviinfo, avifile, movie


Previous page  aviinfo axes Next page

© 1994-2005 The MathWorks, Inc.