
Essential matrix

In computer vision, the essential matrix is a formula_1 matrix, formula_2 that relates corresponding points in stereo images assuming that the cameras satisfy the pinhole camera model.
Function.
More specifically, if formula_3 and formula_4 are homogeneous "normalized" image coordinates in image 1 and 2, respectively, then
if formula_3 and formula_4 correspond to the same 3D point in the scene.
The above relation which defines the essential matrix was published in 1981 by H. Christopher Longuet-Higgins, introducing the concept to the computer vision community. Richard Hartley and Andrew Zisserman's book reports that an analogous matrix appeared in photogrammetry long before that. Longuet-Higgins' paper includes an algorithm for estimating formula_2 from a set of corresponding normalized image coordinates as well as an algorithm for determining the relative position and orientation of the two cameras given that formula_2 is known. Finally, it shows how the 3D coordinates of the image points can be determined with the aid of the essential matrix.
Use.
The essential matrix can be seen as a precursor to the fundamental matrix. Both matrices can be used for establishing constraints between matching image points, but the essential matrix can only be used in relation to calibrated cameras since the inner camera parameters must be known in order to achieve the normalization. If, however, the cameras are calibrated the essential matrix can be useful for determining both the relative position and orientation between the cameras and the 3D position of corresponding image points.
Derivation and definition.
This derivation follows the paper by Longuet-Higgins.
Two normalized cameras project the 3D world onto their respective image planes. Let the 3D coordinates of a point P be formula_10 and formula_11 relative to each camera's coordinate system. Since the cameras are normalized, the corresponding image coordinates are
A homogeneous representation of the two image coordinates is then given by
which also can be written more compactly as
where formula_18 and formula_4 are homogeneous representations of the 2D image coordinates and formula_20 and formula_21 are proper 3D coordinates but in two different coordinate systems.
Another consequence of the normalized cameras is that their respective coordinate systems are related by means of a translation and rotation. This implies that the two sets of 3D coordinates are related as
where formula_23 is a formula_1 rotation matrix and formula_25 is a 3-dimensional translation vector.
The essential matrix is then defined as:
where formula_26 is the matrix representation of the cross product with formula_25.
To see that this definition of the essential matrix describes a constraint on corresponding image coordinates multiply formula_2 from left and right with the 3D coordinates of point P in the two different coordinate systems:
Finally, it can be assumed that both formula_37 and formula_38 are > 0, otherwise they are not visible in both cameras. This gives
which is the constraint that the essential matrix defines between corresponding image points.
Properties.
Not every arbitrary formula_1 matrix can be an essential matrix for some stereo cameras. To see this notice that it is defined as the matrix product of one rotation matrix and one skew-symmetric matrix, both formula_1. The skew-symmetric matrix must have two singular values which are equal and another which is zero. The multiplication of the rotation matrix does not change the singular values which means that also the essential matrix has two singular values which are equal and one which is zero. The properties described here are sometimes referred to as "internal constraints" of the essential matrix.
If the essential matrix formula_2 is multiplied by a non-zero scalar, the result is again an essential matrix which defines exactly the same constraint as formula_2 does. This means that formula_2 can be seen as an element of a projective space, that is, two such matrices are considered equivalent if one is a non-zero scalar multiplication of the other. This is a relevant position, for example, if formula_2 is estimated from image data. However, it is also possible to take the position that formula_2 is defined as
where formula_48, and then formula_2 has a well-defined "scaling". It depends on the application which position is the more relevant.
The constraints can also be expressed as
and 
Here, the last equation is a matrix constraint, which can be seen as 9 constraints, one for each matrix element. 
These constraints are often used for determining the essential matrix from five corresponding point pairs.
The essential matrix has five or six degrees of freedom, depending on whether or not it is seen as a projective element. The rotation matrix formula_23 and the translation vector formula_25 have three degrees of freedom each, in total six. If the essential matrix is considered as a projective element, however, one degree of freedom related to scalar multiplication must be subtracted leaving five degrees of freedom in total.
Estimation.
Given a set of corresponding image points it is possible to estimate an essential matrix which satisfies the defining epipolar constraint for all the points in the set. However, if the image points are subject to noise, which is the common case in any practical situation, it is not possible to find an essential matrix which satisfies all constraints exactly.
Depending on how the error related to each constraint is measured, it is possible to determine or estimate an essential matrix which optimally satisfies the constraints for a given set of corresponding image points. The most straightforward approach is to set up a total least squares problem, commonly known as the eight-point algorithm.
Extracting rotation and translation.
Given that the essential matrix has been determined for a stereo camera pair -- for example, using the estimation method above -- this information can be used for determining also the rotation formula_23 and translation formula_25 (up to a scaling) between the two camera's coordinate systems. In these derivations formula_2 is seen as a projective element rather than having a well-determined scaling.
Finding one solution.
The following method for determining formula_23 and formula_25 is based on performing a SVD of formula_2, see Hartley & Zisserman's book. It is also possible to determine formula_23 and formula_25 without an SVD, for example, following Longuet-Higgins' paper.
An SVD of formula_2 gives
where formula_64 and formula_65 are orthogonal formula_1 matrices and formula_67 is a formula_1 diagonal matrix with
The diagonal entries of formula_67 are the singular values of formula_2 which, according to the internal constraints of the essential matrix, must consist of two identical and one zero value. Define
and make the following ansatz
Since formula_67 may not completely fulfill the constraints when dealing with real world data (f.e. camera images), the alternative
may help.
Proof.
First, these expressions for formula_23 and formula_26 do satisfy the defining equation for the essential matrix
Second, it must be shown that this formula_26 is a matrix representation of the cross product for some formula_25. Since
it is the case that formula_85 is skew-symmetric, i.e., formula_86. This is also the case for our formula_26, since
According to the general properties of the matrix representation of the cross product it then follows that formula_26 must be the cross product operator of exactly one vector formula_25.
Third, it must also need to be shown that the above expression for formula_23 is a rotation matrix. It is the product of three matrices which all are orthogonal which means that formula_92, too, is orthogonal or formula_93. To be a proper rotation matrix it must also satisfy formula_94. Since, in this case, formula_2 is seen as a projective element this can be accomplished by reversing the sign of formula_2 if necessary.
Finding all solutions.
So far one possible solution for formula_23 and formula_25 has been established given formula_2. It is, however, not the only possible solution and it may not even be a valid solution from a practical point of view. To begin with, since the scaling of formula_2 is undefined, the scaling of formula_25 is also undefined. It must lie in the null space of formula_2 since
For the subsequent analysis of the solutions, however, the exact scaling of formula_25 is not so important as its "sign", i.e., in which direction it points. Let formula_105 be normalized vector in the null space of formula_2. It is then the case that both formula_105 and formula_108 are valid translation vectors relative formula_2. It is also possible to change formula_110 into formula_111 in the derivations of formula_23 and formula_25 above. For the translation vector this only causes a change of sign, which has already been described as a possibility. For the rotation, on the other hand, this will produce a different transformation, at least in the general case.
To summarize, given formula_2 there are two opposite directions which are possible for formula_25 and two different rotations which are compatible with this essential matrix. In total this gives four classes of solutions for the rotation and translation between the two camera coordinate systems. On top of that, there is also an unknown scaling formula_116 for the chosen translation direction.
It turns out, however, that only one of the four classes of solutions can be realized in practice. Given a pair of corresponding image coordinates, three of the solutions will always produce a 3D point which lies "behind" at least one of the two cameras and therefore cannot be seen. Only one of the four classes will consistently produce 3D points which are in front of both cameras. This must then be the correct solution. Still, however, it has an undetermined positive scaling related to the translation component.
The above determination of formula_23 and formula_25 assumes that formula_2 satisfy the internal constraints of the essential matrix. If this is not the case which, for example, typically is the case if formula_2 has been estimated from real (and noisy) image data, it has to be assumed that it approximately satisfy the internal constraints. The vector formula_105 is then chosen as right singular vector of formula_2 corresponding to the smallest singular value.
3D points from corresponding image points.
Many methods exist for computing formula_123 given corresponding normalized image coordinates formula_124 and formula_125, if the essential matrix is known and the corresponding rotation and translation transformations have been determined.