I am writing a C# application that is using the Kinect, i am taking the output currently and writing it to a Shader Resource and rendering it as a texture, my issue is that the Kinect (apparently) only runs at 30fps, so it is throttling my performance badly.
What is the best way to overcome this, is it multithreading? Is there some sort of design pattern that would help with this type of issue? As far as i can tell i may want to have the kinect processing the data on a thread, and then get access to it when the process is finished, but i'm not sure where to start with that in a safe manner.
Thanks for any advice you can offer.
I am currently using OpenNI for the kinect drivers/api, and SlimDX for the directX side of rendering.
I have not worked with the Kinect before and you didn't specify which drivers/wrapper you are using, but I suspect that it probably won't matter.
What you will probably need to do is the following:
For excellent tutorials on threading in c#, I always recommend Albahari's Threading in C#. I would also recommend if you want more specific information on what you can do to speed up your application, you should probably edit your question and add details about specifically how you have it structured now and what wrapper/driver's you are using, etc.
Any development with Kinect that requires high perfomance you should use the pooling model instead event model. And complementary to this, your best option is open a thread and do the pooling operations. You can use too threads with event model , to make long time operations and not freeze the user interface.
And you can see this : http://msdn.microsoft.com/en-us/library/hh973076
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With