User`s guide

Working with AVI Files
5 Click-and-drag the Frame Counter block from the demo model into your
model. This block counts the number of frames in an input video.
6 Use the Insert Text block to annotate the video stream w ith a running
framecount. Settheblockparametersasfollows:
Main pane, Text =
['Frame count' sprintf ('\n ') ' Sou rce frame:
%d']
Main pa ne, Location = [85 2]
Main pane, Color value = 1
Font pane, Font face = LucindaT ypew riterRegular
By setting the Text parameter to ['Fram e c ount ' sprintf('\n')
'Source frame: %d']
, you are as king the block to print Fra me count on
one line and the
Source frame: on a new line. Because you specified %d,
an ANSI C printf-style format specification, the Variables port appears on
the block. The block takes the port input (it is expecting a decimal) and
substitutes it for the
%d in the string. You used the Location parameter to
specifywheretoprintthetext. Inthiscase,thelocationis85rowsdown
and 2 rows over from the top left corner of the image.
7 Use t he Video Viewer blocks to view t he original and annotated videos.
Accept the default parameters.
8 Connect the blocks as shown in the following figure.
2-11