How-to: Successfully install Kinect on Windows (OpenNI and NITE). UPDATE: For more Kinect blog posts, consider visiting my new website pterneas.com. The website will always be up-to-date with the latest SDKs and sensors.
PrimeSense Sensor Module for OpenNI (Version 5.1.2.1 - May 15th 2012) - Website: Forum: Wiki: Binaries are available at: (The 'OpenNI Compliant Hardware Binaries' section) Sources are available at: or for the unstable branch Release Notes: -. At the moment, the default is to compile the code with SSE3 support (this is also true for the supplied binaries). If you have a CPU without such support, please remove the sse compiler flags from the make files.
(A good hint for this error is that you encounter an 'illegal instructions' messages). By default, the linux kernel mounts unknown USB devices with write permissions to root only, and read-only permissions to other users. When not running as root, this prevents communicating with the device. To fix this issue: - Navigate to Platform/Linux/Build - run 'make install-usb-rules' - if the device was connected, unplug and reconnect it. This part is done automatically by the install script, but you will need to do it manually if you choose not to use the automated install.
Linux: The device driver contains a thread for reading from the USB device. This thread should have high priority in order to function correctly. Each process using the device driver should have the CAPSYSNICE capability in order to raise thread priority. Failing to have that capability, will cause a failure in setting priority, consequently causing loss of data.
MacOSX: Only OSX 10.6 (Snow Leopard) and above with a 64-bit Intel based CPU is currently supported. Client/Server is not supported yet so do not attempt to access the sensor with more then one application.
Build Notes: - Windows: Requirements: 1) Microsoft Visual Studio 2010 From: 2) Python 2.6+/3.x From: 3) PyWin32 From: Please make sure you download the version that matches your exact python version. 4) WIX 3.5 From: 5) OpenNI 1.5.x.x From: Optional Requirements (To build the documentation): 1) Doxygen From: 2) GraphViz From: Building Sensor: 1) Go to the directory: 'Platform Win32 CreateRedist'. Run the script: 'Redist.py'. This will compile and prepare the redist exe files that includes everything.
2) Install the exe you've just made which is located in Platform Win32 CreateRedist FinalXX Sensor-Win32-5.x.x.x.exe (XX being the number of bits: 32 or 64) The installer will also automatically register all the modules into OpenNI via the NiReg utility. The visual studio solution is located in: Platform Win32 Build EngineWin32.sln. Important: Please note that even though the directory is called Win32, you can also use it to compile it for 64-bit targets (AMD64/x64). Linux: Requirements: 1) GCC 4.x From: Or via apt: sudo apt-get install g 2) Python 2.6+/3.x From: Or via apt: sudo apt-get install python 3) OpenNI 1.5.x.x From: Building Sensor: 1) Go into the directory: 'Platform/Linux/CreateRedist'. Run the script: './RedistMaker'.
This will compile everything and create a redist package in the 'Platform/Linux/Redist' directory. It will also create a distribution in the 'Platform/Linux/CreateRedist/Final' directory. 2) Go into the directory: 'Platform/Linux/Redist'.
Run the script: 'sudo./install.sh' (needs to run as root) The install script copies key files to the following location: Libs into: /usr/lib Bins into: /usr/bin Config files into: /usr/etc/primesense USB rules into: /etc/udev/rules.d Logs will be created in: /var/log/primesense To build the package manually, you can run 'make' in the 'Platform Linux Build' directory. Important: Please note that even though the directory is called Linux, you can also use it to compile it for 64-bit targets and pretty much any other linux based environment. Building Sensor using a cross-compiler: 1) Make sure to define two environment variables: - CXX - the name of the cross g for platform - STAGING - a path to the staging dir (a directory which simulates the target root filesystem). Note that should be upper cased. For example, if wanting to compile for ARM from a x86 machine, ARMCXX and ARMSTAGING should be defined.
2) Go into the directory: 'Platform/Linux/CreateRedist'. Run: './RedistMaker ' (for example: './RedistMake Arm').
This will compile everything and create a redist package in the 'Platform/Linux/Redist' directory. It will also create a distribution in the 'Platform/Linux/CreateRedist/Final' directory.
3) To install OpenNI files on the target file system: Go into the directory: 'Platform/Linux/Redist'. Run the script: './install.sh -c $STAGING' (for example: './install.sh -c $ARMSTAGING'). The install script copies key files to the following location: Libs into: STAGING/usr/lib Bins into: STAGING/usr/bin Config files into: STAGING/usr/etc/primesense USB rules into: STAGING/etc/udev/rules.d Logs will be created in: STAGING/var/log/primesense To build the package manually, you can run 'make PLATFORM=' in the 'Platform Linux Build' directory. If you wish to build the Mono wrappers, also run 'make PLATFORM= monowrapper' and 'make PLATFORM= monosamples'. MacOSX: Requirements: 1) For Mac OSX 10.7, Xcode 4.3.2 From: You will also need to download and install the 'Commandline Tools for XCode - Late March 2012' package: Note: Since Xcode is now a normal application, it no longer automatically install itself. You have to copy&paste Xcode yourself into your Applications folder. (or run the application 'Install Xcode' from your Applications folder / LaunchPad).
It's also recommended to run the following command after you do the above: sudo xcode-select -switch /Applications/Xcode.app/ For Mac OSX 10.6, Xcode 3.2.6: From: Please note that you need to register as a mac developer (It's free!). 2) OpenNI 1.5.x.x From: Building Sensor: 1) Go into the directory: 'Platform/Linux/CreateRedist'. Run the script: './RedistMaker'. This will compile everything and create a redist package in the 'Platform/Linux/Redist' directory. It will also create a distribution in the 'Platform/Linux/CreateRedist/Final' directory. 2) Go into the directory: 'Platform/Linux/Redist'. Run the script: 'sudo./install.sh' (needs to run as root) The install script copies key files to the following location: Libs into: /usr/lib Bins into: /usr/bin Config files into: /usr/etc/primesense USB rules into: /etc/udev/rules.d Logs will be created in: /var/log/primesense To build the package manually, you can run 'make' in the 'Platform Linux Build' directory.
OpenNI/NITE Installation on Windows OpenNI/NITE Installation on Windows May 2014: PrimeSense was bought by Apple at the end of April, and the website was shut down. Fortunately, several sites have set up archives of the old OpenNI and NITE software, such as. When looking through these archives, it's important to remember that the code examples in my book use OpenNI version 1. It's quite different from version 2, which sports many changes to the skeleton and hand detection functions, resulting in big changes to NITE as well. In other words, you need to find archive copies of version 1 of OpenNI and NITE to run my code. The following instructions explain how to do that.
This page is written in the form of a checklist. If you prefer a wordier explanation, then please have a look at section 3 of the. Remember that it refers to the now-defunct OpenNI website from 2012, so ignore any weblink information in that chapter. Clean Up Useful freeware tools for cleaning Windows:,. use to delete any applications that mention 'Kinect', 'Xbox', 'PrimeSense', 'OpenNI' or 'NITE'. delete the C: Program Files PrimeSense and C: Program Files OpenNI directories (or the equivalents for your platform). uninstall any drivers that mention 'Kinect', 'Xbox' or 'PrimeSense' via Window's Device Manager 2.
Download the Packages Download the relevant OpenNI/NITE zip file from the downloads website. Search for 'All Downloads' to find suitable versions of OpenNI and NITE for Windows, Linux, and OSX.
![Win32 Win32](/uploads/1/2/5/6/125618091/763872232.jpg)
I recommend the following:. Windows 32-bit: OpenNINITEInstaller-win32-0.27.zip. Windows 64-bit: OpenNINITEInstaller-win64-0.27.zip. Linux 32-bit: OpenNINITEInstaller-Linux32-0.27.zip. Linux 64-bit: OpenNINITEInstaller-Linux64-0.27.zip.
OSX: OpenNINITEInstaller-OSX-0.24.zip For example, the Windows 32-bit zip file contains four installers:. nite-win32-1.5.2.21-dev.msi. openni-win32-1.5.4.0-dev.msi.
SensorKinect092-Bin-Win32-v5.1.2.1.msi. sensor-win32-5.1.2.1-redist.msi I've also made that zip file available; it's 120 MB large. There are two installers containing the word 'sensor', which relate to the SensorKinect driver. It seems that the driver inside SensorKinect092-Bin-Win32-v5.1.2.1.msi is compiled using VC 2010 so you must have Microsoft's VC 2010 redistributable installed for the driver to correctly execute. The redistributable is inside sensor-win32-5.1.2.1-redist.msi. If you don't want to install the 64-bit version of OpenNI on your 64-bit Windows machine, then you can use the 32-bit installer instead.
Some good instructions on how to do that can be found. Installation Install the four downloaded packages in the order:. OpenNI: openni-win32-1.5.4.0-dev.msi. SensorKinect driver - there are two steps: first sensor-win32-5.1.2.1-redist.msi, and then SensorKinect092-Bin-Win32-v5.1.2.1.msi. NITE: nite-win32-1.5.2.21-dev.msi Afterwards, check if the software is in the C: Program Files OpenNI and C: Program Files PrimeSense directories.
To install the three hardware drivers (for motor, audio, and camera), you should:. plug the Kinect into your PC and into the mains;.
this will trigger Windows into installing the drivers, but don't let the installation search for the drivers itself. Instead you should supply their location in C: Program Files PrimeSense SensorKinect Driver. afterwards, check if the 3 drivers show up in Windows' Device Manager under a 'PrimeSense' header Delete OpenNI's Java CLASSPATH environment variable via Windows' System control panel Advanced tab 4. Edit four XML Configuration Files In C: Program Files PrimeSense NITE Data edit:. Sample-Scene.xml. Sample-Training.xml. Sample-User.xml In C: Program Files OpenNI Data edit:.
SampleConfig.xml The edits to these XML files are:. add the PrimeSense license:. add attributes to all the subterms: Look at SampleConfig.xml in the for examples of these changes.
Test OpenNI and NITE In C: Program Files OpenNI Samples Bin Release, run the applications:. NiSimpleRead.exe. NiSimpleViewer.exe. NiViewer.exe,. NiUserTracker.exe. In C: Program Files PrimeSense NITE Samples Bin Release, run:.
Sample-Boxes.exe 6. Start Java Programming The Java wrappers for OpenNI and NITE are part of the installation, so you can now start programming. For details, please read the. Navigation:. Up to the. On to Dr.
Andrew Davison E-mail: Back to.