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

Selecting a specific device for accessing depth stream

We discussed about how to retrieve a list of connected devices but we never used this data to select one of those devices; we always used ANY_DEVICE as the parameter for the openni::Device::open() method without even asking ourselves what this parameter is.

In this recipe, we will show you how to select your desired device and open it. Then create openni::VideoStream for the depth sensor of this device.

But first let's talk about the openni::Device::open() method. Actually this method has a parameter of type string (actually a character array) containing the hardware location (Uri) of the desired device. We always used ANY_DEVICE as the parameter of this method until now, but actually ANY_DEVICE ...

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