Commit 7f931992 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #6537 from Slonegg:opeeni2_multiple_devices

parents 40686415 688ebd89
...@@ -231,6 +231,14 @@ CvCapture_OpenNI2::CvCapture_OpenNI2( int index ) ...@@ -231,6 +231,14 @@ CvCapture_OpenNI2::CvCapture_OpenNI2( int index )
return; 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); status = device.open(deviceURI);
if( status != openni::STATUS_OK ) if( status != openni::STATUS_OK )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment