none
It's possible to reset the skelon data and ID? Or any way to select the skeleton to be tracked? RRS feed

  • Question

  • I will like to use the application with viewers behind and I'm afraid that in some case the tracked skeletons can be set to viewers instead players. If this is the case, there is any way I can reset the skeletons, so the application starts again looking for skeletons and this time hopefully it will select the players.

    Or even better, is there any way I can set the default tracking skeleton based on the distance to the camera?

    I now using this code to select get the data from closest  skeleton to the camera:

      SkeletonFrame skeletonSet = e.SkeletonFrame;
          SkeletonData data=null;
          
          float distanceZ=9000;
        
          foreach (SkeletonData datas in skeletonSet.Skeletons)
          {
            if (SkeletonTrackingState.Tracked == datas.TrackingState)
            {
              if (datas.Position.Z < distanceZ)
              {
                distanceZ = datas.Position.Z;
                data = datas;
              }
            }
                
          }
    


    Thanks for your help.

    Tuesday, August 30, 2011 7:38 AM

Answers

  • Sorry, Kinect SDK Beta API does not provide any way for you to specify which skeletons are being actively tracked, so what you're doing right now seems like a fairly reasonable thing to do. You might want to look at other pieces of data such as how tall is the skeleton, color of clothes being worn (from looking at color video stream) and things like that to be able to get a more solid concept of player identity that allows you to have some sort of continuity. That being said, if the SkeletonData.TrackingID is the same across multiple skeleton frames, you can be sure that it's the same skeleton being tracked as before. If the TrackingID changes then is when you need to resort to other mechanisms to maintain a player identity.

    Eddy


    I'm here to help
    Tuesday, August 30, 2011 11:40 PM
  • yes, as long as a skeleton is assigned the same, consistent tracking ID, it will end up in the same array index location.

    Eddy


    I'm here to help
    Thursday, September 15, 2011 9:39 PM

All replies

  • Sorry, Kinect SDK Beta API does not provide any way for you to specify which skeletons are being actively tracked, so what you're doing right now seems like a fairly reasonable thing to do. You might want to look at other pieces of data such as how tall is the skeleton, color of clothes being worn (from looking at color video stream) and things like that to be able to get a more solid concept of player identity that allows you to have some sort of continuity. That being said, if the SkeletonData.TrackingID is the same across multiple skeleton frames, you can be sure that it's the same skeleton being tracked as before. If the TrackingID changes then is when you need to resort to other mechanisms to maintain a player identity.

    Eddy


    I'm here to help
    Tuesday, August 30, 2011 11:40 PM
  • Is it very likely (guaranteed?) that while a given SkeletonData.trackingID is being tracked, that it will be in the same skelFrame.SkeletonData[i] array index location?

    Such a guarantee can assist me in knowing a "the user has left the scene" event.


    --Dale
    Wednesday, September 14, 2011 1:58 PM
  • It seems that way yes from what eddy said. The same tracking ID is assigned to the same skeleton but sometimes the skeleton gets a new skeleton id when something happens. Question will the tracking ID  stay the same for his project if a person leaves and comes back to the kinect? (so he can maintain player identity)


    • Edited by The Thinker Thursday, September 15, 2011 12:29 PM
    Thursday, September 15, 2011 12:27 PM
  • yes, as long as a skeleton is assigned the same, consistent tracking ID, it will end up in the same array index location.

    Eddy


    I'm here to help
    Thursday, September 15, 2011 9:39 PM