Common Vision Blox 15.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Friends Modules Pages
Code Reader

C++ .NET Python
Cvb::CodeReader Stemmer.Cvb.CodeReader cvb.code_reader

The CVB Code Reader is a high speed and reliable tool for decoding of both 1D and 2D codes for demanding machine vision applications. The reader delivers high decoding reliability with an accuracy of up to 99.9995% and remains robust even under challenging conditions such as reflective surfaces or low ambient lighting, as well as codes that are partially damaged, distorted, or of low quality.

Supported Codes

The following codes are supported:

2D Codes:

  • Data Matrix
  • QR, Micro QR
  • PDF417, MicroPDF417

1D Barcodes:

  • EAN8, EAN13 (including composite variants)
  • UPC-A, UPC-E (including composite variants)
  • Code 128
  • Code 39
  • Code 93
  • Code 11
  • Interleaved 2 of 5.

Postal Codes:

  • USPS Intelligent Mail
  • Dutch Post (KIX)
  • RoyalMail 4-State Code
  • Australia Post

GS1 Family:

  • GS1 DataBar-14
  • GS1 DataBar Stacked
  • GS1 DataBar Limited
  • GS1 DataBar Expanded
  • GS1 DataBar Expanded Stacked

Pharma Codes:

  • Pharmacode
  • Code 32 (Italian Pharmacode).

How To Use the Code Reader

The CVB Code Reader can be integrated with minimal effort. Code examples are available in the respective Decoder class documentation for C++, .NET, and Python: Cvb::CodeReader::Decoder, Stemmer.Cvb.CodeReader.Decoder, and cvb.code_reader.Decoder

The typical decoding workflow consists of the following steps:

  1. Create an instance of the decoder class: Cvb::CodeReader::Decoder, Stemmer.Cvb.CodeReader.Decoder, or cvb.code_reader.Decoder.
  2. Retrieve the configuration object for the desired symbology via the decoder, enable and configure it. In C++ and Python, select the code type using the Cvb::CodeReader::Symbology or cvb.code_reader.Symbology enum. In .NET, use the corresponding configuration class from the Stemmer.Cvb.CodeReader.Config namespace. Multiple code types can be configured in parallel by retrieving and enabling multiple configuration objects.
  3. Load an image and start the decoding process.

Recommendations

General Limitations and Recommendations

To support reliable detection and decoding, please consider the following guidelines:

  • General Image Size: The maximum supported image resolution is officially specified as 8192 × 8192 pixels. In practice, larger images may still be processed successfully, depending on available system resources and image content. However, this is not guaranteed and may vary between environments.
  • 2D Codes: A module size of up to 20 pixels is recommended. In many cases, decoding may still succeed with slightly larger modules, but this cannot be guaranteed.
  • Direct Part Marking (DPM) Codes: For DPM applications, the maximum supported image size is 1280 × 1024 pixels. Exceeding this limit may lead to decoding failures.

Performance vs. Robustness

By default, the CVB Code Reader is optimized to offer a balanced trade-off between decoding performance and robustness. To adjust this balance according to application requirements, several configuration options are available. For instance, enhancing robustness may slow down decoding, while prioritizing speed can reduce reliability under challenging conditions. The following options can be used to fine-tune this behavior:

Additional performance-related options may also be available within the configuration class of each individual code type. These can provide further control to optimize decoding behavior depending on the symbology and specific application requirements.

Examples

Example code can be found in the respective Decoder class documentation Cvb::CodeReader::Decoder (C++), Stemmer.Cvb.CodeReader.Decoder (.NET), and cvb.code_reader.Decoder (Python).

Additionally the CVB installation comes along with example programs under