pythonopencvimage-processingqr-codeimage-scanner

How to detect a pattern (such as a QR code) on a scanned paper so that it can be correctly rotated/scaled/identified?


I have PDF files or JPG images that I need to print (these are formulars that will be filled in by hand), and I need that:

What kind of pattern should I add on the formular paper, so that a Python library (which one?) will be able to crop it / rotate it / identify it with an ID?

I was thinking about adding a QR-code (containin a number ID) on top left of paper, and a QR-code on bottom right of the paper, or maybe also "hirondelles" symbols:

The QR code would be generated with qrcode library:

import qrcode
img = qrcode.make('ID1138934')

and added on top the PDF with this method.


Note:

enter image description here


Solution

  • This task needs the combination of two techniques: