NI Vision for LabVIEW

IMAQ Advanced Setup Learn Geometric Pattern 2 VI

  • Updated2023-02-21
  • 6 minute(s) read
Owning Palette: Geometric Matching Advanced (Edge Based)
Requires: NI Vision Development Module

Optimizes and fine-tunes advanced parameters used during the learning phase of edge-based geometric pattern matching. Run this VI before the IMAQ Learn Geometric Pattern 2 VI. If you use the IMAQ Setup Learn Geometric Pattern 2 VI along with this VI, execute this VI after the IMAQ Setup Learn Geometric Pattern 2 VI.

Examples

IMAQ Advanced Setup Learn Geometric Pattern 2

cstr.gif

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

c1dnclst.gif

Advanced Geometric Learn Options 2 is an array of options to use during the learning phase.

cu16.gif

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

Curve Extraction Mode (0)

Specifies how the VI identifies curves in the image. Set this option to Normal if you want the VI to make no assumptions about the uniformity of objects in the image or the image background. Set this option to Uniform Regions if you want the VI to assume that either the objects in the image or the image background consist of uniform pixel values. This allows the VI to more accurately calculate the external curves of the objects.

Curve Edge Threshold (1)

Specifies the minimum contrast an edge pixel must have for it to be considered part of a curve. Valid values range from 1 to 255.

Curve Edge Filter Size (2)

Specifies the width of the edge filter that the VI uses to identify curves in the image. Set this option to 0 to specify a fine filter width, set this option to 1 to specify the normal filter width, or set this option to 2 to specify contour tracing.

Min Curve Length (3)

Specifies the length, in pixels, of the smallest curve that you want the VI to identify. The VI ignores any curves that have a length less than this value.

Curve Row Search Step Size (4)

Specifies the distance, in the y direction, between the image rows that the algorithm inspects for curve seed points. Valid values range from 1 to 255. The default value is 15.

Curve Col Search Step Size (5)

Specifies the distance, in the x direction, between the image columns that the algorithm inspects for curve seed points. Valid values range from 1 to 255. The default value is 15.

Curve Max Endpoint Gap (6)

Specifies the maximum gap, in pixels, between the endpoints of a curve that the VI identifies as a closed curve. If the gap is larger than this value, the VI identifies the curve as an open curve. The default value is 10.

Extract Closed Curves (7)

Specifies whether to identify only closed curves in the image. The default value is FALSE, which specifies that the VI should identify both open and closed curves.

Enable Subpixel Curve Extraction (8)

The VI ignores this value.

Minimum Scale Factor (%) (9)

Specifies the minimum scale factor for matches to the template. The default value is 75%, which means matches with dimensions less than 75% of the dimensions of the template will not be searched for.

Maximum Scale Factor (%) (10)

Specifies the maximum scale factor for matches to the template. The default value is 125%, which means matches with dimensions greater than 125% of the dimensions of the template will not be searched for.

Minimum Angle Value (11)

Specifies the minimum rotation angle for the template. The default is 0. The size of the template can be reduced by increasing this value.

Maximum Angle Value (12)

Specifies the maximum rotation angle for the template. The default is 360.

Image Sampling Factor (13)

Specifies the factor by which the template is subsampled before being used for matching. The factor should be a power of 2. If the specified value is not a power of 2, then the closest power of 2 value is used. The default value is 0, which specifies that the subsampling factor is automatically determined by the IMAQ Learn Geometric Pattern 2 VI.

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 Geometric Pattern 2 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 Geometric 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.

Examples

Refer to the following for an example that uses this VI.

  • LabVIEW\examples\Vision\Geometric Matching\Geometric Matching with Calibration.vi

Log in to get a better experience