The process of decomposing an essential matrix follows the following steps:
-
Compute the decomposition of the essential matrix E using singular value decomposition (SVD). SVD decomposition is a method of decomposing a matrix into a product of three matrices, which is of the form E = UΣV^T, where U and V are orthogonal matrices and Σ is a diagonal matrix. The result of this step is stored in u, w and vt.
-
Copy the third column of the U matrix to t, and normalize. t represents the translation vector of the camera.
-
Define the W matrix. In some cases, W is also called the "rotation matrix", which is determined by the properties of the essential matrix E.
-
Compute two possible rotation matrices R1 and R2. These two matrices represent the rotation of the camera.
-
Check the determinants of R1 and R2. If the determinant is negative, the corresponding rotation matrix is inverted. Because in computer vision, we usually want rotation matrices to have a positive determinant, which means they represent a rotation of a right-handed coordinate system.
From the essential matrix E, two possible rotation matrices and a translation vector are calculated. The result is used for camera pose estimation.