If you want to use OpenNI (not 2), refer to homebrew-openni.
OpenNI2 formula is now provided by brewsci/science, so homebrew-openni2 won't provide it. homebrew-openni2 is supporting OpenNI2-FreenectDriver formula.
1. Download formulae
First, tap homebrew-science and homebrew-openni2.
$ brew tap brewsci/science $ brew tap totakke/openni2
Install OpenNI2 by the following command.
$ brew install openni2
If you want to use Kinect for Xbox360, install
It must be installed after installation of OpenNI2 is finished.
$ brew install openni2-freenectdriver
Add the recommended variables to your dotfile (
export OPENNI2_INCLUDE=/usr/local/include/ni2 export OPENNI2_REDIST=/usr/local/lib/ni2
Above paths are for default environment.
Check correct paths for your environment by
brew info openni2.
3. Run NiViewer for test
Connect a device to the PC and run NiViewer.
$ cd `brew --prefix`/share/openni2/tools $ ./NiViewer
$ brew uninstall openni2
Code is under the BSD 2 Clause (NetBSD) license, the same as Homebrew.