MCPcopy Index your code
hub / github.com/OpenMotionLab/MotionGPT / Rodrigues

Function Rodrigues

scripts/fbx_output.py:81–88  ·  view source on GitHub ↗
(rotvec)

Source from the content-addressed store, hash-verified

79# Computes rotation matrix through Rodrigues formula as in cv2.Rodrigues
80# Source: smpl/plugins/blender/corrective_bpy_sh.py
81def Rodrigues(rotvec):
82 theta = np.linalg.norm(rotvec)
83 r = (rotvec/theta).reshape(3, 1) if theta > 0. else rotvec
84 cost = np.cos(theta)
85 mat = np.asarray([[0, -r[2], r[1]],
86 [r[2], 0, -r[0]],
87 [-r[1], r[0], 0]])
88 return(cost*np.eye(3) + (1-cost)*r.dot(r.T) + np.sin(theta)*mat)
89
90
91# Setup scene

Callers 1

process_poseFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected