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

Self-check sometimes fails due to zbarimg unreliability #9

Open
za3k opened this issue Jun 1, 2021 · 6 comments
Open

Self-check sometimes fails due to zbarimg unreliability #9

za3k opened this issue Jun 1, 2021 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@za3k
Copy link
Owner

za3k commented Jun 1, 2021

zbarimg is failing and the self-check of the pdf frequently fails. Get a repro case and report this to zbarimg.
Generally see if zbarimg/zbarcam can be improved (in terms of read % and size)--QR resolution is a bit low right now.

@za3k za3k changed the title Self-check sometimes fails Self-check sometimes fails due to zbarimg unreliability Jun 1, 2021
@za3k
Copy link
Owner Author

za3k commented Jun 2, 2021

Reported as mchehab/zbar#182

@misaki-web
Copy link

I noticed this problem using qr-backup. I added a comment on the zbar issue. It seems that moving the missed QR code just 1 pixel in one direction solves the issue, so the problem may be with exact alignment of several QR codes on the same page.

A workaround may be to avoid positioning the QR codes on a perfect grid, but move each code 1 pixel in a different direction alternately. It would not be visually noticeable.

@za3k
Copy link
Owner Author

za3k commented Jul 31, 2021 via email

@misaki-web
Copy link

misaki-web commented Aug 1, 2021

It's better to fix the QR scanner for everyone, rather than introduce a qr-backup specific workaround for a problem in the QR scanner.

Yes, I agree. My workaround is just an idea that may solve temporarily the issue (in my few manual tests, it seems to always solve the issue) in case the root issue is not found easily or quickly by zbar devs.

I'd like to understand what's happening better. If you can demonstrate a qr-backup patch that removes grid-alignment and consistently works, please do so. It would definitely help diagnose the root cause.

I'm not sure I'll have time for now, but I'll keep it in mind. However, an even better workaround may be to split the page with imagemagick (for example) before scanning QR codes, so if the page has 16 QR codes, split it in 16 individual PNG images, then scan each one separately. It may even help to find alternatives to zbar because some QR code readers don't seem to scan all possible codes on an image but only one.

Show the command/patch you're using to adjust things one pixel. It's always best to let other people directly reproduce things themselves in bug reports.

Actually, I made some tests by editing the image directly with GIMP. It was just a few preliminary tests to check if the issue seemed to be related to QR code positioning.

@za3k za3k added the help wanted Extra attention is needed label Mar 21, 2022
@za3k
Copy link
Owner Author

za3k commented Sep 21, 2022

Improved by specifying -density 600 in the restore process, but still very finicky.

@za3k
Copy link
Owner Author

za3k commented Sep 21, 2022

Now that I'm doing a PDF->tif conversion as a workaround, whole pages have started failing sometimes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants