Chapter5 MachineVision
©NationalInstruments Corporation 5-13 IMAQVision for LabWindows/CVI User Manual
Finding Points Using Pattern MatchingThe pattern matching algorithms in IMAQVision measure the similarity
betweenan idealized representation of a feature, called a template, and the
feature thatmay be present in an image. A feature is defined as a specific
pattern of pixelsin an i mage. Patternmatch ingr eturns the location of the
center of the template and the template orientation. Follow these
generalized stepsto find f eaturesin an image using pattern matching:
1. Definea reference or fiducial pattern in the form of a template image.
2. Usethe refer ence pattern to train the pattern matching algorithm with
imaqLearnPattern().
3. Definean image or an area of an image as the search area. A small
search area reducesthe timeto find the features.
4. Sett he tolerances and parametersto specify how the algorithm
operates atr un time using the options parameter of
imaqMatchPattern().
5. Testthe search algorithm on test images using
imaqMatchPattern().
6. Verifythe results using a ranking method.
Defining and Create Good TemplateImagesThe selection of a good template image plays a critical part in obtaining
good results.Because the template image represents the pattern that you
wantto find, make sure that all the important and unique characteristics of
the pattern are well defined in the image.
Severalfactors are critical in creating a template image. These critical
factorsinc lude symmetry,feature detail, positional information, and
background information.
Symmetry
A rotationally symmetric template is less sensitive to changes in rotation
thanone that is rotationally asymmetric. A rotationallysymmetric template
provides good positioning information but no orientation information.