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

zbarimg fail to decode large QR code created by qrencode #66

Open
petterreinholdtsen opened this issue Nov 26, 2019 · 10 comments
Open

zbarimg fail to decode large QR code created by qrencode #66

petterreinholdtsen opened this issue Nov 26, 2019 · 10 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@petterreinholdtsen
Copy link

This issue is originally reported to https://bugs.debian.org/719013 .

I just tested this with zbar version 0.22, and sure enough, the problem still exist:

$ yes | dd bs=1 count=3000 | qrencode -S -v 32 -o /tmp/foo.png
$ zbarimg /tmp/foo-0*
scanned 0 barcode symbols from 2 images in 0.16 seconds


WARNING: barcode data was not detected in some image(s)
Things to check:
  - is the barcode type supported? Currently supported symbologies are:
    . EAN/UPC (EAN-13, EAN-8, EAN-2, EAN-5, UPC-A, UPC-E, ISBN-10, ISBN-13)
    . DataBar, DataBar Expanded
    . Code 128
    . Code 93
    . Code 39
    . Codabar
    . Interleaved 2 of 5
    . QR code
    . SQ code
  - is the barcode large enough in the image?
  - is the barcode mostly in focus?
  - is there sufficient contrast/illumination?
  - If the symbol is split in several barcodes, are they combined in one image?
  - Did you enable the barcode type?
    some EAN/UPC codes are disabled by default. To enable all, use:
    $ zbarimg -S*.enable <files>
    Please also notice that some variants take precedence over others.
    Due to that, if you want, for example, ISBN-10, you should do:
    $ zbarimg -Sisbn10.enable <files>

$

I expected zbar to handle QR codes generated by qrencode.

@matheusmoreira
Copy link
Contributor

matheusmoreira commented Nov 27, 2019

I was able to reproduce this issue with zbarimg 0.23 as well as the master branch.

$ yes | dd bs=1 count=3000 | qrencode -S -v 32 -o 66.png
$ zbarimg --version
0.23
$ zbarimg -Sdisable -Sqr.enable 66-01.png 66-02.png 2>&1 | grep WARNING
WARNING: barcode data was not detected in some image(s)
$ zbar/zbarimg/zbarimg -Sdisable -Sqr.enable 66-01.png 66-02.png 2>&1 | grep WARNING
WARNING: barcode data was not detected in some image(s)

@jose1711
Copy link
Contributor

possibly related: #65

@jose1711
Copy link
Contributor

by looking at debug.svg it seems that grid finder got totally confused:
obrázok

@bitcoinhodler
Copy link

I noticed this problem recently when attempting to split a large block of data into multiple QR codes to solve this issue. My workaround was to split the data myself and run qrencode multiple times to create separate QR codes, instead of running qrencode once to create a series of "structured append" codes.

It would be nice if zbarimg could decode these, and even better if it could somehow report the structured append metadata (sequence indicator and parity data).

@mchehab mchehab added enhancement New feature or request help wanted Extra attention is needed labels Apr 9, 2020
@monperrus
Copy link

looking forward to seeing support for structured append in zbar!

@maglub
Copy link

maglub commented Feb 26, 2021

@jose1711 how do you generate an debug.svg file?

@ionum
Copy link

ionum commented Jun 26, 2021

@jose1711 You have to set DEBUG_SVG and recompile...

@markuzzi
Copy link

What is the status of this issue? Is there any chance to recover a QR code that is created with qrencode? It is very large.

@liyaodev
Copy link

liyaodev commented Oct 9, 2021

Maybe try to upgrade zbarimg=0.23, It seem to be a similar issue that Polyconseil/zbarlight#33.

@petterreinholdtsen
Copy link
Author

Do you mean you did not see the problem with zbarimg version 0.23, in contradiction to the message in #66 (comment) ? I hope the recipe to reproduce it is simple enough for anyone to test.

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

No branches or pull requests

10 participants