Recognition Quality Presets

Overview

Aspose.BarCode for Java contains class QualitySettings that is used to enable and disable various algorithms to read barcodes with damages or artifacts. In addition, class QualitySettings allows customizing the trade-off between recognition quality and speed in common cases. Corresponding methods are grouped into dedicated presets that allow improving image recovery and barcode reading for various scenarios.

Recognition Presets

In this section, supported recognition presets are described, including HighPerformance, NormalQuality, HighQuality, MaxBarCodes, and others, as represented in the table below. By default, the NormalQuality preset is applied.

Recognition Preset Description
NormalQuality Suitable for regular-quality barcode images
HighQuality Intended for low-quality barcode images. It allows scanning diagonal and severely damaged barcode images
HighPerformance Used for high-quality barcode images
HighQualityDetection Same as NormalQuality but with the setDetectorSettings method called passing the HighQuality value
MaxQualityDetection Same as NormalQuality but with the setDetectorSettings method called using the MaxQuality value. It allows detecting diagonal and damaged barcode images
MaxBarcodes Allows scanning all barcodes possibly presented in an image, including invalid ones. It is recommended for debugging tasks only

Universal Presets for All Barcode Types

Aspose.BarCode for Java suggests various universal recognition presets and corresponding methods to activate them, such as setHighPerformance, setNormalQuality, and setHighQuality. These presets establish linear dependence between reading accuracy and speed for all barcode types. Generally, using the default NormalQuality preset is sufficient for most of barcodes that have acceptable scanning quality.

Presets for 1D Barcode Types

To scan linear barcodes, Aspose.BarCode for Java allows using dedicated recognition presets suitable for normal-quality barcodes. These presets provide improved methods for 1D barcode detection and decoding and are useful to work with barcodes of small dimensions or complex documents with multiple text blocks and tables. For example, compared with general recognition settings, HighQualityDetection and MaxQualityDetection presets allow improving recognition results for 1D barcodes in complex documents. Alternatilvely, such imprment can be implemented using the NormalQuality preset and tuning BarcodeSvmDetectorSettings through the setDetectorSettings method.

The image shown below is a sample document with multiple barcodes that contains also text parts and figures.

MaxBarCodes Preset for Debugging

To detect all possible barcodes in an image including invalid ones, Aspose.BarCode for Java contains a special preset called MaxBarCodes. This preset allows restoring up to 1% more barcodes (severely damaged or incorrectly generated) in comparison with the results that can be reached by the NormalQuality preset. Similar reading settings can be implemented through the setAllowIncorrectBarcodes method. The MaxBarCodes preset may be used to scan even unreadable barcodes; however, it is intended for debugging tasks only as it may result in considerably augmenting the time needed to complete the reading process and providing invalid decoding outputs. This preset is suggested only for advanced users of the Aspose.BarCode library.