the following image already lets you clear of that goes this post
The Bruno with the Rollings! Awesome… things that allows us to KinectSdk. In this case I have taken as starting point the example that brings the Developer Toolkit Browser 1.5 that is included with the KinectSDK and after a few modifications I have to create my own green screen.
But well going to the code which is really what interests us and before I read to me, better to read a bit of code. In this case work with a WPF application in which the main form has the following code
As you can see in the previous code, it is nothing out of this world. A WPF form with a superior as a header image and 2 images at the bottom. The first "imgBackground" image is used as the basis of the background with which it will work and that it will process data from the Depth and Kinect Camera. The second image "imgMask" is that which is used to paint the final outcome of the green screen.
The form code is not very complicated, as you can see below:
The process is actually quite simple:
- The sensor is initialized to make it work with the skeleton, the Chamber and the depth sensor
- Store the values of work of these Streams for the subsequent processing of data
- Is tabaja on the AllFramesReady event of the Kinect sensor
- In this event the depth and color frames are processed
- With the outcome of these frames, creates a new image that makes a merge between the background and the body of the detected person
The interesting code is called in the 70-79 lines, that I reserve for tomorrow and to also be able to explain it better.
Saludos @ Home