add support for multiple OpenNI2 devices

pull/6537/head
Dmitry Trifonov 9 years ago
parent 72ec643129
commit 688ebd8960
  1. 8
      modules/videoio/src/cap_openni2.cpp

@ -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 )
{

Loading…
Cancel
Save