Cant open capture object for Kinect
I have installed OpenNI and SensorKinect following the tutorial here: and the example viewer works just fine. I have downloaded OpenCV 2.4.3 and then done the following:
- mkdir release
- cd release
- cmake-gui ..
- hit configure
- set WITH_OPENNI to ticked
- checked that it has found OPENNI dirs and primesense dir
- hit configure and then generate
- ran make
I then try and run the sample code from OpenCV-2.4.3/samples/openni_capture.cpp
However I get the following output:
Device opening ...
done.
Can not open a capture object.
The relevant code is:
VideoCapture capture(CV_CAP_OPENNI);
if( isVideoReading )
capture.open( filename );
else
capture.open( CV_CAP_OPENNI );
cout << "done." << endl;
if( !capture.isOpened() )
{
cout << "Can not open a capture object." << endl;
return -1;
}
Were you able to solve this problem? I'm running into the same situation. Thanks.
Were either of you able to solve this problem?