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

Finding the related user ID for each hand ID

When dealing with nite::HandTracker and nite::HandData, there is no way to find out which hand belongs to which user. Actually, there is no direct way of finding this out in NiTE at all. In this recipe, we will show you how it's possible to use nite::UserTracker and nite::UserMap along with nite::HandTracker and nite::HandData to determine the user ID of each hand.

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. Copy ReadLastCharOfLine() and HandleStatus() from the first recipe of this chapter to the top of your source code (just below the #include lines). ...

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