Here’s how I go the samples working. First install OpenNI itself:
- Download OpenNI 2.2 Beta for OS X.
- Run
sudo ./install.sh
. You will not see any output. This is normal.
Next you’ll need a driver for the Kinect:
- Clone the OpenNI2-FreenectDriver repo.
- Run
./waf configure build
. You should now have abuild
directory withlibFreenectDriver.dylib
in it. - Copy that file into
Redist/OpenNI2/Drivers/
. If you want to try the samples then also copy the file intoSamples/Bin/OpenNI2/Drivers
.
To run an example:
cd Samples/Bin
./ClosestPointViewer
To use the OpenNI in an XCode project, for example in combination with openFrameworks:
- Create a new project. (Use the project generator if you are working with oF.)
- Click the name of the project in the left sidebar and make sure ‘Project’ is selected in the main panel.
- Look for the setting ‘Header Search Paths’ and click to edit. Click the plus sign and add the path to ‘Include’ directory from OpenNI. For example, I installed OpenNI in
/Applications/OpenNI-MacOSX-x64-2.2
, so my path is/Applications/OpenNI-MacOSX-x64-2.2/Include
. - Next, copy
libOpenNI2.dylib
from the OpenNIRedist
folder to the folder that will contain your binary (the compiled version of your project). If you are working with oF then this is thebin
folder inside your project. - Finally, add
#include "OpenNI.h"
add the start of your code. (In oF: this would be intestApp.h
.)
Hello.
I am trying to set up xtion pro live for development on mac OS X 10.9.2
I have downloaded the OpenNI 2.2 beta and installed it by running the shell script install.sh but I don’t have the driver for xtion pro live and it seems that asus officially doesn’t support mac osx. Can you suggest alternative for getting xtion pro live to work with mac osx?
I have never used an Xtion, so I’m afraid I can’t help you there.