Deep Diving into the Kinect for Windows v2, Part 2...
- Posted: Feb 13, 2014 at 6:00 AM
- 10,526 Views
- 1 Comment
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Zubair Ahmed is back with the second part, first part Dive into Developing with the Kinect for Windows v2, of his exploration of the Kinect for Windows v2 SDK, fixing a few bugs and providing more tips and tricks too...
In my previous K4W deep dive post I draw Body and joints in WPF and overlay them on top of Color stream. In that post notice that I am using two Image control, one to render Color and other for Body info.
Also in that post I talked about a hack to position body tracking drawings ‘properly’ over the color stream.
In this post however I fix the above two problems, which means I don’t need to use 80px offset hack from the previous post and use only one Image control to render both Color and Body data.
Fixing Body tracking offset – Using MapCameraPointToColorSpace
First thing first, in the previous post I used a method of the CoordinateMapper class in the Kinect for Windows v2 SDK that uses camera point and maps them to depth space
The problem is that this method does not accurately translates points to the color frame that we receive from the Kinect sensor so I can up with the hack. Fortunately the CooridnateMapper class has another method that works perfectly for this.
This time I use the ColorSpacePoint and use that to get X and Y coordinates from the camera.
Merge Color and Body frames to use one Image control
Alright so I got the Body info mapped properly to the Color frames, but I have not solved one problem, how to merge these two frames and use single image control to render them.
Project Information URL: http://www.zubairahmed.net/?p=1682