Kinect, OpenNI, NiTE and Nuimotion Setup for OSX


Messing around with a Kinect, OpenNI, NiTE led me to a node.js app called Nuimotion.

In an effort to document successful install of all the required packages I created these instructions.

– Installation notes for OSX Mavericks.
NOTE: All code is installed to ~/Developer/Work

Install Updates

– Update system, run App Store, Updates

– Run Xcode and agree to terms and finish installation:


Install brew

– Install Homebrew:

ruby -e "$(curl -fsSL"

NOTE: This will likely prompt for root password and install command line developer tools.

– Update and check brew:

brew update
brew doctor

NOTE: Tested with brew version 0.9.5

Install freenect from github

– Install dependencies:

brew uninstall libusb
brew install libusb --universal
brew install cmake

– Clone `libfreenect`:

mkdir -p ~/Developer/Work
cd ~/Developer/Work
git clone
cd libfreenect
git checkout tags/v0.3.0

NOTE: Tested with libfreenect stable release v0.3.0

– Build and install:

mkdir build
cd build
sudo make install

– Test with glview:

sudo glview

– Reference:

Install node.js

– Install node.js:

NOTE: Tested with node.js v0.10.23

Install OpenNI and NiTE

– Download OpenNI from:

– Uncompress OpenNI and move:

tar xvf OpenNI-MacOSX-x64-2.2.tar.bz2
mv OpenNI-MacOSX-x64-2.2 ~/Developer/Work/
cd ~/Developer/Work/OpenNI-MacOSX-x64-2.2
sudo ./

– Download NiTE from:

– Uncompress NiTE and move:

tar xvf NiTE-MacOSX-x64-2.2.tar.bz2
mv NiTE-MacOSX-x64-2.2 ~/Developer/Work/
cd ~/Developer/Work/NiTE-MacOSX-x64-2.2
sudo ./

– Copy `` to OpenNI2 directory:

cp /usr/local/lib/OpenNI2-FreenectDriver/libFreenectDriver.dylib \

– Copy all libraries to `/usr/local/lib`

sudo cp -R ~/Developer/Work/OpenNI-MacOSX-x64-2.2/Redist/* /usr/local/lib
sudo cp -R ~/Developer/Work/NiTE-MacOSX-x64-2.2/Redist/* /usr/local/lib

– Add to library path:

vi ~/.bash_profile
export DYLD_LIBRARY_PATH=/usr/local/lib64/:/usr/local/lib64/OpenNI2-FreenectDriver/:/usr/local/lib:$DYLD_LIBRARY_PATH

– Add OpenNI and NiTE to .bash_profile:

cat ~/Developer/Work/OpenNI-MacOSX-x64-2.2/OpenNIDevEnvironment >> ~/.bash_profile
cat ~/Developer/Work/NiTE-MacOSX-x64-2.2/NiTEDevEnvironment >> ~/.bash_profile

– Logout and log back in to use changes made to `.bash_profile`.

Install Nuimotion and Websocket

– Make project directory:

mkdir ~/Developer/Work/prototype-nuimotion/

– Copy Redist files to the root of the app:

cp -R ~/Developer/Work/NiTE-MacOSX-x64-2.2/Redist/* ~/Developer/Work/prototype-nuimotion/
cp -R ~/Developer/Work/OpenNI-MacOSX-x64-2.2/Redist/* ~/Developer/Work/prototype-nuimotion/

– Install `websocket`:

npm install websocket

– Install `node-gyp`:

sudo npm install -g node-gyp

– Create `prototype-nuimotion` and download the nuimotion project to the `node_modules` directory:

mkdir ~/Developer/Work/prototype-nuimotion/node_modules
cd ~/Developer/Work/prototype-nuimotion/node_modules
mv nuimotion-master nuimotion

– Rebuild:

cd ~/Developer/Work/prototype-nuimotion/node_modules/nuimotion
node-gyp rebuild

– Edit `index.js` to fix require, remove `src` prefix in first line:

vi ~/Developer/Work/prototype-nuimotion/node_modules/nuimotion/index.js
module.exports = require('./build/Release/nuimotion.node');

– Copy `basicquickstart.js` and run:

cp ~/Developer/Work/prototype-nuimotion/node_modules/nuimotion/quickstart/basicquickstart.js ~/Developer/Work/prototype-nuimotion/
cd ~/Developer/Work/prototype-nuimotion/
sudo node basicquickstart.js

– Reference:

Comments are closed.