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

Free Support Forum - aspose.com

Barcode Reader not recognizing barcode that is of very similar quality as others that get found

Hello,

Aspose Barcode Reader has been working fine so far, but every now and then there is a barcode or two that it just can’t recognize.

The barcodes we usually scan are almost always present angled on the pdf/image, and it works just fine, so we don’t expect that to be the case here.

The barcode also looks very much like others in terms of quality.

Are you able to scan this barcode on your end?

Tech: .NET 6.0
Package: Aspose.BarCode 21.2.0 (also upgraded to 22.5.0 with same result)

Some information on our process:

  • we load PDF pages into Bitmap
  • we use: BarCodeReader.ProcessorSettings.UseAllCores (set to true)
  • we scan for the following barcodes: DecodeType.Code39Standard
  • we tried almost all possible combinations of quality settings (median smoothing, decreased image, salt and pepper, etc.)

Here is the BarcodeResult object that I inspected right after scanning (it finds only “50”):

    [0] = {BarCodeResult} CodeType = Code39Standard, CodeText = "50", Confidence = Moderate,     ReadingQuality = 80,72972106933594
 CodeBytes = {byte[]} byte[2]
 CodeText = {string} "50"
 CodeType = {SingleDecodeType} Code39Standard
 CodeTypeName = {string} "Code39Standard"
 Confidence = {BarCodeConfidence} Moderate
 Extended = {BarCodeExtendedParameters} Extended: 1D
 ReadingQuality = {double} 80.729721069335938
 Region = {BarCodeRegionParameters} Angle = 2,070030689239502, Quadrangle = {LeftTop = {X=116,Y=309}, RightTop = {X=199,Y=312}, RightBottom = {X=198,Y=351}, LeftBottom = {X=115,Y=349}}

2 Recognized Barcode Example.pdf (105.0 KB)
1 Unrecognized Barcode Example.pdf (138.9 KB)

I have attached 2 PDF files, one having the barcode it can’t scan, and the second having a barcode it can scan.

Thank you for your help.

Best regards,
Marko Bezjak

@MarkoBezjak,

Thanks for the sample PDF documents.

Please notice, I am able to reproduce the issue as you mentioned by using your sample PDF document “1 Unrecognized Barcode Example.pdf”. I used my sample code to try to recognize/detect barcode via Aspose.BarCode for .NET but to no avail. If I use “2 Recognized Barcode Example.pdf” file it works ok though. I have logged a ticket with an id “BARCODENET-38210” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.