We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Failed to recognize Noisy BarCodes - From scanner

I am using Aspose.barcode for Java trial version and evaluating whether it is the right product for us or not. I found it as a very easy solution to read/write barcodes. But I have problem while reading barcodes from images where the code text is not getting retrieved corrected. If the barcodes printed on PDF from scanner, there is chance of noise where the barcode recognizer software might fail. Looks like the API has a limitation (supported Symbologies) on barcode recognition on noisy images.
I have a test case (attached PDF doc) that I executed where the barcode extractor program could not recognize it. It contains 3 pages in it. First two pages (1 & 2) are scanned copies and 3rd one was created by the PDF editor. The attached program (using ASPOSE API) was able to scan (recognize) the barcode on the first page (as ND0P2 instead of ND062) and failed to do the same on 2nd page whereas it always be successful while reading barcodes from non-scanned PDF images (created through PDF s/w with clear barcode image).

This might not be problem if the scanner machine doesn't add up any extra noise in the image and the quality of the image.

We are seriously planning to evaluate a solution which works for our business needs. We could decide on your problem becuase of this problem. Any help would be appreciated.


Thank you for inquiry.

For noisy images, you may try using some recognition hints. I was able to read the barcode in the first page by adding the below line:


But, the reader still failed to recognize the barcode from second page. The bars are not clear as compared to the first one. Is it possible for you to increase the scan quality? I will also send this image to the developers for further analysis.

I have a similar problem (also evaluating 2.4.0-trial). Attached are two png, one generated completely through computer (image printer, etc), the other one via a scan of a print out. Both are not pixel perfect; one has some dithering, the other some noise. Im my opinion not too bad though. But the scanned one is not recognized.

public class Test
static public void main(String[] args)
test(new File(“c:/tmp/test-ok.png”));
test(new File(“c:/tmp/test-not.png”));
catch (Throwable t) {t.printStackTrace(); }
static private void test(File file)
throws IOException
BufferedImage lBufferedImage = ImageIO.read(file);
BarCodeReader lBarCodeReader = new BarCodeReader(lBufferedImage, BarCodeReadType.Code39Standard);
String lBarcode = lBarCodeReader.getCodeText();
System.out.println(file.getName() + " -> " + lBarcode);

test-ok.png -> 01234567890
test-not.png -> null


Thank you for inquiry.

You may try different recognition hints for scanned images. Please visit http://www.aspose.com/documentation/java-components/aspose.barcode-for-java/better-and-faster-image-processing-for-barcode-recognition.html for reference.

I was able to recognize the barcode from both of the images using the MedianSmoothing hint.


The issues you have found earlier (filed as BARCODJAVA-21932) have been fixed in Aspose.BarCode for Java 7.0.0.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.