Expand description
Bundle adjustment for multi-camera calibration.
Implements a Levenberg-Marquardt-style optimizer for globally consistent multi-camera calibration by minimizing reprojection error across all camera views simultaneously.
§Algorithm
Given N cameras and M 3D points observed across multiple views:
- Initialize camera parameters (rotation, translation, focal length) and 3D point positions from an initial estimate.
- Compute the Jacobian of the reprojection error with respect to all parameters.
- Solve the normal equations
(J^T J + lambda * diag(J^T J)) * delta = -J^T rwhereris the residual vector. - Update parameters and adjust
lambdabased on error reduction. - Repeat until convergence.
§References
- Triggs, B. et al. “Bundle Adjustment — A Modern Synthesis” (2000).
- Levenberg, K. “A Method for the Solution of Certain Non-Linear Problems in Least Squares” (1944).
Structs§
- Bundle
Adjust Config - Configuration for bundle adjustment.
- Bundle
Adjust Result - Result of bundle adjustment.
- Bundle
Adjuster - Bundle adjuster using Levenberg-Marquardt optimization.
- Camera
Params - Camera parameters: 6 extrinsics (3 rotation + 3 translation) + 1 focal length. Rotation is stored as a Rodrigues vector (axis * angle).
- Observation
- A 2D observation: which camera saw which 3D point, and at what pixel location.
- Point3D
- A 3D point.