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

Free Support Forum - aspose.com

No recognize barcode in java

No recognize barcode in java.


minimum resolution?

Hi Alcides,

Thank you for your interest in Aspose products.

In my personal experience, all the images having resolution of 300dpi or more, get easily scanned by Aspose.BarCode component. Also, I have confirmed this from the development end and according to them the minimum recommended resolution required to successfully scan a barcode from an image is 300dpi. Please note, with low resolution you may require to set RecognitionHints

Regarding the image provided by you, I am unable to scan a single barcode from it. I believe that the image has a resolution of 96dpi. Can you please provide a sample that has been scanned on some higher resolution?

the component can be configured to perform an extensive search?

we use a resolution of 200 dpi, at the request of the customer.

List ol = new ArrayList();
for(OrientationHints hints:ol){
BarCodeReader b = new BarCodeReader(bi,BarCodeReadType.getCode128());
while (b.read() == true)
// Barcode found. Print result on screen
System.out.println("Barcode found. Codetext: " + b.getCodeText());
BarCode code=new BarCode( b.getCodeText());

With the bar code reader, if you recognize the bar code on the physical document.

300dpi full color

300dpi gray scale


Thank you for providing more samples. You may have increased the resolution of your recent samples but the image quality of barcode label has decreased. The barcode bars are not distinguishable in both images. Please note, there are several other factors contributing in scan failure, like presence of noise in the image, skewness of barcode label, punch holes/white spots etc. Severity of one such factor or a combination of two or more makes it difficult for the BarCodeRecognition algorithm to scan a barcode properly.

Please find attached a sample image. It has several barcodes that you can try to recognize using the Aspose.BarCode for Java. It will also give you an idea of required image quality.

Please note that you can perform extensive scanning by setting the customized scan strength to 100 as below,