| 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.
The following codes are supported:
2D Codes:
1D Barcodes:
Postal Codes:
GS1 Family:
Pharma Codes:
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:
Cvb::CodeReader::Decoder, Stemmer.Cvb.CodeReader.Decoder, or cvb.code_reader.Decoder.Cvb::CodeReader::Symbology or cvb.code_reader.Symbology enum. In .NET, use the corresponding configuration class from the Stemmer.Cvb.CodeReader.Config namespace.Note, that multiple code types can be configured in parallel by retrieving and enabling multiple configuration objects:
To support reliable detection and decoding, please consider the following guidelines:
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:
Code search speed – controls the trade-off between search speed, damage tolerance, and the required code contrast:
P_CODE_SEARCH_SPEEDCvb::CodeReader::Decoder::SetCodeSearchSpeed (C++)Stemmer.Cvb.CodeReader.Decoder.CodeSearchSpeed (.NET)cvb.code_reader.Decoder.code_search_speed (Python)The available values are:
| Value | Description |
|---|---|
0 | Default. Provides the highest damage tolerance and supports low-contrast codes. |
1 | Faster search with reduced damage tolerance. Low-contrast codes can still be detected. |
2 | Faster search with further reduced damage tolerance. Intended for medium-contrast codes. |
3 | Fastest search. Has the same damage tolerance as level 2 and is intended for high-contrast codes only. |
Higher values can improve decoding speed, but may reduce the tolerance against damaged or low-contrast codes.
Decode time limit – limits the time available for decoding:
P_TIME_LIMIT_DECODECvb::CodeReader::Decoder::ExecuteFor (C++)Stemmer.Cvb.CodeReader.Decoder.ExecuteFor (.NET)cvb.code_reader.Decoder.execute_for (Python)The time limit is specified through the decoding method:
| API | Type | Time specification |
|---|---|---|
| C++ | std::chrono::duration | Duration, converted to milliseconds |
| .NET | System.TimeSpan | Duration, converted to milliseconds |
| Python | int | Milliseconds |
The supported range is 0 to 60000 milliseconds. A value of 0 disables the time limit.
A lower time limit can reduce the processing time per image, but may also reduce the probability of successfully decoding difficult codes.
Fast Data Matrix search – enables a faster search mode for Data Matrix codes:
P_FAST_DM_SEARCHCvb::CodeReader::Config::DataMatrix::SetFastDataMatrixSearchEnabled (C++)Stemmer.Cvb.CodeReader.Config.DataMatrix.IsFastDataMatrixSearchEnabled (.NET)decoder.config(cvb.code_reader.Symbology.DataMatrix).is_fast_data_matrix_search_enabled (Python)The available values are:
| Value | Description |
|---|---|
false | Disables fast Data Matrix search. |
true | Enables fast Data Matrix search. |
This option applies to Data Matrix decoding only. It can improve decoding performance in suitable applications. Depending on the image quality and code characteristics, decoding robustness may be affected.
Fast Data Matrix search should only be enabled if Data Matrix is the only enabled symbology.
Additional performance-related options may also be available within the configuration class of each individual code type. These options provide further control to optimize decoding behavior according to the symbology and the specific application requirements.
The code search speed can be configured through the decoder.
Higher values can improve decoding speed, but may reduce the tolerance against damaged or low-contrast codes.
The decode time limit is specified when starting the decoding operation.
The time limit is specified in milliseconds in Python. In C++ and .NET, it is specified using a duration. If the time limit is reached, the returned status indicates whether decoding completed within the specified time limit.
Fast Data Matrix search is configured through the Data Matrix configuration.
Fast Data Matrix search should only be enabled if Data Matrix is the only enabled symbology.
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