On Sun, Apr 22, 2012 at 07:12, Troy Boswell <troy.boswe...@gmail.com> wrote:libfreenect never runs or handles any packets unless you're actively
> I am new to concurrent processing but I am wondering if someone can explain why libfreenect drops frames if I put a blocking function in main(). A good example is the opencv example, if cvwaitkey blocks for more than 5ms then libfreenect will drop frames. Thus you surely cannot use this function to block waiting for a key press (cvwaitkey(0)) or libfreenect will drops frames like crazy. I suspect it has something to do with usb timing. Maybe the callback blocks if main is block, any insight would be helpful. I am only concerned as I only need to periodically capture frames, if I could block main() for a period of time and let libfreenect do its thing it would reduce my cpu usage as I currently have to sit main in a while loop simply burning cpu time.
calling freenect_process_events(). It does not internally fork a
thread. So if you don't give it CPU time (by calling
freenect_process_events()) before the kernel fills up all the
isochronous buffers we've queued to store the data streaming from the
Kinect, then data will be lost, which will likely result in framedrop.
The usual solution is to spawn a thread which calls
Hope that helps explain things!
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.