Better and Faster Image Processing for BarCode Recognition

Skip to end of metadata
Go to start of metadata
Aspose.BarCode for Java provides better and faster barcode recognition using the following image processing algorithms:
  • Median smoothing image processing (RecognitionHints.ImageBinarizationHints. MedianSmoothing())
  • HLS image processing (RecognitionHints.ImageBinarizationHints.HLS())
  • Grayscale image processing (RecognitionHints.ImageBinarizationHints.Grayscale())

These settings can be useful while detecting barcodes from scanned or slightly damaged images. The probability of barcode detection will increase by this setting.

Programming Sample

The following code snippet shows how to use median smoothing, HLS and grayscale image processing techniques while recognizing the barcode:

[Java]
// read code39 barcode from image
String image = "code39Extended.jpg";
BarCodeReader reader = new BarCodeReader(Toolkit.getDefaultToolkit().getImage(image), BarCodeReadType.getCode39Standard());
// set grayscale image processing
reader.setHints(RecognitionHints.ImageBinarizationHints.getGrayscale());
// try to recognize all possible barcodes in the image
while (reader.read())
{
    System.err.println("Codetext: " + reader.getCodeText());
}
// close reader
reader.close();
 
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.