kinect: Use ROS+openCV and openCV without ROS same time
Hello.
I discovered the following problem for my delelopments:
Sometimes I need to develop kinect-applications with ROS (and openCV) and sometimes I just need openCV for my apps (no use of ROS this time).
Working with ROS+openCV+kinect works fine, but when I change to openCV-dev. only I can't get any connection to the kinect-cam.
For using openCV directly with the kinect I have to recompile openCV with the flag "with_openni" set to 1 (http: //seevisionc.blogspot.co.uk/2012/07/compiling-opencv-with-openni-for.html)
After doing so, for example I tried this file here:
https: //github.com/Itseez/opencv/blob/master/samples/cpp/openni_capture.cpp
Result when ROS (and the included openCV) is installed :
This program demonstrates usage of depth sensors (Kinect, XtionPRO,...). The user gets some of the supported output images.
All supported output map types: 1.) Data given from depth generator OPENNI_DEPTH_MAP - depth values in mm (CV_16UC1)
OPENNI_POINT_CLOUD_MAP - XYZ in meters (CV_32FC3)
OPENNI_DISPARITY_MAP - disparity in pixels (CV_8UC1)
OPENNI_DISPARITY_MAP_32F - disparity in pixels (CV_32FC1)
OPENNI_VALID_DEPTH_MASK - mask of valid pixels (not ocluded, not shaded etc.) (CV_8UC1) 2.) Data given from RGB image generator OPENNI_BGR_IMAGE
- color image (CV_8UC3) OPENNI_GRAY_IMAGE - gray image (CV_8UC1)Device opening ... done. Can not open a capture object.
When I uninstall ROS and the openCV comming along with it, the example linked above works just fine. - When only ROS/opencv or openCV standalone are installed each program works for itself, But with both installed using the kinect with opencv directly does not work.
Do you have any suggentions how to solve this issue?
My OS: Ubuntu 12.04.01 x64
Thanks!