2

I am currently working on a BSc thesis concerning 2D barcodes. We decided to work with Zxing due to its huge community and its performances.

I am having issues when trying to recognize a QR Code among many others (think about a piece of paper with a grid with 10x10 QR Codes). Sometimes it works and it recognizes, but most of the times I get one of these errors:

com.google.zxing.ChecksumException com.google.zxing.FormatException

What I believe is that it finds a possible QR Code (perhaps out of focus, or cut out) and tries to decode it, if it fails, the whole image gets thrown away.

I would like to find an efficient way to tell the program to keep looking throughout the whole image for a valid QR Code. For me it is important to recognize even just 1 code in the whole set.

Things I did:

  • Kept a proper Quiet zone between the codes (I chose 3 instead of 4, since I need to have, in an area, as many QR codes as possible)
  • Used hint 'TRY.HARDER'

The image is from a webcam and it is 640x480px. The quality is fairly decent.

An idea of the pattern: QR code pattern

Even if most of them are corrupted or badly exposed but even just 1 barcode is readable, I would like to be able to find it. I don't mind to lose a bit of speed (at the moment the decoding speed, if the barcode is found, is around 1-2ms).

Any suggestion?

N3sh
  • 881
  • 8
  • 37
  • Most bar code decoding software isn't really made to consistently read under circumstances like this even when you have the right amount of quiet zone. You may need to do some preprocessing where you divide the image and single out individual QR codes for sending on to the zxing decoder. The reason it can decode so fast is that it makes a lot of assumptions about what it is looking at and it is probably not scanning the whole field for a valid code. – Shane Wealti Mar 21 '14 at 21:08
  • http://stackoverflow.com/questions/15107610/how-to-read-multiple-qr-codes-from-one-image-using-zxing-library – Shane Wealti Mar 21 '14 at 21:13
  • Actually now that I take a closer look, are you sure that every QR code in your pattern is a valid QR code? It is normal behavior for it to throw those exceptions upon reading a incorrectly formatted QR code. – Shane Wealti Mar 21 '14 at 21:18
  • I would review the finder pattern finder code to see if you can get some insight into what the algorithm is doing. It might help you design a QR code pattern that passes your test. https://github.com/zxing/zxing/blob/master/core/src/main/java/com/google/zxing/qrcode/detector/FinderPatternFinder.java – Shane Wealti Mar 21 '14 at 21:21
  • Is there any way to intelligently remove parts of the image? Because if I do something which statically and recursively removes a pre-specificed part of the image, I might just end up not being able to actually recognize any pattern (e.g. if the problem is a partially visible QR code, then removing X each time, might only repeat the same issue). Any suggestion? I would also like to not lose much speed with that. – N3sh Mar 23 '14 at 13:11
  • @ShaneWealti why did you ask if they are valid QR codes? I have generated with the same library and they are encoded. And they work. – N3sh Mar 23 '14 at 14:53
  • Can you provide a representative sample list of the data encoded in your QR codes? – Shane Wealti Mar 24 '14 at 13:01

0 Answers0