Building an augmented reality with Kinect
In this recipe we will learn how to combine both Kinect's depth and image frames to create augmented reality application.
Tip
Since Kinect for Windows SDK is available only for Windows, this recipe is written for Windows users only.
Getting ready
Download and install Kinect for Windows SDK from http://www.microsoft.com/en-us/kinectforwindows/.
Download KinectSDK CinderBlock from GitHub at https://github.com/BanTheRewind/Cinder-KinectSdk, and unpack it to the blocks
directory.
In this example, we are using assets from one of the sample programs delivered with the Cinder package. Please copy the ducky.mshducky.png
, phong_vert.glsl
, and phong_frag.glsl
files from cinder_0.8.4_mac/samples/Picking3D/resources/
into your assets
folder.
How to do it…
We will now create an augmented reality application using a sample 3D model.
Include the necessary header files:
#include "cinder/app/AppNative.h" #include "cinder/gl/Texture.h" #include "cinder/gl/GlslProg.h" #include...