IMAQ Advanced Setup Learn Pattern 2 VI

LabView NI Vision

IMAQ Advanced Setup Learn Pattern 2 VI

Owning Palette: Pattern Matching AdvancedInstalled With: NI Vision Development Module

Optimizes and fine-tunes advanced parameters used during the learning phase. Execute this VI before the IMAQ Learn Pattern 2 VI. If you use the IMAQ Setup Learn Pattern 2 VI along with this VI, execute the IMAQ Advanced Setup Learn Pattern 2 VI after the IMAQ Setup Learn Pattern 2 VI.

IMAQ Advanced Setup Learn Pattern 2

cstr.gif

Learn Pattern Setup Data In is a string that contains information from the IMAQ Setup Learn Pattern 2 VI. If this input is not connected, the VI uses default parameters for all unconfigured options.

c1dnclst.gif

Advanced Shift Learn Options is an array of options to use during the learning phase. The array is composed of the following elements:

cu16.gif

Setup Data Item determines the option you want to use during the learning phase of shift-invariant matching. The following values are possible:

Initial Step Size (0)

Specifies the largest number of image pixels to shift the sample across the inspection image during the initial phase of shift-invariant matching. The default is 7. The algorithm may reduce the value of the Initial Step Size based on the Initial Sample Size and the template image. If the step size is not an odd integer, the VI coerces it to the next smaller odd integer.

Initial Sample Size (1)

Specifies the number of template pixels that you want to include in a sample for the initial phase of shift-invariant matching. The default is 0, which allows the algorithm to compute the Initial Sample Size. For optimal speed, the VI coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.

Initial Sample Size Factor (2)

Specifies the size of the sample for the initial phase of shift-invariant matching as a percent of the template size, in pixels. The default is 0, which causes the VI to use the Initial Sample Size. If you provide values for both the Initial Sample Size Factor and the Initial Sample Size, the VI uses the Initial Sample Size. For optimal speed, the VI coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.

Final Sample Size (3)

Specifies the number of template pixels you want to add to the Initial Sample Size for the final phase of shift-invariant matching. These additional points include edge points. The default is 0, which allows the algorithm to compute the Final Sample Size. For optimal speed, the VI coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.

Final Sample Size Factor (4)

Specifies the size of the sample for the final phase of shift-invariant matching as a percent of the edge points in the template, in pixels. The default is 0, which causes the VI to use the Final Sample Size. If you provide values for both the Final Sample Size Factor and the Final Sample Size, the VI uses the Final Sample Size. For optimal speed, the VI coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.

Subpixel Sample Size (5)

Specifies the number of template pixels that you want to include in a sample for the subpixel phase of shift-invariant matching. The default is 0, which allows the algorithm to compute the Subpixel Sample Size. For optimal speed, the VI coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.

Subpixel Sample Size Factor (6)

Subpixel Sample Size Factor specifies the size of the sample for the subpixel phase of shift-invariant matching as a percent of the template size, in pixels. The default is 0, which causes the VI to use the Subpixel Sample Size. For optimal speed, the VI coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.

cdbl.gif

Item Value is the value of the option you want to use during the learning phase.

c1dnclst.gif

Advanced Rotation Learn Options is an array of options to use during the learning phase. If this array is connected, the learning phase extracts information for rotation-invariant matching. Each cluster in the array is composed of the following elements:

cu16.gif

Setup Data Item determines the option you want to use during the learning phase. The following values are possible:

Search Strategy Support (0)

specifies the aggressiveness of the rotation search strategy available during the matching phase. Three types of search strategies are available. The default is 2.

  1. Conservative—Extracts template information for Conservative matching only.
  2. Balanced—Extracts template information for Balanced and Conservative matching.
  3. Aggressive—Extracts template information for Aggressive, Balanced, and Conservative matching.
Initial Step Size (1)

Specifies the largest number of image pixels to shift the sample across the inspection image during the initial phase of matching. The default values are 5 for the Balanced search strategy and 3 for the Conservative search strategy. If the step size is not an odd integer, the VI coerces it to the next smaller odd integer.

Note  The Aggressive search strategy does not support the Initial Step Size option.
Initial Sample Size (2)

Specifies the number of template pixels that you want to include in a sample for the initial phase of rotation-invariant matching. The default is 0, which allows the algorithm to compute the Initial Sample Size. For optimal speed, the VI coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.

Initial Sample Size Factor (3)

Specifies the size of the sample for the initial phase of rotation-invariant matching as a percent of the template size, in pixels. The default is 0, which causes the VI to use the Initial Sample Size. If you provide values for both the Initial Sample Size Factor and the Initial Sample Size, the VI uses the Initial Sample Size. For optimal speed, the VI coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.

Initial Angular Accuracy (4)

Initial Angular Accuracy sets the angle accuracy, in degrees, to use during the initial phase of rotation-invariant matching. The default is 6 degrees. The VI coerces the angle to the largest integer smaller than it that evenly divides 360. This option is not used in conjunction with the Aggressive search strategy.

Final Sample Size (5)

Specifies the number of template pixels you want to add to the Initial Sample Size for the final phase of rotation-invariant matching. These additional points include edge points. The default is 0, which allows the algorithm to compute the Final Sample Size. For optimal speed, the VI coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.

Final Sample Size Factor (6)

Specifies the size of the sample for the final phase of rotation-invariant matching as a percent of the edge points in the template, in pixels. The default is 0, which causes the VI to use the Final Sample Size. If you provide values for both the Final Sample Size Factor and the Final Sample Size, the VI uses the Final Sample Size. For optimal speed, the VI coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.

Final Angular Accuracy (7)

Sets the angle accuracy, in degrees, to use during the final phase of the rotation-invariant matching. The default is 1 degree. Use subpixel accuracy to achieve angle accuracy less than the default. This value must be no greater than the value for Initial Angular Accuracy. The VI coerces the angle to the largest integer smaller than it that evenly divides 360. This option is not used in conjunction with the Aggressive search strategy.

Subpixel Sample Size (8)

Specifies the number of template pixels that you want to include in a sample for the subpixel phase of rotation-invariant matching. The default is 0, which allows the algorithm to compute the Subpixel Sample Size. For optimal speed, the VI coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.

Subpixel Sample Size Factor (9)

Subpixel Sample Size Factor specifies the size of the sample for the subpixel phase of rotation-invariant matching as a percent of the template size, in pixels. The default is 0, which causes the VI to use the Subpixel Sample Size. For optimal speed, the VI coerces sizes that are less than 240 to an integer multiple of 12 and coerces sizes greater than 240 to an integer multiple of 60.

cdbl.gif

Item Value is the value of the option you want to use during the learning phase.

cerrcodeclst.gif

error in (no error) describes the error status before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

ci32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

cstr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

istr.gif

Learn Pattern Setup Data Out is a string that contains information about the setup parameters selected for the learning phase. Connect this output to the IMAQ Learn Pattern 2 VI.

ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

istr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.