I have implemented this fix locally almost three years ago, and tested so many times that it feels safe to open a pull request.
This improvement was needed since I had small QR codes printed too fast by an inkjet printer. There were therefore smears just 1 mm wide that on a QR code of a couple of centimeters in size were enough to make the black squares look like a rectangle, and they were so not recognized.
This algorithm adds a little tolerance if QR codes are not detected in first place, i.e. a false negative result is provided.
I have implemented this fix locally almost three years ago, and tested so many times that it feels safe to open a pull request. This improvement was needed since I had small QR codes printed too fast by an inkjet printer. There were therefore smears just 1 mm wide that on a QR code of a couple of centimeters in size were enough to make the black squares look like a rectangle, and they were so not recognized. This algorithm adds a little tolerance if QR codes are not detected in first place, i.e. a false negative result is provided.