Products & Services Solutions Academia Support User Community Company

Learn more about Video and Image Processing Blockset   

Read AVI File (Obsolete) - Read uncompressed video frames from AVI file

Library

vipobslib

Description

The Read AVI File block reads video frames from an uncompressed AVI file and import them into a Simulink model. You can view the video frames using a To Video Display block or Video Viewer block. This block does not support audio samples. Also, this block is supported for simulation only. It produces an error during Real-Time Workshop code generation.

The output ports of the Read AVI File block change according the content of the AVI file. If the file contains RGB video frames, the R, G, and B ports appear on the block. If the file contains intensity video frames, the I port appears on the block.

PortOutputSupported Data TypesComplex Values Supported

I

Scalar, vector, or matrix of intensity values

  • Double-precision floating point

  • Single-precision floating point

  • 8-, 16- 32-bit signed integer

  • 8-, 16- 32-bit unsigned integer

No

R, G, B

Scalar, vector, or matrix that represents one plane of the RGB video stream. Outputs from the R, G, or B ports have the same dimensions.

Same as I port

No

EOF

Scalar value

Boolean

No

Use the File name parameter to specify the name of the AVI file from which to read. If the location of this file is on your MATLAB path, enter the filename. If the location of this file is not on your MATLAB path, use the Browse button to specify the full path to the file as well as the filename.

If filename.avi has a colormap associated with it, the AVI file must satisfy the following conditions or the block produces an error:

Use the Video output data type parameter to set the data type of the values output from the block. You can choose double, single, int8, uint8, int16, uint16, int32, uint32, and Inherit from file. If you choose double or single, the block scales the input pixels values and outputs values between 0 and 1. If you choose int8, uint8, int16, uint16, int32, or uint32, the blocks scales the input pixel values and outputs values between the minimum and maximum values supported by the chosen data type. If you choose Inherit from file, the block does not scale the input pixel values.

Use the Number of times to play file parameter to enter the number of times to play the file. The number you enter must be a positive integer or inf, to play the file until you stop the simulation.

Use the Output end-of-file indicator parameter to determine when the last video frame in the AVI file is output from the block. When you select this check box, a Boolean output port labeled EOF appears on the block. The output from the EOF port is 1 when the last video frame is output from the block. Otherwise, the output from the EOF port is 0.

Dialog Box

The Read AVI File dialog box appears as shown in the following figure.

File name

Specify the name of the AVI file from which to read.

Video output data type

Set the data type of the video data output from the block.

Number of times to play file

Enter a positive integer or inf to represent the number of times to play the file.

Output end-of-file indicator

Use this check box to determine whether the output is the last video frame in the AVI file.

See Also

From Multimedia File

Video and Image Processing Blockset software

Image From File

Video and Image Processing Blockset software

Image From Workspace

Video and Image Processing Blockset software

To Multimedia File

Signal Processing Blocksetsoftware

To Video Display

Video and Image Processing Blockset software

Video From Workspace

Video and Image Processing Blockset software

Video Viewer

Video and Image Processing Blockset software

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS