I have the following problem: I need to transform skele开发者_运维百科ton joint positions, from Kinect, to joint rotation angles.
If you mean by "rotation angle" is considering three pairs of joints ,
You can get the relative rotation angles but the absolute angles as follows.
Say the joints are A,B and C
- You can define a triangle (traingle ABC ).
- Then you can assign any value (say R ) as one of the three angles (ex: angle ABC = R ).
- Since you have the joint positions you can calculate the length of each 'edge' of the triangle using distance formula.
- Use Cosine(Cos) Rule to calculate the relative angles .
(which will be for example BAC = 0.2R , CAB = 3R etc)
As well as you can get the variation of a particular angle where distance between two joints are constant .( ex: consider Shoulder - Elbow and Elbow - Wrist ). Initially angle ABC was R and Then 1.02R , Next 1.3R ..etc
- consider each joint as a vector.
- axis angle between two vectors (one in current frame, come from kinect data. one in an initial pose. As the new SDK does not have an initial pose, you may need to set a virtual pose as the initial pose).
- a rotation quaternion/matrix from axis angle
More information on this page.
精彩评论