[Math] How to convert from left-handed coordinate system to right-handed

coordinate systemseuclidean-geometrytransformation

I need to convert coordinates and rotations from left-handed coordinate system (used by Unity) to right-handed (used by camera calib. toolbox in MATLAB\Octave)

enter image description here enter image description here

While converting point coordinates may be easy, I cannot say the same for rotations.
I need rotations in form of 3×3 rotation matrices, not quaternions.

For each object I have

$ t_{left} = \begin{bmatrix} x \\ y \\ z \end{bmatrix} $ and $ R_{left} = \begin{bmatrix} r11 & r12 & r13 \\ r21 & r22 & r23 \\ r31 & r32 & r33 \end{bmatrix}
$

defined in coordinate frame from the left image. Which transformation should I apply to get $ t_{right} $ and $ R_{right} $ in the right coordinate frame?

Best Answer

Flip $y\leftrightarrow z$, apply the original rotation, flip $y\leftrightarrow z$ again. So $$\begin{pmatrix}r11&r12&r13\\r31&r33&r32\\r21&r23&r22\end{pmatrix} $$

Related Question