Slideshow Gestures-WPF C# Sample

Kinect for Windows 1.5, 1.6

Overview

When you run this sample, you see the following:

  • An image, or slide, with a number printed on the top of it. Think of this as a slide and the slide number.
  • Swipe your right arm to the left to advance to the next slide. This also increments the slide number.
  • Swipe your left arm to the right to go back to the previous slide. This also decrements the slide number.
  • A stick-figure representation of each tracked skeleton is also displayed.
The Sample Uses the Following APIsTo Do This
KinectSensor.KinectSensors PropertyGet the Kinect sensors that are plugged in and ready for use.
SkeletonStream.Enable MethodStart streaming the skeleton data stream.
KinectSensor.Start Method and KinectSensor.Stop MethodStart or stop the sensor.
KinectSensor.SkeletonFrameReady EventAdd an event handler for the skeleton data. The sensor will signal the event handler when each new frame of skeleton data is ready.
SkeletonFrameReadyEventArgs.OpenSkeletonFrame MethodGet a frame of skeleton data in the event handler.
Skeleton classCreate an array of skeletons to store skeleton data locally.
SkeletonFrame.CopySkeletonDataTo MethodCopy a frame of skeleton data to a pre-allocated array.
SkeletonFrame.CopySkeletonDataTo MethodFind the closest tracked skeleton using the depth data from the joint positions.
Microsoft.Samples.Kinect.SwipeGestureRecognizer componentThe tracked skeletons are passed to a recognizer, a custom component in the developer toolkit that implements the swipe right and swipe left gestures.
SkeletonTrackingState.Tracked value and JointType EnumerationDraw a stick figure connecting the skeleton joints for each tracked skeleton.

To run a sample you must have the Kinect for Windows SDK installed. To compile a sample, you must have the developer toolkit installed. The latest SDK and developer toolkit are available on the developer download page. If you need help installing the toolkit, look on this page: To Install the SDK and Toolkit. The toolkit includes a sample browser, which you can use to launch a sample or download it to your machine. To open the sample browser, click Start > All Programs > Kinect for Windows SDK [version number] > Developer Toolkit Browser.

If you need help loading a sample in Visual Studio or using Visual Studio to compile, run, or debug, see Opening, Building, and Running Samples in Visual Studio.

Community Additions

ADD
Show: