计算出相机坐标系的三轴旋转欧拉角,旋转后可以转出世界坐标系。
旋转顺序为z、y、x
const double PI = 3.141592653;
double thetaz = atan2(r21, r11) / PI * 180;
double thetay = atan2(-1 * r31, sqrt(r32*r32 + r33*r33)) / PI * 180;
double thetax = atan2(r32, r33) / PI * 180;
参考:https://www.cnblogs.com/singlex/p/RotateMatrix2Euler.html