Open neonb88 opened 4 years ago
Hi, you can use the following to convert rotation matrix to vector. https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.transform.Rotation.html
I haven't tested but a combination of 'from_matrix()' and 'as_rotvec()' should do the job.
@bharat-b7 Thanks! Will check it out. But does it deal with the issue of "dependent rotations" ? ie. I mean where global rotation of the wrist depends on local rotation of all joints "above" the wrist on the kinematic tree (ie. elbow, shoulder)?
@bharat-b7 Thanks! Will check it out. But does it deal with the issue of "dependent rotations" ? ie. I mean where global rotation of the wrist depends on local rotation of all joints "above" the wrist on the kinematic tree (ie. elbow, shoulder)?
At least, this is an issue unless someone pre-defined the order of the rotations from out['pose_0'][0]
to always be the same (ie. global rotates before back rotates before shoulder b4 elbow b4 wrist)
Hi, you can use the following to convert rotation matrix to vector. https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.transform.Rotation.html
I haven't tested but a combination of 'from_matrix()' and 'as_rotvec()' should do the job.
Hi @neonb88, I am facing the same issue. Did this answer work for you? If not, could you please share what worked. Thanks in advance.
Using the following worked for me
from scipy.spatial.transform import Rotation as R
r = R.from_matrix(rot_matrix).as_rotvec()
Hi @bharat-b7 ,
I'm sure you are quite busy, but 10 minutes of your time could potentially save me hours. Is there code to convert the
(3,3)
numbers inm['pose_N'][0,1]
to the 3 ((3,)
) angles per joint (72 pose parameters) used by SMPL?https://github.com/bharat-b7/MultiGarmentNetwork/issues/24#issuecomment-632296220
Thanks, Nathan