This project shows how to use the Kinect SDK to do basic gesture recognition to control PowerPoint.
Copyright (c) 2011-2012
- Kinect for Windows SDK 1.0
- Microsoft Office
An enthusiast user, Dux Raymond Sy
, showing how to use Kinect PowerPoint (Blog post
- Compile and run the application
- Point the Kinect at you and stand at least five feet away
- You can see yourself in the application window and the three ellipses will track your head and hands.
- Extend your right arm to activate the "right" or "forward" gesture. Extend your left arm to active the "left" or "back" gesture. These gestures will send a right or left arrow key to the foreground application, respectively.
- Run your PowerPoint show so PowerPoint is the foreground application, and the right and left gestures will go forward and back in your deck.
The ellipses grow and change color when your hand exceeds the threshold of 45 centimeters. The gestures will only activate once as your hand exceeds the threshold, and only one of the gestures can be active at once. You must bring your hand back closer to your body to activate the gesture a second time.
The gestures will also work for any other application. For example, open Notepad and type some text then use the gestures to move the cursor left or right one character at a time.
By default voice recognition is disabled due to false positives, but you can uncomment the call to the StartSpeechRecognition() in MainWindow_Loaded() to enable speech recognition. The recognizer is set up to recognize and respond to the following commands:
- computer show window
- computer hide window
- computer show circles
- computer hide circles
- There is currently no way to activate embedded videos, so you should add a PowerPoint animation so the video starts when you push the right arrow key.
- The gesture is triggered based upon the distance between the head and the hands, so you might accidentally trigger the gesture if you put your arms out, or bend over to pick something up perhaps.
- Speech recognition, if enabled, will currently cause the program to hang after you close the window until the next audio sample is recognized or rejected.
- Speech recognition may have a lot of false positive or false negatives. Hopefully this will be improved in future versions of the SDK.
This code is a sample project from my book, Natural User Interfaces in .NET. If you want to learn more about how to design and develop NUIs, please check my book out. If you like this software, please buy my book to show your support and tell your friends! Thanks!Natural User Interfaces in .NET
Chapter 1 is free at that URL.
The source code is made available under the Ms-PL