0

So I have a working version of the Kinect working in its own thread and I want the application to to run at 60 fps (despite the cameras running at 30, which is fine). Getting the frame and body tracking data is working perfectly with a wait time of

(1.f/60.f)*1000.f

milliseconds, but I have a feeling that calling k4a_device_get_capture, k4abt_tracker_enqueue_capture, and k4abt_tracker_pop_result at this wait length cause spill over into the subsequent frames (possibly up to 3).

Am I wrong on this? Should I divide this all further by 3? Or am I just over thinking it?

1 Answers1

0

Errors in the SDK pipeline will cause k4a_device_get_capture to return a failure, so your timeout should be a reflection how slow the host PC can become before failing, or how many dropped frames you can tolerate. You could use an infinite timeout and call k4a_device_stop_cameras() to unblock the thread calling k4a_device_get_capture.

wes-b
  • 176
  • 3
  • Thanks, this actually cleared up what I was trying to figure out. I can see how a slower machine (like a laptop) could make use of infinite to get a good read out in time. – Danny Vargas Oct 23 '19 at 01:12