The following procedure provides a basic methodology for using the ModelFinder step:
Optionally, adjust the ModelFinder step settings to control the search algorithm's speed and thoroughness.
Optionally, adjust the Advanced search settings specific to the ModelFinder step to further control the image data that you will search.
Run the project to the ModelFinder step to ensure your project works correctly.
To specifically search for line segments or circular, elliptical, or rectangular shapes in your image, use the SegmentFinder, CircleFinder, EllipseFinder, or RectangleFinder step, respectively.
To define models, perform the following:
Click on the Add
image model ()
toolbar button in the
Project toolbar.
On the image, click the 2 opposite corners of the rectangular region that best surrounds your model. To cancel what you have done, press the Escape key before the last click.
To apply the same setting to multiple models at once, use the Apply multiple dialog, accessible from the setting's Alternate options button.
To delete a model, select it from the Configuration pane and press the Delete key.
Use the Configuration pane to view your models and ensure that you defined them correctly.
You can add models from DXF files using the Add DXF model
()
toolbar button.
Matrox Design Assistant supports version 14 2D DXF files. Not every entity in a DXF file is supported; unsupported entities are ignored. The supported entities are Line, Polyline, Lwpolyline, Circle, Arc, Ellipse, Block (a collection of entities), and Insert (an entity containing a reference to where the Block should be drawn, and at what location and scale).
Note that you cannot specify a polarity for a DXF model.
When the model is added from a DXF file, the model will retain its coordinate system (the origin and the axes). Most DXF files are oriented so that the Y-axis is increasing upwards; whereas, the coordinate system Matrox Design Assistant uses is oriented so that the Y-axis is increasing downwards. Therefore, the imaged model will look flipped when compared to the original model. This means that, unless the model is symmetrical, the match will not be made. To avoid this, verify that the Vertical axis input is set appropriately (Flip, No Flip, Default). The default value is Flip.
You can configure the DXF model's reference point when adding the model, or edit the reference point at runtime using the Reconfigure step. A runtime editable annotation is available to allow setting the reference point interactively.
By default, synthetic models are defined to have a 10% margin around the bounding box of their edges. When finding an occurrence, extra edges found in this area will reduce the target score. You can change the size of the margin by setting the Box margin input in the Properties pane. Note also that a synthetic model composed of connected lines, rather than separated line segments, will give more successful results.
For synthetic models, you can specify the Pixel Scale of the model, which is the ratio between pixel units and model (real-world) units. The Pixel Scale input value corresponds to the number of pixels required to represent 1 real-world unit in the DXF model. For example, if 10 pixels represent a distance of 5 mm, the Pixel Scale is 2.0.
When searching for a calibrated model in a calibrated target image, the Pixel Scale only affects the display and draw operations, but not the match nor the returned results. If, after adding a calibrated DXF model, the model's thumbnail image is not what you expect, check the Pixel Scale. The default Pixel Scale for a calibrated model is 1.0/(pixel size in X of the associated camera calibration). In most cases, leave the Pixel Scale at the Default setting for calibrated models.
For an uncalibrated model, you must set a Pixel Scale if the default value of 1.0 is not accurate. In the case of a search for an uncalibrated model in an uncalibrated target image, the Pixel Scale is used for the match.
When searching for synthetic models, if your target image is calibrated, the DXF model must be calibrated. Similarly, if the target image is uncalibrated, the DXF model must be uncalibrated.
The ModelFinder step settings control search speed and thoroughness. To change the default ModelFinder step settings, perform one or more of the following:
Set the Total number of occurrences of all models and the Number of occurrences of each specific model. Use these to specify the maximum total and maximum model-specific number of occurrences to search for, respectively. Setting the Total number of occurrences or Number to All can slow down the search; if possible, specify a value.
Note that you cannot attain the maximum Number of occurrences of a specific model if the Total number of occurrences set for all models is reached first.
Set the Speed. Use this to specify the algorithm's search speed. Increasing the search speed can decrease the search time, but can also decrease the robustness and sub-pixel accuracy of the search.
Set the Accuracy. Use this to specify the accuracy with which to find occurrences. The precision achieved depends on the quality of the image. The search speed setting slightly affects the accuracy. A lower Accuracy setting can speed up the search.
Optionally, adjust the Search settings available for all Finder steps to control edge extraction and the definition and identification of a match.