Recognition Quality Presets

Manage Reading Speed and Quality Using Presets

Aspose.BarCode for C++ provides class QualitySettings that allows enabling and disabling various algorithms for image recovery to read barcodes with distortions or artifacts. See the article Recognition Specifics for more information about special cases of barcode recognition. Moreover, class QualitySettings provides special parameters to customize the trade-off between reading speed and quality in regular situations. Such parameters are grouped into several presets that facilitate image recovery and barcode reading for different recognition scenarios.

Supported Presets

This section provides detailed information about supported recognition presets, including NormalQuality, HighPerformance, HighQuality, MaxBarCodes, manually configured options, and others, as listed in the table below. By default, QualitySettings uses the NormalQuality preset.

Recognition Preset Description
NormalQuality Suitable for the most of barcodes with regular quality
HighQuality Intended for work with low-quality barcodes; it allows reading and decoding diagonal and severely corrupted barcodes
HighPerformance Suggested for high-quality barcode images
HighQualityDetection Similar to the NormalQuality one but has the DetectorSettings parameter set to HighQuality
MaxQualityDetection Similar to the NormalQuality one but with the DetectorSettings set to MaxQuality. It is applicable to detect diagonal and damaged barcodes
MaxBarcodes Allows reading all potential barcodes in an image, even incorrect ones. It is recommended for use for debugging purposes only

Universal Presets for All Barcode Types

Aspose.BarCode for C++ provides several universal recognition quality setting presets, such as HighPerformance, NormalQuality, and HighQuality. These presets allow establishing linear dependence between recognition quality and speed for all barcode types, including 1D, 2D, and postal symbologies. In most cases, the NormalQuality preset used by default is sufficient for the majority of barcodes that provide normal scanning quality.

Presets for 1D Barcode Types

To read 1D barcodes, Aspose.BarCode for C++ provides special quality setting presets that are intended for working with normal quality barcodes and at the same time, enable improved parameters for the detection and recognition of 1D barcodes. These presets can be particularly useful in cases when it is necessary to scan barcodes of small dimensions that are difficult for detecting and recognizing from complex documents with many textual blocks and tables. Specifically, using HighQualityDetection and MaxQualityDetection presets allows getting much better recognition results for 1D barcodes in complex documents compared with basic settings. Similar improvements can be achieved by using the NormalQuality preset and specifying the appropriate settings in DetectorSettings.

The image below illustrates an example of a document with various barcodes presented in this document along with textual parts and illustrations.

Preset MaxBarCodes for Debugging

To read all barcodes potentially presented in an image including incorrect ones, Aspose.BarCode for C++ provides a special preset called MaxBarCodes. This preset applies recognition quality settings that allow recovering up to 1% more barcodes (severely corrupted or erroneous ones) compared with the results achievable using the NormalQuality preset. Similar recognition quality settings can be enabled using the AllowIncorrectBarcodes property. Although the MaxBarCodes mode may be useful to decode barcodes that otherwise are unreadable, it should be used for debugging purposes only, as applying this parameter may lead to notably increasing the time required to complete the recognition process and producing incorrect recognition outputs. This preset is recommended for use only for advanced users of the Aspose.BarCode library.