8 Example Applications
Pattern Matching
Pattern matching can be used to recognize and/or locate specific objects in
an image. It can be accomplished using se veral techniques, one of which is
correlation. C orre lation provides a direct measure of the similarity betwee n
two images. Though sensitive to the scaling or rotation of objects, norm alized
correlation is robust to changes in lighting.
This section includes the following topic:
• “Tracking an Object Using Correlation” on page 8-2-- Use the 2-D
Correlation, 2-D Maximum, and Draw Shapes blocks to track the motion of
an obje ct in a v ideo stream
Tracking an Object Using Correlatio n
In this example, you use the 2-D Correlation, Maximum, and Draw Shapes
blocks to find and indicate the location of a sculpture in each video frame:
1 Create a new Simulink model, and add to it the blocks shown in the
following table.
Block Library Quantity
Read Binary File Video and Image Processing
Blockset > Sources
1
Image Data T
ype
Conversion
VideoandImageProcessing
Blockset > Conversions
1
Image From File Video and Image Pro cessin g
Blockset > Sources
1
2-D Correlation Video and Image Processing
Blockset > Statistics
1
Maximum
VideoandImageProcessing
Blockset > Statistics
1
Draw Shapes Video and Image Pro cessing
Blockset > Text & Graphics
1
8-2
Comments to this Manuals