Skip to content

Pin Matching

Operator Function

This operator is used to compare the X, Y coordinates and height information of pins using a recipe, and output the pins' X, Y coordinates, height and spacing information, as well as the comparison results with the recipe. Note: The standard part point cloud used must be preprocessed.

Parameter Introduction

Input Parameters

ParameterRangeDefault ValueDescriptionIllustration
Input Image0-80The IM number for image input

Calculation Parameters

ParameterRangeDefault ValueDescriptionIllustration
Use Region Parameterstrue/falsefalseIf enabled, use Region as input; if not enabled, use Input Image as input
Region2D Window/2D Circular Window/2D Polygon Window/Box/Cylinder Box/Rotated Box/Point Set (binding only)BoxManually select an appropriate ROI region
Can bind to select existing ROI regions
Pin Minimum Spacing0.5Minimum distance between two pins
Pin Minimum Points50Minimum number of points for a pin
Sorting Method+X/-X/+Y/-Y+X+X: Pins sorted from left to right, top to bottom
-X: Pins sorted from right to left, bottom to top+Y: Pins sorted from right to left, bottom to top
-Y: Pins sorted from right to left, bottom to top
Pin Heighttrue/falsefalseIf enabled, output pin height information
Outlier RemovalPercentile Filter/NoneOnly enabled when pin height measurement is enabled; select filtering method
Low Removal Percentage0.000-50.00010.000Remove noise points in the low Z direction according to this ratio. For example, when the ratio is set to 10%, remove the lowest 10% of points
High Removal Percentage0.000-50.00010.000Remove noise points in the high Z direction according to this ratio. For example, when the ratio is set to 10%, remove the highest 10% of points
Height ModeMinimum, Maximum, Mean, Median, Standard Deviation, PercentileMedianProvide 6 methods for calculating height
Percentage10Enabled when mode is Percentile; input percentile, e.g., input 50 to take the middle 50% of points for height calculation
Pin Spacingtrue/falsefalseIf enabled, output pin spacing information
Recipe Comparisontrue/falsefalseIf enabled, output comparison information with the pin recipe
Recipe Pathtrue/falsefalseEnabled when recipe comparison is enabled; input the path of the pin recipe (only supports .json recipe files with array named "recipe")
Measurement Resulttrue/falsefalseCan be enabled when recipe comparison is enabled; when enabled, output the comparison result with the pin recipe, displayed on the interface and saved in global variables
Pin Offset1.000Set the offset in X or Y direction for pin sorting; if within the offset range, considered in the same row/column

Result Display

ParameterRangeDefault ValueDescriptionIllustration
Sequence Numbertrue/falsefalsePin sequence number; if enabled, displayed in the image
X Coordinatetrue/falsefalsePin X coordinate; if enabled, displayed in the image
Y Coordinatetrue/falsefalsePin Y coordinate; if enabled, displayed in the image
Heighttrue/falsefalsePin height; if enabled, displayed in the image
X Offset Valuetrue/falsefalsePin X offset value; if enabled, displayed in the image
Y Offset Valuetrue/falsefalsePin Y offset value; if enabled, displayed in the image
Height Offset Valuetrue/falsefalsePin height offset value; if enabled, displayed in the image
Matching Resulttrue/falsefalsePin matching result; if enabled, display pin sequence number and OK or NG in the image
ROI Point Settrue/falsefalseOnly effective when Use Region Parameters is selected; the point set of the ROI selected region; if enabled, displayed in the image

Output Parameters

NameTypeRangeDescription
Resultbooltrue/falsetrue for success
false for failure
Warningbooltrue/falsetrue indicates there is a warning
false indicates there is none
MessagestringOutputs success, error, or warning information; if there is no error or warning, it is empty
TimefloatOperator execution time, unit: ms
pinint[]Output pin sequence numbers
keyint[]Output pin key positions
pin_position_xfloat[]Output pin X coordinates
pin_position_yfloat[]Output pin Y coordinates
pin_position_heightfloat[]Output pin height values
pin_position_side_xfloat[]Output pin spacing in X direction
pin_position_side_yfloat[]Output pin spacing in Y direction
pin_position_side_heightfloat[]Output pin height spacing
pin_resultstring[]Output pin matching results

Tip

For more detailed explanations of parameter types, please refer to Type Definitions

Exception Troubleshooting

No.Exception InformationCorresponding ParameterSolution
1Input region type is {0}, invalid region typeRegion TypeRegion input type must be one of: 2D Window/2D Circular Window/2D Polygon Window/Box/Cylinder Box/Rotated Box/Point Set
2Region is empty1. Check if selection is empty
2. Check if point set is empty
3Input point cloud is emptyConfirm if IM contains valid points; if no valid points, load point cloud or switch to IM with valid points
4Pin extraction failedModify pin setting parameters
5Input sorting method is {0}, invalid sorting methodSorting MethodSelect sorting method as one of +X/-X/+Y/-Y
6Input height mode is {0}, invalid sorting methodHeight ModeSelect mode as Maximum/Minimum/Median/Mean/Removal Percentage
7File "{0}" does not exist or cannot be accessedFile PathInput valid recipe path
8File "{0}" failed to loadFile PathInput valid path and must be a json file
9File does not contain "recipe"Use a json file with the "recipe" key
10Recipe count does not match the number of detected pinsThe recipe array must match the number of detected pins
11The {0}th pin does not have the {1} fieldSequence number, recipe variable nameUse the i-th set of recipe files with recipe variable parameters
12Input polygon vertex count is less than 3, cannot form a polygonAdd 2D polygon window vertices so that the vertex count is at least three

Example Introduction

Engineering Design

  1. Select the Load Point Cloud tool to load the 3D point cloud image to be processed into IM0;

  2. Select the 3D Region tool to select the region for plane fitting;

  3. Select the 3D Plane tool, using the output of the 3D Region tool as input, fit a plane and transform the point cloud;

  4. Select the 3D Square Probe tool to search for positioning points;

  5. Select the 3D Position Adjustment tool, using the positioning point as the new origin, adjust the point cloud position;

  6. Select the 3D Crop tool to crop the pin point cloud;

  7. Select the 3D Transformation tool to adjust the pin point cloud to a suitable position;

  8. Select the Pin Recipe Creation tool to obtain the pin recipe file;

  9. Select the Pin Matching tool to detect pins.

Tool Usage

  1. Select the input image for operation; the image number must match the IM number where the image is located in the project.

  2. Either do not enable Use Region Parameters, or enable region and select region type as Box, move the box to the position to be measured, enclosing the point cloud to be measured.

  3. Set parameters.

  4. Check the content you want to display in the result display section.

  5. Click Test to check if the image window and parameters meet expectations.

  6. If there are no issues, click Save, then run the operator in the run list to view the results in the corresponding IM.

Local ImageLocal Image

AI-Vision, Making 3D Measurement Easier