| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
Note aviread is not recommended. Use mmreader to read various video file formats, including AVI. |
mov = aviread(filename)
mov = aviread(filename, index)
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 platforms, 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 |
|---|---|---|
Height-by-width-by-3 array of uint8 values | Empty | |
Height-by-width array of uint8 values | m-by-3 array of double values |
aviread supports 8-bit frames, for indexed and grayscale images, 16-bit grayscale images, or 24-bit truecolor images. Note, however, that movie only accepts 8-bit image frames; it does not accept 16-bit grayscale image frames.
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.
avifile, mmfileinfo, mmreader, movie
![]() | aviinfo | axes | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |