7.3.1   Introducing the Matching Assistant of HDevelop

The Matching Assistant of HDevelop is a front-end to HALCON's powerful matching methods:

For basic information on these matching methods and how to choose a suitable method for your application, please refer to the section Select a Matching Method or for more detailed information refer to the Solution Guide on Matching.

These matching methods that are available within the Matching Assistant let you locate objects with subpixel accuracy at a high speed, even when they appear rotated, partly occluded, or under changing illumination. Using the Matching Assistant you can

All you need is a single model image and a set of test images. The Matching Assistant further assists you by automatically calculating suitable parameter values based on your selections.

How to use the Matching Assistant is described here.

A reference to the elements of the Matching Assistant can be found here.

In this online help, the following special terms are used:

Matching
Matching is the process of locating an object described by a model in an image. The results of the matching process are the position and orientation of the object and the matching score.

Alignment
This method can be applied to transform the position of the matched object corresponding to the reference image. Alignment is useful if the following image processing step is not invariant against rotation or translation, like OCR or the variation model. Note that by alignment the matched object is only rotated and translated. To remove perspective or lens distortions, e.g., if the camera observes the scene under an inclined angle, you must rectify the image first. The matching assistant allows you to generate code for an affine transformation which can subsequently be used for alignment with the Measure Assistant. Alignment is useful for all further processes that rely on fixed ROIs, like measuring and OCR.

Model
In order to locate an object, you must provide the Matching Assistant with an example image of the object. From this, the Matching Assistant then creates the so-called model, an internal representation of the object containing only the information characterizing the object. This representation is then used when searching for the object in the test images. You can also provide the Matching Assistant with a model in DXF format (or in the HALCON formats SHM, NCM, DSM or DFM).

Model Image
This is the image containing your example of the object to be searched for. This image should be a characteristic image of the object, i.e., the object should appear in its default position and orientation and not be occluded; furthermore, the image should not contain clutter. You can load this image via the menu item File ▹ Load Model Image.

Reference Image
If a reference image is selected, the position of the match in this image is used as reference. This is necessary to perform alignment. If no reference image is chosen, the model image will be used as basis for alignment.

Model Region of Interest (ROI)
This is the region in the model image which contains the object to be trained. You can select this region via the menu item ROI.

Rectification
This method can be applied to the search image to transform it such that the found model and the model in the reference image appear as similar as possible. Rectfying an image is useful for all further processes that rely on fixed ROIs, like measuring and OCR.

Test Image
You can test the performance of the matching process by providing test images via the menu item Usage ▹ Test Images ▹ Load Test Images. These images should be representative images from your matching application, i.e., the object should appear in all allowed variations of its position, orientation, occlusion, and illumination.

Score
When comparing a detected match in a test image with the model, the Matching Assistant calculates a measure of similarity, the so-called score, which ranges between 0 (no similarity) and 1 (perfect similarity).