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

How to change binarizer #39

Open
Fellow-Bennse opened this issue Jun 3, 2024 · 2 comments
Open

How to change binarizer #39

Fellow-Bennse opened this issue Jun 3, 2024 · 2 comments
Labels
enhancement zxing-library-issue Likely an upstream issue with Java ZXing library

Comments

@Fellow-Bennse
Copy link

Hey there!

when using zxing for QR-Code extraction it can happen that it fails to extract due to the picture/document being of poor quality and the binarizer reading the QR-Code as black square.

I read in the docs that there is a "hybrid-binarizer" that should be working better in such cases but I fail to find the information on how to swap to that binarizer.
Would appreciate some help on this matter.

@dlenski dlenski added the zxing-library-issue Likely an upstream issue with Java ZXing library label Jun 3, 2024
@dlenski
Copy link
Owner

dlenski commented Jun 3, 2024

I read in the docs that there is a "hybrid-binarizer"

This? https://zxing.github.io/zxing/apidocs/com/google/zxing/common/HybridBinarizer.html

I fail to find the information on how to swap to that binarizer.

This Python package interfaces with the Java ZXing library entirely via its command-line interface.

If you want to be able to switch the binarizer in python-zxing, you should start by contributing a change to ZXing's CommandLineRunner.java to allow setting the binarizer from the CLI. Feel free to link it to this issue.

It wouldn't be the first time that we've sent improvements upstream.

@Fellow-Bennse
Copy link
Author

@dlenski ah so it's not in the python lib implemented as of now? I see.
if I get to a point where I might have time for it I guess I'll look into it.
Appreciate the Information!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement zxing-library-issue Likely an upstream issue with Java ZXing library
Projects
None yet
Development

No branches or pull requests

2 participants