AIRKinect 2.2 – now with open-source native code

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:

user.getBoneByName(SkeletonBone.LEFT_UPPER_ARM).orientation.absoluteOrientationMatrix

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):

user.skeletonBones

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:

openNiJoint.nativeOrientationConfidence:Number
openNIJoint.nativeOrientation:Matrix3D

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:

joint.position.x
joint.rgbPosition.x

etc…

You will use:

joint.position.world.x
joint.position.rgb.x

etc…

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 :)

As always, you can find the latest release & docs on github (http://as3nui.github.com/airkinect-2-core/), all our repositories are on https://github.com/AS3NUI/

We hope you like this update, looking forward to seeing the projects you’re building with AIRKinect!

47 Responses to “AIRKinect 2.2 – now with open-source native code”

  1. Muchas Gracias por el esfuerzo y el tiempo dedicado,su librerìa se ha vuelto muy importante para los que desarrollamos kinect.

    Muchas gracias !

  2. Anthony Sherritt says:

    Thank you guys once again! Does this version support tracking 2 skeletons? And if not, are there plans to do so in the near future?

    • I started using AIRKinect since version 1.6, and as I remember it was already able to track 2 skeletons. cmiiw

      • Anthony Sherritt says:

        Thanks for that. I do see that 2 skeletons are working in the example. Don’t know why I thought otherwise. Maybe because I code alone mostly.

  3. Hi, I have problems starting the application with the new airkinect sdk 2.2, I get as an error “initial content not found”, I share with you the project to see if they can help me.

    https://dl.dropbox.com/u/862935/prueba.rar

  4. Glad it finally support a higher resolution in mac version. But I have trouble using it..
    When I change it to CameraResolution.RESOLUTION_1280_960, it dosen’t show anything. But other resolution sizes are working fine.

    I have installed the most updated version of driver – OpenNI-Bin-Dev-MacOSX-v1.5.4.0.

    Any help?

    • Anthony Sherritt says:

      I seem to be having the same issue on my PC windows 7. I thought maybe it was because my XBox360 Kinect didn’t support that size.

  5. Hello,
    I’m trying to put the Kinect working with the code you have on github, but when i compile allways get the error “[Fault] exception, information=TypeError: Error #1009: Cannot access a property or method of a null object reference.”
    and the line is this one “context = ExtensionContext.createExtensionContext(“com.as3nui.nativeExtensions.air.kinect”, (shared) ? “shared” : null);”

    the var context allways return me NULL

  6. Hello.
    I have problems starting the application with the new version (2.2).
    I have experienced an shutdown error in “setting.userMask = true”

    • You’ll need to provide a little more details: what’s the system/drivers you’re using, what’s the full list of settings you are using. Did you experience problems with previous versions of airkinect?

  7. really , c++ source code ? cool !
    i dont have many money but i could buy you guys a beer :)

  8. How to get user’s SkeletonJoint in version2.2 (MSSDK)??

    This code in version2.1(MSSDK) is work fine, but in version2.2(MSSDK), device.users.length is always 0, why?


    for each(var user:User in device.users){
    ...............
    }

  9. But how to get the old rotationX, rotationY, rotationZ of every Bone? I have no idea how to use the absoluteOrientationMatrix for this. Can you help me? I have the mssdk.

  10. I just tried out 2.2 but on all the demo’s using the skelletons I’m getting:

    INFO: Starting Device
    INFO: Starting Skeleton Tracking
    ERROR: Failed to Initalize Skeleton Tracking
    INFO: Stopping Kinect

    The 2.1 examples are still behaving as expected though, so I’m ruling out any driver issues, what else can it be?

  11. Renan Amaral says:

    Hey guys ! Tanx for the great work/help !

    I’m getting this error while trying to debug in FlashDevelop: “The content cannot be loaded because there was a problem loading an extension: Error: Requested extension com.as3nui.nativeExtensions.air.kinect could not be found.”

    What is correct ID of the extension to put in the XML, please ! =]

    []‘s

    • Hi I have another kind of problem in FlashDevelop, if you manage to solve yours could share the project?, That will allow me to work with FlashDevelop, my problem was as follows:

      “Hi, I have problems starting the application With The airkinect new sdk 2.2, I get an error as” initial content not found “, I share with you the project to see if THEY CAN help me.”
      https://dl.dropbox.com/u/862935/prueba.rar

      • Renan Amaral says:

        Hey Luis !
        Your first problem was that you didn’t added the flag “-extdir extension/debug/” in the “Packager.bat” file. You must add this that AND in the Run.bat.
        After that, the window opened, but had another problem inside I coudn’t manage.
        Let’s see if someone else can help us.
        []‘s

        • Perfecto, era esta lìnea de còdigo que estaba mal escrita :

          adl “%APP_XML%” “%APP_DIR%”-extdir extension/debug/

          lo reemplace por

          adl “%APP_XML%” “%APP_DIR%” -extdir extension/debug/

          Muchas gracias

  12. Hi. There is a method AIRKinectTransformSmoothParameters() in the previous version of AIRKinect, but I can not find it in AIRKinect2, did this method get removed in AIRKinect2? is there something similar in AIRKinect2?

    I really want this method since I need the cursor image that linked to user’s hand joint to be smoother.

    any help would be much appreciated

    CAI

  13. Renan Amaral says:

    One more question:
    Which drivers should I use with this API ? I found more than one on the internet.. =[
    Tanx !
    []‘s

  14. Why the function “chooseSkeletons” is only available for MSSDK?
    thank you!

    • I need to use this feature with OpenNI. How can active a skeleton for a specific user with OpenNi? Is it possible ?
      thank you

  15. Hi,

    I’m trying to make a small game with collision detection from the 3D character demo.
    My problem is that I can get the position of the hands from the RGB feed but the 3D character position is different from the RGB skeleton. I’ve tried to modify the camera3D parameters but even if it’s better, the RGB and 3D character joints are still not exactly the same. Do you know how I can make them identical or how I can get the position of the 3D character hands?

    Thanks.

  16. Nice job!

  17. Great job!

    I have one question though:
    If i disable the skeleton detection i should still get events when a user is added, right?
    I see the users (with depthShowUserColors) but the event never gets dispatched.
    On the other hand if i set skeletonEnabled true, then both USERS_ADDED and USERS_WITH_SKELETON_ADDED get dispatched.
    Is it a bug or am i doing something wrong?

    Thanks!

  18. Hi,

    Is higher resolution of video supported yet. Somehow I cannot go over 640 x 380 resolution. Have been stuck at this for over 2 months now…..

  19. C’est article est interesssant, je le relais à mes contacts !! :p

    Feel free to surf to my blog post :: Micah

  20. Right here is the perfect blog for anybody who would like to find out
    about this topic. You know so much its almost hard to argue with you (not that I really will need to…HaHa).
    You definitely put a new spin on a topic that has been discussed for many
    years. Great stuff, just wonderful!

  21. gaining muscle says:

    It is really a great and helpful piece of information. I’m glad that you simply shared this useful info with us. Please keep us up to date like this. Thanks for sharing.

  22. How would I identify either an user is facing towards the Kinect device or the user is in backward posture?

    • It always took 3~5 seconds to know it, Can it get faster to identify when the user just entering detect area?

  23. Just want to say your article is as astonishing. The clearness on your
    put up is simply great and that i could think you are an expert in this subject.
    Well together with your permission allow me to clutch your RSS feed to keep updated
    with forthcoming post. Thanks one million and please carry on the enjoyable work.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>