Surface Matching
Description
This Step is used to search for and locate the features that match the template in the 2D image, compute object poses, and provide data for subsequent steps that require synchronized 2D pose transformation. Support multi-object locating and recognition.
Workflow
The process of configuring this Step is shown below:
-
Configure the input. Connect the ports manually or select the input(s) under Input in the parameter configuration panel.
-
Make and select a template. For more information on how to make a template, refer to 2D Template Editor.
-
Determine whether to enable Use Intensity Image and Use Feature Region based on the actual scenario.
-
Set Matching Settings.
-
Select the Output under Output.
-
Run the Step and view output.
Input Description
| Input Item | Description | ||
|---|---|---|---|
Surface Data |
Surface data used to match the template. |
||
Alignment Parameter Group |
Adjust the pose of the feature region synchronously based on the pose transformation of the target object.
|
Parameter Description
| Parameter | Description |
|---|---|
Use Intensity Image |
Specifies whether to use the intensity image for template matching. If this option is selected, the intensity image must be used when creating the template; otherwise, matching will fail. It is not checked by default. When this option is not selected, the Step will use the depth map from the surface data for matching. |
Use Feature Region |
This Step restricts the matching algorithm to execute only within the specified feature regions, thereby increasing matching speed and reducing false matches. For more information on how to configure and adjust the feature region(s), see Feature Region. If an Alignment Parameter Group is input, the position and angle of the feature region can be adjusted simultaneously based on the pose change of the target object. |
Template Settings
| Parameter | Description | ||
|---|---|---|---|
Select a Template |
This parameter is used to specify the matching template. Click Open the editor to open 2D template editor, where you can edit the template for alignment. After specifying and saving the template, click ▼ and select the template in the drop-down menu. For instructions on how to use the editor, refer to 2D Template Editor.
|
Matching Settings
Frequently Used Parameters
| Parameter | Description |
|---|---|
Edge polarity sensitive |
This parameter controls whether edge polarity must match the template. The polarity indicates the direction of intensity changes along the edges, e.g., light-to-dark or dark-to-light. If there is not a large disparity in the data acquisition scenarios, enable this option to ensure matching accuracy. If there is a large disparity, disable this option to enhance the matching generalization ability. It is enabled by default. |
Max number of matching results |
Specifies the maximum number of matching results to be output. Only the top N matching results with the highest scores are kept (where N is the value of this parameter). If fewer than N matches are found, all are output. Default value: 1 |
Min matching score |
This parameter is used to determine whether a matching result is valid. Any result whose score is below this value will be discarded. Default value: 50.0 |
Advanced Parameters
| Parameter | Description | ||
|---|---|---|---|
Valid Matching Threshold |
In the target image, points with gradient magnitudes greater than or equal to this threshold are considered valid edge points and participate in matching score calculation. Default value: 10 |
||
Min Valid Match Ratio |
The minimum ratio of valid matched edge points to the total number of edge points in the template. Default value: 50% |
||
Search Radius |
The radius of the circular search area for finding corresponding matching points of each template feature point in the target image during pose refinement. Default value: 8
|
||
Max Overlap Ratio |
Used to filter out duplicate matching results. If there is an overlap between two matching results and the overlap ratio exceeds this value, only the result with the higher matching score will be retained. Default value: 50% |
||
Padding Ratio |
Specifies the ratio of allowed padded size to template size when the target object may be partially outside the image. Padding can recover edge matches that would otherwise fail, but generally increases computation.
|
Output Description
Select the output item(s) to add the output port(s) to the Step, and the corresponding data will be output after the Step is run. You can select the output according to the actual measurement requirements.
|
If you select an expandable output item, you must expand it by clicking ▶, and then set the Lower Limit and Upper Limit values to determine the acceptable range. If the output value falls within the acceptable range, the measurement item is judged as passing (OK), or else it is judged as failing (NG). |
| Output Item | Description | ||
|---|---|---|---|
Scale Ratio |
The scale of the matched object relative to the template. |
||
Matching Score |
Used to evaluate the match quality. |
||
Match Count |
The number of matching results. |
||
Alignment Parameter Group |
The translation and rotation parameters required to align matched objects with the template.
|
Troubleshooting
See Error Code List for common error messages and solutions.