Issues reading QRCodes

49 views
Skip to first unread message

Vinicius Paiva

unread,
Jun 1, 2013, 10:16:02 AM6/1/13
to zx...@googlegroups.com
Hello,

some days ago I posted that my code couldn't read a QRCode while the ZXing site could. I was helped and started to use the code from the servlet that tried two different binarizers. (Thank you Sean Owen)

But I'm still having problems, like this image in attachment. Every reader app that I use from my phone can read it, but ZXing can't (neither my code nor the servlet, CheckSumException). I was reading this group searching for ideas and I found someone saying that if he rotated the image ZXing could read it correctly.

So... I tried that, and I found that if that image is rotated 90º clockwise the library is finally able to decode it without errors. What am I supposed to do? Try to read it in every possible angles? Is there a guideline to correct position the QRCode to read it? Because I'm currently in a game of trial and error, zooming and cropping the image to read it correctly.

Any help would be appreciated,

[]'s

Vinicius
saved44.png

Sean Owen

unread,
Jun 1, 2013, 10:51:53 AM6/1/13
to zx...@googlegroups.com
Without rotation, this scans instantly off the screen, and yes most any small perturbation of the image scans. It's just that this particular image doesn't work. Yes if you really need every image to scan you can re-try with a small change, like scaling or rotation, and you may find it then works. Or if you know where the barcode is, just limit to that region of the image.

Vinicius Paiva

unread,
Jun 1, 2013, 7:43:16 PM6/1/13
to zx...@googlegroups.com
Hello Sean,

The thing is that I'm generating these QRCodes with maximum error correction, I guess it shouldn't be this hard to decode it aftewards. Even with digitalized documents (the user prints then digitalizes it), which is my case.

[]'s

Vinicius

Sean Owen

unread,
Jun 1, 2013, 7:49:46 PM6/1/13
to zx...@googlegroups.com
It is nothing to do with error correction, but finding the finder patterns. The usual model is a stream of images, so failing to find it in one image doesn't matter much. I think you will find that simple perturbation can correct the rare cases where this happens, and it's easy to do.

Vinicius Paiva

unread,
Jun 1, 2013, 8:02:22 PM6/1/13
to zx...@googlegroups.com
Just to be clear, simple perturbation = rotate it 90º clockwise, right?


Sean Owen

unread,
Jun 2, 2013, 12:37:24 AM6/2/13
to zx...@googlegroups.com
Yeah that's easy to do -- you could try down-sampling too.

kenji uno

unread,
Jun 4, 2013, 8:58:06 PM6/4/13
to zx...@googlegroups.com
Hi.

I have similar problem about paper scanned QR symbol.

I could read your symbol by resizing image by ImageMagick. for example:

convert.exe U:\saved44.png -resize 50% C:\A\A.png

As Sean Owen mentions, the down-sampling is possible method to help detection and sampling accuracy.

Thanks.

2013年6月1日土曜日 23時16分02秒 UTC+9 Vinicius Paiva:
Reply all
Reply to author
Forward
0 new messages