Calculate Rotation matrix from Essential Matrix when translation relation is known

matrix equationsrotations

I am currently trying to solve a system of two matrix equations for a rotation and translation vector to be able to get the transformation between two camera images. Thereby the essential matrix $E$ is known and a $3\times 3$ matrix. This essential matrix relates to the $3\times 3$ rotation matrix $R$ and the skew symmetric representation of the $3\times 1$ translaton vector $t$ as follows:

$$
E = R \begin{bmatrix}t\end{bmatrix}_{\times}
$$

also see here: Essential matrix

Furthermore, another correlation is known which is:

$$
v_2 = R v_1 + t
$$

Here the vector $v_2$ and $v_1$ are $3\times 1$ and known.

I am looking for an analytical solution for the translation vector $t$ and roation $R$. I guess $R$ should be represent in axis-rotation form to also take care of the gimbal lock problem. As far as I see this problem should also be solvable since the roation matrix $R$ technically only has 3 degrees of freedom, e.g. by further normalizing on the rotation axis.
However, until now I was not able to solve this problem. Has anyone a hint how to get a possible solution or how to best apporach this problem?

Best Answer

I found a way to incorporate the constraint, however it isn't a closed form solution (I think an approach based on polar decomposition is also posible, I haven't explored it).

Let me explain it.

$$R^T E = R^T R \begin{bmatrix}t\end{bmatrix}_{\times}$$

$$\begin{bmatrix}t\end{bmatrix}_{\times} - R^T E = 0$$

Since $t = v_2 - R v_1$ we can replace in the above equation:

$$\begin{bmatrix}v_2 - R v_1\end{bmatrix}_{\times} - R^T E = 0$$

Since skew symmetric matrices form a vector space the following identity holds by linearity: $\begin{bmatrix}a - b\end{bmatrix}_{\times} = \begin{bmatrix}a\end{bmatrix}_{\times} - \begin{bmatrix}b\end{bmatrix}_{\times}$, so:

$$\begin{bmatrix}v_2\end{bmatrix}_{\times} - \begin{bmatrix}R v_1\end{bmatrix}_{\times} - R^T E = 0$$

Notice also that the following identity holds: $\begin{bmatrix}R v_1\end{bmatrix}_{\times}= R \begin{bmatrix}v_1\end{bmatrix}_{\times} R^T$ so we can write:

$$\begin{bmatrix}v_2\end{bmatrix}_{\times} - R \begin{bmatrix}v_1\end{bmatrix}_{\times} R^T - R^T E = 0$$

Which is a quadratic equation on $R$. This can be solved by Newton iteration e.g., Gauss-Newton method.

I think you might need to add a constraint, in the form of Lagrange multiplier, to enforce $R^T R = I$ i.e., $R \in SO(3)$. (If Lagrange multipliers are too cumbersome you can add the constraint as a weighted term to the energy).

You can use the $R$ found in polar decomposition of $E$ as initial guess to the Newton method for faster convergence. Once you have $R$ you can find $t$ replacing on the constraint equation.

Related Question