Table Of Contents

Set Advanced Match Options (G Dataflow)

Last Modified: June 25, 2019

Stores the Advanced Match Options to Template In image.

The stored parameters will be used for matching when Match Pattern and Match Geometric Pattern nodes are called. This node can be called multiple times on the same template image in order to store advanced parameters of multiple algorithms into the template image. Note that these parameters will be overridden if any Preset-Parameters are set to Template In directly through Match Pattern or Setup Advanced Match Geometric Pattern.

connector_pane_image
datatype_icon

algorithm

Algorithm for which Advanced Match Options will be used.

Name Value Description
Low Discrepancy Sampling 0

Uses a low discrepancy sampling algorithm. This algorithm extracts the most significant information to represent an image. If your template contains large regions of similar grayscale information, a wide aspect ratio, or is very small, use one of the pyramidal matching algorithms instead.

Grayscale Value Pyramid 1

Uses a grayscale value pyramid algorithm. This algorithm uses normalized gray values as features, and is useful when the template does not contain structured information, but has intricate textures for dense edges.

Gradients Pyramid 2

Uses a gradient pyramid algorithm. This algorithm uses filtered edge pixels as features. This algorithm is more resistant to occlusion and intensity changes compared to the grayscale value pyramid, and is often being faster because of a smaller amount of data. However, the strength and reliability of edges reduces at very low resolutions this method requires the user to sometimes work at higher resolutions compared to the gray value method.

Geometric Pattern 3 Geometric Matching locates regions in a grayscale image that match a model or template of a reference pattern. Geometric Matching is specialized to locate templates that are characterized by distinct geometric or shape information. When using Geometric Matching, you create a template that represents the object for which you are searching. The Machine Vision application then searches for instances of the template in each inspection imageand calculates a score for each match. The score relates how closely the template resembles the located matches. Geometric Matching finds template matches regardless of lighting variation, blur, noise, occlusion, and geometric transformations such as shifting, rotation, or scaling of the template.
datatype_icon

template in

Reference to the template image in which you want to store advanced match options.

datatype_icon

advanced match options

An array of advanced options to store in the template image. The stored parameters will be used for matching when Match Pattern and Match Geometric Pattern nodess are called.

datatype_icon

Item

Option to use during the matching phase.

Name Value Description
LD Sampling - Minimum Contrast 0

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

LD Sampling - Enable Subpixel Accuracy 1

Determines whether to return the match results with subpixel accuracy. Set this option to 1 to enable subpixel accuracy. The default value is 0, which disables subpixel accuracy.

LD Sampling - Search Strategy 2

Specifies the aggressiveness of the 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.
LD Sampling - Subpixel Iterations 3

Specifies the maximum number of incremental improvements used to refine matches using subpixel information. The minimum value for this option is 20.

LD Sampling - Subpixel Tolerance 4

Specifies the maximum amount of change, in pixels, between consecutive incremental improvements in the match position before the node stops refining the match position. The default value is 0, which specifies that the node should always use a number of refinements equal to Subpixel Iterations. If you provide values for both Subpixel Iterations and Subpixel Tolerence, the node refines the match for, at most, Subpixel Iterations but may stop early if Subpixel Tolerence is satisfied.

LD Sampling - 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 minimum value for this option is 5. The default value is 200.

LD Sampling - Match List Reduction Factor 6

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

LD Sampling - Initial Step Size 7

Specifies the number of template pixels that you want to include in a sample for the initial phase of matching. The default is 0, which allows the algorithm to compute the Initial Sample Size. For optimal speed, the node 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.

LD Sampling - Intermediate Angular Accuracy 8

Sets the angle accuracy, in degrees, to use during the final phase of the 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 node 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.

Pyramid - Max Pyramid Level 100

Specifies the pyramid level at which the coarse-to-fine matching begins. The higher this value the faster the matching will be. Thus, setting this to 0 will lead to a very large match time. All values higher than the maximum allowed pyramid level, or automatically computed during learning the template, are coerced to the maximum allowed level. The default value is set to the optimal pyramid level, or automatically computed during learning the template. Note that setting this value lower than the Max Pyramid Level to Store Data, used in learning the template, is not allowed, as the required data for coarse matching will be missing. The Get Template Information node can be used to obtain the various pyramid levels used while learning the template and this parameter can then be set accordingly.

Pyramid - Minimum Contrast 102

Specifies the minimum contrast to consider the image region for matching. Any image region lower than minimum contrast will be skipped for matching, which improves performance.

Pyramid - Enable Subpixel Accuracy 103

