Kinect 2.0 Joint / JointOrientation to Ogre3D
Posted: Wed Dec 10, 2014 11:52 am
Hey guys,
I want to reimplement the Demo of Sinbad using Kinect v2, but I am encountering a problem which I was not able to solve on my own...
The connection to the kinect is working and I can print some values like the joint position (x,y,z) and the joint orientation(x,y,z,w) for each of the 25 joints found by the Kinect skeleton.
My problem is now how I can map those values to sinbad? I know there is a demo for the kinect v1 using OpenNI, but I can't find the sourcecode.
In this posting it says that the orientation is "roll", "pitch", "yaw". Some people say that the values are absolute and other that they are relative to the parents bone.
But my problem is, that I do not know how to create a quaterion from r,p,y... If I have the quaternion I can apply it to a bone, that wouldn't be the problem.
Here are some values coming from the kinect when moving the left arm. (Values are for the wrist) first the 3 position values and after that the 4 orientation values, each line for one frame of the kinect
Can someone help me and at least explain to me what those values are or how I can use roll pitch yaw to create a valid quaternion?
I want to reimplement the Demo of Sinbad using Kinect v2, but I am encountering a problem which I was not able to solve on my own...
The connection to the kinect is working and I can print some values like the joint position (x,y,z) and the joint orientation(x,y,z,w) for each of the 25 joints found by the Kinect skeleton.
My problem is now how I can map those values to sinbad? I know there is a demo for the kinect v1 using OpenNI, but I can't find the sourcecode.
In this posting it says that the orientation is "roll", "pitch", "yaw". Some people say that the values are absolute and other that they are relative to the parents bone.
But my problem is, that I do not know how to create a quaterion from r,p,y... If I have the quaternion I can apply it to a bone, that wouldn't be the problem.
Here are some values coming from the kinect when moving the left arm. (Values are for the wrist) first the 3 position values and after that the 4 orientation values, each line for one frame of the kinect
Code: Select all
11:50:39: WRIST: 0.105007 -0.0241627 0.890557 -0.0275453 -0.197223 0.976617 -0.0810145
11:50:39: WRIST: 0.168085 -0.0717494 0.920979 -0.0700791 -0.0294791 0.992532 -0.0953983
11:50:39: WRIST: 0.245335 -0.0582655 0.831103 -0.126986 -0.189362 0.950926 -0.20918
11:50:39: WRIST: 0.261235 -0.0738448 0.889838 -0.281718 -0.0110119 0.928249 -0.242625
11:50:39: WRIST: 0.386774 0.038957 0.855162 -0.4302 -0.316903 0.661656 -0.526034
11:50:39: WRIST: 0.381307 0.0654915 0.877569 0.509834 0.250843 -0.554102 0.608373
11:50:39: WRIST: 0.365752 0.0196074 0.864313 -0.392745 -0.0836547 0.703819 -0.585996
11:50:39: WRIST: 0.358447 0.0287535 0.85712 -0.264221 0.0757864 0.713433 -0.64456
11:50:39: WRIST: 0.366006 -0.122044 0.561175 -0.160404 -0.344358 0.872678 -0.306792
11:50:39: WRIST: 0.37519 -0.11875 0.550461 0.0667296 -0.340323 0.858438 -0.377905
11:50:39: WRIST: 0.394419 -0.117494 0.536459 0.265227 -0.22559 0.805716 -0.479151
11:50:39: WRIST: 0.437061 -0.104316 0.543979 0.156031 -0.13026 0.820895 -0.533684
11:50:39: WRIST: 0.460237 -0.091752 0.567488 0.00790161 -0.111821 0.855681 -0.505216
11:50:39: WRIST: 0.437995 -0.104449 0.581361 0.930455 0.363881 -0.0069316 -0.0423697
Can someone help me and at least explain to me what those values are or how I can use roll pitch yaw to create a valid quaternion?