Ask Your Question

klapperj's profile - activity

2017-07-07 10:44:47 -0600 received badge  Editor (source)
2017-07-07 10:28:57 -0600 asked a question Using OpenCV + OpenNI2.2 + ASUS Xtion2 depth sensor

I have a .cpp program running with an Xbox 360 Kinect through a combination of OpenCV3.0 + OpenNI1.5 + SensorKinect on Ubuntu 14.04 LTS. The program runs great with no issues. I am now trying to run this program with a newer sensor(ASUS Xtion2). I have spent a considerable amount of time with this project and cannot figure out the compatability.

I can get the sensor to work with all OpenNI2.2 programs such as NiViewer, SimpleViewer, SimpleRead, etc. The version of OpenNI2.2 I installed is here: https://github.com/occipital/OpenNI2 . I installed OpenCV3.2 from here http://opencv.org/releases.html and ran cmake with the "WITH_OPENNI2" flag set. OpenCV is able to recognize the OpenNI2.2 package when I run "make".

When I try to run the program the sensor is recognized and these messages are shown:

Video Camera at /dev/video1 Detected 
Depth Camera at /dev/video0 Detected 
Creating Depth stream 
Depth Stream start 
Xtion2 sensor found! 
Depth Stream stop

The program begins to access the sensor and then immediately shuts off. I have added the "Xtion2 sensor found!" message to print when the depth sensor is accessed by OpenCV. I cannot figure out why the camera shuts off. Because the Xtion2 sensor is new, I cannot find much help with this online. I am wondering if this sensor will be able to work with the combination of OpenNI2.2 and OpenCV3.2 to retrieve the RGB and depth data from the sensor.

Don't hesitate to ask questions because I most likely have the answers. I am just not sure the in-depth information that is needed to fully understand what isn't working.

I would appreciate any help I can get. Thanks!