zxing-js / library

Multi-format 1D/2D barcode image processing library, usable in JavaScript ecosystem.
https://zxing-js.github.io/library/
Apache License 2.0
2.44k stars 541 forks source link

Decoding EAN-8 & EAN-13 give inconsistent results #351

Open maartenmensink opened 3 years ago

maartenmensink commented 3 years ago

Question

We made a scanner based on this library. During testing we have gotten some odd decoding result while scanning. Codes of the following types:

On full camera resolution decoding of the EAN-13 gives the following results. EAN-8 shows similar behavior.

9780201379624 0796881379624 0798281379624

IMG_5810

Platform iPhone 8 iOS 13,7

Reproducible with

https://zxing-js.github.io/ngx-scanner/

Is this a bug in the decoding algorithm?

odahcam commented 3 years ago

Probably a bug or a misconfiguration inside the reader. What reader are you using?

maartenmensink commented 3 years ago

MultiFormatReader with QrCode, EAN-8, EAN-13 as formats enabled.

odahcam commented 3 years ago

I noticed we do have some strange coding inside the MultiFormatOneDReader, which is used by MultiFormatReader, where some custom changes were made due to the lack of readers. Luckly enough the feature/rss-14-reader branch will help solving that, but I don't expect finishing it anytime soon without help. I merged that branch into master just now, even tho it's not production ready but I'm marking the classes as experimental hoping this will help accelerate these readers development.