2D Target Object Pose Deviation Inspection
Function Description
This step inspects pose deviations of workpieces in images through 2D template matching. By comparing workpiece features with templates, it calculates positional offsets and angle deviations of workpieces relative to templates, and automatically determines whether workpiece placement position or orientation is abnormal based on configured deviation thresholds.
Usage Scenario
This step is suitable for scenarios where abnormal workpiece placement position or orientation needs to be detected.
Input and Output
Input
| Input Port | Data Type | Description |
|---|---|---|
Image |
Image |
Workpiece image to be inspected. |
2D Alignment Parameter Group |
Pose2D |
Synchronously adjusts pose of target region according to pose transformation of target objects. |
Output
| Output Port | Data Type | Description |
|---|---|---|
Deviation Judgment Result |
String |
Deviation judgment result, OK or NG. |
Deviation Check |
Bool |
Indicates whether workpieces pass deviation inspection. |
Angle Deviation |
Number |
Rotation-angle deviation of workpieces relative to template. |
Center Point X Offset |
Number |
X-direction offset of workpiece center relative to template center. |
Center Point Y Offset |
Number |
Y-direction offset of workpiece center relative to template center. |
Parameter Description
| Parameter | Description |
|---|---|
ROI Settings |
Description: Used to limit image-processing area. If ROI is not set, the step processes the entire image. Adjustment instruction: After clicking the icon, drag with the left mouse button in data-visualization area to draw an ROI of corresponding shape. |
Mask Settings |
Description: Used to set one or multiple masks so image regions covered by masks are ignored during matching. Adjustment instruction: After clicking the icon, add anchor points by left-clicking in data-visualization area to draw polygon masks. |
Template Settings
| Parameter | Description | ||
|---|---|---|---|
Select Template |
Description: Used to set matching template. Adjustment instruction: Open template editor and edit templates used for matching in this tool. After configuration is completed and template is saved, click ▼ and select a template from drop-down menu. For usage of this editor, refer to 2D Matching Template Editor.
|
Matching Settings
| Parameter | Description | ||
|---|---|---|---|
Edge Polarity Sensitive |
Description: Controls whether edge polarity must match the template during matching. Polarity indicates grayscale transition direction at edges, such as bright-to-dark or dark-to-bright. Default value: Enabled. Adjustment instruction: If data-acquisition conditions are consistent, enable this option to ensure matching accuracy; if differences are large, disable it to improve matching generalization. |
||
Minimum Matching Score |
Description: Used to determine whether matching results are valid. Results with matching scores lower than this value are discarded. Default value: 50.0. |
||
Valid Matching Threshold |
Description: In target images, points with gradient magnitude greater than or equal to this threshold are treated as valid edge points and participate in matching-score statistics. Default value: 10. |
||
Lower Limit of Valid Matching Ratio |
Description: Minimum ratio of validly matched edge points to total template edge points. Default value: 50%. |
||
Search Radius |
Description: During pose correction, this is the radius of circular search area allowed when searching corresponding matching points in target image for each template feature point. Default value: 8.
|
||
Upper Limit of Overlap Ratio |
Description: Used to filter duplicate matching results. When overlap ratio between two matching results exceeds this value, only the one with higher matching score is retained. Default value: 50%. |
||
Fill Ratio |
When the object to be matched may partially exceed image boundaries, this parameter specifies allowed fill size as a ratio of template size. Filling can improve edge-matching success rate but usually increases computation.
Default value: 0%. |
Deviation Threshold Settings
| Parameter | Description |
|---|---|
Lower Limit of X Offset |
Description: Maximum allowed negative offset in X direction, in px. If difference between workpiece center X coordinate and template center X coordinate is lower than this value, result is judged as NG. Default value: -100.00 px. |
Upper Limit of X Offset |
Description: Maximum allowed positive offset in X direction, in px. If difference between workpiece center X coordinate and template center X coordinate is greater than this value, result is judged as NG. Default value: 100.00 px. |
Lower Limit of Y Offset |
Description: Maximum allowed negative offset in Y direction, in px. If difference between workpiece center Y coordinate and template center Y coordinate is lower than this value, result is judged as NG. Default value: -100.00 px. |
Upper Limit of Y Offset |
Description: Maximum allowed positive offset in Y direction, in px. If difference between workpiece center Y coordinate and template center Y coordinate is greater than this value, result is judged as NG. Default value: 100.00 px. |
Lower Limit of Angle |
Description: Minimum allowed angle deviation, in °. If difference between workpiece rotation angle and template angle is lower than this value, result is judged as NG. Default value: -180°. |
Upper Limit of Angle |
Description: Maximum allowed angle deviation, in °. If difference between workpiece rotation angle and template angle is greater than this value, result is judged as NG. Default value: 180°. |