EddyVerbruggen/barcodescanner-lib-aar

Cannot Find some QR Codes

Closed this issue · 5 comments

Problematic QR Code:
image

Finding (also changing the angle of the QR code to 45° scans successfully):
image

After further investigation it seems the vertical and horizontal pattern is accepted at the incorrect center, for this particular QR Code.
Which lead me to come across these concerns:

It seems at FinderPatternFinder.java:78
pureBarcode = hints != null && hints.containsKey(DecodeHintType.PURE_BARCODE);
the default for pureBarcode is false (I'd rather assume most QR Codes are pure monochrome?)
eg. pureBarcode = hints == null || hints.containsKey(DecodeHintType.PURE_BARCODE);

In any case at FinderPatternFinder.java:496 it seems that the diagonal check is ignored when it is not monochrome (!pureBarcode || crossCheckDiagonal(...). This seems strange can someone please explain the reasoning behind this, I don't understand it. According to me it should still do the check regardless if it is a pureBarcode or not.

Unfortunately I'm currently unable to run any tests

meaning of Pure Barcode:

  /**
   * Image is a pure monochrome image of a barcode. Doesn't matter what it maps to;
   * use {@link Boolean#TRUE}.
   */
  PURE_BARCODE(Void.class),

DecodeHintType.java

Hi, I think you're best off asking this at the repo where this is actually maintained. The code you found in this repo is similar to the original: https://github.com/zxing/zxing/blob/master/core/src/main/java/com/google/zxing/qrcode/detector/FinderPatternFinder.java

Sorry that it's not too clear that this is 'soft fork'.

Ok will do.
Further down the Rabbit hole I go :)

Haha, good luck! 👍

@EddyVerbruggen can you please update with the fix zxing/zxing#906
Can you also updated the phonegap plugin again?