Coding4Fun: Build Fun, Cool, Commercial Applications Using the Kinect for Windows SDK Dan Fernandez Director Microsoft Corporation Brian Peek Senior Technical Evangelist Microsoft Corporation
IR Emitter Color Sensor IR Depth Sensor Tilt Motor Microphone Array
Horizontal Vertical
DEMO
DDDDDDDDDDDDDPPP DepthPlayer Index
NearDefault 0.4m/1.3 ft0.8m/2.6 ft
1.3’2.6’9.8’13.1’26.2’ Default Mode Near Mode Feet Meters UnknownNormal
1.3’2.6’9.8’13.1’26.2’ Default Mode Near Mode Feet Meters UnknownToo NearNormalToo Far
DEPTH FORMULAS Depth data short[] allData = new short[depthFrame.PixelDataLength]; Get depth for a point (X:160, Y:120, Width: 320) int index = (width * y) + x; // 38,560 Get X, Y for an index (Index: 5,000, Width:320) int x = index % width; // 200 int y = index / width; //15 Distance Formula short depthPoint = allData[index]; int depth = depthPoint >> DepthImageFrame.PlayerIndexBitmaskWidth; // 2,000 Player Formula int player = depthPoint & DepthImageFrame.PlayerIndexBitmask; // 1
DEMO
Max of two skeletons per Kinect 6 Player Proposals HandLeft WristLeft ShoulderLeft Head ElbowLeft ShoulderRight HandRight WristRight ElbowRight ShoulderCenter FootLeft AnkleLeft KneeLeft HipLeft HipCenter HipRight FootRight AnkleRight KneeRight Spine
Z Axis X Axis Y Axis Joints in meters from camera Negative Positive Negative
Each joint has associated tracking state Tracked, Not tracked, or Inferred Inferred - Occluded, clipped, or low confidence joints Use TransformSmoothParameters to smooth joint data to reduce jitter Kinect transform smoothing uses Holt Double Exponential Smoothing - Skeleton.ClippedEdges = FrameEdges.Top;
Fatigue Kills GesturesUse Coding4Fun ScaleTo extension method
DEMO
KINECT AS AN OFFICE MONITOR.
KINECT AS AN OFFICE MONITOR.
DEMO
Rotation in camera space, or amount of rotation from parent bone Player orientation stored in HipCenter, or ShoulderCenter when seated Matrix or Quaternion format for animations
Kinect data over the network using sockets Color, Depth, Skeleton, and Audio Client libraries for WPF, Windows Phone & WinRT
DEMO
Real-time tracking of multiple faces 2D Mesh and Points 3D Head Pose Animation Units Z Axis
100 2D Points 87 in picture 13 additional for center of eye, corners of mouth, center of nose, head bounding box
Pitch Yaw Roll
Neutral Jaw Lowerer Lip Corner Depressor Closed Sad frown Happy smile Neutral ClosedFully open Six Animation Units Uses Candide3 model
DEMO
SPEECH RECOGNITION GRAMMAR yes yes please yes yeah yep ok please out._value = "Yes"; var grammar = new Choices(); grammar.Add(“yes please"); grammar.Add(“yes"); grammar.Add(“yeah"); grammar.Add(“yep"); grammar.Add(“ok"); Ensure AutomaticGainControl = false
DEMO
Admin - controls global game state Robots – Movement, punching, hits, and referee mode User Consoles - player health, time User console’s skeleton data determines movement & punching
DEMO
AAP205 – Leveraging Natural User Interface Technologies to Deliver Improved User Experience (Tim Huckaby) Project Detroit – By Registration BoxingBots – In Expo Hall
Visual Studio Home Page :: Jason Zander’s Blog :: Facebook :: Twitter :: Somasegar’s Blog ::
Required Slide Complete an evaluation on CommNet and enter to win!
Scan the Tag to evaluate this session now on myTechEd Mobile