Skip to content

QR Code Reader vTool#

The QR Code Reader vTool allows you to detect QR codes in images and decode them.

The QR Code Reader can detect and decode up to three QR codes in an image it receives via the Image input pin. It outputs the results via the Regions and Texts output pins.

The region output contains the region in which a QR code was found. The text output is the text string encoded by the QR code.

QR-code Reader vTool

How It Works#


The QR Code Reader vTool doesn't support Micro QR code detection.

You can detect up to three QR codes in an image. If you know that your images only contain one or two codes, configuring the QR Code Reader to only look for the expected number of QR codes may save processing time. If the number of QR codes varies or is unknown, configure the QR Code Reader to look for three codes.


For time-critical applications you can specify a timeout. A timeout helps in cases where the processing time varies or can't be foreseen, for example, if the image doesn't contain a QR code. Once the specified timeout is exceeded, the detection process stops and moves on to the next image.

Basler recommends setting the timeout a bit lower than the desired time limit. This is because the vTool doesn't stop the detection process immediately. Therefore, set the timeout to 70–80 % of the desired time limit.

Common Use Cases#

  • Reading QR codes: In this case, you only need to connect the Texts output pin to output the decoded strings.
  • Determining the positions of QR codes: Use the positions and sizes of the QR codes returned by the Regions output pin for subsequent processing.

Configuring the vTool#

To configure the QR-code Reader vTool:

QR Code Reader vTool Settings

  1. In the Recipe Management pane in the vTool Settings area, click Open Settings or double-click the vTool.
    The QR Code Reader dialog opens.
  2. In the Number of QR Codes area, select how many QR codes you want to detect.
  3. In the Timeout area, specify whether you want detection to end after a certain amount of time. If you want to specify a timeout, clear the No timeout check box and enter the desired timeout in the input field.

You can view the result of the QR Code Reader in a pin data view. Here, you can select which outputs to display.



Accepts images directly from a Camera vTool or from a vTool that outputs images, e.g., the Image Format Converter vTool.

  • Data type: Image
  • Image format: 8-bit to 16-bit mono or color images. Color images are converted internally to mono images.



Returns the text string encoded in a QR code.

  • Data type: String Array


Returns the region of every QR code found. The region is of rectangular shape. It can be used for visualization purposes or for subsequent feature extraction.

  • Data type: Region Array

Typical Predecessors#

Typical Successors#

Back to top