KevinLTT / video2bvh

Extracts human motion in video and save it as bvh mocap file.
MIT License
580 stars 90 forks source link

How to amend the result when correct the initial_directions? #52

Open hujb48 opened 2 years ago

hujb48 commented 2 years ago

Hi, I would like to use my own skeleton, however, some of my initial_directions are not paralleled to any coordinate axis. So, my question is how to amend the result? For example: I got LeftElbow': [1, 0, 0] to LeftElbow': [0.718, 0.718, 0], this makes a rotation of 45 degree around with the z axis in local coordinate system. Now, for the .BVH the XYZ rotation parameterss are [a, b, c], so how could I get new parameters for the new local coordinate system which are [a', b', c'] 作者您好,我想使用我自己的骨架,然而,我的一些initial_directions是不平行于任何坐标轴的。所以,我的问题是如何去修正得到的ZXY旋转结果? 例如: 我的LeftElbow'初始direction是:[1,0,0],修改为LeftElbow':[0.718, 0.718, 0],这个旋转变化体现为在局部坐标系的中的绕z轴旋转45度。对于原来的direction,在.bvh文件中的对应点的 X、Y、Z旋转参数是[a, b, c],那么我如何获得新的局部坐标系的旋转参数[a',b',c']呢?

visionNoob commented 1 year ago

@hujb48 did you solve the problem?