IMAQ Advanced Setup Match Pattern 2 VI

LabView NI Vision

IMAQ Advanced Setup Match Pattern 2 VI

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

Optimizes and fine-tunes advanced parameters used during the matching phase. Execute this VI before the IMAQ Match Pattern 2 VI or the IMAQ Refine Matches VI. If you use the IMAQ Setup Match Pattern 2 VI along with this VI, execute this VI after IMAQ Setup Match Pattern 2.

IMAQ Advanced Setup Match Pattern 2

cstr.gif

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

c1dnclst.gif

Advanced Shift Match Options is an array of options to use during the matching phase. If this array is connected, the matching phase searches for the template image allowing up to ±4° of rotation. 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 matching phase. The following values are possible:

Minimum Contrast (0)

Specifies the minimum expected difference between the maximum pixel value and the minimum pixel value in the inspection image.

Enable Subpixel Accuracy (1)

Determines whether to return the match results with subpixel accuracy. The default is 0, which disables subpixel accuracy.

Subpixel Iterations (2)

Defines the maximum number of incremental improvements used to refine shift-invariant matching using subpixel information. The default is 20.

Subpixel Tolerance (3)

Defines the maximum amount of change, in pixels, between consecutive incremental improvements in the match position that you want to trigger the end of the refinement process. The default is 0, which specifies using the Subpixel Iterations value.

If you provide values for both Subpixel Iterations and Subpixel Tolerance, the VI refines the match for at most Subpixel Iterations but may stop early if Subpixel Tolerance is satisfied. If you set Subpixel Tolerance, matches may be invalidated during the subpixel matching process. However, using Subpixel Iterations alone cannot invalidate a match. This behavior is particular important in the IMAQ Refine Matches VI.

Initial Match List Length (4)

Specifies the maximum size of the match list. The match list contains the regions in the inspection image that have the highest probability of containing a match. The default is 200.

Match List Reduction Factor (5)

Specifies the reduction of the match list as matches are refined. The default is 5.

Initial Step Size (6)

Specifies the number of pixels to shift the sample across the inspection image during the initial phase of shift-invariant matching. The default is 0, which uses the Initial Step Size stored in the template. If the step size is not an odd integer, the VI uses the default value.

cdbl.gif

Item Value is the value for the option you want to use during the matching phase.

c1dnclst.gif

Advanced Rotation Match Options is an array of options to use during the matching phase of rotation-invariant matching. If this array is connected, the matching phase searches for the template image regardless of the rotation of the template. 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 matching phase. The following values are possible:

Minimum Contrast (0)

Specifies the minimum expected difference between the maximum pixel value and the minimum pixel value in the inspection image.

Enable Subpixel Accuracy (1)

Determines whether to return the match results with subpixel accuracy. The default is 0, which disables subpixel accuracy.

Search Strategy (2)

Specifies the aggressiveness of the rotation search strategy. 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.
Subpixel Iterations (3)

Defines the maximum number of incremental improvements used to refine rotation-invariant matching using subpixel information. The default is 20.

Subpixel Tolerance (4)

Defines the maximum amount of change, in pixels, between consecutive incremental improvements in the match position that you want to trigger the end of the refinement process. The default is 0, which specifies using the Subpixel Iterations value.

If you provide values for both Subpixel Iterations and Subpixel Tolerance, the VI refines the match for at most Subpixel Iterations but may stop early if Subpixel Tolerance is satisfied. If you set Subpixel Tolerance, matches may be invalidated during the subpixel matching process. However, using Subpixel Iterations alone cannot invalidate a match. This behavior is particular important in the IMAQ Refine Matches VI.

Initial Match List Length (5)

Specifies the maximum size of the match list. The match list contains the regions in the inspection image that have the highest probability of containing a match. The default is 200.

Match List Reduction Factor (6)

Specifies the reduction of the match list as matches are refined. The default is 5.

Initial Step Size (7)

Specifies the number of pixels to shift the sample across the inspection image during the initial phase of rotation-invariant matching. The default is 0, which uses the Initial Step Size stored in the template. If the step size is not an odd integer, the VI uses the default value.

Intermediate Angular Accuracy (8)

Specifies the accuracy to use during the intermediate phase of rotation-invariant matching. The default is the value of Final Angular Accuracy stored in the template. The VI coerces this value to an integer that evenly divides 360 and lies in the range defined by Initial Angular Accuracy and Final Angular Accuracy.

cdbl.gif

Item Value is the value for the option you want to use during the matching 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

Match Pattern Setup Data Out is a string that contains information about the setup parameters for the matching phase. Connect this output to the IMAQ Match 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.