none
Whi I receive TrackingID from not tracked body? RRS feed

  • Question

  • How is possible that I receive ( through OnFaceFrameArrived() ) an e.FrameReference.AcquireFrame().TrackingId of bodies who are not tracked anymore?
    My code works well but it's strange to me that i still receive frames from old bodies.

    If you need, here is a pseudocode of mine:
    OnBodyFrameReceived()
    {
     if (body.TrackingId == idBodyWhoseBodyIsInCharge)
     {
      if (body.IsTracked)
      {
       if (_faceSource == null)
       {
       _faceSource = new FaceFrameSource(_kinect, body.TrackingId, FaceFrameFeatures);
       _faceReader = _faceSource.OpenReader();
       _faceReader.FrameArrived += OnFaceFrameArrived;
       _faceSource.TrackingIdLost += OnTrackingIdLost;
       }
      }
     }
    }
    
    OnFaceFrameArrived(object sender, FaceFrameArrivedEventArgs e)
    {
     Console.WriteLine(@"faceid: " + e.FrameReference.AcquireFrame().TrackingId);
    }
    
    OnTrackingIdLost()
    {
     _faceReader = null;
     _faceSource = null;
    }

    I'm not able to understand why i receive prints of bodies who are not tracked anymore.
    Thanks
    Wednesday, March 18, 2015 4:15 PM

All replies

  • Maybe this is done to avoid refreshing unmeaningful data. If a body is not tracked anymore, body.IsTracked will be false and the runtime has not to worry about overriding every other value in the body structure. SDK samples always check for isTracked before considering a body as valid.
    Friday, March 20, 2015 8:44 AM