Traditional computer vision (CV) is built on a foundation of Heuristics—hand-crafted rules designed to solve geometric problems in ideal conditions. But the real world is rarely ideal.
When you tilt a physical grid, the Centroid of a square is no longer its geometric center. In a perspective projection, the edge closer to the camera appears larger than the edge further away.
Calculating the center of mass using cv.moments on a tilted contour pull the coordinate toward the "fat" edge. This shift—sometimes just 1 or 2 pixels—is enough to make a high-density 21x21 grid extraction fail entirely.
Our digital sensors are discrete grids. When an edge falls "between" pixels, the intensity values are averaged (Aliasing). Traditional peak-finding logic often snaps to the closest integer pixel.
Adjust the tilt in the visualizer to observe how the visual "center" deviates from the projection's true mathematical center.