Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CODE_128] Can't read barcode #566

Closed
jumafuse opened this issue Jun 23, 2023 · 11 comments · Fixed by #574
Closed

[CODE_128] Can't read barcode #566

jumafuse opened this issue Jun 23, 2023 · 11 comments · Fixed by #574
Labels

Comments

@jumafuse
Copy link

Any help would be greatly appreciated.

My code basically replicates the behaviour of the test application:

https://zxing-js.github.io/library/examples/multi-camera/

Example Image:

https://ibb.co/hWkGHzm

I can hardly read it in a blue moon under perfect conditions. It really doesn't make sense since most of the time doesn't work.

If I'm missing some configuration options that I should set somewhere, I set hints already to only CODE_128.

I would greatly appreciate any hints.

@jumafuse
Copy link
Author

I can offer a bounty if that helps any time dedicated to this worthwhile.

@alvarobertin
Copy link

i'm having the same issue 😞 but with EAN codes. If i find something i'll let you know

@zhanghaipeng788
Copy link

i'm having the same issue 😞 but with Codebarcodes. If i find something i'll let you know

@bbuhler
Copy link

bbuhler commented Jul 11, 2023

In my case it is working with version 0.19.x but not with latest 0.20.0.

@teckel12
Copy link

teckel12 commented Jul 30, 2023

@jumafuse It could be you're using the wrong camera on your scanning device (if using a phone). it could be using a camera that doesn't support autofocus.

I forked a Vue-based library and added the capability to auto-select the most appropriate camera (back camera with autofocus and torch). I also added a bunch of other features which greatly help scanning (like zoom and even manual focus capability). Basically, the goal was for it to work as well as any native barcode scanning app. BTW, my library can totally read your example barcode without any issues.

Here's a link to a demo. Probably best to try it from your phone:

https://barcode.leethost.com/

@alvarobertin
Copy link

Wow @teckel12, its working perfectly! That's what we were looking for in my team!

Kudos to you!

@JanPolasek
Copy link
Contributor

@jumafuse Try using version 0.18.0 (I think 0.18.2 is the last one that works properly). I've pinned that version in my project as 0.18.3 broke scanning of several symbologies including EAN13 and CODE_128. Issues with EANs have been resolved in 0.20.0, but when I compared 0.20.0 and 0.18.0 side by side the former simply couldn't scan CODE_128 reliably while the latter fared much better.

@dolin-tan
Copy link

@JanPolasek V0.18.2 Scan Code_ 128 is effective for me, although not very clever, it can barely be used. Thank you very much

@teckel12
Copy link

teckel12 commented Sep 14, 2023

@JanPolasek Oddly, I have no problem scanning the barcode in this issue or the one in #394 with v0.20.0.

But looking at your changes in #574 it does appear there was a conversion mistake. I've made a comment in your code as it could be simplified and made much faster.

@jumafuse
Copy link
Author

jumafuse commented Sep 19, 2023

  • 0.19.2 worked given ideal conditions and a good camera. But is very very very rough.
  • I will now try v0.18.2.

@piotr-bender-silevis
Copy link

piotr-bender-silevis commented Nov 8, 2023

I've used DecodeHintType.TRY_HARDER and it works much better on 0.20.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants