-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved performance by using FrameArrived events to avoid busy waiting #57
base: kinect2
Are you sure you want to change the base?
Conversation
I added another commit, with some speed improvements for the registration. It just avoids doing registration calculations on pixels with invalid depth. Those pixels are returned as (infinite, infinite) values from the coordinate mapper, and doing calculations on those seems to be quite slow @mvm9289 interested? :-) |
Hi @HenningJ, thanks for sharing your patch with the community :)! This change looks good to me! I'll merge it back into my own repo. |
…think this is needed, but wont hurt
…, in case it doesn't work the first time.
Some more stuff...mostly implemented mirroring (by just copying each line backwards instead of forwards) + some minor improvements. 90a41cc is because waiting 500 milliseconds before asking if the device is ready sometimes wasn't necessary, but sometimes wasn't enough. So rather than just increasing the 500 to 1000, I just ask every 100 ms, up to 1000 ms, and stopping as soon as the device is ready. |
Yeah! That was one of the entries of my TODO list :)) Thanks for fixing it!! Miguel.
On Fri, Jul 3, 2015 at 3:46 PM, Henning Jungkurth [email protected]
|
Without this patch, the Kinect2 driver basically does busy waiting for new frames on three threads simultaneously, always taking all available CPU cycles.
With this patch, the three threads sleep until the Kinect SDK sends a
FrameArrived
event for the correspondingFrameReader
, using up way less CPU cycles.