Commit 688ebd89 authored by Dmitry Trifonov's avatar Dmitry Trifonov

add support for multiple OpenNI2 devices

parent 72ec6431
...@@ -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