Tamori
Tamori

Reputation: 97

OpenNI: Device not found in sample code even though it is detected and working

I want to run the OpenNI 2 code samples with my new Asus Xtion 2 camera on Windows 10 (64 bit), but the device doesn't get found. What's bizarre is that I can execute the pre-compiled binaries of the samples and see the signal streams in NiViewer without any problem, but when I try to run the samples by compiling the source code in Visual Studio 2017 the camera is not detected. Specifically, rc in the following initialization code

Status rc = OpenNI::initialize();
Device device;
rc = device.open(ANY_DEVICE);
if (rc != STATUS_OK)
{
    printf("Couldn't open device\n%s\n", OpenNI::getExtendedError());
    return 2;
}
[...]

does not return STATUS_OK and getExtendedError() returns a no device found error upon execution.

I have only one OpenNI installation on my PC so there can't be any confusion between multiple versions.

What could that error be due to?

Upvotes: 0

Views: 852

Answers (1)

XH_Zhang
XH_Zhang

Reputation: 11

You need put RvcLib.dll and SenDuck.dll into build_path\OpenNI2\Drivers.

Both files can find in Tools\OpenNI2\Drivers.

Upvotes: 1

Related Questions