Table Of Contents

Read Data Matrix Barcode (G Dataflow)

Last Modified: June 25, 2019

Locates and reads the value encoded in a Data Matrix barcode.

You can compare the decoded data to a reference string or check whether the data contains a specific pattern. Many of the options of this node allow for automatic detection of Data Matrix barcode properties or determine which methods the node should use to locate and decode the Data Matrix barcode. Selecting specific properties and methods for these options will increase the performance of the node.

connector_pane_image
datatype_icon

search options

Cluster containing the options to use when searching for Data Matrix codes in the image.

datatype_icon

rotation mode

Amount of Data Matrix code rotation the node should allow.

Name Description
unlimited The node allows for unlimited rotation.
0 degrees The node allows for 0 degrees of rotation.
90 degrees The node allows for 90 degrees of rotation.
180 degrees The node allows for 180 degrees of rotation.
270 degrees The node allows for 270 degrees of rotation.
datatype_icon

skip location?

Boolean that specifies if the node assumes that the Data Matrix code occupies the entire image, or the entire search region.

If TRUE, the node skips the location phase, moving immediately to extraction and decoding.

TRUE Data Matrix code occupies the entire image or the entire search region.
FALSE No assumptions made about the percentage of the image occupied by the Data Matrix code.

Default: FALSE

datatype_icon

edge threshold

Minimum contrast a pixel must have in order to be considered part of a matrix cell edge.

The lower this value, the more potential edge candidates the node will examine during the location phase. Setting this value too low will decrease the performance of the node because the node will examine too many potential edge candidates. Setting this value too high may also decrease the performance of the node by removing valid edge candidates, making location more difficult. Setting this value too high may also cause the node to fail to identify a Data Matrix barcode because all edge candidates are eliminated.

datatype_icon

demodulation mode

Mode the node should use to demodulate, or determine which cells are ON and which cells are OFF, within the Data Matrix code.

Name Value Description
auto-detect -2

(Default) The node tries each demodulation mode and use the one which decodes the Data Matrix code within the fewest iterations and utilizing the least amount of error correction.

histogram 0

The node uses a histogram of all of the cells to calculate a threshold. This threshold determines if a cell is on or off. This is the fastest method, but it requires images with consistent levels of contrast in the matrix.

local contrast 1

The node examines each of the cell's neighbors to determine if the cell is on or off. This method is slower, but works with images that have inconsistent levels of contrast.

combination 2

The node uses the histogram of the cells to calculate a threshold. For cells with pixel values that are sufficiently below or above this threshold, the node will use the threshold to determine if the cell is on or off. If the cell pixel values are close to the threshold, the node will use the local contrast method to determine if the cell is on or off. This method is slower, but works with Data Matrix codes that have extremely low cell fill percentages or gross print growth errors.

all 3

The node tries histogram, local contrast, and combination, stopping once one mode is successful.

datatype_icon

cell sample size

Sample size, in pixels, to take to determine if each cell is ON or OFF.

Name Value Description
auto-detect -2

(Default) The node tries each sample size and use the one which decodes the Data Matrix code within the fewest iterations and utilizing the least amount of error correction.

1×1 1

The node will use a 1×1 sized sample from each cell.

2×2 2

The node will use a 2×2 sized sample from each cell.

3×3 3

The node will use a 3×3 sized sample from each cell.

4×4 4

The node will use a 4×4 sized sample from each cell.

5×5 5

The node will use a 5×5 sized sample from each cell.

6×6 6

The node will use a 6×6 sized sample from each cell.

7×7 7

The node will use a 7×7 sized sample from each cell.

datatype_icon

cell filter mode

Mode to use to determine the pixel value for each cell.

If cell sample size is 1×1, then the value of the sample pixel determines the pixel value for the cell.

Name Value Description
auto-detect -2

The node tries all filter modes and uses the one that decodes the Data Matrix code within the fewest iterations and utilizing the least amount of error correction.

average 0

The node sets the pixel value for the cell to the average of the sampled pixels.

median 1

The node sets the pixel value for the cell to the median of the sampled pixels.

central average 2

The node sets the pixel value for the cell to the average of the pixels in the center of the cell sample.

high average 3

