Table Of Contents

Find Pattern (G Dataflow)

Last Modified: October 26, 2017

Searches for a template image in a rectangular search area of the image.

connector_pane_image
datatype_icon

image in

Reference to the source image.

datatype_icon

template image

Reference to the image to locate during the match process.

The template image is the image obtained from the output of the Learn Pattern node. If the template has not been learned, this node first goes through the learning process.

datatype_icon

search rectangle

Rectangular search area in an image.

The left, top, right, and bottom coordinates describe a non-rotated rectangle. The rotation specifies the rotation angle of the rectangle around its center.

datatype_icon

left

X-coordinate of the upper left corner of the rectangle.

datatype_icon

top

Y-coordinate of the upper left corner of the rectangle.

datatype_icon

right

X-coordinate of the bottom right corner of the rectangle.

datatype_icon

bottom

Y-coordinate of the bottom right corner of the rectangle.

datatype_icon

rotation

Rotation angle in degrees of the rectangle with its center as point of rotation.

If the rotation angle does not equal zero, the left, top, right, and bottom coordinates are not the actual coordinates of the upper left and bottom right corner of the rectangle. Instead these coordinates are a position, if the rotation angle equals zero.

datatype_icon

coordinate system

Input that specifies the coordinate system to use.

datatype_icon

reference system

Cluster containing origin, angle (deg), and axis reference.

datatype_icon

origin

Point cluster that specifies the origin of the base-reference coordinate system.

datatype_icon
x

X-coordinate of the center of the circle.

datatype_icon
y

Y-coordinate of the center of the circle.

datatype_icon

angle (deg)

Angle that the base-reference coordinate system makes with the image coordinate system.

datatype_icon

axis reference

Element defined as direct or indirect.

datatype_icon

measurement system

Cluster containing origin, angle (deg), and axis reference.

datatype_icon

origin

Point cluster that specifies the origin of the base-reference coordinate system.

datatype_icon
x

X-coordinate of the center of the circle.

datatype_icon
y

Y-coordinate of the center of the circle.

datatype_icon

angle (deg)

Angle that the base-reference coordinate system makes with the image coordinate system.

datatype_icon

axis reference

Element defined as direct or indirect.

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

options

Cluster defining the parameters of the template location algorithm and the information that is overlaid on the result image.

datatype_icon

algorithm

Pattern matching algorithm used to find the template information.

all learns the template using all of the algorithms.

Name Value Description
all 0

Uses all of the algorithms, one after the other.

low discrepancy sampling 1

Uses a low discrepancy sampling algorithm. This algorithm extracts the most significant information to represent an image. If the 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 2

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 3

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.

datatype_icon

number of matches requested

Number of valid matches expected.

datatype_icon

minimum match score

Smallest score a match must have to be considered valid.

datatype_icon

subpixel accuracy

Boolean that specifies if the match results should be returned with subpixel accuracy.

datatype_icon

rotation angle ranges

Array of angle ranges where each range specifies how much the template pattern rotates in the image.

Each range is specified by a start angle and an end angle, both of which are expressed in degrees.

datatype_icon

show search area

Boolean that pecifies if the centers and bounding rectangles of the patterns found are overlaid on the result image.

datatype_icon

show result

Boolean that specifies if the centers and bounding boxes of the patterns found are overlaid on the result image.

datatype_icon

number of matches

Number of template matches found in the inspection image based on the input settings.

datatype_icon

image out

Reference to the destination image.

The search area and/or the result of the measurement can be overlaid on the image according to the settings.

datatype_icon

matches (pixel)

Array of match clusters, in pixel coordinates.

datatype_icon

Position

Point-coordinate cluster corresponding to the center of the template.

datatype_icon

Angle

Rotation angle of the template in the source image at the current match location.

datatype_icon

Scale

Change in percentage size of the matched template from the original template.

This parameter is not used for pattern matching and is always set to 1.

datatype_icon

Score

Match results ranked on a scale of 0 to 1000, where 0 equals no match and 1000 equals a perfect match.

datatype_icon

Bounding Box

Array of points that define the boundary of the template pattern in the image.

Connect this array directly to the Overlay Multiple Lines node to overlay the location of a match on the image.

datatype_icon

matches (real-world)

Array of match clusters, in real-world coordinates.

datatype_icon

Position

Point-coordinate cluster corresponding to the center of the template.

datatype_icon

Angle

Rotation angle of the template in the source image at the current match location.

datatype_icon

Scale

Change in percentage size of the matched template from the original template.

This parameter is not used for pattern matching and is always set to 1.

datatype_icon

Score

Match results ranked on a scale of 0 to 1000, where 0 equals no match and 1000 equals a perfect match.

datatype_icon

Bounding Box

Array of points that define the boundary of the template pattern in the image.

Connect this array directly to the Overlay Multiple Lines node to overlay the location of a match on the image.

datatype_icon

coordinate system dup

Reference to the coordinate system.

datatype_icon

reference system

Cluster containing origin, angle (deg), and axis reference.

datatype_icon

origin

Point cluster that specifies the origin of the base-reference coordinate system.

datatype_icon
x

X-coordinate of the center of the circle.

datatype_icon
y

Y-coordinate of the center of the circle.

datatype_icon

angle (deg)

Angle that the base-reference coordinate system makes with the image coordinate system.

datatype_icon

axis reference

Reference to the axis defined as direct or indirect.

datatype_icon

measurement system

Cluster containing origin, angle (deg), and axis reference.

datatype_icon

origin

Point cluster that specifies the origin of the base-reference coordinate system.

datatype_icon
x

X-coordinate of the center of the circle.

datatype_icon
y

Y-coordinate of the center of the circle.

datatype_icon

angle (deg)

Angle that the base-reference coordinate system makes with the image coordinate system.

datatype_icon

axis reference

Reference to the axis defined as direct or indirect.

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.
datatype_icon

elapsed time

Duration of the search, in milliseconds.

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