ZXing.Net: Scanned QR Code is not recognized

Hi,

I am having trouble with decoding the following QR code. The Code has been printed and then scanned again and can then no be read anymore by the ZXing library. I mostly tried with the CommandLineDecoder and the WindowsFormsDemo from the Clients folder. I tried with all kinds of different settings but none seem to work. rechnung3

What do I need to do to make this work?

Thanks for your help.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 22 (1 by maintainers)

Most upvoted comments

Hello, As I try to find an issue to trouble decoding Swiss QRCode (since days…)

–> I scan approx 50 Swiss Invoice to 300 dpi, color per day –> Mostly, the botom left pattern of the QR Code cause the problem (if you just make some manual colorisation of the botom left pattern, everytings become ok)

My solution (95% of my QR invoices are well decoded) –> first attemp --> crop (botom part of the page) + reduce image by 0.5 + TRY_HARDER + TRY_INVERSE (works almost always and fast) –> seconde attemp --> full page + no reduction + TRY_HARDER + TRY_INVERSE –> last attemp --> crop (botom part of the page) + enlarge image by 2 + TRY_HARDER + TRY_INVERSE

Not realy “nice” solution, but it works pretty well.

@n-exo I just now got to the point where I can fully decode a QR Code. I tried with your image. The problem seems to be that has a very low resolution. This makes it very sensitive to a not perfect detection of the alignment pattern. I might be able to improve upon it but I am not sure. What helps a lot though, is just scaling the image up (I tried with 500%):

The following images are debug output generated by my decoder. You can see that it detected the alignment marks fine, but because the calculated center is off a little, it doesn’t get the modules to the lower right correctly (and possibly others).

Original

The scaled up version is perfect though (I did nothing special, just used paint.net and scaled it):

ScaledUpBy5

So the question is, why are your images of such a low resolution and can you do something about it? Maybe just scale it up before processing it?

@kltye I can confirm the suspicion about the alignment mark. My Decoder uses the lowest right mark and can decode your sample fine.

@kltye I just noticed that your last comment was potentially intended to be addressed to me. My answer is: I can’t / won’t. I’m not a .NET developer and busy improving the c++ port. Said improvements will result in the ability to scan the OPs Swiss code example with zxing-cpp.