2019-12-29 09:11:17 -0600 | received badge | ● Notable Question (source) |
2018-07-23 09:33:23 -0600 | received badge | ● Popular Question (source) |
2017-04-12 06:17:28 -0600 | asked a question | Rotation matrix to euler angles with opencv c++ correct value wrong place I am working on a project wich involves Aruco markers and opencv. I am quite far in the project progress. I can read the rotation vectors and convert them to a rodrigues matrix using rodrigues() from opencv. This is a example of a rodrigues matrix I get: [0,1,0; 1,0,0; 0,0,-1] I use the following code. I use the predefined rot2euler to convert from rodrigues matrix to euler angles. And I convert the received radians to degrees. rot2euler looks like the following. If I use the rodrigues matrix I give as an example I get the following euler angles. [0; 90; -180] But I am suppose to get the following. [-180; 0; 90] When is use this tool [danceswithcode.net/engineeringnotes/rotations_in_3d/demo3D/rotations_in_3d_tool.html] You can see that [0; 90; -180] doesn't match the rodrigues matrix but [-180; 0; 90] does. (I am aware of the fact that the tool works with ZYX coordinates) So the problem is I get the correct values but in a wrong order. Another problem is that this isn't always the case. For example rodrigues matrix: [1,0,0; 0,-1,0; 0,0,-1] Provides me the correct euler angles. If someone knows a solution to the problem or can provide me with a explanation how the rot2euler function works exactly. It will be higly appreciated. Kind Regards Brent Convens |