BeadFind

The BeadFind function is used to find the center of a bead feature, and create a polyline that traces the path of the detected bead. The bead path found and trained by the tool is used as an input by a BeadInspect function to determine positional, width, or coverage defects in the bead.

Note:
  • BeadFind and BeadInspect functions are only available on In-Sight vision systems running In-Sight firmware 5.5.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions. For more information on BeadInspect, see BeadInspect.
  • BeadFind and BeadInspect functions do not support color images. If a color image is loaded, it will be automatically converted to a greyscale image.
  • For more information about how to use the BeadFind and BeadInspect functions, see Use the BeadFind and BeadInspect Functions.

BeadFind Inputs

Syntax: BeadFind(Image,Fixture,Background Image,Bead Sample Location,Max Width Deviation (%),Bead Finding Tolerance,Bead Find Optimizations,Max Bead Paths to Find,Find Bead Paths,Selected Bead Path,Edit Bead Path,Bead Train Optimizations,Train Bead Path,Show Graphics)

Parameter Description

Image

 

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

 

Specifies the image coordinate system in which the bead path is defined. The default setting is (0,0,0), the top leftmost corner of the image.

Row (default = 0)

The row offset, in image coordinates.

Column (default = 0)

The column offset, in image coordinates.

Theta (default = 0)

The angle of orientation, in the image coordinate system.

Background Image

(Optional) Specifies a reference to a spreadsheet cell that contains an Image data structure of an image to be used for image subtraction.

A background image should be an image without any bead material. It is used to create a high contrast image between an image with and without bead material to enhance the bead material visibility on a part during the bead find analysis.

Note:
  • The subtracted image will not be generated until the Find Bead Paths button is clicked. To see the subtracted image, the Show Graphics Subtracted Image checkbox must be checked.
  • The subtracted image will not be saved with the job.
Bead Sample Location

Specifies where the BeadFind function will begin to search bead path(s). The circle doesn't need to be placed in the center of a bead path, as long as the radius of the circle encloses both edges of the bead.

Note: The value of the Radius parameter determines the width of the search calipers. If a section of the bead is wider than the search calipers, the bead search will fail.

X

The x-offset of the circle, in image coordinates (0 to sensor image height - 1; default = sensor image height / 2).

Y

The y-offset of the circle, in image coordinates (0 to sensor image width - 1; default = sensor image width / 2).

Radius

The radius of the circle, in image coordinates (0 to sensor image height / 2; default = 30).

 

Max Width Deviation (%)

Specifies the maximum allowable bead width change in percentage (1-100; default = 50). The bead search stops if the bead width deviation is above or below the threshold.

Bead Finding Tolerance

Specifies how aggressively to search for edges that comprise a bead (0-10; default = 3). A higher value allows bead finding to operate in areas of the image where the bead path is ambiguous.

0 = Least aggressive

...

10 = Most aggressive

Bead Find Optimizations

Specifies bead finding parameters that can be set manually or allowed to be automatically calculated by the tool.

Auto

Specifies whether or not the function will automatically determine the bead finding optimization parameters.

Bead Color

Specifies the bead color against the background color (Dark on Light or Light on Dark; default = Light On Dark).

Bead Width

Specifies the expected bead width in pixels (1 to sensor image width - 1; default = 10).

Note: If the average bead width within the Bead Sample Location circle is out of the range of Bead Width +/- Max Width Deviation (%), the bead search will fail. For example, if the expected Bead Width is set to 12 and the Max Width Deviation (%) is set to 25%, the average bead width within the Bead Sample Location should range from 9 to 15. If the actual average bead width detected within the Bead Sample Location is 17, no bead path will be found.
Min Contrast

Specifies the minimum contrast value (1-255; default = 10) to be considered a bead edge. A lower value allows bead edges to be detected in low contrast images with noise.

Max Bead Paths to Find Specifies the maximum number of possible bead path candidates to find (1 - 5; default = 5). The function will stop processing once the specified number of bead candidates are found.
Find Bead Paths

Click this button to start finding bead path candidates. The number of bead paths found will be displayed to the right of the button once the operation is completed. If no bead paths are found, 0 will be displayed.

Note: Pressing the Find Bead Paths button will clear all previous bead path information including modifications to the existing paths or trained bead path data. To restore the information, press Cancel button to exit property sheet without saving any changes in the property sheet.
Selected Bead Path

Specifies which of the possible bead path candidates will be used to display and to train the bead (0 to 4; default = 0).

Edit Bead Path

Click this button to switch to the Interactive Graphics Mode to manually adjust and optimize the points of the selected bead path before training. For more information on Interactive Graphics Mode, see Interactive Graphics Mode.

Note:
  • If no bead path is found or the Selected Bead Path value is greater than the number of found paths, the Edit Bead Path button will be disabled.
  • If a bead path is modified after training, the bead path needs to be retrained.

Bead Train Optimizations

Specifies training parameters for optimizing bead training.

Caliper Spacing

Specifies the density of the edge detection calipers that are placed along the bead path (1 - 10; default = 3). This value will dictate the minimum length of a possible defect. Set a higher value to decrease the number of calipers when only coarse defect detection is needed. To detect smaller defects, set a lower value to increase the number of calipers.

Smoothing Factor

Specifies how much influence uneven edges will have on the best fit line for the trained bead path (1 - 10; default = 3). Use a higher value to make the best fit bead path less sensitive to variations such as spikes along the edges of the bead. Use a lower value when the bead edges are very smooth.

Train Bead Path

Click this button to train bead path.

During training, detailed analysis of the bead characteristics are calculated. These calculations will be used to set initial values for a BeadInspect function that references this BeadFind tool.

Note: If the BeadFind tool is retrained, a referencing BeadInspect will be modified with updated bead characteristics.
Show Graphics

Specifies which BeadFind graphical overlays will be drawn on top of the image.

Bead Path

Displays the best fit line along the selected bead path either in blue if a bead path is not trained or in green if a bead path is trained.

Note: Once a bead path is found, bead path is always displayed while the BeadFind property sheet is open.
Bead Edges

Displays the positions of the bead edges that have been detected along the bead path. If an edge is not found, yellow circles will be displayed to indicate where the edge is expected to be found.

Bead Edges (Average)

Displays the average positions of bead edges that have been detected along the bead path.

Calipers

Displays the calipers along the bead path. The calipers for the selected bead path candidate will be displayed in green. The calipers for the trained bead path will be displayed in one of the following colors:

  • Green: Both edges are found.
  • Yellow: Miss an edge and fill edge is used.
  • Black: Miss both edges and mask is applied.
Subtracted Image

Displays the subtracted image created by subtracting an active image with a Background Image.

Note: The subtracted image will not be displayed until the Find Bead Paths button is clicked.

BeadFind Outputs

Returns

A Bead data structure containing the information about detected beads in the image, or #ERR if any of the input parameters are invalid.

Results

When BeadFind is initially inserted into a cell, a results table is created in the spreadsheet. For example, this is the default BeadFind results table: