# How to convert from left-handed coordinate system to right-handed?

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)

While converting point coordinates may be easy, I cannot say the same for rotations. I need rotations in form of 3x3 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?

• Would it help to say that the transformation is given by reflecting across $y=z$? – Toby Mak Oct 20 '18 at 9:25
• @TobyMak, as far as I suppose, this would help for point coordinates, but not for rotations. Correct me please if I'm not true – Simon Oct 20 '18 at 9:27
• The way you've labed your axis makes it look like they are both right handed systems and they treat z as up instead of y in one. You'll need to label axis correctly with respect to sign if you want proper help. – opa Apr 19 at 21:03
• @opa, they are labelled absolutely correctly, they come from different software. What I need is a conversion from system from the left to the system on the right. – Simon Apr 20 at 5:57
• @Simon Well they are both the same handed-ness as they are labeled now, so either the labels are wrong with respect to your question or you don't need handed-ness conversions. – opa Apr 20 at 18:56

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}$$