Real Time 3D Reconstruction from Monocular Video

The noise affecting the tracking system makes necessary to represent transformation matrices using their respective equivalent as Lie groups. But groups are no-linear (every classic group is a differentiable manifold) we have to compute their respective tangent space (its Lie algebra) in which we can optimize parameters using the classical Weighted Laast Squares algorithm. Even when this optimization is taking place in the vectorial space of the Lie algebra, the solutions are vectors in the tangent space. They determine the direction of the the curve passing through the point which is the most meaningful information. The exponential of this vector gives an infinitesimal path of the curve in the group which it is the solution we are looking for.

Lie groups and algebras

A lie group $G$ is a topological group which is also a smooth manifold with differential structure. The associated Lie algebra $\mathfrak{g} := T_{p}G$ is a vector space that represents the tangent space of the group at a point $p \in G$. This tangent space provides a linearization of the Lie group when $p = I$, maintaining most of its properties. A Lie group and its Lie algebra are intimately related, allowing calculations in one to be mapped usefully into the other

The special orthogonal group called $SO(3)$ represents all rotations about the origin of the three-dimensional euclidean space $\mathbb{R}^3$. It is given as the set of all orthogonal matrices with unit determinant, i.e.

It is also a subgroup of the general linear group $GL(3)$ of regular matrices. Its Lie algebra $\mathfrak{so}(3)$ is given by all skew-symmetric $3 \times 3$ matrices with the commutator operator defined as

The commutator is skew-symmetric $ [A,B] = - [B, A] $ and verifies the Jacobi identity:

which characterize an abstract Lie algebra structure.

The link between a Lie group and its Lie algebra is the exponential map $exp$ and its inverse $exp^{-1} = log$. They allow us to switch between the vector space generated by the Lie algebra and the Lie group. It can be defined for all groups $G \subset GL(n, \mathbb{R})$ where $GL(n, \mathbb{R})$ is the group of $n \times n$ real invertible matrices.

3D rigid body transformations

The group of rigid transformations in 3D space $SE(3)$ is represented by linear transformations on homogeneous four-vectors. They are used to represent camera motion between several keyframes in tracking systems.

The group of similarity transformations in 3D space $Sim(3)$ combines the scale to the rigid transformation. As $SE(3)$, it is represented by linear transformations on homogeneous 4-vectors, with 7 degrees of freedom so its Lie algebra is a vector space of dimension 7. It has a nearly identical representation to $SE(3)$, with an additional scale factor:

A basic requirement of the tracking system is that the projection equation must be differentiable with respect to changes in camera pose which are represented by left-multiplication by a camera motion $M \in \mathbb{R}^{4 \times 4}$ given by

where the camera motion is an element of $SE(3)$, whose tangent space is represented by the Lie algebra $\mathfrak{se}(3)$. It is important to note that $\mathfrak{se}(3)$ is isomorphic with $\mathbb{R}^6$ such that there exists a map that transforms between both spaces. $\mathfrak{se}(3)$ can be parametrized by a vector $\mu = (\omega, \upsilon) \in \mathbb{R}^6$ where $\upsilon \in \mathbb{R}^3$ represent a translation, whereas $\omega \in \mathbb{R}^3$ represent a rotation axis and a rotation angle $\omega$ with its magnitude. These properties allow to enforce all the constraints of $SE(3)$ while keeping the optimization procedures simple on the vector space of $\mathfrak{se}(3) \approx \mathbb{R}^6$

There are simpler ways to compute the exponential map for some groups such as $SO(3)$ and $SE(3)$. Using an adaptation of the original Rodrigues formula we can define the exponential map of $SE(3)$ for a matrix $S$ parametrized by $\mu$

The camera motion parameters in $\mu$ are estimated from a bunch of image measurements using the Weighted Least Squares method with a M-estimator. This method provides a robust estimation of a sigma-squared for all the measurements to reduce the outliers influence. After this optimization, the exponentiation over a vector in $SE(3)$ generates the matrix to update the current pose of the camera.

Weighted Least Squares (WLS)

A Lie group formalism allows to cast the motion computation problem into simple geometric terms so that it becomes an optimization problem. The pose update is computed iteratively by minimizing a robust objective function based on the reprojection error. This optimization can be solved using the iterative WLS algorithm in which an estimator is used for re-weighting $w_i$ on each iteration, such as the Tukey biweight objective function used by @klein2007parallel.

which can also be represented in its matrix form

So, it can be considered as a fixed point by the product application. This interpretation can be reformulated as an equilibrium vector of a dynamical system defined on the space of matrices, i.e., a local minimum for an optimization problem.

Parameterization of rotations

A rotation vector is an appropriate and more compact representation of a rotation matrix (any rotation matrix has just 3 degrees of freedom). Then, it can be represented using only 4 parameters: a rotation vector $\mathbf{v}, \mathbf{k} \in \mathbb{R}^3, |\mathbf{k}| = 1$ describing the rotation axis and a rotation angle $\theta$ according to the right hand rule. The Rodrigues formula allows to define the rotation vector [@corrochano2001geometric]

which can be expressed in matrix terms

where $\mathbf{K}$ is the skew-symmetrical matrix of the unit rotation vector $k$

The exponential map operation ($exp$) allows to convert a Lie algebra $\mathfrak{g}$ to a Lie group $G$. For elementary (not composed) rotations, it transfors an axis-angle representation of rotations to a $3 \times 3$ rotation matrix.

Thus, the unit vector $\omega$ and the angle $\theta$ are sometimes called the exponential coordinate of the elementary rotation matrix $\mathbf{R}$. A more "compact" representation of Rodrigues notation can be achieved in $v \in \mathbb{R}^3$ [OpenCV]. The rotation angle $\theta$ is represented as the module of the vector $v$ while the rotation axis is the normalized vector $v / |v|$. Rodrigues and Euler representation of rotations are related but they have singularities and other problems when representing rotations at 180 degrees.

Euclidean transformations

An Euclidean transformation $E$ is composed by rotations and translations in the three-dimensional space. This can be represented using a $3\times4$ matrix operating on homogeneous coordinates, such that a vector $\mathbf{x}$ is transformed into $\mathbf{x}'$ by $ \mathbf{x}' = E \mathbf{x}$

This 3D rigid body transformation is a member of the Special Euclidean Lie group $SE(3)$. This group can be parametrized in $\mathbb{R}^3$ by the vector space which supports the Lie Algebra $ \mathfrak{se}(3)$ . Usually, the first three parameters are a translation vector while the second three are a rotation vector, whose direction is the axis of rotation and length the "amount" of rotation (in radians), as for $SO(3)$