Products & Services Solutions Academia Support User Community Company

Learn more about Video and Image Processing Blockset   

Template Matching

Using the Template Matching Block

Template matching is a technique in image processing for finding subregions of an image which match a template image. Template matching applications include manufacturing, robotics, edge, or shape detection and facial recognition. The matching process moves the template image to all possible positions in a larger source image. It computes a numerical metric that indicates how well the template matches the image in that position.

You can use any of the follow metrics for template matching with the Video and Image Processing Blockset:

 Choosing an Output Option

 Input and Output Signal Sizes

 Defining the Region of Interest (ROI)

 Choosing a Match Metric

 Returning the Matrix of Match Metric Values

 Returning the Best Match Location

 Returning the Neighborhood Match Metric around the Best Match

 Choosing a Search Method

 Using the ROIValid and NValid flags for Diagnostics

Video Stabilization

The Estimate Motion Subsystem for Video Stabilization demo implements the Template Matching block. The purpose of the model is to track a license plate of a vehicle while reducing the effect of camera motion from a video stream.

In the first video frame, the model defines the target to track. In this case, it is the back of a car and the license plate. It also establishes a dynamic search region, where the last known target location determines the position.

You can find demos for the Video and Image Processing Blockset by typing vipdemos on the MATLAB command line. You can launch the Video Stabilization model directly by typing vipstabilize on the MATLAB command line.

Panorama Creation

The Motion Estimation Subsystem of the Panorama Creation demo implements the Template Matching block. This model uses the block to estimate the motion between consecutive video frames. Then it computes the motion vector of a particular block in the current frame with respect to the previous frame. The model uses this motion vector to align consecutive frames of the video to form a panoramic picture.

You can find demos for the Video and Image Processing Blockset by typing vipdemos on the MATLAB command line. You can launch the Panorama model directly by typing vippanorama on the MATLAB command line.

  


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