MATLAB: How to calculate 3 rotation angles and scaling factor from 3 by 3 affine parameters matrix

affine 3daffine transformationhelmert 3drotation angles in 3dscaling factor

My apologies if my question is too simple, but I can't seem to find an answer. I need to calculate 3 rotation angles: Rx, Ry, Rz and a scaling factor from a matrix of 3 by 3 affine parameters which I get from Helmert 3D affine function which exist in Geodesic Transformation Toolbox (<http://www.mathworks.com/matlabcentral/fileexchange/9696-geodetic-transformations-toolbox)>. As part of calculated transformation model I get 3 translation parameters followed by 9 affine parameters, and I'm not sure how I can calculate rotation angles and scaling factor for the transformation.
Any points are greatly appreciated.

Best Answer

The determinant of the matrix should give the scale factor (cubed), so you can obtain the pure rotational part as
scale=det(A)^(1/3);
R=A/scale;
There are many ways to factor a rotation matrix R into 3 separate rotations Rx, Ry, Rz. Choose one that suits you from here
Related Question