Determines whether to return the match results with subpixel accuracy. Set this option to 1 to enable subpixel accuracy. The default value is 0, which disables subpixel accuracy.

Pyramid - Subpixel Iterations 104

Specifies the maximum number of incremental improvements used to refine matches using subpixel information. The minimum value for this option is 20.

Pyramid - Subpixel Tolerance 105

Specifies the maximum amount of change, in pixels, between consecutive incremental improvements in the match position before the node stops refining the match position. The default value is 0, which specifies that the node should always use a number of refinements equal to Subpixel Iterations. If you provide values for both Subpixel Iterations and Subpixel Tolerance, the node refines the match for, at most, Subpixel Iterations but may stop early if Subpixel Tolerance is satisfied.

Pyramid - Initial Match List Length 106

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 minimum value for this option is 5. The default value is 200 for shift matching, and 300 for rotation matching.

Pyramid - Match List Reduction Factor 107

Specifies the reduction of the match list as matches are refined. The default value is 1, which results in no reduction.

Pyramid - Intermediate Angular Accuracy 108

Specifies the angular accuracy used for initial coarse matching when rotation is present. The default value is 6 degrees. Setting this value too high creates the risk of losing out matches.

Pyramid - Process Border Matches 109

Specifies whether to search for partial (border matches) or not. Note that the border could either be the image border or the border of the supplied ROI region. Turning this parameter on increases the match time, especially for larger templates. The default value is TRUE.

Pyramid - Min Match Separation Distance 111

Specifies the minimum separation distance, in pixels, between the origins of two matches that have unique positions. The node does not return matches that have the same position and angle. The default value is 20.

Pyramid - Min Match Separation Angle 112

Specifies the minimum angular difference, in degrees, between two matches that have unique angles. The node does not return matches that have the same position, scale, and angle. The default value is 10.

Pyramid - Max Match Overlap 113

Specifies the maximum amount of overlap, expressed as a percentage, allowed between the bounding rectangles of two matches. The default value is 20.

Pyramid -Max Cache in MB 114

Specifies the maximum cache size to use while matching for rotation. The cache is used to control the size of the template data in memory while matching. Cases where successive search images are expected to have matches which are either at same angle or at angles belonging to a small set of recurring values will see maximum cache utilization and speed-ups. The default value is 5 Megabytes.

Pyramid - Clear Cache 115

Specifies whether or not to flush the cache after every match. Turning this ON will take away the caching benefits seen for successive match images having matches at the same angle or at recurring angles. The default value is OFF.

Enable Defect Map 200

Specifies whether or not to calculate the defect map between the template and match image. The default value is OFF.

