A c++ wrapper for OpenNI.
Switch branches/tags
Nothing to show
Pull request Compare This branch is even with pixelnerve:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Block OpenNI
A C++ wrapper for OpenNI

This block is going through heavy remake and so old code/methods are mixed with new methods for the moment.
I will be changing the way things are handled at the moment when i'm finished. All for better support on multiple devices.

Basic description

Support for several generators as Image, IR, Depth and User.
Skeleton tracking is also supported.

How to use

You need to install the sensor drivers, OpenNI and NITE.
Note! PrimeSense drivers do not work with the Kinect. 

So here's a step-by-step installationg guide:
(The links you'll find here are the latest unstable at the time of writing)

Windows 32bit:

Download/Install OpenNI:

Download/Install Avin2's SensorKinect:

Download/Install NITE:

At this moment you should now be able to run the samples in OpenNI. 
Go to OpenNI's folder and browse to /Samples/Bin/Release. 
Run NiViewer.exe. You should now be looking at a window with the RGB and Depth feed coming from the kinect

MacOSX 32bit:

1) Download/Install MacPorts
	(Snow Leopard 10.6) https://distfiles.macports.org/MacPorts/MacPorts-2.0.0-10.5-Leopard.dmg
	(Lion 10.7) https://distfiles.macports.org/MacPorts/MacPorts-2.0.0-10.7-Lion.dmg

2) Open the terminal, install libtool/libusb.
	2.1) Type and run: sudo port install libtool
	2.2) Type and run: sudo port install libusb-devel +universal

3) Download/Untar OpenNI
	3.1) Open the terminal, goto openni's folder you just untar'ed.
	3.2) Type and run: sudo ./install.sh

4) Download Avin2's SensorKinect
	4.1) Open the terminal, goto SensorKinect's folder you just untar'ed.
	4.2) Type and run: sudo ./install.sh

5) Download NITE
	4.1) Open the terminal, goto NITE's folder you just untar'ed.
	4.2) Type and run: sudo ./install.sh

At this moment you should now be able to run the samples in OpenNI. 
Go to OpenNI's folder and browse to /Samples/Bin/Release (use terminal). 
Run ./NiViewer. You should now be looking at a window with the RGB and Depth feed coming from the kinect

	Check Avin2's SensorKinect repo (@github) for more information.


Fork charlesdietrich/BlockOpenNI

Support for Mac OS X. 

For OS X: Follow the instructions found on the README file at https://github.com/avin2/SensorKinect.
It's well described (using macports) and works nicely.

Installation instructions for OS X:

First, get libusb and the kinect patch on http://openkinect.org/wiki/Getting_Started#Manual_Build_under_OSX. Patch libusb.

From http://discussions.info.apple.com/thread.jspa?threadID=2614064&tstart=0, do the following:

env CFLAGS="-arch i386" ./configure; make
mv libusb/.libs/libusb-1.0.0.dylib /tmp/libusb-1.0.0.dylib.i386
make clean
env CFLAGS="-arch x86_64" ./configure; make
mv libusb/.libs/libusb-1.0.0.dylib /tmp/libusb-1.0.0.dylib.x86_64
lipo -create /tmp/libusb-1.0.0.dylib.i386 /tmp/libusb-1.0.0.dylib.x86_64 -output libusb/.libs/libusb-1.0.0.dylib
sudo make install

Install all the stuff on the OpenNI page. Just grab binaries.

Go to https://github.com/avin2/SensorKinect. Download the binary file for OS X. Install.

Change to your blocks directory

git clone https://github.com/charlesdietrich/BlockOpenNI.git

You can now compile. However, you will get an xml error when running.

This is a hack: You need to copy BlockOpenNI/samples/BlockOpenNISample/data  to ~/Library/Developer/Xcode/Build/Products/Debug/. This should be done with a resource.

Now you should be good to go. If you get No PS sensor is connected! error, try running another Kinect program, and then running again.

Now you can repeat above steps with BlockOpenNISkeleton.