O'Reilly logo

Augmented Reality with Kinect by Rui Wang

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

Locating the cursors

In the first example of this chapter, we will convert the two hand bones into cursors to simulate a multitouch-like behavior. While the hand positions are changing, the cursors will also move so that we can locate them on a certain object, such as a button or a menu item. The available range of the hand positions must be limited here, otherwise the result will be confusing if we drop the arms and don't want the cursor to move again.

Drawing cursors from two hands

The line-trailing example in the previous chapter is a good start for our new task, so we will work on this example to add cursor support based on user-skeleton data we have already obtained. The steps are given as follows:

  1. Define arrays to store necessary hand positions, ...

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