Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Obtaining Euler angles from Rotation Matrix

Hi,

I wish to extract Euler angles from the rvec output parameter of cv::solvePnp.

I understand that 3x1 rvec needs to be passed on to the Rodrigues function to obtain the 3x3 rotation matrix.

But to obtain Euler Angles, I need to use a fixed convention ( see this , for example Z-Y-X,etc ) which requires the rotation matrix to be obtained from a permutation (fixed order) of multiplication of Matrices ,

eg: for Z-Y-X convention, R_resultant = Rz * Ry * Rx.

I have looked into the source code here for Rodrigues function but don't quite understand how the matrix is formed Hence -

My Question: What is the convention (Z-Y-X, X-Y-Z, etc) of the formation of the 3x3 Rotation matrix obtained from Rodrigues ? Without this information I cannot obtain Euler angles. I have seen this tutorial for real time pose estimation, but unfortunately I don't understand the assumption for the convention (and hence I had made another question for that - here).

Obtaining Euler angles from Rotation Matrix

Hi,

I wish to extract Euler angles from the rvec output parameter of cv::solvePnp.

I understand that 3x1 rvec needs to be passed on to the Rodrigues function to obtain the 3x3 rotation matrix.

But to obtain Euler Angles, I need to use a fixed convention ( see this , for example Z-Y-X,etc ) which requires the rotation matrix to be obtained from a permutation (fixed order) of multiplication of Matrices ,

eg: for Z-Y-X convention, R_resultant = Rz * Ry * Rx.

I have looked into the source code here for Rodrigues function but don't quite understand how the matrix is formed Hence -

My Question: What is the convention (Z-Y-X, X-Y-Z, etc) of the formation of the 3x3 Rotation matrix obtained from Rodrigues ? Without this information I cannot obtain Euler angles. I have seen this tutorial for real time pose estimation, but unfortunately I don't understand the assumption for the convention (and hence I had made another question for that - here).