No BSD License  

Highlights from
aviread

5.0

5.0 | 1 rating Rate this file 6 Downloads (last 30 days) File Size: 13.14 KB File ID: #18559

aviread

by Grégory Païs

 

31 Jan 2008 (Updated 01 Feb 2008)

Read avi film into matlab on Windows Platform.

| Watch this File

File Information
Description

Read image frames into matlab from Video (avi) in Windows Platform. Like aviread matlab function. If wmplayer can read your video this function can read too.

Based AVI file reader provided by Microsoft Video for Windows® (VFW)
In visual C++
Header: Declared in Vfw.h
Library: Use Vfw32.lib

-- Depending on your Matlab version, the .mexw32 files may need to be renamed as .dll

-- The library usage is as follows,
mov = aviread(avi_filename, nframes);
image(mov.cdata);

-- recompile the library
I have compiled the code with Visual C++ .net 2003 (ver 7.1)
under matlab tape:

matlab\> mex -setup

Choose your compiler and execute the file mex_cmd.m in archive file for compiling .cpp source files.

MATLAB release MATLAB 7 (R14)
Other requirements VFW codecs
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
22 Feb 2008 dupond gilbert

good and fast

15 Feb 2011 Martin Simonovsky

Great, just what I needed. However, line 97 in AviReadMex should be

AviVideo.GetDataImage( ((unsigned char*)mxGetPr(pMxIm)), iNumFrame-1);

as otherwise the first frame is skipped when using one-based indices from matlab.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
application Grégory Païs 22 Oct 2008 09:45:48
read avi frame Grégory Païs 22 Oct 2008 09:45:48
application ???? 19 Jul 2011 06:58:41

Contact us at files@mathworks.com