A work-in-progress C# wrapper for libfreenect2, tested on Ubuntu 14.04.
Note this library only works with Kinect One. If you have Kinect 360, you should use libfreenect which comes with its own C# wrapper (as well as many other wrappers).
This repo was forked from https://github.com/madadam/freenect2.net
After cloning the repo cd into the freenect.net folder and follow these build steps:
-
Expose the libfreenect2 library and include paths:
source setenv.sh
It does nothing else than these two exports:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/freenect2/lib export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:~/freenect2/include
If you have installed the freenect2 files elsewhere, replace ~/freenect2/include with it.
-
make the libfreenect2c.so in the native folder:
cd native make cp libfreenect2c.so .. cd ..
-
Copy the libfreenect2 libraries into the base folder. If you have done a make install of the libfreenect2 to the default ~/freenect2 folder, this would look like
cp ~/freenect2/lib/libfreenect2.so* .
-
Finally, start the solution from the same bash, so C# can find the library via $LD_LIBRARY_PATH (here using MonoDevelop as development environment):
monodevelop Freenect2.sln
-
Check the target framework of the two solution subprojects to match your currently installed .NET version.
-
Press F5