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

Can't decode barcode unless scaled up #25

Open
KyleMaas opened this issue Apr 26, 2020 · 1 comment
Open

Can't decode barcode unless scaled up #25

KyleMaas opened this issue Apr 26, 2020 · 1 comment

Comments

@KyleMaas
Copy link
Contributor

I can't decode this test barcode:
stresstest-only-120dpi

But I can if I size it up by 2x with no interpolation:
stresstest-only-120dpi-expanded

@piderman314
Copy link
Owner

This is an unfortunate side effect of having to detect QR codes in fuzzy images. There's a lot of interpolation and rounding going on. In the case where the QR is an exact size pixel-for-pixel, the calculated locations are sliiightly off (0.5px in x direction, 1px in y direction :P) and and such the alignment pattern can't be found, and the data extraction fails as well. Some extra code would be needed to see that it's a 1px-QR and adjust accordingly.

When the modules are 2px wide already the rounding doesn't matter anymore.

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

No branches or pull requests

2 participants