Unable to build with OpenNI+Kinect support (Bug #3572)


Added by Arun JVS about 11 years ago. Updated over 9 years ago.


Status:Open Start date:2014-02-25
Priority:Normal Due date:
Assignee:Roman Donchenko % Done:

0%

Category:build/install
Target version:-
Affected version:branch 'master' (3.0-dev) Operating System:Linux
Difficulty: HW Platform:x64
Pull request:

Description

I'm trying to build OpenCV with OpenNI+avin2 Kinect Driver support
(as suggested by http://docs.opencv.org/doc/user_guide/ug_highgui.html):

$ cmake\
    -D CMAKE_BUILD_TYPE=RELEASE\
    -D CMAKE_INSTALL_PREFIX=/home/arun/opencv/opencv-install\
    -D BUILD_DOCS=ON\
    -D BUILD_EXAMPLES=ON\
    -D BUILD_TESTS=ON\
    -D BUILD_PERF_TESTS=ON\
    -D BUILD_opencv_python=ON\
    -D WITH_OPENGL=ON\
    -D WITH_OPENNI=ON\
    -D OPENNI_LIB_DIR=/home/arun/opencv/openni/lib\
    -D OPENNI_INCLUDE_DIR=/home/arun/opencv/openni/include\
    -D OPENNI_PRIME_SENSOR_MODULE_BIN_DIR=/home/arun/opencv/openni/bin\
    /home/arun/opencv/opencv

However cmake is unable to find them:

....
....
WARNING, OpenNI library directory (set by OPENNI_LIB_DIR variable) is not found or does not have OpenNI libraries.
WARNING, OpenNI include directory (set by OPENNI_INCLUDE_DIR variable) is not found or does not have OpenNI include files.
WARNING, PrimeSensor Module binaries directory (set by OPENNI_PRIME_SENSOR_MODULE_BIN_DIR variable) is not found or does not have PrimeSensor Module binaries.
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - found
....
....
--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  YES (ver 2.2.0)
--     FFMPEG:                      YES
--       codec:                     YES (ver 53.35.0)
--       format:                    YES (ver 53.21.1)
--       util:                      YES (ver 51.22.2)
--       swscale:                   YES (ver 2.1.0)
--       gentoo-style:              YES
--     GStreamer:                   NO
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
....
....

I have correctly extracted the contents from OpenNI-Linux-x64-2.2.0.33.tar.zip and SensorKinect093-Bin-Linux-x64-v5.1.2.1.tar.bz2 though:

$ tree /home/arun/opencv/openni/

.
├── bin
│   └── XnSensorServer
├── include
│   ├── Android-Arm
│   │   └── OniPlatformAndroid-Arm.h
│   ├── Driver
│   │   ├── OniDriverAPI.h
│   │   └── OniDriverTypes.h
│   ├── Linux-Arm
│   │   └── OniPlatformLinux-Arm.h
│   ├── Linux-x86
│   │   └── OniPlatformLinux-x86.h
│   ├── MacOSX
│   │   └── OniPlatformMacOSX.h
│   ├── OniCAPI.h
│   ├── OniCEnums.h
│   ├── OniCProperties.h
│   ├── OniCTypes.h
│   ├── OniEnums.h
│   ├── OniPlatform.h
│   ├── OniProperties.h
│   ├── OniVersion.h
│   ├── OpenNI.h
│   ├── PrimeSense.h
│   ├── PS1080.h
│   ├── PSLink.h
│   └── Win32
│       └── OniPlatformWin32.h
└── lib
    ├── libOpenNI2.jni.so
    ├── libOpenNI2.so
    ├── libXnCore.so
    ├── libXnDDK.so
    ├── libXnDeviceFile.so
    ├── libXnDeviceSensorV2KM.so
    ├── libXnFormats.so
    ├── OpenNI2
    │   └── Drivers
    │       ├── libOniFile.so
    │       ├── libPS1080.so
    │       ├── libPSLink.so
    │       ├── PS1080.ini
    │       └── PSLink.ini
    ├── OpenNI.ini
    └── org.openni.jar

11 directories, 34 files

Someone also faced this problem:
http://answers.opencv.org/question/17666/opencv-2461-openni-22-missing/

Does OpenCV maintain support for OpenNI at all?
I can't find any mention of 'libOpenNI2.so' anywhere is the course.


Related issues

related to Feature #3671: Openni2 support Open 2014-05-01

Associated revisions

Revision df57d038
Added by Vadim Pisarevsky about 10 years ago

Merge pull request #3572 from berak:python_samples_30

History

Updated by Roman Donchenko about 11 years ago

OpenNI 2 is not supported. Use 1, or help us implement it. :-)

Updated by Arun JVS about 11 years ago

I would like to look into it. But http://www.openni.org says that the site closes on April 23rd.
Any clues on that?

Maybe it is more worth to use OpenKinect.org's libfreenect (https://github.com/OpenKinect/libfreenect) ?
It definitely seems lighter and neatly written.

Updated by Dinar Ahmatnurov about 11 years ago

  • Status changed from New to Open
  • Category set to build/install
  • Assignee set to Roman Donchenko

Updated by Maksim Shabunin over 9 years ago

Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4706

Also available in: Atom PDF