Techniquecore
Reduced camera system
Also called Schur complement trick, point elimination in bundle adjustment.
Eliminate the point blocks of the bundle adjustment normal equations by a Schur complement, leaving a smaller system in the camera parameters only.
The reduced camera system is the linear system that remains when the point unknowns are eliminated from the normal equations of bundle adjustment. Each Gauss-Newton or Levenberg-Marquardt step of bundle adjustment solves
where holds the camera updates, the point updates, is block diagonal with one block per camera, is block diagonal with one block per point, and has a block exactly where camera sees point . Because is block diagonal it is cheap to invert, and block Gaussian elimination gives the Schur complement system
followed by . The system in has only the camera unknowns, for cameras with fixed intrinsics, against for the full system with points, and is usually far larger than . This is the core of sparse bundle adjustment, which factors , and of inexact Newton bundle adjustment, which solves it by conjugate gradients without forming it.
In plain words
In bundle adjustment, every measurement ties one camera to one point, and no measurement ties two points together. So if the cameras were known, each point could be fixed on its own with a tiny 3 by 3 system. The trick turns this around. For each point, it works out how the best position of that point depends on the cameras that see it, and it substitutes that into the equations for the cameras. What is left is a system about the cameras only, which is much smaller. After solving it, each point is updated alone. Nothing is approximated: the answer is the same as solving the whole big system at once.
When it applies
The trick applies to any symmetric positive definite system whose unknowns split into two groups, where the second group has a block diagonal (or otherwise cheap to factor) diagonal block. In bundle adjustment the two groups are the cameras and the points. The matrix is for Gauss-Newton, or (or ) for Levenberg-Marquardt, and the right side is . is block diagonal because each residual involves one point only. If (or the damped ) is positive definite, the elimination is exact and is positive definite too. It pays off when the eliminated group is the large one: .
The template
REDUCE-AND-SOLVE(U, V, W, e_a, e_b)- 1
for each point j: compute V_j^-1 ▷ 3 x 3, independent - 2
S <- U ; r <- e_a - 3
for each point j, for each camera i that sees j: Y_ij <- W_ij V_j^-1 ; r_i <- r_i - Y_ij e_b,j - 4
for each camera k that sees j: S_ik <- S_ik - Y_ij W_kj^T - 5
solve S δa = r ▷ dense or sparse Cholesky, or PCG - 6
for each point j: δb_j <- V_j^-1 (e_b,j - Σ_i W_ij^T δa_i) - 7
return δa, δb
Lines L1 to L4 build and the reduced right side point by point. Point contributes one term to for every pair of cameras that both see it, so is nonzero only when cameras and share a point. Line L5 solves the reduced system. Line L6 recovers each point from the cameras that see it. With cameras seeing point and observations, lines L1, L3 and L6 cost , line L4 costs , and a dense Cholesky factorization in line L5 costs , against for a dense solve of the full system.
Why it is exact (theorem). The second block row gives . Substituting it into the first block row gives . Conversely, any solution of the reduced system, with from line L6, solves the full system. If the full matrix is positive definite, then for and one gets , so is positive definite and its Cholesky factorization exists.
What means (theorem). The camera block of is . When is the information matrix of a Gaussian estimate, is the information matrix of the cameras alone, with the points marginalized out; this is why the same operation is called marginalization in SLAM.
Classic examples
A small worked case. Take two cameras and three points, each with one scalar unknown, with , , camera 1 seeing points 1 and 2, camera 2 seeing points 2 and 3, all , and . Then
The off-diagonal comes from point 2, the only point both cameras see. Solving gives , and line L6 gives . Substituting all five values into the original system confirms every equation; for example the first row is .
Bundle adjustment. With 6 parameters per camera and 3 per point, a scene of 100 cameras and 100000 points has a full system of order 300600, but has order 600. This is the step of sparse bundle adjustment.
Large photo collections. With tens of thousands of cameras, itself is too large to factor densely. Inexact Newton bundle adjustment applies to vectors as and solves by preconditioned conjugate gradients.
Marginalization in sliding windows. In sliding window bundle adjustment and visual-inertial odometry, old states leave the window by the same Schur complement, which keeps their information as a prior on the remaining states.
Outside vision. The same block elimination is static condensation in the finite element method and the interface system of nonoverlapping domain decomposition.
Variations
- Eliminate the cameras instead. When there are far more cameras than points, which is rare, eliminate the camera blocks and solve for the points.
- Sparse . When each camera shares points with only a few others, as in a long street sequence, is sparse, and a sparse Cholesky factorization with a fill-reducing ordering is much cheaper than a dense one.
- Implicit . Never form ; compute products with it, and solve iteratively.
- Shared intrinsics. Parameters that all cameras share, such as one focal length, add a dense border to ; they stay in the reduced system.
- Points with extra structure. Inverse depth points (1 parameter) or line features change only the size of the blocks.
- Damping. For Levenberg-Marquardt, add to both and before the elimination, so that the result is the exact damped step.
Pitfalls
- Singular point blocks. A point seen by one camera has a rank 2 in Gauss-Newton, and a point with a tiny triangulation angle has a nearly singular one. Damp , or remove such points, before line L1.
- Damping only . Adding to after the elimination is not the Levenberg-Marquardt step. Damp and first.
- Gauge. Without fixed gauge parameters, and are singular in the undamped case; see gauge freedom. Fix a camera and a scale, or keep .
- Dense fill. If one point is seen by all cameras, it alone makes dense. Many shared points in large scenes make dense even when is very sparse.
- Assuming is small. has order ; with in the tens of thousands it does not fit in memory as a dense matrix.
Exercises
- Show that is positive definite when is, and that .
- In the worked case, change from to (camera 2 no longer sees point 2). Show that becomes diagonal and explain why.
- Count the nonzero blocks of for cameras in a line, where each point is seen by two neighboring cameras only. What is the cost of a banded Cholesky factorization of ?
- Prove that the camera block of equals .
- For a damped system with , show that eliminating the points and then solving gives the same step as the dense Levenberg-Marquardt solve, even when the undamped are singular.
References
- Bill Triggs, Philip F. McLauchlan, Richard I. Hartley and Andrew W. Fitzgibbon, Bundle adjustment, a modern synthesis, in Vision Algorithms, Theory and Practice, Lecture Notes in Computer Science 1883, Springer, 2000, 298-372, Section 6.1, The Schur complement and the reduced bundle system, and the rest of Section 6 on the network structure and fill
- Richard Hartley and Andrew Zisserman, Multiple View Geometry in Computer Vision, second edition, Cambridge University Press, 2004, Appendix 6, Iterative estimation methods (the partitioned normal equations of sparse Levenberg-Marquardt and their solution by eliminating the point parameters)
- Manolis I. A. Lourakis and Antonis A. Argyros, SBA: A software package for generic sparse bundle adjustment, ACM Transactions on Mathematical Software 36(1), 2009, the derivation of the reduced camera system from the block structure of the normal equations
- Sameer Agarwal, Noah Snavely, Steven M. Seitz and Richard Szeliski, Bundle adjustment in the large, Computer Vision ECCV 2010, Lecture Notes in Computer Science 6312, Springer, 2010, 29-42, the Schur complement section (the reduced camera system and its implicit and explicit use)
- Richard Szeliski, Computer Vision, Algorithms and Applications, second edition, Springer, 2022, Chapter 11, Structure from motion and SLAM (bundle adjustment, exploiting sparsity)
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag BH2N89 Edit this page History Report an error Markdown