Making WPF and Kinect app's easier... WpfKinectHelper
Today's project by Ben Centra is one of those nice to have projects that can make your WPF Kinect coding life easier...
A helper class designed to make working with the Microsoft Kinect in C# WPF Applications a breeze.
(The Kinect SDK and a Microsoft Kinect are required)
Made by Ben Centra (email@example.com)
- Instantly sets up Color, Depth, Skeleton, and Audio data streams
- Converts Color and Depth data for easy display
- Draws Skeleton bones and joints in both Default and Seated modes
- Access to Kinect motor for angle adjustment
- Access to live stream data through custom events
Start by creating a new C# WPF Application in Visual Studio and adding 'KinectHelper.cs' to the project.
Next, add the appropriate Controls to MainWindow.xaml, such as:
- Images for the Color, Depth, and Skeleton data
- Slider for adjusting the motor angle
- Checkbox for toggling Seated mode
Then, add a KinectHelper object to MainWindow.xaml.cs:
Instantiate the KinectHelper inside of a "Loaded" event handler for the Main Window:
You can also use the shorthand constructor for the KinectHelper to do all the above in one line:
To view the output of the Kinect's data streams, set the Source property of the Image controls created in MainWindow.xaml:
You can use some additional KinectHelper methods to control the motor angle and toggle Seated mode in event handlers for the other controls created in MainWindow.xaml:
You can also access stream data directly using custom events. For example, to listen for SkeletonDataChange events, first add the following to your Main Window Loaded event:
Then, add the event handler method ("SkeletonDataChange") to MainWindow.xaml.cs:
Project Information URL: https://github.com/bencentra/WpfKinectHelper
Project Source URL: https://github.com/bencentra/WpfKinectHelper