none
Prevent Joint Tracking RRS feed

  • Question

  • Is there a way to prevent Kinect from tracking a specific joint from a player's skeleton.

    I tried setting its tracking state:

    public void UntrackJoint(Skeleton skeleton, JointType jointType){

    skeleton.Joints[jointType].TrackingState = JointTrackingState.NotTracked;

    }

    It gives me an error:

    Cannot modify the return value of 'Microsoft.Kinect.JointCollection.this[Microsoft.Kinect.JointType]' because it is not a variable

    Since it cannot be modified, is there an alternative way to change it or is it not possible?

    Thank you! :)

    Monday, February 4, 2013 4:02 PM

Answers

  • First of all, I find your question a little bit intriguing.  I had never thought of not tracking a joint.  I often "throw away" joint information that I am not interested in, but I have never tried to not have it include the information in the joint collection.  I am guessing that the reason that you want to do this is that you want to iterate over the joint collection without enumerating the specific joint types during that iteration and you want to not have joints that you are not interested in included in that collection?

    Unfortunately, I do not think that you can do this.  I think the best that you can do is ignore the joints that you are not interested in during the iteration.  Or you could take the time to copy the joint collection to another collection while weeding out the the joints that you are not interested in processing.  This would probably not be very fast unless you do some tricks with hash tables or something like that.  Sorry I don't have any better news.


    Walt Smith Senior Architect

    Tuesday, February 5, 2013 2:11 PM

All replies

  • First of all, I find your question a little bit intriguing.  I had never thought of not tracking a joint.  I often "throw away" joint information that I am not interested in, but I have never tried to not have it include the information in the joint collection.  I am guessing that the reason that you want to do this is that you want to iterate over the joint collection without enumerating the specific joint types during that iteration and you want to not have joints that you are not interested in included in that collection?

    Unfortunately, I do not think that you can do this.  I think the best that you can do is ignore the joints that you are not interested in during the iteration.  Or you could take the time to copy the joint collection to another collection while weeding out the the joints that you are not interested in processing.  This would probably not be very fast unless you do some tricks with hash tables or something like that.  Sorry I don't have any better news.


    Walt Smith Senior Architect

    Tuesday, February 5, 2013 2:11 PM
  • Hello Walt, thanks for your reply.

    I'd like to prevent from tracking other joints to avoid miscalculation of joint positions.
    As far as I know, when a joint overlaps another joint Kinect will not be able to accurately detect which joint is which.

    I am currently developing an application and one of its functionality is to track my right hand as cursor. The problem is when my right hand overlaps another joint, the cursor jitters. I was thinking that if my right hand is the only joint that is tracked in my body, jittering may be prevented.

    Unfortunately, as you have said that it is not possible. Is there any way to prevent this?

    Tuesday, February 5, 2013 7:23 PM