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