How to configure OpenNI 2.0 with OpenCV for the Kinect project?

I am working on my project last year. I need to work with Kinect to detect hand movements. I tried several methods and got some results, but they were not enough to meet the needs of the project. I saw this video for a long time, and just found out that they are opening it recently. So I tried.

Now my problem is how to set things up.

The above amazing project uses OpenNI with Kinect. I tried to follow the OpenCV tutorials to create it from the source code so that OpenCV works with OpenNI.

Problems:

  • It says: "For the OpenNI Framework, you need to install both the development assembly and the PrimeSensor module." but since I was following the links, some of them were dead. It seems that OpenNI 2.0 no longer uses PrimeSensor.

  • It also says that in the Cmake folders, one is OpenCV/Src , the other is /build . But downloaded OpenCV has nothing like a Src folder.

  • However, I used the entire folder as Src and placed it in the build folder and checked WITH OPENNI . I used the Include and Lib folder in OpenNI2, which I downloaded, but when I built the OpenCV solution (already generated from CMake), all the builds failed.

  • Also, when building with Cmake, even if my future OpenCV solution were successfully built (it wasn’t), Cmake would tell me how PrimeSense is unavailable, which made me feel so insecure :(

  • I am a little confused in 32- and 64-bit versions. The above project that I want to use says that it works at the 64-bit level. But I use MS C ++ Express, all projects are 32-bit. So which PrimeSense drivers (data in OpenNI2) should I use?

Could you tell me how to install all these things (OpenNI2.0, OpenCV 2.4.3, PrimeSense) together so that I can work with Kinect?

+8
opencv kinect openni
source share
2 answers

A back I wrote two tutorials: 1) how to configure OpenNI 1.5 using NITE 2) how to compile OpenCV with support for OpenNI.

Here can be found here and here

I know that this is not what you asked for, but the process of compiling OpenCV with OpenNI 2.0 should be similar and can help you understand where you are going to make a mistake.

I will try to write a new tutorial, however, since I currently do not have access to the sensor, I may not be able to check whether it will work in the end.

EDIT: I wrote code to access Kinect data streams in OpenCV Mat format using OpenNI 2.x. The github repo code can be found here here . A detailed guide to setting everything up can be found here .

+3
source share

OpenNI 2.x is far superior to previous versions. You do not need to install the primesense sensorkinect driver. You can use OpenNI 2.x with the Microsoft Kinect SDK 1.x.

Install 64-bit and 32-bit OpenNI 2.x if you have Windows 7 x64, otherwise 32-bit. Customize it using Visual Studio 2010 or 12. You can follow this video:

http://www.youtube.com/watch?v=ACqPsV0R4to

Then configure OpenCV for Visual Studio 2010 or 12. You can follow this link:

http://4someonehelp.blogspot.in/2013/04/install-opencv-245-using-visual-studio.html

thanks

+1
source share

All Articles