yanchxx / MoPA

An Blender addon uses ROMP to extract human's 3D poses from image, video or webcam and drive your own 3D character.
MIT License
242 stars 49 forks source link

关于‘poses'四元数具体含义 #40

Closed LihaoshengQAZ closed 1 year ago

LihaoshengQAZ commented 1 year ago

请问,执行代码 `outputs_all = romp_model(image) if outputs_all is None: client.send('none'.encode('utf-8')) continue

        poses = getAxisAngle(outputs_all['smpl_thetas'])[0]
        if 'cam_trans' not in outputs_all:
            trans = convert_cam_to_3d_trans(outputs_all['cam']).tolist()
        else:
            trans = outputs_all['cam_trans'].tolist()

        outputs = {'poses': poses, 'trans': trans[0]}`

得到的poses信息是24*4的 这是会收到poses是24根骨骼的四元数信息吗?如果是的话,那请问这个四元数的四个数具体代表什么呢?

yanchxx commented 1 year ago

poses = getAxisAngle(outputs_all['smpl_thetas'])[0]

这里是把旋转角表示(243)转换成了轴角表示(244),前三个是旋转轴,第四个是旋转角度

LihaoshengQAZ commented 1 year ago

[0.999267041683197, 0.0037113577127456665, 0.03809218108654022, 3.1125089587661123]比如这样就是前三个代表旋转轴,最后3.1125089587661123代表旋转角是吗?

yanchxx commented 1 year ago

LihaoshengQAZ commented 1 year ago

好的,非常感谢!

LihaoshengQAZ commented 1 year ago

不好意思,我这里似乎还是有一点疑问。我刚刚去看了getAxisAngle函数,所以对于上面那个四维数,我理解为前三个值 [0.999267041683197, 0.0037113577127456665, 0.03809218108654022] 表示一个单位向量,它表示了轴的方向。,然后最后一个数值3.1125089587661123代表当前骨骼绕着前面那个方向轴旋转了这么多的弧度,是吗?

yanchxx commented 1 year ago

嗯 是的