none
SkeletalTracking Fundamentals error RRS feed

  • General discussion

  • hi !, i have a problem, i saw the video SkeletalTrackingFundamentals by Dan Fernandez and when i run the app it fails because without skeleton it present this event it fires and obviously nobody stay in front of kinect, so, the error is this: Object reference not set to an instance of an object. Skeleton variable is logically invalid (Null) because no one in front of kinect, so,  what i m supose to do ?

    at the video explain Dan fernandez says that event only fires when a person (skeleton) recognizes the kinect and this I understand, but my app fails.

     

    any idea ?

    thnks

    Thursday, August 4, 2011 9:45 PM

All replies

  • That video was authored when Beta 1 was released, and the behavior it describes was accurate at that point. However, we recently shipped Beta 1 refresh and behavior was changed in managed API to always fire event whenever there is a depth frame, even if there is no skeleton detected. This was done to match native code behavior.

    I'm sorry for the confusion. I will let the right people know about this.

    Eddy


    I'm here to help
    Friday, August 5, 2011 2:53 AM
  • yeah, i have the new SDK, before with the previous version that didn't happen, not supposed that an event is triggered ONLY when something happens?, in this particular case should fire only when it detects a skeleton because then it would not be an event. so, anyway, in this new version of the SDK will make video tutorials explaining the changes? or launch a new update corrects these errors? or how I can manage this event without firing automatically ?
    Friday, August 5, 2011 4:18 PM
  • Could you explain me why made the event is automatically fired ? not quite understand how they did and how it should work then, make video tutorials or tutorials?


    sorry for the english is not my native language.

    Friday, August 5, 2011 4:23 PM
  • The event is now always fired in C# for a couple of reasons:

    1) It matches the C++ API behavior
    2) If it doesn't fire when there are no skeletons, then the code necessary to react appropriately when skeleton stops being tracked becomes more complicated.

    When no skeletons are being tracked, you will still receive a SkeletonFrame structure, but if you examine the SkeletonData structures sent to you as part of SkeletonFrame.Skeletons, you will notice that all of them have SkeletonData.TrackingState == SkeletonTrackingState.NotTracked. You should just avoid examining further the SkeletonData objects that have this state.

    Eddy


    I'm here to help
    Saturday, August 6, 2011 2:08 AM