Kinect v2 skeletal tracking on Linux / OS X?

I’ve read up on this Discourse-forum about all ofxKinectV2 addons created by users but I don’t know yet whether I may get skeletal tracking with OF on OS X.
Can someone whether this is already possible (if yes, how) and if not, what is missing.

No, because hacking Kinect v2 for OSX/Linux and implementing skeletal tracking are completely different things. The only practical way to enable skeletal tracking on OSX/Linux with Kinect v2 is to develop a OpenNI2 driver for Kinect v2 and use NiTE like what libfreenect did ( https://github.com/OpenKinect/libfreenect/tree/master/OpenNI2-FreenectDriver ). But I don’t see the OpenKinect community developing such a thing (and technically we cannot find NiTE library anymore), so I’d recommend using Microsoft SDK on Windows.

It looks like someone is working on a driver, but it’s still windows only. https://github.com/occipital/OpenNI2/tree/kinect2/Source/Drivers/Kinect2

Don’t know if that could come to OS X because it’s based on the official Kinect SDK?

Hi,

A few days ago someone created a pull request with the OpenNI2-freenect2driver. Would it be possible if that would work?

Somehow I’m not able to post the link to it, so you need to prepend https:// to github.com/occipital/OpenNI2/pull/46

Cheers

Hi,

I have created the pull request. I have never used skeletal tracking with OpenNI2. And now, I don’t have enough GPU resource or Kinect v2, so I cannot test it now. But I have implemented most of features of OpenNI2 , so Nite2 will possibly work.

I have written how to set up my driver https://github.com/MasWag/OpenNI2/tree/libfreenect2/Source/Drivers/Libfreenect2 but it may not be so easy. ( https://github.com/OpenKinect/libfreenect2/issues/168 )

2 Likes

Thanks! I’ll give it a try!
Where can I find the patched libusb? I’ve been looking but can’t find it.

Hi,

Libfreenect2 depended on patched libusb (now libfreenect2 works with unpatched libusb but when I have written the driver, patch was required). When building this old libfreenect2 (https://github.com/MasWag/libfreenect2/tree/sequence), patched libusb and other external libraries are build under “depends” of libfreenect2’s root.

Ah, okay! I’ve installed libfreenect2 but when running the example the depth and ir remain black, the RGB works fine.

Is the example libfreenect2’s example? This may be a problem with GPU. libfreenect2 has three depth parsers, OpenGL,OpenCL ,and CPU. By default OpenGL is used, but you can change default parser at compile time by

cmake -DENABLE_OPENGL=OFF -DENABLE_OPENCL=OFF CMakeLists.txt
When you compile like this, CPU is used as a default parser and when you disable only OpenGL, OpenCL is used as a default parser.

Some config of GPU may be required when running with OpenGL or OpenCL.

Thank you, disabling OpenGL solved that issue.
When trying to use OpenNI2 some other issues pop up, but I don’t have any time left to try and get this working.
Hopefully I’ll be able to get back to this at some point later on.