Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Put this debugging line, cout << cv::getBuildInformation() << endl;, in your code, right before

if( !capture.isOpened() )
{
    cout << "Can not open a capture object." << endl;
    return -1;
}

That will let you know if your opencv is installed with openni. If switches,

OpenNI:                      YES (ver 1.5.4, build 0)
OpenNI PrimeSensor Modules:  YES (/usr/lib/libXnCore.so)

are NO in your case, then you might want to consider recompiling your opencv modules with the cmake flag -D WITH_OPENNI=ON.

Cheers!