The node sets the pixel value for the cell to the average value of the half of the sampled pixels with the highest pixel values.

low average 4

The node sets the pixel value for the cell to the average value of the half of the sampled pixels with the lowest pixel values.

very high average 5

The node sets the pixel value for the cell to the average value of the ninth of the sampled pixels with the highest pixel values.

very low average 6

The node sets the pixel value for the cell to the average value of the ninth of the sampled pixels with the lowest pixel values.

all filters 8

The node tries each filter mode, starting with average and ending with very low average, stopping once a filter mode decodes correctly.

datatype_icon

skew degrees allowed

Amount of skew in the code to allow.

Default: 5

datatype_icon

maximum iterations

Maximum number of iterations before the node stops looking for the code.

Default: 500

datatype_icon

initial search vector width

Number of pixels to average together to determine the location of an edge.

You may need to increase this value when the Data Matrix code has cells with a low fill percentage.

Default: 5

datatype_icon

description options

Cluster that contains the Data Matrix code description options to use when searching for Data Matrix codes in the image.

datatype_icon

aspect ratio

Ratio of the width of a cell of the Data Matrix code, in pixels, divided by the height of a cell of the Data Matrix code, in pixels.

Set this value to 0 to indicate that the node should determine the aspect ratio.

Default: 0

datatype_icon

rows

Number of rows in the Data Matrix code.

Set this value to 0 to indicate that the node should determine the number of rows.

Default: 0

datatype_icon

columns

Number of columns in the Data Matrix code.

Set this value to 0 to indicate that the node should determine the number of columns.

Default: 0

datatype_icon

rectangle

Boolean that specifies if the Data Matrix code is square or rectangular.

If both rows and columns are non-zero, the node ignores this setting.

datatype_icon

ECC

ECC used for the Data Matrix code.

Name Value Description
auto-detect -2

(Default) Sets the node to determine the barcode ECC automatically.

ECC 000 0

Sets the node to read Data Matrix codes of ECC 000 only.

ECC 050 50

Sets the node to read Data Matrix codes of ECC 050 only.

ECC 080 80

Sets the node to read Data Matrix codes of ECC 080 only.

ECC 100 10

Sets the node to read Data Matrix codes of ECC 100 only.

ECC 140 14

Sets the node to read Data Matrix codes of ECC 140 only.

ECC 000-140 19

Sets the node to read Data Matrix codes of ECC 000, ECC 050, ECC 080, ECC 100, and ECC 140 only.

ECC 200 20

Sets the node to read Data Matrix codes of ECC 200 only.

datatype_icon

barcode polarity

Data-to-background contrast for the Data Matrix code.

Name Value Description
auto-detect -2

(Default) Sets the node to determine the code polarity automatically.

black on white 0

Sets the node to read codes with dark data on a bright background.

white on black 1

Sets the node to read codes with bright data on a dark background.

datatype_icon

cell fill percentage

Fill percentage for a cell that is in the ON state.

Name Value Description
auto-detect -2

(Default) Sets the node to determine the Data Matrix code cell fill percentage automatically.

< 30% 0

Sets the node to read Data Matrix codes with a cell fill percentage of less than 30 percent.

>= 30% 1

sets the node to read Data Matrix codes with a cell fill percentage greater than or equal to 30 percent.

datatype_icon

minimum border integrity %

Minimum percentage of the matrix border the node should expect in the Data Matrix code.

During the location phase, the node ignores possible matrix candidates that do not have at least this level of border integrity.

datatype_icon

mirror mode

Option that specifies if the Data Matrix code appears normally in the image or if the Data Matrix code appears mirrored in the image.

Name Value Description
auto-detect -2

(Default) Sets the node to automatically determine if the code is mirrored.

normal 0

Sets the node to read codes that appear normally in the image.

mirrored 1

Sets the node to read codes that appear mirrored in the image.

datatype_icon

image in

Reference to the source image.

datatype_icon

ROI descriptor

Region of interest within which the Data Matrix code is located.

The first contour of the ROI must be a rectangle, rotated rectangle, or convex polygon. If skip location? of the data matrix search options input is TRUE, a convex polygon contour has an additional constraint of being four-sided. If the ROI descriptor is empty or not connected, the entire image is considered to be the 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

