Merge pull request #6537 from Slonegg:opeeni2_multiple_devices

This commit is contained in:
Vadim Pisarevsky 2016-05-31 10:35:44 +00:00
commit 7f9319924b

View File

@ -231,6 +231,14 @@ CvCapture_OpenNI2::CvCapture_OpenNI2( int index )
return;
}
// find appropriate device URI
openni::Array<openni::DeviceInfo> ldevs;
if (index > 0)
{
openni::OpenNI::enumerateDevices(&ldevs);
deviceURI = ldevs[index].getUri();
}
status = device.open(deviceURI);
if( status != openni::STATUS_OK )
{