Detection of Potential Barcode Regions

Overview

To read barcodes, Aspose.BarCode for Java first performs the segmentation of a source image and finds areas with potential barcodes. Two barcode region detectors are available: the one with flexible sensitivity implemented in a class called BarcodeSvmDetectorSettings and the other one that relies on the previous detector version that allows correctly identifying about 97% of barcodes without the need in additional settings. BarcodeSvmDetectorSettings is used by default together with calling the setNormalQuality method.

Barcode Detector with Flexible Sensibility

BarcodeSvmDetectorSettings allows adjusting the sensitivity of the barcode detector in a flexible manner according to specific needs. The better is the detector sensitivity, the lower is reading speed and the better are the results of barcode region detection in complex source images with many text blocks and tables. For 1D barcodes, BarcodeSvmDetectorSettings supports the following sensitivity settings:

  • NormalQuality
  • HighQuality
  • HighPerformance
  • MaxQuality

Previous Version of Barcode Detector

The setUseOldBarcodeDetector method allows performing barcode region detection for 1D barcodes using the previous detector version that does not support flexible sensitivity settings. This region detection mode is close to NormalQuality and HighQuality modes of the new detector implemented in BarcodeSvmDetectorSettings.

Adjust Scan Gap during 1D and 2D Barcode Scanning

To conduct preliminary detection of large-sized 1D and some 2D types, such as QR Code, PDF417, or Aztec Code, barcode scanning can be applied with a gap of several lines. This option is intended to avoid unaccaptably long scanning and allows speeding up the decoding process. Aspose.BarCode for Java supports a special method called setAllowDetectScanGap to enable the scan gap. However, if large-sized and tiny barcodes are displayed in an image close to each other, applying this recognition option can lead to a failure to read smaller-sized barcode. When this option is not enabled, reading such combinations of barcodes can be executed successfully at the expense of recognition speed.