prepare for grading?

Option for specifying if the node should make calculations needed to prepare to grade the Data Matrix code.

Name Value Description
do not prepare 0

(Default) Does not make any preparatory calculations. Attempts to grade the Data Matrix code will generate an error.

prepare for AIM grading 1

Prepares the image for grading using the AIM Print Quality metrics.

datatype_icon

size options

Cluster that contains the code size options to use when searching for codes in the image.

datatype_icon

data matrix size

Size range, in pixels, for the code in the image.

The node ignores potential barcode candidates that are sized outside of this range.

datatype_icon

minimum size

Minimum size, in pixels, of the code in the image.

Setting this value to 0 indicates that the node should never exclude a barcode candidate because it is too small.

Default: 0

datatype_icon

maximum size

Maximum size, in pixels, of the code in the image.

Setting this value to 0 indicates the node should never exclude a barcode candidate because it is too large.

Default: 0

datatype_icon

quiet zone width

Minimum size of the quiet zone, in pixels.

The node ignores barcode candidates whose quiet zones are smaller than this value.

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

advanced options

Array of advanced options.

datatype_icon

option

Option the node uses when reading the data matrix.

line detection (0) Enables the line detection algorithm. Use line detection if the image has a cluttered background.
highlight filter (1) Enables the highlight filter. Use the highlight filter if the image is blurry or has low contrast.
aggressive (2) Enables aggressive reading. aggressive reading returns the decoded code immediately without minimizing detected errors.
datatype_icon

value

Value that specifies whether to use the selected option.

A value greater than 0 enables the option.

datatype_icon

image out

Reference to the source image.

datatype_icon

data matrix report

Cluster of information about the code that the node reads.

datatype_icon

found?

Boolean that indicates if a data matrix code is located in the image.

TRUE Data matrix code was located in the image.
FALSE Data matrix code was not located in the image.
datatype_icon

binary?

Boolean that indicates if the Data Matrix code contains either encoded non-ASCII binary data or ASCII text.

TRUE Data Matrix code contains encoded non-ASCII binary data.
FALSE Data Matrix code contains ASCII text.
datatype_icon

data

Encoded information that the node reads.

datatype_icon

bounding box

Aarray of five points that define the boundary of the Data Matrix code in the image.

datatype_icon

errors corrected

Number of erasures corrected using inherent error correction.

datatype_icon

erasures corrected

Number of erasures corrected using inherent error correction.

datatype_icon

aspect ratio

Aspect ratio of the data matrix code in the image.

datatype_icon

rows

Number of rows in the Data Matrix code.

datatype_icon

columns

Number of columns in the code.

datatype_icon

ecc

Type of the Data Matrix code.

datatype_icon

barcode polarity

Polarity of the Data Matrix code.

datatype_icon

cell fill percentage

Cell fill percentage of the code.

datatype_icon

border integrity

Percentage of the Data Matrix border that appears correctly in the image.

datatype_icon

mirrored?

Boolean that indicates if the code appears mirrored or normally in the image.

TRUE Code appears mirrored in image.
FALSE Code appears normal in image.
datatype_icon

minimum edge strength

Minimum strength of the edges used to find the coarse location of the Data Matrix code in the image.

Use this value as a guide for setting the edge threshold value in the barcode search options control.

datatype_icon

demodulation mode

Demodulation mode used to locate the code.

If demodulation mode is set to auto-detect in data matrix search options, this output indicates the recommended demodulation mode for this image.

datatype_icon

cell sample size

Cell sample size used to locate the Data Matrix barcode.

If cell sample size is set to auto-detect in data matrix search options, this output indicates the recommended cell sample size for this image.

datatype_icon

cell filter mode

Cell filter mode used to locate the barcode.

If cell filter mode is set to auto-detect in the data matrix search options, this output indicates the recommended cell filter mode for this image.

datatype_icon

iterations

Number of iterations in attempting to locate the Data Matrix code.

If this number is equal to maximum iterations in data matrix search options and the node failed to locate the code, you may be able to locate the code by increasing maximum iterations.

datatype_icon

mean light

Mean of the light lobe from the final grid-point histogram of the symbol under test.

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