2D Target Object Pose Deviation Check
Function
This Step is used to determine whether a target object in an image exhibits pose deviation using 2D template matching. The target object is compared against a reference template based on feature alignment, and specified deviation thresholds are applied to automatically classify the object as OK or NG.
Usage Scenario
This Step is suitable for scenarios where it is necessary to verify whether the placement position or pose of target objects is abnormal.
Input and Output
Input
| Input port | Data type | Description |
|---|---|---|
Image |
Image |
Image of the target object to be checked. |
2D Alignment Parameter Group |
Pose2D |
Used to adjust the ROI’s pose in sync with the target object’s pose changes. |
Output
| Output port | Data type | Description |
|---|---|---|
Deviation Judgment Result |
String |
Pose deviation check result, OK or NG. |
Deviation Check |
Bool |
Used to indicate whether the target object passes the pose deviation check. True indicates pass, and false indicates fail. |
Angle Deviation |
Number |
Angular deviation of the target object relative to the template. |
Center X Offset |
Number |
Offset of the object center point relative to the template center in the X direction. |
Center Y Offset |
Number |
Offset of the object center point relative to the template center in the Y direction. |
Parameter Description
| Parameter | Description |
|---|---|
ROI Setting |
Parameter description: This parameter is used to limit the image processing area. When ROI is not set, the Step processes the entire image.
|
Mask Setting |
Parameter description: This parameter is used to set one or more masks so that image areas covered by the masks are ignored during matching.
|
Template Settings
| Parameter | Description | ||
|---|---|---|---|
Select Template |
Parameter description: This parameter is used to set the matching template. Tuning instructions: Open the Template Editor and edit the template used for matching in this tool. After the template is configured and saved, click ▼ to select the template from the drop-down list. For instructions on using this template editor, refer to 2D Template Editor.
|
Matching Settings
| Parameter | Description | ||
|---|---|---|---|
Edge Polarity Sensitive |
Parameter description: 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.
|
||
Min Matching Score |
Parameter description: This parameter is used to determine whether a matching result is valid. Any result whose score is below this value will be discarded.
|
||
Valid Matching Threshold |
Parameter description: 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.
|
||
Min Valid Match Ratio |
Parameter description: The minimum ratio of valid matched edge points to the total number of edge points in the template.
|
||
Search Radius |
Parameter description: 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 |
Parameter description: This parameter is 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.
|
||
Padding Ratio |
Parameter description: This parameter 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.
Default value: 0% |
Deviation Threshold Settings
| Parameter | Description |
|---|---|
X Offset Low |
Parameter description: The maximum allowed negative offset in the X direction, in px. If the difference between the X coordinate of the target object’s center point and the X coordinate of the template center point is less than this value, the result is judged as NG.
|
X Offset High |
Parameter description: The maximum allowed positive offset in the X direction, in px. If the difference between the X coordinate of the target object’s center point and the X coordinate of the template center point is greater than this value, the result is judged as NG.
|
Y Offset Low |
Parameter description: The maximum allowed negative offset in the Y direction, in px. If the difference between the Y coordinate of the target object’s center point and the Y coordinate of the template center point is less than this value, the result is judged as NG.
|
Y Offset High |
Parameter description: The maximum allowed positive offset in the Y direction, in px. If the difference between the Y coordinate of the target object’s center point and the Y coordinate of the template center point is greater than this value, the result is judged as NG.
|
Angle Low |
Parameter description: The minimum allowed angular deviation, in degrees. If the difference between the target object’s rotation angle and the template angle is less than this value, the result is judged as NG.
|
Angle High |
Parameter description: The maximum allowed angular deviation, in degrees. If the difference between the target object’s rotation angle and the template angle is greater than this value, the result is judged as NG.
|