Table Of Contents

Match Color (G Dataflow)

Last Modified: June 25, 2019

Finds the match between the color content of multiple regions in an image and those defined by color spectrum.

color spectrum is output from the Learn Color node.

connector_pane_image
datatype_icon

image in

Reference to the color image from which to extract the color feature to compare with the color defined by the input color spectrum.

datatype_icon

ROI descriptor

Regions in the image whose color information you want to compare with the information in color spectrum.

All region contours are considered to be external. If ROI descriptor contains multiple regions, the color information in each region is compared with color spectrum individually and the match results are reported for each region. If ROI descriptor is not connected, the node considers the entire image as a single region.

datatype_icon

global rectangle

Coordinates of the bounding rectangle.

datatype_icon

contours

Individual shapes that define an ROI.

datatype_icon

ID

Object specifying if contour is the external or internal edge of an ROI.

datatype_icon

Type

Shape type of the contour.

datatype_icon

Coordinates

Relative position of the contour.

datatype_icon

color spectrum

Information about the color to match.

During the matching phase, the color information in each specified image region is compared with the information contained in this array. Ignore certain color components by replacing the corresponding component in color spectrum to -1. For example, by replacing the last component in color spectrum with -1, the white color is ignored during the color matching process. By replacing the second to last component in color spectrum, the black color is ignored during the color matching process.

datatype_icon

minimum match score

Smallest score a match can have to be considered valid.

The data range for a match is between 0 and 1000.

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

match saturation threshold

Threshold value to distinguish two colors with the same hue value.

Threshold value should be the same as that in the Learn Color node.

Default: 80

datatype_icon

image out

Reference to the source image.

datatype_icon

match flags

Array containing Boolean information that indicates if there is a match between the input color information and the color in each specified region in the image.

TRUE Color information matches the input color information.
FALSE Color information does not match the input color information.
datatype_icon

match scores

Array containing the match scores for each region in the image.

The match scores are represented on a scale of 0 to 1000, where 0 indicates no match and 1000 indicates a perfect match.

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