# Need help with joint rotations.

• ### Question

• Hello,

I have the following problem:

Need to transform skeleton joint positions to rotations (euler's angles or quaternion).

Best regards.

Tuesday, September 13, 2011 9:05 PM

Eddy

I'm here to help
Friday, September 16, 2011 10:59 PM
• With the current API, you won't be able to get accurate measurements of head yaw, since there is only one joint representing entire head. I guess if you calculate vector A from right shoulder to left shoulder joint and also vector B from shoulder center to head joint, then the cross product between A and B would be an approximation of yaw. Again, this would not be very precise, since it would only capture details if the whole neck + head are moving downwards or upwards from the base of the neck around the shoulders. It is very possible for head to move independently from the top of the neck, and that kind of motion won't be accurately captured by this calculation.

Eddy

I'm here to help
Tuesday, September 20, 2011 5:25 PM

### All replies

Eddy

I'm here to help
Friday, September 16, 2011 10:59 PM
• Hey there, would you mind to share your thoughts or codesnippets so far?

Maybe I need to take Quaternions too, because I need to calculate Angles that aren't easily to calculat through vectors (e.g. the headyaw or armyaw).

BitGriff, did you continue on thinking about quaternions or did you take other ideas?

@Eddy, do you think it is possible to calculate  the headyaw angle for example?

I didn't try crossprodukt yet...

Thanks

Tuesday, September 20, 2011 12:43 PM
• With the current API, you won't be able to get accurate measurements of head yaw, since there is only one joint representing entire head. I guess if you calculate vector A from right shoulder to left shoulder joint and also vector B from shoulder center to head joint, then the cross product between A and B would be an approximation of yaw. Again, this would not be very precise, since it would only capture details if the whole neck + head are moving downwards or upwards from the base of the neck around the shoulders. It is very possible for head to move independently from the top of the neck, and that kind of motion won't be accurately captured by this calculation.

Eddy

I'm here to help
Tuesday, September 20, 2011 5:25 PM

Yeah, I tried it the same way you suggested but you are right, its not that precise!

What I actually would need are more joints on the head. One more would be sufficient...

Maybe I could extract it from depthstream, but I think it would need a couple of days to have a running solution...

And I think, Quaternions wouldn't solve the problem too. Its simply to few information between head and shouldercenter :/

Thank you,

Simon

Tuesday, September 20, 2011 8:10 PM