The Inspiration In many educational settings, the bridge between traditional paper-based testing and modern digital analytics is broken. I observed teachers spending exhaustive hours manually grading Optical Mark Recognition (OMR) sheets or struggling with expensive, proprietary hardware scanners. I was inspired to create a solution that democratizes high-speed grading—allowing any educator with a basic camera to transform a physical bubble sheet into digital data instantly.

How I Built the Project The core of the project is built using Python and OpenCV, leveraging Computer Vision to mimic human sight. The workflow follows a precise mathematical and logical pipeline:

Image Pre-processing: I implemented Grayscale conversion and Gaussian Blurring to reduce noise, followed by Canny Edge Detection to find the sheet boundaries.

Perspective Transformation: To handle "real-world" photos (which are often tilted), I used a four-point perspective transform. This "warps" the image into a perfect bird's-eye view.

Contour Filtering: The system identifies all circular shapes and filters them based on aspect ratio and area to distinguish bubbles from stray marks.

Challenges Faced The road to a functional scanner was not without hurdles:

Lighting Variability: Shadows and uneven lighting often caused the computer to "see" marks where there were none. I overcame this by implementing Adaptive Thresholding, which calculates thresholds for small regions of the image rather than a global constant.

Calibration: Ensuring the system could distinguish between a "faintly filled" bubble and a "completely filled" one required rigorous testing and fine-tuning of pixel-density parameters.

Share this project:

Updates