Single skeleton tracking RRS feed

  • Question

  • Hi, I have been working with the Kinect all summer using OpenNI but I have been working with the SDK for only a month or so now. I tried looking for similar questions like this already, but couldn't quite find the answer I am looking for.

    Is there a way to only track one skeleton instead of two? I am making a game for class and it would be nice if I could only track the user that is directly in front of the kinect instead of any people standing around or behind the player. Ideas I have had are making it so the kinect only tracks users in a certain x, y, z range? But I am not sure how I would implement something like this. 

    If anyone has a solution for me, could I get the algorithm or even the code to do this, thanks.

    I am using C# in XNA


    Wednesday, November 23, 2011 5:50 PM

All replies

  • You can do something like this to track only one skeleton in your nui_skeletonFrameReady method


    SkeletonFrame allSkeletons = e.SkeletonFrame;
    SkeletonData skeleton = allSkeletons.Skeletons.FirstOrDefault(s => s.TrackingState == SkeletonTrackingState.Tracked);
    if (skeleton != null)

    • Proposed as answer by ykbharat Sunday, May 6, 2012 12:06 PM
    Thursday, November 24, 2011 2:54 PM