"Creating a Gesture-Controlled App in Just Three Steps"
A couple months ago we highlighted Sage Franch's new Kinect Development series, Jumping into Kinect for Windows v2 development series. She's continued to push forward and the latest post, Part 3, gets you building your first gesture-controller app...
This Kinect for Windows v2 tutorial series will help you build an interactive Kinect app using Visual Studio and C#. You are expected to have basic experience with C# and know your way around Visual Studio. Throughout the series, you will learn how to set up your Kinect for Windows v2 sensor and dev environment, how to track skeletons and hand positions, how to manipulate the data from the colour and infrared sensors and the microphone array, how to recognize hand gestures, and how to put it all together in a deployable Windows app.
Level: Beginner to Intermediate
Welcome to part 3 of the Kinect With Me Kinect for Windows development series! Last time we started getting into the code with an intro to body tracking and overlaying shapes on the body in real time. This week's tutorial will show how easy it is to add gesture control to an app - it only takes six lines of code!
To really get a feel for the range of gesture controls, let's start off with a blank grid app. By default, the grid app has a main menu similar to the Windows 8 start screen, with tiles that you can select to enter the next level of content. For the sake of simplicity for this tutorial we'll leave our content blank, but you can customize it however you want.
Step 1: Set Up Your App for Kinect Use
You should already know how to do this from Part 2 of this tutorial series, but there are a couple more things you must do:
- Add a reference to Microsoft.Kinect.Xaml.Controls
- Add using Microsoft.Kinect.Xaml.Controls
Step 2: Create a KinectUserViewer and a KinectRegion
Step 3: Add Content to App on Launch
Finally we'll create a new grid and add our region and user viewer to it....