Problemadvanced
Rotation averaging
Also called multiple rotation averaging, rotation synchronization.
Find absolute rotations of many cameras that best agree with measured relative rotations on the edges of a view graph.
Rotation averaging is the problem of finding the absolute orientations of cameras from noisy measurements of some of their relative orientations . The measured pairs are the edges of a view graph, and the relative rotations come from the essential matrices of the image pairs. Each absolute rotation appears in many edges, so the edges are redundant, and the problem asks for the rotations that agree with all of them as well as possible under a chosen distance on the rotation group and a chosen loss. The answer is fixed only up to one common rotation, the gauge. Rotation averaging is the first step of global structure from motion, before translation averaging, and the rotation part of pose graph optimization in SLAM. The name multiple rotation averaging separates it from single rotation averaging, the mean of several measurements of one rotation. The best known algorithm in vision is Lie-algebraic rotation averaging.
In plain words
Each camera in a set of photos points in some direction, and you want to know all these directions. For pairs of photos that overlap, you can measure how much the second camera is turned compared with the first. These pair measurements have small errors, and some are completely wrong. Rotation averaging finds one direction per camera so that the pair measurements fit as well as possible. If you only chain the measurements from one camera to the next along a path, the errors add up, and different paths give different answers. Averaging uses all pairs together and spreads the errors over them. Turning all cameras together by the same amount does not change any pair, so one camera is fixed as the reference.
Definition
Input. A connected graph with , and for each edge a measured rotation . The convention is for the coordinates of a point in the frames of cameras and , so with absolute rotations the exact relation is .
Output. Rotations that minimize
with to fix the gauge.
Distances. For a rotation by the angle , . The angular, or geodesic, distance is , the angle of , which is also with the logarithm map. The chordal distance is . The quaternion distance uses for unit quaternions in the Hamilton convention. All three are close to times a constant for small angles.
Losses. gives the least squares problems, which are the maximum likelihood problems for small Gaussian noise. gives the problem, which is less affected by wrong edges. Bounded losses such as Geman-McClure, , ignore large residuals almost completely.
Gauge. If solves the problem, so does for any fixed , since . Fixing removes this freedom.
Variants
- Single rotation averaging. One rotation, many measurements of it: find the mean of . With the chordal cost, the answer is the arithmetic mean projected onto by the singular value decomposition (theorem). With the geodesic cost, it is the Karcher mean, found by iteration.
- Rotations in the plane. In , rotations are angles, and the problem becomes angular synchronization: find angles with modulo . Singer (2011) solved it by an eigenvector of a Hermitian matrix.
- Robust averaging. A fraction of the edges are outliers. The loss is or bounded, or the outliers are removed first by cycle tests on the view graph.
- Weighted averaging. Each edge has a weight or a full covariance, for example from the number of inliers of its pair.
- Pose averaging. The edges carry full relative poses in with known translation scales. This is pose graph optimization; with the chordal cost it can be solved with a certificate by SE-Sync.
Examples
- A tree. If is a tree, every edge can be met exactly: fix and set along the tree. The cost is 0, and the solution is unique up to the gauge. There is no redundancy, so the noise of each edge goes straight into the result.
- A triangle of rotations about one axis. Take rotations about the axis with by , by and by . Going around the cycle gives degrees, so no choice fits all three edges. With , the squared geodesic cost has its minimum at , , with a residual of on each edge. The cost has the value at every split of the among the three edges with the same sign, so its minimizer is not unique; one minimizer puts all of it on one edge.
- One wrong edge. On a complete graph of 6 cameras with exact edges, replace one edge by a rotation rad away. The least squares solution spreads this error over all cameras. The robust run of the Lie-algebraic algorithm in the reference code of global structure from motion returns rotations within rad of the truth, and the edge test then removes exactly the wrong edge (a benchmark result on this test).
Known algorithms
- Spanning tree. Chain the rotations along a maximum spanning tree of the view graph. It costs after the tree is built, but uses no redundancy. It is the usual start for the iterative methods.
- Linear chordal relaxation. Martinec and Pajdla (2007) drop the constraint , solve the linear least squares problem in the 9 entries of each matrix, and project each result onto . A spectral form takes the top 3 eigenvectors of the matrix of the blocks , as in angular synchronization.
- Lie-algebraic averaging. Govindu (2004) linearizes the residuals in the Lie algebra , solves a sparse Laplacian system for an update of all rotations, and repeats. Chatterjee and Govindu (2013, 2018) made it robust with an start and iteratively reweighted least squares.
- Weiszfeld iterations. Hartley, Aftab and Trumpf (2011) minimize the geodesic cost one rotation at a time with the Weiszfeld algorithm for the geometric median.
- Semidefinite relaxation. Fredriksson and Olsson (2012) and Eriksson, Olsson, Kahl and Chin (2018) solve the Lagrangian dual of the chordal problem as a semidefinite program; when the dual is tight, the result is the global minimum with a certificate. Shonan averaging and rotation coordinate descent solve the same relaxation faster.
| Algorithm | Time | Space | Properties | Code |
|---|---|---|---|---|
| Lie-algebraic rotation averaging | O(k (E + N^3)) total | O(E + N^2) extra | deterministiciterativelocalnot monotoneiterative | 1 language |
Bounds
- Identifiability (theorem). With exact data on a connected graph, the solution is unique up to the gauge, because chaining along any spanning tree fixes every rotation. With a disconnected graph, each component has its own gauge, and the relative orientation of the components is not determined.
- Non-convexity. is not a convex set, and the multiple averaging cost has local minima that are not global, even for the geodesic cost. For single rotation averaging the picture is simpler: Hartley et al. (2013) show that the geodesic cost has a unique minimum when all measurements lie in a small enough ball, and they give the radius (theorem).
- When it is easy. Wilson, Bindel and Snavely (2016) bound the size of the region where the cost is locally convex in terms of the algebraic connectivity of the graph Laplacian and the noise level: well connected graphs with small noise are easy, and long chains with large noise are hard (theorem).
- Strong duality (theorem). Eriksson et al. (2018) prove that the semidefinite relaxation of chordal averaging is tight, so the global minimum can be found in polynomial time, when the residual angles at the optimum are below a bound that depends on the algebraic connectivity of the graph.
- Cost of a step. The iterative methods solve one sparse linear system with unknowns per iteration. For the view graphs of SfM, a sparse Cholesky factorization or the conjugate gradient method makes a step close to linear in .
Reductions
- From global SfM. Global structure from motion reduces to rotation averaging, then translation averaging with the rotations fixed, then triangulation.
- From pose graph optimization. Fixing the translations of a pose graph leaves rotation averaging; many pose graph solvers start from a rotation averaging solution.
- To a linear problem by relaxation. Dropping the orthogonality constraints gives a linear least squares problem (chordal relaxation); dropping the rank constraint of the lifted matrix gives a semidefinite program.
- To angular synchronization. For rotations about one common axis, the problem is synchronization over , the unit complex numbers.
Applications
- The rotation step of global SfM pipelines such as the method of Moulon, Monasse and Marlet (2013), 1DSfM (Wilson and Snavely 2014) and their successors.
- Rotation initialization for pose graph optimization after loop closures in SLAM.
- Multi-camera rig calibration, where the relative rotations between the cameras of a rig come from many captures.
- Cryo-electron microscopy, where the orientations of many noisy projections of one molecule are found by synchronization of their relative rotations.
References
- Richard Hartley, Jochen Trumpf, Yuchao Dai and Hongdong Li, Rotation averaging, International Journal of Computer Vision 103(3), 2013, 267-305, the whole survey (the metrics on SO(3), single and multiple rotation averaging, convexity, and the algorithms)
- Venu Madhav Govindu, Lie-algebraic averaging for globally consistent motion estimation, IEEE Conference on Computer Vision and Pattern Recognition (CVPR 2004), vol. 1, 684-691, the statement of motion averaging on a graph and the iterative Lie-algebraic solution
- Daniel Martinec and Tomas Pajdla, Robust rotation and translation estimation in multiview reconstruction, IEEE Conference on Computer Vision and Pattern Recognition (CVPR 2007), 1-8, the linear method for the rotations (a least squares problem in the matrix entries followed by a projection onto the rotations)
- Avishek Chatterjee and Venu Madhav Govindu, Robust relative rotation averaging, IEEE Transactions on Pattern Analysis and Machine Intelligence 40(4), 2018, 958-972, the robust formulation and the comparison of the cost functions
- Kyle Wilson, David Bindel and Noah Snavely, When is rotations averaging hard?, Computer Vision ECCV 2016, Lecture Notes in Computer Science, Springer, 2016, 255-270, the local convexity analysis in terms of the graph Laplacian
- Anders Eriksson, Carl Olsson, Fredrik Kahl and Tat-Jun Chin, Rotation averaging and strong duality, IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR 2018), 127-135, the Lagrangian dual of chordal rotation averaging and the condition for strong duality
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 YMV3VT Edit this page History Report an error Markdown