The Precision Threshold

Our 21x21 grid requires sub-pixel precision. If our estimate is off by just 0.5 pixels at the corners, the resulting coordinate system drift makes accurate color sampling impossible.

Continuous Regression

While classic CV "snaps" to the nearest integer pixel, a Neural Network can output continuous floating-point values. By training on perfectly labeled synthetic data, the network learns to map internal feature intensities directly to sub-pixel coordinates.

$y = \sigma(W \cdot x + b)$
Output: (x: 124.72, y: 88.14)

Heatmaps and Offset Regression

State-of-the-art models for corner detection (like LSCCL) don't just output coordinates. They predict two components simultaneously:

Why this solves the 20-degree tilt: By bypassing the discrete sampling ritual of OpenCV's AdaptiveThreshold, the network is never "distracted" by the aliased edges of the colored cells. It learns the smooth, continuous geometry of the perspective transformation.
Discrete vs Continuous Sampling
Target: (5.42, 3.81)
Classic Snap: (5, 4)