Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Augmented Reality with Kinect

You're reading from   Augmented Reality with Kinect If you know C/C++ programming, then this book will give you the ability to develop augmented reality applications with Microsoft's Kinect. By the end of the course you will have created a complete game.

Arrow left icon
Product type Paperback
Published in Jul 2013
Publisher Packt
ISBN-13 9781849694384
Length 122 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Rui Wang Rui Wang
Author Profile Icon Rui Wang
Rui Wang
Arrow right icon
View More author details
Toc

Detecting a face from the camera


Before we start to detect a face in front of the Kinect camera, we should set up the include and library files of the face tracking library. For Visual Studio users, first add ${FTSDK_DIR}/inc to the current include directories of your project, and add ${FTSDK_DIR}/Lib/x86/FaceTrackLib.lib to the additional dependencies. You may also have to manually copy all the files in ${FTSDK_DIR}/Redist/x86 to your executable folder to help find these dynamic library files smoothly.

Now we will work on a Kinect example we have done before, which has already initialized the Kinect context for the new face tracking library that is ready to use.

Detecting and drawing the face rectangle

In this example, we will first detect the position and size of the face.

  1. Include the face tracking library header, and declare some global variables for recording necessary face tracking data.

    #include <FaceTrackLib.h>
    
    IFTFaceTracker* tracker = NULL;
    IFTResult* faceResult = NULL;
    FT_SENSOR_DATA...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image