One way to spot if an object (or part of an object) is to look for a pattern of primitives occurring in a scene.
Template Matching
Template matching is a simple in which instances of prestored patterns are sought in an image.
Template matching has been performed at the pixel level and also on higher level.
Pixel Level Template Matching
Here we seek low level pixel templates. There are 4 approaches:
High Level Template Matching
A problem with pixel based is that although fairly cheap and simple to implement to rotation and translation is a problem. Also images are rarely perfect suffering form blurring, stretched and other distortions and peppered with noise.
E.g. How could low level methods cope with handwritten characters?
High level template matching methods operate on an image that has typically been segmented into regions of interest.
Regions can be described in terms of area, average intensity, rate of change of intensity, curvature and also compared -- bigger than, adjacent to, above, distance between.
Templates are described in relationships between regions. Production rules and other linguistic representations have been used here. Also statistical methods (relaxation based techniques) have been applied to perform the matching.