QR Code Reader

NI Vision Assistant

QR Code Reader

Decodes a QR code.

Main Tab

The following controls are available on the Main tab.

  • Step Name—Name to give the step.
  • Reposition Region of Interest—When enabled, the step dynamically repositions the region of interest based on a coordinate system you built in a previous step.
  • Reference Coordinate System—Coordinate system to which you want to link the region of interest.
  • Code Read—Specifies the code that the step read.
  • Elapsed Time—Amount of time the step took to read the code.
  • Suggest Values—Allows the algorithm to detect the best values for parameters whose Suggest Value? checkboxes are enabled.

Basic Tab

The following controls are available on the Basic tab.

  • Suggest Value?—When enabled, the step suggests a value for the associated control after the Suggest Values button is clicked.
  • QR Model—Specifies the QR code model to look for in the image.
    • Auto-detect—Sets the step to determine the QR code model automatically.
    • Micro—Sets the step to read Micro QR codes only. Micro QR codes have only a single target in the top left.
    • Model 1—Sets the step to read Model 1 QR codes only. Model 1 QR codes have targets in all corners except for the bottom right corner and have alignment patterns along the edges.
    • Model 2—Sets the step to read Model 2 QR codes only. Model 2 QR codes have targets in all corners except for the bottom right corner and have alignment patterns inside the data.
  • Matrix Size—Sets the size of the QR code to read.
  • Barcode Polarity—Specifies the data-to-background contrast for the QR code.
    • Auto-detect—Sets the step to determine the QR code polarity automatically.
    • Black On White—Sets the step to read QR codes with dark data on a bright background.
    • White On Black—Sets the step to read QR codes with bright data on a dark background.
  • Min Cell Size (pixels)—Specifies the minimum size, in pixels, of the matrix in the image. If you set this value to 0, the step never excludes a matrix candidate because it is too small.
  • Max Cell Size (pixels)—Specifies the maximum size, in pixels, of the matrix in the image. If you set this value to 0, the step never excludes a matrix candidate because it is too large.
  • Uncheck/Check All—Disables/Enables all Suggest Value checkboxes.
  • Code Read—Specifies the code that the step read.
  • Elapsed Time—Amount of time the step took to read the code.
  • Suggest Values—Allows the algorithm to detect the best values for parameters whose Suggest Value? checkboxes are enabled.

Advanced Search Tab

The following controls are available on the Advanced Search tab.

  • Suggest Value?—When enabled, the step suggests a value for the associated control after the Suggest Values button is clicked.
  • Rotation Mode—Specifies the amount of QR code rotation to allow.
    • Unlimited—The step allows for unlimited rotation.
    • 0 Degrees—The step allows for no rotation.
    • 90 Degrees—The step allows for +/- 90 degrees of rotation.
    • 180 Degrees—The step allows for +/- 180 degrees of rotation.
    • 270 Degrees—The step allows for +/- 270 degrees of rotation.
  • Skew Degrees Allowed—Amount of skew in the QR code to allow. The default is 5 degrees.
  • Edge Threshold—Specifies the minimum contrast a pixel must have to be considered part of a QR code cell edge. The lower this value, the more potential edge candidates the step examines during the location phase. Setting this value too low decreases the performance of the step because the step examines too many potential edge candidates. Setting this value too high may also decrease the performance of the step by removing valid edge candidates, making location more difficult. Setting this value too high may also cause the step to fail to identify the QR code because all edge candidates are eliminated.
  • Code Read—Specifies the code that the step read.
  • Elapsed Time—Amount of time the step took to read the code.
  • Suggest Value—Allows the algorithm to detect the best values for parameters whose Suggest Value? checkboxes are enabled.

Cell Sampling Tab

The following controls are available on the Cell Sampling tab.

  • Suggest Value?—When enabled, the step suggests a value for the associated control after the Suggest Values button is clicked.
  • Demodulation Mode—Specifies the mode that the step uses to determine which cells are on and which cells are off in the QR code.
    • Auto-detect—The step tries each demodulation mode and use the one which decodes the QR code within the fewest iterations and utilizes the least amount of error correction.
    • Histogram—The step 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 requires images with consistent levels of contrast in the matrix.
    • Local Contrast—The step examines each neighbor of a cell to determine if the cell is on or off. This method is slower but works with images that have inconsistent levels of contrast in the matrix.
    • Combination—The step uses the histogram of the matrix to calculate a threshold. For cells with pixel values that are sufficiently below or above this threshold, the step uses the threshold to determine if the cell is on or off. If the cell pixel values are close to the threshold, the step uses the Local Contrast method to determine if the cell is on or off. This method is slower but works with images that have extremely low cell fill percentages or gross print growth errors.
    • All—The step tries Histogram first, then Local Contrast, and then Combination, stopping when one mode is successful.
  • Cell Sample Size—Specifies the cell sample size, in pixels, to use to determine if each cell is on or off.
    • Auto-detect—The step tries each sample size and uses the one that decodes the QR code in the fewest iterations using the least amount of error correction.
    • 1×1 The step uses a 1×1 sized sample from each cell.
    • 2×2—The step uses a 2×2 sized sample from each cell.
    • 3×3—The step uses a 3×3 sized sample from each cell.
    • 4×4—The step uses a 4×4 sized sample from each cell.
    • 5×5—The step uses a 5×5 sized sample from each cell.
    • 6×6—The step uses a 6×6 sized sample from each cell.
    • 7×7—The step uses a 7×7 sized sample from each cell.
  • Cell Filter Mode—Specifies the mode the step uses 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.
    • Auto-detect—The step 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—The step sets the pixel value for the cell to the average of the sampled pixels.
    • Median—The step sets the pixel value for the cell to the median of the sampled pixels.
    • Central Average—The step sets the pixel value for the cell to the average of the pixels in the center of the cell sample.
    • High Average—The step 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—The step 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—The step 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—The step 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—The step tries each filter mode, starting with Average and ending with Very Low Average, stopping once a filter mode decodes correctly.
  • Mirror Mode—Specifies if the QR code appears normally in the image or if the QR code appears mirrored in the image.
    • Auto-detect—Sets the step to determine if the QR code is mirrored automatically.
    • Normal—Sets the step to read QR codes that appear normally in the image.
    • Mirrored—Sets the step to read QR codes that appear mirrored in the image.
  • Uncheck/Check All—Disables/Enables all Suggest Value checkboxes.
  • Code Read—Specifies the code that the step read.
  • Elapsed Time—Amount of time the step took to read the code.
  • Suggest Values—Allows the algorithm to detect the best values for parameters whose Suggest Value? checkboxes are enabled.