Presentation is loading. Please wait.

Presentation is loading. Please wait.

Work With Skeleton Data

Similar presentations


Presentation on theme: "Work With Skeleton Data"— Presentation transcript:

1 Work With Skeleton Data
Kinect for Windows Video Courses Jan 2013

2 Demo: How to get skeleton data

3 Kinect For Windows SDK & Toolkit
Download SDK & Toolkit: Install SDK & Toolkit. Install examples provided in toolkit (SkeletonBasics-WPF)

4 4 Steps to Get Skeleton Data
Find an available Kinect sensor. Enable skeleton data stream. Register stream ready event handler function. Start capturing data.

5 4 Steps to Get Skeleton Data – Find an available Kinect Sensor
KinectSensor object represents a Kinect sensor entity. Enumerate all Kinect sensors and find a usable one. foreach (var potentialSensor in KinectSensor.KinectSensors) { if (potentialSensor.Status == KinectStatus.Connected) this.sensor = potentialSensor; break; }

6 4 Steps to Get Skeleton Data – Find an available Kinect Sensor
Status of Kinect sensor: Disconnected – Sensor has been plugged off USB port. Connected – Sensor is ready to use. Initializing – Sensor is being initialized. Not powered – Sensor is connected to USB port but power line is disconnected.

7 4 Steps to Get Skeleton Data – Enable skeleton data stream
KinectSensor.SkeletonStream implements API functions related to skeleton data retrieving and processing. Initialize to enable skeleton data stream: this.sensor.SkeletonStream.Enable();

8 4 Steps to Get Skeleton Data – Register stream ready event handler function
Register the stream event handler function to Kinect sensor so that when a new skeleton frame comes in, the handler function is called to retrieve and process the data. this.sensor.SkeletonFrameReady += this.SensorSkeletonFrameReady;

9 4 Steps to Get Skeleton Data – Start Kinect sensor
Call KienctSensor.Start() to let Kinect sensor begin capturing the data. try { this.sensor.Start(); } catch (IOException) this.sensor = null;

10 Retrieve Skeleton Data
When new incoming data frame is ready, stream data ready event is triggered. Open image frame in stream data ready event handler function. private void SensorSkeletonFrameReady(object sender, SkeletonFrameReadyEventArgs e) { using (SkeletonFrame skeletonFrame = e.OpenSkeletonFrame()) if (skeletonFrame != null) skeletons = new Skeleton[skeletonFrame.SkeletonArrayLength]; skeletonFrame.CopySkeletonDataTo(skeletons); }

11 Skeleton Data Joints – Collection of 20 joints which have the coordinate information. Position – Position of tracked human body. TrackingState – If all 20 joints are tracked or only position is provided. ClippedEdges – If any joints are outside capture range. Each joint can have tracked, not tracked or inferred state.

12 Overview Hardware overview and SDK installation Color Introduction to color stream Demo: How to get color data Demo: ColorBasics sample Depth Introduction to depth stream Demo: How to get depth data Demo: DepthBasics sample Skeleton Introduction to skeleton stream Demo: How to get skeleton data Demo: SkeletonBasics sample Audio Introduction to audio stream Demo: How to capture audio Demo: Speech recognition Advanced Topics Streams sync and coordinate mapping Demo: Streams sync and coordinates mapping Accelerometer and tilt angle Demo: How to get accelerometer and tilt angle

13 Learn More About Kinect for Windows in MSDN

14 Thanks Contact us:

15


Download ppt "Work With Skeleton Data"

Similar presentations


Ads by Google