1
votes

I would like to use this code to kinect with Kinect because my codings are all in c++, and I realize that I would need openni.

 VideoCapture capture( CV_CAP_OPENNI );

The problem is, I cannot find the latest guide installment for openni. When I do find some good guides, the links are dead. Can Anyone give me links for good openni installation in windows and in visual studio 2010? I would be very grateful.

1
Right now some guides says that Kinect 1.6 and openni 2.0 and nite 2.0 can be installed together. Since now there are latest updates to all installer, if I install each latest updates, will it still work like Kinect 1.6, openni 2.0 and nite 2.0?Atikah Sani

1 Answers

0
votes

VideoCapture capture( CV_CAP_OPENNI ); sounds like your using OpenCV built with OpenNI support. I recommend installing OpenNI first. Version 1.5.4.0 which you can find here works with OpenCV. I haven't tested OpenNI 2.0 with OpenCV yet.

You need to install 3 things in this order:

  1. OpenNI
  2. NITE
  3. Sensor Kinect (Avin's driver has the patch for Kinect, where as the default Sensor Driver is for Asus like sensors)

Once you've installed OpenNI and it works: PrimeSense drivers detects the device and you can run any of the OpenNI samples, like NiViewer(in OpenNIInstallFolder/Samples/Build/Bin/..etc.) you can choose to simple use the C++ OpenNI API or install and use OpenCV with OpenNI support.

You should built it from source and using CMake turn OpenNI support on. Once that's built OpenCV with OpenNI support you can run the above code. Here's a screenshot running ccmake. It should very similar on Windows with CMake. OpenNI with OpenCV ccmake You don't need all the other settings exactly like mine, make sure WITH_OPENNI is ON.

I've recently posted an OpenCV/OpenNI simple filtering example here. OpenCV+OpenNI filter and contour example