Merge pull request #6537 from Slonegg:opeeni2_multiple_devices
This commit is contained in:
commit
7f9319924b
@ -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 )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user