stevelibre / onipy

Automatically exported from code.google.com/p/onipy
GNU Lesser General Public License v3.0
0 stars 0 forks source link

README for OpenNI Python Wrapper Created by Gabriele Nataneli (gamix) 2 February 2011

RELEASE NOTES V0.4

V0.3.1 alpha

V0.3 alpha

ADDITIONAL NOTES

DEPENDENCIES Mandatory

HOW TO BUILD Windows

Linux

http://www.openni.org/downloadfiles/openni-binaries/20-latest-unstable

Use the latest unstable version [used OpenNI-Bin-Linux64-v1.0.0.25.tar.bz2]

mkdir ~/openni && mkdir ~/openni/openni tar xjvf OpenNI-Bin-Linux64-v1.0.0.25.tar.bz2 -C ~/openni/openni cd ~/openni/openni sudo ./install.sh (edit install.sh if not using Ubuntu)

In ONIPY/ProjectFiles/Linux:

make (edit Makefile if not using Ubuntu with Python 2.6) sudo make install

HOW TO READ THE CODE

DESIGN RATIONALE While SWIG is a great tool for generating quick bindings for large libraries, it tends be a little slippery. Bindings created in SWIG are somewhat unreliable and lead to unpleasant crashes wherever developers don’t specify the details of how objects must be converted from C++ to Python appropriately. A good alternative is Boost Python, which is what I used here. Boost Python provides less automation than SWIG, but it gives developers more fine grained control and it typically refuses to build if the binding code is not implemented correctly.

I originally developed this binding only to expose a small subset of OpenNI’s functionality for a specific computer vision project I am working on, in which case the overhead of using Boost Python is perfectly acceptable. I hope that the code that I’ve written can become the backbone for a more complete binding to OpenNI and NITE with contributions from the fantastic open source community surrounding these projects.

TROUBLESHOOTING Visual Studio can’t find the environment variables, but you just set them!

Remember to either log off or restart your system for changes in the environment variables to take effect. I know that this is obvious, but people often forget :-)

You get ImportError: DLL load failed: The specified module could not be found when you import the binding or run the sample code.