Hartley Normalization
DLT algorithms build large linear systems from point coordinates and solve them via SVD. When the coordinates span vastly different scales (e.g., pixel values in the hundreds vs. homogeneous scale factor of 1), the resulting system is ill-conditioned: small perturbations in the data cause large changes in the solution. Hartley normalization is a simple preprocessing step that dramatically improves numerical stability.
The Problem
Consider the homography DLT: we build a matrix from pixel coordinates and solve . If , the entries of range from to . The condition number of becomes large, and the SVD solution is sensitive to floating-point errors.
The Solution
Normalize the input points so they are centered at the origin with a controlled scale, solve the system, then denormalize the result.
2D Normalization
Given points :
-
Centroid: ,
-
Mean distance from centroid:
-
Scale factor:
-
Normalization matrix:
- Normalized points:
After normalization, the points have centroid at the origin and mean distance from the origin.
3D Normalization
For 3D points , the analogous normalization uses:
- Mean distance target: (instead of )
- A normalization matrix
Denormalization
After solving the normalized system, the result must be denormalized. For a homography estimated from normalized points:
For a fundamental matrix:
The denormalization formula depends on the specific problem. Each chapter states the appropriate denormalization.
When It Is Used
Hartley normalization is applied in every DLT-based solver in calibration-rs:
| Solver | Normalized spaces |
|---|---|
| Homography DLT | World 2D + image 2D |
| Fundamental 8-point | Image 1 2D + image 2 2D |
| Essential 5-point | Image 1 2D + image 2 2D |
| Camera matrix DLT | World 3D + image 2D |
| PnP DLT | World 3D (image points use normalized coordinates via ) |
Reference
Hartley, R.I. (1997). "In Defense of the Eight-Point Algorithm." IEEE Transactions on Pattern Analysis and Machine Intelligence, 19(6), 580-593.
The normalization technique is described in Algorithm 4.2 of Hartley & Zisserman (2004).