Essential matrix

Uses your system voice; voice and rate in settings.

Snapshot

≈ 10 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

In computer vision, the essential matrix is a 3 \times 3 matrix, \mathbf{E} that relates corresponding points in stereo images assuming that the cameras satisfy the pinhole camera model.

In computer vision, the essential matrix is a 3 \times 3 matrix, \mathbf{E} that relates corresponding points in stereo images assuming that the cameras satisfy the pinhole camera model.

Function

More specifically, if \mathbf{y} and \mathbf{y}' are homogeneous normalized image coordinates in image 1 and 2, respectively, then (\mathbf{y}')^\top \, \mathbf{E} \, \mathbf{y} = 0 if \mathbf{y} and \mathbf{y}' correspond to the same 3D point in the scene (not an "if and only if" due to the fact that points that lie on the same epipolar line in the first image will get mapped to the same epipolar line in the second image). The above relation which defines the essential matrix was published in 19811 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 \mathbf{E} 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 \mathbf{E} 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, \mathbf{F} . 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 (matrices \mathbf{K} and \mathbf{K}' ) 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. The essential matrix is related to the fundamental matrix with \mathbf{E} = ({\mathbf{K}'})^{\top} \; \mathbf{F} \; \mathbf{K} . \begin{pmatrix} y_1 \\ y_2 \end{pmatrix} = \frac{1}{x_3} \begin{pmatrix} x_1 \\ x_2 \end{pmatrix}   and   \begin{pmatrix} y'_1 \\ y'_2 \end{pmatrix} = \frac{1}{x'_3} \begin{pmatrix} x'_1 \\ x'_2 \end{pmatrix} A homogeneous representation of the two image coordinates is then given by \begin{pmatrix} y_1 \\ y_2 \\ 1 \end{pmatrix} = \frac{1}{x_3} \begin{pmatrix} x_1 \\ x_2 \\ x_{3} \end{pmatrix}   and   \begin{pmatrix} y'_1 \\ y'_2 \\ 1 \end{pmatrix} = \frac{1}{x'_3} \begin{pmatrix} x'_1 \\ x'_2 \\ x'_{3} \end{pmatrix} which also can be written more compactly as \mathbf{y} = \frac{1}{x_{3}} \, \tilde{\mathbf{x}}   and   \mathbf{y}' = \frac{1}{x'_{3}} \, \tilde{\mathbf{x}}' where \mathbf{y} and \mathbf{y}' are homogeneous representations of the 2D image coordinates and \tilde{\mathbf{x}} and \tilde{\mathbf{x}}' 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 \tilde{\mathbf{x}}' = \mathbf{R} \, (\tilde{\mathbf{x}} - \mathbf{t}) where \mathbf{R} is a 3 \times 3 rotation matrix and \mathbf{t} is a 3-dimensional translation vector. The essential matrix is then defined as: where [\mathbf{t}]_{\times} is the matrix representation of the cross product with \mathbf{t} . Note: Here, the transformation [\mathbf{R}^{T} | \mathbf{t}] will transform points in the 2nd view to the 1st view. For the definition of \mathbf{E} we are only interested in the orientations of the normalized image coordinates (See also: Triple product). As such we don't need the translational component when substituting image coordinates into the essential equation. To see that this definition of \mathbf{E} describes a constraint on corresponding image coordinates multiply \mathbf{E} from left and right with the 3D coordinates of point P in the two different coordinate systems: \tilde{\mathbf{x}}'^{T} \, \mathbf{E} \, \tilde{\mathbf{x}} \, \stackrel{(1)}{=} \,\tilde{\mathbf{x}}^{T} \, \mathbf{R}^{T} \, \mathbf{R} \, [\mathbf{t}]_{\times} \, \tilde{\mathbf{x}} \, \stackrel{(2)}{=} \, \tilde{\mathbf{x}}^{T} \, [\mathbf{t}]_{\times} \, \tilde{\mathbf{x}} \, \stackrel{(3)}{=} \, 0 Insert the above relations between \tilde{\mathbf{x}}' and \tilde{\mathbf{x}} and the definition of \mathbf{E} in terms of \mathbf{R} and \mathbf{t} . \mathbf{R}^{T} \, \mathbf{R} = \mathbf{I} since \mathbf{R} is a rotation matrix. Properties of the matrix representation of the cross product. Finally, it can be assumed that both x_{3} and x'_{3} are > 0, otherwise they are not visible in both cameras. This gives 0 = (\tilde{\mathbf{x}}')^{T} \, \mathbf{E} \, \tilde{\mathbf{x}} = \frac{1}{x'_{3}} (\tilde{\mathbf{x}}')^{T} \, \mathbf{E} \, \frac{1}{x_{3}} \tilde{\mathbf{x}} = (\mathbf{y}')^{T} \, \mathbf{E} \, \mathbf{y} which is the constraint that the essential matrix defines between corresponding image points. \mathbf{E} =[\mathbf{\widetilde{t}}]_{\times} \, \mathbf{R} where \mathbf{\widetilde{t}} = -\mathbf{R}\mathbf{t} , and then \mathbf{E} has a well-defined "scaling". It depends on the application which position is the more relevant. The constraints can also be expressed as \det \mathbf{E} = 0 and 2 \mathbf{E} \mathbf{E}^T \mathbf{E} - \operatorname{tr} ( \mathbf{E} \mathbf{E}^T ) \mathbf{E} = 0 . 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 \mathbf{R} and the translation vector \mathbf{t} 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. \mathbf{E} = \mathbf{U} \, \mathbf{\Sigma} \, \mathbf{V}^{T} where \mathbf{U} and \mathbf{V} are orthogonal 3 \times 3 matrices and \mathbf{\Sigma} is a 3 \times 3 diagonal matrix with \mathbf{\Sigma} = \begin{pmatrix} s & 0 & 0 \\ 0 & s & 0 \\ 0 & 0 & 0 \end{pmatrix} The diagonal entries of \mathbf{\Sigma} are the singular values of \mathbf{E} which, according to the internal constraints of the essential matrix, must consist of two identical and one zero value. Define \mathbf{W} = \begin{pmatrix} 0 & -1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{pmatrix}   with   \mathbf{W}^{-1} = \mathbf{W}^{T} =\begin{pmatrix} 0 & 1 & 0 \\ -1 & 0 & 0 \\ 0 & 0 & 1 \end{pmatrix} and make the following ansatz [\mathbf{t}]_{\times} = \mathbf{U} \, \mathbf{W} \, \mathbf{\Sigma} \, \mathbf{U}^{T} \mathbf{R} = \mathbf{U} \, \mathbf{W}^{-1} \, \mathbf{V}^{T} Since \mathbf{\Sigma} may not completely fulfill the constraints when dealing with real world data (f.e. camera images), the alternative [\mathbf{t}]_{\times} = \mathbf{U} \, \mathbf{Z} \, \mathbf{U}^{T}   with   \mathbf{Z} = \begin{pmatrix} 0 & 1 & 0 \\ -1 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix} may help. [\mathbf{t}]_{\times}\,\mathbf{R} = \mathbf{U} \, \mathbf{W} \, \mathbf{\Sigma} \, \mathbf{U}^{T} \mathbf{U} \, \mathbf{W}^{-1} \, \mathbf{V}^{T}\, = \mathbf{U} \, \mathbf{\Sigma} \, \mathbf{V}^{T} = \mathbf{E} Second, it must be shown that this [\mathbf{t}]_{\times} is a matrix representation of the cross product for some \mathbf{t} . Since \mathbf{W} \, \mathbf{\Sigma} = \begin{pmatrix} 0 & -s & 0 \\ s & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix} it is the case that \mathbf{W} \, \mathbf{\Sigma} is skew-symmetric, i.e., (\mathbf{W} \, \mathbf{\Sigma})^{T} = - \mathbf{W} \, \mathbf{\Sigma} . This is also the case for our [\mathbf{t}]_{\times} , since ([\mathbf{t}]_{\times})^{T} = \mathbf{U} \, (\mathbf{W} \, \mathbf{\Sigma})^{T} \, \mathbf{U}^{T} = - \mathbf{U} \, \mathbf{W} \, \mathbf{\Sigma} \, \mathbf{U}^{T} = - [\mathbf{t}]_{\times} According to the general properties of the matrix representation of the cross product it then follows that [\mathbf{t}]_{\times} must be the cross product operator of exactly one vector \mathbf{t} . Third, it must also need to be shown that the above expression for \mathbf{R} is a rotation matrix. It is the product of three matrices which all are orthogonal which means that \mathbf{R} , too, is orthogonal or \det(\mathbf{R}) = \pm 1 . To be a proper rotation matrix it must also satisfy \det(\mathbf{R}) = 1 . Since, in this case, \mathbf{E} is seen as a projective element this can be accomplished by reversing the sign of \mathbf{E} if necessary. \mathbf{E} \, \mathbf{t} = \mathbf{R} \, [\mathbf{t}]_{\times} \, \mathbf{t} = \mathbf{0} For the subsequent analysis of the solutions, however, the exact scaling of \mathbf{t} is not so important as its "sign", i.e., in which direction it points. Let \hat{\mathbf{t}} be normalized vector in the null space of \mathbf{E} . It is then the case that both \hat{\mathbf{t}} and -\hat{\mathbf{t}} are valid translation vectors relative \mathbf{E} . It is also possible to change \mathbf{W} into \mathbf{W}^{-1} in the derivations of \mathbf{R} and \mathbf{t} 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 \mathbf{E} there are two opposite directions which are possible for \mathbf{t} 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 s > 0 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 \mathbf{R} and \mathbf{t} assumes that \mathbf{E} satisfy the internal constraints of the essential matrix. If this is not the case which, for example, typically is the case if \mathbf{E} has been estimated from real (and noisy) image data, it has to be assumed that it approximately satisfy the internal constraints. The vector \hat{\mathbf{t}} is then chosen as right singular vector of \mathbf{E} corresponding to the smallest singular value. An Investigation of the Essential Matrix by R.I. Hartley

Text derived from https://en.wikipedia.org/w/index.php?oldid=1334447197 under CC BY-SA 4.0; modifications have been made.

References

  1. ↩Wikipedia publication date (×1) · confidence 0.95 https://en.wikipedia.org/w/index.php?oldid=1334447197

Sources cited in this revision

No external citation was extracted for this revision. That is a statement about the source, not a claim that none exists.