Export (0) Print
Expand All

Face Tracking Visualization C++ Sample

Kinect for Windows 1.5, 1.6, 1.7, 1.8


Demonstrates using the Face Tracking SDK to track and visualize a single face or multiple faces.

The Sample Uses the Following APIsTo Do This
INuiSensor::NuiInitialize method and NUI_IMAGE_TYPE_DEPTH, NUI_INITIALIZE_FLAG_USES_SKELETON, and NUI_INITIALIZE_FLAG_USES_COLOR constantsInitialize the sensor to stream out color, depth, and skeleton data.
INuiSensor::NuiSkeletonTrackingEnable methodEnable skeleton tracking.
CreateEvent functionCreate three events that will be signaled when data (color, depth, skeleton) is available by returning an event handle.
INuiSensor::NuiImageStreamOpen method, NUI_IMAGE_TYPE constant, NUI_IMAGE_RESOLUTION constant, and the event handleOpen a stream to receive data.
INuiSensor::NuiImageStreamGetNextFrame methodCall this twice to get the next frame of image data (color and depth).
INuiSensor::NuiSkeletonGetNextFrame methodGet the next frame of skeleton data.
INuiFrameTexture interfaceSave a frame of image (color or depth) data.
NuiImageStreamReleaseFrame functionRelease each frame of image data (color or depth).
NUI_SKELETON_FRAME structureSave a frame of skeleton data.
INuiSensor::NuiImageStreamReleaseFrame method Release each frame of color data after saving it.
INuiSensor::Release method Release the sensor when you exit the application.
EggAvatar ClassCustom class for animating the rendered avatar.

To run a sample you must have the Kinect for Windows SDK installed. To compile a sample, you must have the developer toolkit installed. The latest SDK and developer toolkit are available on the developer download page. If you need help installing the toolkit, look on this page: To Install the SDK and Toolkit. The toolkit includes a sample browser, which you can use to launch a sample or download it to your machine. To open the sample browser, click Start > All Programs > Kinect for Windows SDK [version number] > Developer Toolkit Browser.

If you need help loading a sample in Visual Studio or using Visual Studio to compile, run, or debug, see Opening, Building, and Running Samples in Visual Studio.

Community Additions

© 2015 Microsoft