Bead

BeadFind Vision Data Access Functions

All of the formulas for the BeadFind functions conform to the following:

  • BeadFind = A Bead data structure output by a BeadFind function
  • Caliper Index = -1, 0 to N (determines which caliper to reference; -1 = get the overall average)
  • Edge = 0 or 1 (determines which edge to reference; 0 = the first edge, and 1 = the second edge)
  • If a bead path is trained, the value returned is likely to be different from the one that is returned from a bead path candidate.

Function Description
GetBeadColor(BeadFind) Returns the color of the selected bead path or trained bead path against the background color ( 0 = Dark On Light, 1 = Light On Dark).
GetBeadContrastThreshold(BeadFind) Returns the calculated contrast threshold of the selected bead path.
GetBeadCount(BeadFind) Returns the number of found bead path candidates. Returns 0, if no bead path is found or Find Bead Paths is not executed.
GetBeadEdgeOffset(BeadFind, [Caliper Index], [Edge]) Returns the average edge offset (in pixels) from the polyline path at the indexed caliper, or the average edge offset along the entire selected bead path.
GetBeadEnclosed(BeadFind) Returns whether the selected bead path is an enclosed loop (0 = Bead is not enclosed,  1 = Bead is enclosed).

GetBeadExtremeWidth(BeadFind, [Extreme])

  • Extreme = 0 or 1 (0 = Min, 1 = Max)

Returns the caliper index that contains the minimum or maximum width of the selected bead path.

GetBeadNumPoints(BeadFind) Returns the number of points that are used in the selected bead path.

GetBeadPoint(BeadFind, [Index], [Dimension])

  • Index = 0 to N (determines which vertex to reference)
  • Dimension = 0 or 1 (0 = X-coordinate of the vertex, 1 = Y-coordinate of the vertex)
Returns the X or Y coordinate of a specified point for the selected bead path.
GetBeadSearchWidth(BeadFind) Returns the calculated half search width (in pixels) of the selected bead path.
GetBeadSelected(BeadFind) Returns the index of the selected bead path.
GetBeadTrained(BeadFind) Returns the trained state of the selected bead path (0 = Untrained, 1 = Trained).
GetBeadWidth(BeadFind, [Caliper Index])

Returns the bead width at the indexed caliper or the average bead width of the selected bead path.

GetNumCalipers(BeadFind) Returns the number of calipers used for the selected bead path.

BeadInspect Vision Data Access Functions

All of the formulas for the Bead functions conform to the following:

  • BeadInspect = A Bead data structure output by a BeadInspect function
  • Edge = 0 or 1 (determines which edge to reference; 0 = the first edge, and 1 = the second edge; default = 0)
  • Format = 0 or 1(determines which format to use; 0 = percent, and 1 = pixels; default = 0)
  • Index = 0 to Defect Count -1 (determines which defect index to reference; default = 0)
  • Index* = -1 to Defect Count -1 (determines which defect index to reference; -1 = find the defect with the extreme minimum or maximum value among all defects based on the Type parameter and return the defect index value; default = 0)
  • Number of Calipers = 0 to Calipers -1 (determines the range of calipers to use; 0 = use all calipers from the start index to the last caliper; default = 0):

    Note: If the entered Number of Calipers value is greater than Calipers - 1, the value will be adjusted to be the remaining calipers from the start index.
  • Start Index = 0 to Calipers - 1 (determines from which caliper index to start; default = 0)
Function Name Description

GetBeadDefectArea(BeadInspect, [Index*], [Type])

  • Type (0 or 1; 0 = minimum; 1 = maximum; default = 0)
Note: Type parameter is valid only when the Index is -1.

Returns the change in bead area compared to the trained bead for the specified defect. The value returned will be positive if the area increases and negative if the area decreases.

GetBeadDefectBoundAngle(BeadInspect, [Index])

Returns the angle of the bounding box of a defect at the specified index.

GetBeadDefectBoundCol(BeadInspect, [Index])

Returns the column coordinate of the bounding box of a defect at the specified index.

GetBeadDefectBoundHigh(BeadInspect, [Index])

Returns the height of the bounding box of a defect at the specified index.

GetBeadDefectBoundRow(BeadInspect, [Index])

Returns the row coordinate of the bounding box of a defect at the specified index.

GetBeadDefectBoundWide(BeadInspect, [Index])

Returns the width of the bounding box of a defect at the specified index.

GetBeadDefectCaliperIndex(BeadInspect, [Index], [Type])

  • Type (0 or 1; 0 = start index; 1 = end index; default = 0)
Returns the index of the first or last caliper in the specified defect.

GetBeadDefectCol(BeadInspect, [Index], [Type])

  • Type (0 or 1; 0 = start index; 0 = end index; default = 0)
Returns the X coordinate of a defect at the specified index.

GetBeadDefectContrast(BeadInspect, [Index*], [Type], [Edge])

  • Type (0 to 3; 0 = minimum; 1 = maximum; 2 = average (not valid if Index parameter is -1); 3 = proposed (not valid if Index parameter is -1); default = 0)

 

Returns the minimum, maximum, average or proposed contrast statistics for the specified defect.

GetBeadDefectCount(BeadInspect, [Type])

  • Type (-1 to 9; default = 0)
-1 Count of defects with multiple types
0 All defects
1 Coverage Min (Underfill)
2 Coverage Max (Overfill)
3 Width Min (Too Narrow)
4 Width Max (Too Wide)
5 Step Change
6 Missing Both Edges
7 Missing First Edge
8 Missing Second Edge
9 No Bead Found
Returns the number of found defects of the specified type.

