I'm trying to implement an OMR using python's CV2. As part of the code I need to find the corners of the choices box (rectangulars) however I ran into difficulty causes by the grade sheet template.
In the grade sheet template that I'm working on (image 1) there are two verticals black lines that goes through all the rectangular that I'm trying to detect. when I used cv2.findContours after applying all the blur and canny stuff, it recognized all the rectangular as two contours instead of 8 rectangular like I expected (image 2). If someone has an idea of how to get around it I will really appreciate it.
image 1 image 2