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

Free Support Forum - aspose.com

PDF417 barcode reading issue

Hi,

I have an issue with the aspose barcode reader library.
It takes a lot of time to find a barcode (30-45 seconds) and it consumes a lot of memory too around 800MB - 1GB of memory).

Maybe you guys have some hints on how to improve this.

My code is this

BarCodeReader reader = new BarCodeReader(file.getAbsolutePath(), DecodeType.PDF_417);
      reader.setQualitySettings(QualitySettings.getMaxBarCodes());

      for (BarCodeResult result : reader.readBarCodes()) {
        System.out.println("CodeText: " + result.getCodeText());
        System.out.println("Symbology type: " + result.getCodeType());
        System.out.println("Percentage recognition: " + result.getReadingQuality());
      }

barcode_not_read_1654259282216_141421056659050501249399593.jpg (2.1 MB)

Without the quality setting QualitySettings.getMaxBarCodes() the barcode is not recognized but the result is a lot faster (5-7 seconds). Memory consumption is a bit smaller.

I also tried to binarize the images but recognition gets worse if I do that.

I’ve attached the problematic barcode

Thank you

@bogandy,

I did test your scenario/case using your barcode image file. It takes approx. 30 seconds to capture the barcodes in the image on my end. I guess considering the quality of the image, the time consumption is ok. QualitySettings.getMaxBarCodes() will make sure to extract/detect every possible barcodes (even with low quality) so it will sacrifice the time consumption (taken) and consume more memory.

I saw that there are a lot of quality settings.
Could you maybe suggest something (recommended maybe for PDF417 barcodes) so that the time/memory can be lowered?

@bogandy,

We need to evaluate it thoroughly. I have logged a ticket with an id “BARCODEJAVA-1367” for your issue. We will check if we could devise/use some attributes to lower down time and memory cost. Alternatively, we could enhance the APIs to detect barcodes with efficiency from deteriorated quality image. We will look into it soon.

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

alright. thank you
Can’t wait for your feedback :slight_smile:

@bogandy,

Please spare us little time to analyze your issue in details first.
Once we have any new information available, we will update you.

sure. thanks

Hi

is there any progress on this?

Thanks

@bogandy,

There is no update yet. We will check and get back to you soon to share either an ETA for your issue or updates/workaround to cope with your issue.

We are sorry for any inconvenience caused!

@bogandy,

The issue is blocked by relevant .NET issue (logged as “BARCODENET-38254”). The temporary solution to cope with it is the size of the image can be decreased 3-4 times. The resolution should be 300-600 dpi. Please note, after resolving the issue this will happen automatically.

Alright. Thank you.
Will I be notified in this ticket when the .NET issue BARCODENET-38254 will be solved?

@bogandy,

We have attached the ticket id with this thread as well, so once the ticket (“BARCODENET-38254”) is resolved, we can update you.

Alright. Thank you

@bogandy,

You are welcome.