rxing-core / rxing

cRustacean Crossing
https://crates.io/crates/rxing
Apache License 2.0
198 stars 19 forks source link

The multiple barcodes decoder issue #48

Closed xdm67x closed 8 months ago

xdm67x commented 8 months ago

Hi, when I want to decode an image containing multiples barcodes, it's not working as expected, the first and second barcodes are detected (datamatrix) but the third one is not found.

Here is the image I used to test it.

multiple_barcodes

Thanks!

hschimke commented 8 months ago

I'll look into this

hschimke commented 8 months ago

I haven't run through these yet, but do they all contain the same encoded information or are they different?

hschimke commented 8 months ago

I think that I found the issue, it's a problem with how the GenericMultipleBarcodeReader works.

The issue is: the mechanism to make sure that a barcode hasn't already been found isn't particularly good (it only detects whether they have the same data). In the example above I believe that two of the barcodes have the same data, so it was erroneously removing one of them from the list of results. I'm working on a fix, which should make its way into the next release.

xdm67x commented 8 months ago

Thanks for the fast response 😄 I will check your fix and keep you updated.

xdm67x commented 8 months ago

It's working thanks for the fix!