O'Reilly logo

OpenNI Cookbook by Soroush Falahati

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Getting a list of all the active users

In this recipe, we are going to cover one of the most basic features of NiTE—recognizing users in the scene based on the depth sensor's data.

Our main goal in this recipe is to present the nite::UserTracker and nite::UserTrackerFrameRef objects and to show you a basic way to retrieve and use them.

Getting ready

Create a project in Visual Studio and prepare it for working with OpenNI and NiTE using the Create a project in Visual Studio 2010 recipe in Chapter 2, OpenNI and C++.

How to do it...

  1. Add the following line to the top of your source code (just below the #include lines):
    #include<conio.h>
  2. Add the ReadLastCharOfLine() and HandleStatus() functions from previous recipes next to the preceding line.
  3. Add the following ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required