GetBeadDefectCoverage(BeadInspect, [Index*], [Type])

  • Type (0, 1 or 2; 0 = minimum; 1 = maximum; 2 = average (not valid if Index parameter is -1); default = 0)
Note:
  • There is only one proposed value per defect. The proposed value is the max value that will fix both edges. It is the value that will be entered in the Contrast Threshold parameter to clear the defect.
  • Edge parameter is not valid if Type = 3.
Returns the minimum, maximum or average bead coverage statistics for the specified defect.

GetBeadDefectEdgeOffset(BeadInspect, [Index*], [Type], [Edge], [Format])

  • Type (0 to 3; 0 = minimum; 1 = maximum; 2 = average (not valid if Index parameter is -1); 3 = proposed (not valid if Index parameter is -1); default = 0)
Note:
  • There is only one proposed value per defect. The proposed value is the max value that will fix both edges. It is the value that will be entered in the Bead Edge Position Tolerance parameter to clear the defect.
  • Edge parameter is not valid if Type = 3.

Returns the minimum, maximum, average or proposed edge offset from the trained path for the specified defect.

GetBeadDefectLength(BeadInspect, [Index*], [Type])

  • Type (0 or 1; 0 = minimum; 1 = maximum; default = 0)
Note: Type parameter is valid only when the Index is -1.
Returns the length (in pixel) for the specified defect.

GetBeadDefectRow(BeadInspect, [Index], [Type])

  • Type (0 or 1; 0 = start index; 0 = end index; default = 0)
Returns the Y coordinate of a defect at the specified index.

GetBeadDefectStep(BeadInspect, [Index**], [Edge])

  • Index** (-1 to Defect Count -1; -1 = find the defect with the maximum step change percentage and return the index value; default = 0)
Returns the maximum step change statistics for the specified defect.

GetBeadDefectType(BeadInspect, [Index], [Format*])

Format* (0 or 1; default = 0)
0

Displays defect type as an integer. The integer will be converted to binary value, representing all of the defect types contained within the specific defect.

1

Displays defect type in string format. Corresponding position is either 0 or position number to indicate the defect type.

Position Chart:
1 2 3 4 5 6 7 8 9
Coverage Min (Underfill) Coverage Max (Overfill) Width Min (Too Narrow) Width Max (Too Wide) Step Change Missing Both Edges Missing First Edge Missing Second Edge No Bead Found
Returns the classification type of the specified defect.

GetBeadDefectWidth(BeadInspect, [Index*], [Type], [Format])

  • Type (0, 1 or 2; 0 = minimum; 1 = maximum; 2 = average (not valid if Index parameter is -1); default = 0)
Returns the minimum, maximum or average bead width statistics for the specified defect.

GetBeadCaliperContrast(BeadInspect, [Type], [Edge], [Start Index], [Number of Calipers])

  • Type (0, 1 or 2; 0 = minimum; 1 = maximum; 2 = average; default = 0)
Returns the minimum, maximum or average bead contras statistics for a range of calipers.

GetBeadCaliperCoverage(BeadInspect, [Type], [Start Index], [Number of Calipers])

  • Type (0, 1 or 2; 0 = minimum; 1 = maximum; 2 = average; default = 0)
Returns the minimum, maximum or average bead coverage statistics for a range of calipers.

GetBeadCaliperEdgeOffset(BeadInspect, [Type], [Edge], [Format], [Start Index], [Number of Calipers])

  • Type (0, 1 or 2; 0 = minimum; 1 = maximum; 2 = average; default = 0)
Returns the minimum, maximum or average bead offset from the trained path for a range of calipers.

GetBeadCaliperMax(BeadInspect, [Type], [Edge], [Start Index], [Number of Calipers])

  • Type (0 to 4; 0 = coverage; 1 = width; 2 = step; 3 = contrast; 4 = displacement)

    Note: Edge parameter is not valid if Type = 0 or 1.

Returns the index of the caliper that detected the maximum value for the specified type of measurement.

Note: A return value of -1 indicates that all of the calipers within the range are in a masked area.

GetBeadCaliperMin(BeadInspect, [Type], [Edge], [Start Index], [Number of Calipers])

  • Type (0 to 4; 0 = coverage; 1 = width; 2 = step; 3 = contrast; 4 = displacement)

    Note: Edge parameter is not valid if Type = 0 or 1.

Returns the index of the caliper that detected the minimum value for the specified type of measurement.

Note: A return value of -1 indicates that all of the calipers within the range are in a masked area.

GetBeadCaliperWidth(BeadInspect, [Type], [Format], [Start Index], [Number of Calipers])

  • Type (0, 1 or 2; 0 = minimum; 1 = maximum; 2 = average; default = 0)
Returns the minimum, maximum or average bead width statistics for a range of calipers.

GetBeadCaliperStep(BeadInspect, [Type], [Edge], [Start Index], [Number of Calipers])

  • Type (0, 1 or 2; 0 = minimum; 1 = maximum; 2 = average; default = 0)
Returns the minimum, maximum or average bead step change statistics for a range of calipers.
GetNumCalipers(BeadInspect) Returns the number of calipers in the BeadInspect function.
GetTotalArea(BeadInspect) Returns the total area in pixels.

ShowBeadCaliperGraphic(BeadInspect, [Type], [Show], [Start Index], [Number of Calipers])

  • Type (0 or 1; 0 = region; 1 = edge; default = 0)
  • Show (0 or 1; 0 = hide graphic; 1 = show graphic; default = 0)

Displays the boundary region or the edge graphics for a range of calipers.