#kinect, #kinectdev, #kinectwindows
- Visual studio 2012
- .NET 4.5
- Kinect for windows sensor device.
- Kinect for Windows SDK (http://go.microsoft.com/fwlink/?LinkID=323588)
- Kinect for Windows Developer Toolkit (http://go.microsoft.com/fwlink/?LinkID=323589)
Kinect for window sensor status
- Create a WPF Application project WPFKinect18 using visual studio 2012.
- Add the following references:
- From the “C:\Program Files\Microsoft SDKs\Kinect\v1.8\Assemblies\ folder, add Microsoft.Kinect.dll”.
- And from the C:\Program Files\Microsoft SDKs\Kinect\Developer Toolkit v1.8.0\Assemblies\ folder, add Kinect.Toolkit.dll, Kinect.Toolkit.Controls.dll and Kinect.Toolkit.Interaction.dll
- Add the KinectSensorChooserUI to the MainWindow.xaml to get the Status of the Kinect sensor. Plugged, unplugged, powered.
- And add a label control to display the Kinect status change.
Add the following code on the MainWindow.xaml.cs
Setup the Kinect for interaction
- Copy these “KinectInteraction180_32.dll, KinectInteraction180_64.dll” dll’s on the output directory of your project. As shown below (you can find these dll’s in the source code of this article.)
- Now change the “SensorChooserOnKinectChanged” event by the following code.
- On the mainwindows.xaml.
You can see the user depth image on the right bottom of the screen. User is detected in-front of Kinect but not active. The user is looking gray colored.
Now the user is active and moving hand and its depth image becomes colored. And you can also see the user’s hand, both hands are track able. You can switch hand cursor control from a left hand to a right hand easily.
- Adding the Kinect tile button inside the Kinect region
- Add the following code snap on the MainWindow.xamlinside the Kinect region.
Twitter Tag: #kinect, #kinectdev, #kinectwindows