It’s been 3 months since the latest release of AIRkinect, which brought you OpenNI support on windows, but today we’re very happy to bring you 2.2! Some of the new stuff we have is:
- Support for seated skeleton tracking (MS SDK)
- Near mode support with skeleton tracking (MS SDK)
- Option to choose which users to track (MS SDK)
- Skeleton bone tracking (both)
We’ve also fixed some bugs concerning initialization failures on the MS SDK version & coordinates not being mirrored correctly on OpenNI.
One of the big new structures you’re going to see is skeleton bones. Skeleton bones is actually the joint rotation info which is moved from the skeleton joints structures into a structure of it’s own. This is mainly because of the differences between OpenNI & the MS SDK. The MS SDK tracks more joints & exposes more joint orientations. OpenNI stores joint rotation info in the start joint of a bone (as an absolute orientation offset from the T-pose), the MS SDK in the end joint. We wanted to create a structure which would be the same in both openNI & windows & exposes.
There is a set of 10 bones which are available on both OpenNI & the MS SDK:
SkeletonBone.NECK SkeletonBone.SPINE SkeletonBone.LEFT_UPPER_ARM SkeletonBone.LEFT_LOWER_ARM SkeletonBone.RIGHT_UPPER_ARM SkeletonBone.RIGHT_LOWER_ARM SkeletonBone.LEFT_UPPER_LEG SkeletonBone.LEFT_LOWER_LEG SkeletonBone.RIGHT_UPPER_LEG SkeletonBone.RIGHT_LOWER_LEG
You can get absolute rotation information as a Matrix3D from a given bone with the following code:
Other information you can get is the name of the start joint, name of the end joint and name of the parent bone. If you are using the MS SDK, you get information on 9 more bones (in regular tracking, not seated mode):
MSSkeletonBone.LEFT_COLLAR MSSkeletonBone.LEFT_HAND MSSkeletonBone.RIGHT_COLLAR MSSkeletonBone.RIGHT_HAND MSSkeletonBone.LOWER_SPINE MSSkeletonBone.LEFT_HIP MSSkeletonBone.LEFT_FOOT MSSkeletonBone.RIGHT_HIP MSSkeletonBone.RIGHT_FOOT
Again, you can get those bones by the getBoneByName method. There’s also a collection of bones you can loop through (similar like you can loop through all the joints of a user):
contains a vector of SkeletonBone instances.
So, skeleton bones contain absolute orientation values for bones. Now, if you want to use the native, platform specific rotation values, we have added that information in the joints where that platform stores those values. So if you have an OpenNI Skeleton joint, you will have access to:
And in the MS SDK:
msJoint.nativeHierarchicalRotationQuaternion:Quaternion msJoint.nativeHierarchicalRotationMatrix:Matrix3D msJoint.nativeAbsoluteRotationQuaternion:Quaternion msJoint.nativeAbsoluteRotationMatrix:Matrix3D
Theres one big change concerning joint information, and that’s where you can find the position values. In earliers versions of airkinect, you had direct properties on joints / users (like joint.depthPosition, joint.depthRelativePosition, joint.position, etc…). We have moved those values (word, rgb & depth position data) to a separate position structure.
So instead of:
You will use:
This will require some basic refactoring of your existing applications, but shouldn’t be that difficult to implement.
There is one more thing to announce: from now on our native C++ sources are open source as well! So if you run into bugs, or want to add new features yourself, please fork & play with the code! Hopefully this will speed up bugfixes / improvements to the native code too
We hope you like this update, looking forward to seeing the projects you’re building with AIRKinect!