User`s guide

2 Importing and Exporting Video
Working with AVI Files
VideoandImageProcessingBlocksetenables you to work with video data
within the Simulink environment. Before you can analyze or operate on your
data, you must import it into your Simulink model. Blocks from the Sources
library, such as the From Multimedia File block, can help you with this type
of task.
This section includes the following topics:
“Importing and Viewing AVI Files” on page 2 -2 -- Use the From Multimedia
File block to import video data into your Simulink model
“Exporting to AVI Files” on page 2-6 -- Use the Write AVI File block to
export video data to an AVI file
“Annotating AVI Files w ith Video Frame Numbers” on page 2-9 Use the
InsertTextblocktoadddescriptivetexttoavideo
“Annotating AVI Files at Two Separate Locations” on page 2-13 Use the
Insert Text block to add text to a video at different locations
“Saving Portions of an AVI File to Separate Files” on page 2-18— Use To
Multimedia File and Enabled Subsystem blocks to save portio ns of one
AVIfiletothreeseparateAVIfiles
Importing and V iewing AVI Files
In this section , you use the From M ultimedia File block to imp ort an AVI file
into y our model a nd the Video Viewer block to view it:
1 Create a new Simulink model, and add to it the blocks shown in the
following table.
Block Library Quantity
From Multi media File Video and Image Processing
Blockset > Sources
1
Video Viewer Video and Image Processing
Blockset > Sinks
1
2-2