Curve Extraction Mode 300 Specifies how the node identifies curves in the image. Set this option to 0 if you want the node to make no assumptions about the uniformity of objects in the image or the image background. Set this option to 1 if you want the node to assume that either the objects in the image or the image background consist of uniform pixel values. This option allows the node to more accurately calculate the external curves of the objects.
Curve Edge Threshold 301 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 302 Specifies the width of the edge filter that the node 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 303 Specifies the length, in pixels, of the smallest curve that you want the node to identify. The node ignores any curves that have a length less than this value. The default value is 25.
Curve Row Search Step Size 304 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 305 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 306 Specifies the maximum gap, in pixels, between the endpoints of a curve that the node identifies as a closed curve. If the gap is larger than this value, the node identifies the curve as an open curve. The default value is 10.
Extract Closed Curves 307 Specifies whether to identify only closed curves in the image. The default value is FALSE, which specifies that the node should identify both open and closed curves.
Enable Subpixel Curve Extraction 308 The node ignores this option.
Enable Correlation Score 309 Specifies that the node should calculate the Correlation Score and return it for each match result. The default value is 1, which enables the Correlation Score.
Enable Subpixel Accuracy 310 Determines whether to return the match results with subpixel accuracy. Set this option to 1 to enable subpixel accuracy. The default value is 0, which disables subpixel accuracy.
Subpixel Iterations 311 Specifies the maximum number of incremental improvements used to refine matches using subpixel information. The minimum value for this option is 20.
Subpixel Tolerance 312 Specifies the maximum amount of change, in pixels, between consecutive incremental improvements in the match position before the node stops refining the match position. The default value is 0, which specifies that the node should always use a number of refinements equal to Subpixel Iterations. If you provide values for both Subpixel Iterations and Subpixel Tolerance, the node refines the match for, at most, Subpixel Iterations but may stop early if Subpixel Tolerance is satisfied.
Initial Match List Length 313 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 minimum value for this option is 5. The default value is 200.
Enable Target Template Curve Score 314 Specifies whether the node should calculate the match curve to template curve score and return it for each match result. Set this option to 1 to enable the target template curve score. The default value is 0, which disables the target template curve score.
Min Match Separation Distance 315 Specifies the minimum separation distance, in pixels, between the origins of two matches that have unique positions. The node does not return matches that have the same position, scale, and angle. Set this value to -1 if you do not want the node to use the position of a match to determine whether the match is unique. The default value is 20.
Min Match Separation Angle 316 Specifies the minimum angular difference, in degrees, between two matches that have unique angles. The node does not return matches that have the same position, scale, and angle. Set this value to -1 if you do not want the node to use the angle of a match to determine whether the match is unique. The default value is 10.
Min Match Separation Scale 317 Specifies the minimum difference in scale, expressed as a percentage, between two matches that have unique scales. The node does not return matches that have the same position, scale, and angle. Set this value to -1 if you do not want the node to use the scale of a match to determine whether the match is unique. The default value is 10.
Max Match Overlap 318 Specifies the maximum amount of overlap, expressed as a percentage, allowed between the bounding rectangles of two matches. Set this value to -1 to ignore this option. The default value is 80.
Enable Coarse Result 319 Specifies whether you want the algorithm to spend less time accurately estimating the location of a match. Set this value to 1 if you want to quickly determine whether a part is present in the inspection image without an accurate estimate of its position, angle, and scale. The default value is 0, which specifies that the node returns matches with pixel or subpixel accuracy.
Enable Calibration Support 320 Specifies whether or not the algorithm treat the inspection image as a calibrated image. Use the Set Simple Calibration node or the Set Calibration Info node to calibrate the inspection image. The default value is TRUE.
Enable Contrast Reversal 321 Specifies the contrast of the matches to search for. Set it to 0 to search for matches with the same contrast as the template. Set it to 1 to search for matches with the inverse contrast of the template. Set it to 2 to search for matches with the same and inverse contrast of the template. The default value is 0.
Search Strategy 322 Specifies the aggressiveness of the strategy used to find matches in the image. The default is 1. The following options are available.
  • Conservative (0) - Specifies the geometric matching algorithm to use the largest possible amount of information from the image at the expense of slowing down the speed of the algorithm.
  • Balanced (1) - Specifies the geometric matching algorithm to balance the amount of information from the image it uses with the speed of the algorithm.
  • Aggressive (2) - Specifies the geometric matching algorithm to use a lower amount of information from the image, which allows the algorithm to run quickly but at the expense of accuracy.
Refinement Match Factor 323 Specifies the factor applied to the number of matches requested to determine how many matches are refined in the pyramid stage. The default is 0, which specifies that the factor is determined internally by the Match Geometric Pattern node.
Subpixel Match Factor 324 Specifies the factor applied to the number for matches requested to determine how many matches are used for the final (subpixel) stage. The default is 0, which specifies that the factor is determined internally by the Match Geometric Pattern node.
Contour Refinement Iterations 325 Specfies the number of iterations to perform to refine the curve.
Scoring Method 326 Specifies how the output match score is computed. The score can be computed as a combination of the different scores that are returned by the Matches output from the Match Geometric Pattern node (Standard Score, Template Target Curve Score, Target Template Curve Score and Correlation Score). The default is 0, which returns just the Standard Score. The score is computed as the average scores as shown in the table below:
  • 0 - Standard
  • 1 - Target Template Curve
  • 2 - Standard, Target Template Curve
  • 3 - Template Target Curve
  • 4 - Standard, Template Target Curve
  • 5 - Target Template Curve, Template Target Curve
  • 6 - Standard, Target Template Curve, Template Target Curve
  • 7 - Correlation
  • 8 - Standard, Correlation
  • 9 - Target Template Curve, Correlation
  • 10 - Standard, Target Template Curve, Correlation
  • 11 - Template Target Curve, Correlation
  • 12 - Standard, Template Target Curve, Correlation
  • 13 - Target Template Curve, Template Target Curve, Correlation
  • 14 - Standard, Target Template Curve, Template Target Curve, Correlation
Initial Match Angular Accuracy 327 Specifies the angular accuracy, in degrees, to be used for initial matching. Default values are 6 (Aggressive), 5 (Balanced) and 3 (Conservative).
datatype_icon

Value

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

datatype_icon

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

datatype_icon

template out

Reference to the template. This template image contains the advanced match options set by the node.

datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics