question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong EAN13 code detected - am I doing something wrong?

See original GitHub issue

why

The above-attached image is wrongly detected - I used:

wget https://github.com/zxing/zxing/archive/master.zip
unzip master.zip
cd zxing-master/
mvn compile
cd javase/target/classes/
java -cp .:../../../core/target/classes com/google/zxing/client/j2se/CommandLineRunner why.png --try_harder  --pure_barcode

…which prints a wrong number (compare to that in the image):

Raw result:
000642109420
Parsed result:
000642109420
Found 2 result points.
  Point 0: (78.5,64.0)
  Point 1: (335.5,64.0)

Am I doing something wrong, or is this kind of errors something to be expected when trying to detect barcodes?

P.S. In case it helps, the barcode was generated inside a Jasper Report, with the Barbeque library, and the document was then scanned back.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
srowencommented, Apr 24, 2014

Erm, if you can control the format, you should just use a different format with a more robust checksum. How about Code 128?

0reactions
Jendorskicommented, Jan 13, 2022

I am also facing this issue, hopefully using Code 128 will help ensure the barcodes return the right numbers, with this format.

Read more comments on GitHub >

github_iconTop Results From Across the Web

2.1 EAN-13 code and error detection - OpenLearn
Recalculating the check digit from the identification code gives 0, so the code is incorrect. Alternatively, using the 'shortcut', we take all 13...
Read more >
When scanning an EAN-13 bar code using ScanTool the last ...
Go to 'PowerTools' > 'ScanTool' > 'Settings' > select EAN-13 symbology. To enable the check-digit mark the checkbox of 'Send Check Character'.
Read more >
EAN 13 Barcode Explained
An EAN 13 barcode is easily recognized: It always starts and ends with two ... EAN 13 barcode; the final and check digit...
Read more >
Why Do Barcodes Misread?
Misreads in the form of a perfectly scanning but wrong barcode can be caused by scanner number substitution. The printed barcode image is ......
Read more >
Printing An Ean13 Code In Correct Size
What am I doing wrong here? I am using an Intermec PF8t printer for printing the labels, could it possible be some driver-setting?...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found