Managing your Kinect with Rob Miles' Kinect Manager
- Posted: May 02, 2012 at 6:00 AM
- 5,047 Views
Since we last highlighted Rob Miles' work in the The Purple Book... "Using Kinect for Windows with XNA" post, he's been a busy guy working on another book for the Kinect. And in his spare time, he's provided us a peek some of the code from the book...
Today I finished all the chapters for my upcoming book about the Kinect SDK. As part of the book I’ve made a wrapper class that makes it a little easier to use the classes in the Kinect for Windows SDK. You can use it to start a Kinect running and then bind to events that driver generates when new frames are available. The frame events are processed on a “round robin” basis so that the driver will not get new data from the sensor until it has been processed by your application. This makes it work well even on low performance machines that might not be able to keep up with the events generated by the Kinect sensor. The manager also generates status messages.
You can download the class, along with a program that demonstrates it, from here. For it to work you must have installed the Kinect for Windows SDK from here. And of course you’ll need a Kinect sensor – either the Xbox 360 one or the Windows one will work fine.
Project Information URL: http://www.robmiles.com/journal/2012/4/22/kinect-manager-available-for-download.html
Project Source URL: http://www.robmiles.com/files/KinectMgrDemo.zip
void setupKinect()
{
try
{
myKinectMgr = new KinectManager(0);
myKinect = myKinectMgr.Kinect;
myKinectMgr.DoProcessSkeletons +=
new KinectManager.ProcessSkeletons(processSkeletonFrame);
myKinectMgr.DoProcessDepthFrame +=
new KinectManager.ProcessDepthFrame(processDepthFrame);
myKinectMgr.DoProcessVideoFrame +=
new KinectManager.ProcessVideoFrame(processVideoFrame);
myKinectMgr.DoStatusChanged +=
new KinectManager.StatusChanged(updateStatus);
myKinectMgr.Start();
}
catch
{
MessageBox.Show("Kinect initialise failed", "Kinect Demo");
Application.Current.Shutdown();
}
}
Contact Information:
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?