zbar
zbar copied to clipboard
QR Code not detected
Attached QR is not detected by zbarimg 0.23. Scan by phone (QRDroid) from screen is OK.
QR code image was extracted from PDF.
I am currently having the same problem. It appears that whenever i scan an image in with an A4 scanner, the QR Code is never detected. The scan is saved to a PDF by the scanner software. I then convert the PDF file to a PNG file in order to use zbarimg.
I have used various barcode readers on mobile devices on the PNG document to make sure the QR Code is not corrupt and they all read the barcode fine.
I would love to know how to fix this. Can provide sample documents if needed.
Same here. This is an example of a QR code which is not detected by zbar:
In case it's useful, @pmichalek's image can be made readable by copying all black pixels 1 px to the right and then again copying all black pixels 1 px down:
EDIT:
Or more simply, by filling in the finders:
I am able to provide a few more images that zbarimg does not decode, but my iPhone has zero issue detecting.
We are scanning documents that we stick a 1"x1" label with a QR Code. Our success rate is fairly good, but every once in a while we also have documents that our software does not process because the QR Code wasn't detected. I am curious why my iPhone can decode these, but zbarimg can't. If there's anything I can do to help, please let me know.
I also tried to recognize scans via QR Codes, and my conclusion was, that QR codes are not reliable enough for recognizing documents. They seem to be rather sensitive about the thickness, shape and orientation of the markers. The reason your phone can recognize them so reliable is, that it has multiple tries. With a standard camera you can scan like 30 images per second and due to the movement of the hand, you'll get a result fairly quickly.
But for a document you have only a single shot. I switched to barcodes, and they are far better recognizable for scans. Maybe there are more fancy kind of codes which also work reliable for scans but I stopped researching there.
just tried/tested and failed to decode a qrcode of a screenshot with zbarimg of zbar-0.23.1 (but works online with zxing.org)
I use this solution and it helps me: https://stackoverflow.com/questions/69689869/improve-zbarimg-qrcode-recognition?newreg=25681a87a68e4de3baf9f2cd28000883
convert input.png +repage -threshold 50% -morphology open square:1 output.png The important parameter is the morphology one