Home > Software engineering >  Easy to detect shapes/patterns to put on corners of a form
Easy to detect shapes/patterns to put on corners of a form

Time:03-12

I am trying to create a form which will be filled and photographed later on. An issue that I am facing is that of alignment. I came across some deep learning solutions which detect the corners of form. But this is a lot of times inaccurate in my use case where the sheet of paper is folded-reopened/crumpled. I also don't have a lot of flexibility/hard-coding options in the deeplearning process.

Are there any patterns which OpenCV can detect with ~100% accuracy no matter the orientation of the pattern? I will be putting different patterns on 4 corners of the sheet. I am thinking of using the inbuilt template matching function or other pattern recognition algorithms. There are some common patters like a big ' ' sign or a star etc that I am trying to avoid. I also tried putting barcodes on the corners because they are also detected fairly easily(Not concerned with the contents of the barcode only their relative positioning). But depending on the quality of image the barcode isn't always detected.

CodePudding user response:

ArUco markers sound like the best option for you, they can easily be implemented in OpenCV.

Aruco example and documentation:https://docs.opencv.org/4.x/d5/dae/tutorial_aruco_detection.html

Python example: https://pyimagesearch.com/2020/12/21/detecting-aruco-markers-with-opencv-and-python/

  • Related