Table Of Contents

Read QR Code (G Dataflow)

Last Modified: June 25, 2019

Locates and reads the value encoded in a QR code.

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

connector_pane_image
datatype_icon

search options

Cluster that contains the search options when searching for QR codes in the image.

datatype_icon

rotation mode

Amount of QR code rotation allowed.

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 QR code occupies the entire image or the entire search region.

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

TRUE QR code occupies the entire image or the entire search region.
FALSE No assumptions made about the percentage of the image occupied by the QR 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 is set, 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 the matrix because all edge candidates are eliminated.

datatype_icon

demodulation mode

Mode used to demodulate the QR code, or determine which cells are on or off.

Name Value Description
auto-detect -2

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

histogram 0

The node uses a histogram of all of the matrix cells to calculate a threshold. This threshold determines if a cell is on or off. This is the fastest method, but it requires QR code 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 QR code images that have inconsistent levels of contrast in the matrix.

combination 2

The node uses the histogram of the matrix 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 QR code images 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, the node should take to determine if each cell is on or off.

Name Value Description
auto-detect -2

(Default) The node will try each sample size and use the one which decodes the QR 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 used to determine the pixel value for each cell.

If cell sample size is 1×1, the value of the single samples pixel always 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 QR 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.

dentral 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 allowed.

Default: 5

datatype_icon

image in

Reference to the source image.

datatype_icon

ROI descriptor

Descriptor that defines the rectangle, rotated rectangle, or polygon within which the QR code is located.

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

description options

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

datatype_icon

matrix size (cells)

Size of the QR code.

datatype_icon

barcode polarity

Data-to-background contrast for the QR 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

mirror mode

Code appears normally in the image or if the 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

QR model

Model type.

There are three major QR code models: QR Code Model 1, QR Code Model 2, and Micro QR Code. Micro QR Codes have only a single target in the top left, while Model 1 and Model 2 have targets in all corners except for the bottom right. Model 2 codes have alignment patterns inside the data. Model 1 codes have alignment patterns along the edges.

Name Value Description
auto detect 0

Automatically selects the QR model.

micro 1

Selects the Micro QR Code model.

Model 1 2

Selects the QR Code Model 1 model.

Model 2 3

Selects the QR Code Model 2 model.

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

code cell size

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

The size refers to cell size in pixels.

datatype_icon

minimum size

Minimum size, in pixels, of a cell in the code.

datatype_icon

maximum size

Maximum size, in pixels, of a cell in the code.

datatype_icon

image out

Reference to the source image.

datatype_icon

QR code report

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

datatype_icon

found?

Boolean that specifies if a QR code was found and decoded in the image.

TRUE QR code found and decoded in the image.
FALSE No QR code found in the image.
datatype_icon

data

Encoded data in the code.

datatype_icon

bounding box

Array that defines the boundary of the QR code in the image.

datatype_icon

errors corrected

Number of rows in the QR code.

datatype_icon

dimensions (rows/cols)

Number of rows and columns in the QR code measured in cells.

All QR codes are square by specification.

datatype_icon

version

Version of the QR code with respect to the model type.

datatype_icon

QR model

QR code model found.

datatype_icon

stream mode

Stream mode or the format of the data that is encoded in the QR code.

datatype_icon

barcode polarity

Data-to-background contrast for the QR code.

datatype_icon

mirrored?

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

TRUE QR code appears mirrored in the image.
FALSE QR code appears normal in the image.
datatype_icon

append stream position

Position the QR symbol is in with respect to the stream of data in all symbols.

A QR symbol to be part of a larger array of symbols.

datatype_icon

size of append stream

QR symbols that are part of a larger array of symbols.

If a QR symbol is part of a larger array of symbols, this parameter returns how many symbols are involved in the array.

datatype_icon

first EAN-128 ID

First EAN-128 Application ID encountered in the stream.

This is only useful for EAN-128 codes. For mixed/appended EAN-128 codes, refer to the tokenized output.

datatype_icon

first alternate language ID

First Regional Language Designator encountered in the stream.

This is only useful for ECI codes. For multiple language ECI symbols, refer to the tokenized output.

datatype_icon

append stream ID

Stream this symbol is related to.

Sometimes a QR symbol is part of a larger array of symbols. Stream ID can be useful when there are a number of QR streams and a symbol needs to be categorized.

datatype_icon

minimum edge strength

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 the matrix because all edge candidates are eliminated.

datatype_icon

demodulation mode

Mode used to demodulate the QR code, or determine which cells are on and which cells are off.

datatype_icon

cell sample size

Sample size, in pixels, used to determine if each cell is on or off.

datatype_icon

cell filter mode

Mode used to determine the pixel value for each cell.

datatype_icon

tokenized output data

Data tokenized the same way it was encoded in the symbol.

This is useful if the symbol is encoded using multiple languages. mode data contains the language identifier. This is also useful if the symbol contains multiple EAN-128 application IDs. mode data contains the application identifiers, otherwise, the QR code report data should suffice.

datatype_icon

stream mode

Stream mode or the format of the data that is encoded in the QR code.

datatype_icon

mode data

Parameter that specifies stream mode specific data.

This parameter uses the following mapping:

  • Numeric - Length of Data String
  • AlphaNumeric - Length of Data String
  • Raw-Byte - Length of Data String
  • UCC/EAN-128 In Tokens - Application ID for the length of the data token
  • UCC/EAN-128 In Data - Length of Data String
  • Extended Character Interpretation - Language Identifier for the length of the data token
  • Kanji -Length of Data String
datatype_icon

data

Encoded data in the code.

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