Cant open capture object for Kinect

asked 2012-12-12 06:22:33 -0500

alykhantejani gravatar image

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:

  1. mkdir release
  2. cd release
  3. cmake-gui ..
  4. hit configure
  5. set WITH_OPENNI to ticked
  6. checked that it has found OPENNI dirs and primesense dir
  7. hit configure and then generate
  8. 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;
}
edit retag flag offensive close merge delete

Comments

1

Were you able to solve this problem? I'm running into the same situation. Thanks.

vixo7 gravatar imagevixo7 ( 2013-01-09 14:01:05 -0500 )edit

Were either of you able to solve this problem?

shray gravatar imageshray ( 2013-08-06 18:11:55 -0500 )edit