KinectV2 Depth/RGB alignment

I want to use the KinectV2 on the mac, I got @theo’s addon running but looking to figure out how to align the rgb image with the depth image. I see in ofxKinect this has been implemented.

Has anyone worked on this with kinectV2?

hey, there is Registration object that’s being created in the ofProtonect object that is inside the ofxKinectV2 object, that handles what you need. you’ll need to add methods to access it and process the frame data.
hope this helps.

@vanderlin - if you get it working def send me a PR.

There is this branch which has world coords - but I don’t think handles RGB -> Depth registration.
https://github.com/ofTheo/ofxKinectV2/tree/feature-worldcoord https://github.com/ofTheo/ofxKinectV2/tree/feature-worldcoord

Also this repo mentions having registration working:
https://github.com/hanasaan/ofxMultiKinectV2 https://github.com/hanasaan/ofxMultiKinectV2

@vanderlin can you give a hint as to how you got theos addon running? I have been trying this and a bunch of other forks but cant seem to get anything that works. I have gone through the driver swap, openCL install and adding the openCL paths but no joy, some compile but most dont. (windows 10 vs2015).

Cheers

Fred

@fresla - if you are on windows you can use Elliot Woods Kinect SDK wrapper.
Its pretty advanced but does almost everything the SDK can do.

I have been using that for some time and it is great. I need to get multiple kinects though so I have to use a libfreenect2 based add-on.

You might have luck pulling libusb from the current VS nightly.

For windows I updated ofxKinect ( v1 ) to use real libusb. I can’t see why that version wouldn’t also work for the ofxKinectV2 addon on Windows.

I have a couple of forks compiling, I am looking to get multiple point clouds, so I need some features that come and go from various forks and branches, namely the openCL acceleration via the cuda SDK. Libusb seems not to be an issue so far.

If anyone is following this, the addon works ok (theos ofxKinectV2), but you need to follow the links for adding opencl paths and the opencl lib to the project. As opencl can operate on a number of platforms I installed the cuda SDK which also has the opencl lib and headers built for using nvidia hardware (most of the tutorials point to installing the intel openCL SDK which does nto play so well with VS2015 - as far as I can tell it is made for VS 2017, and is also CPU based). I addded the paths to the project and it compiled. The last thing was to add the patched libusb dll, which I got from here:

KinectV2 are working well on windows. I am looking into the mosst efficient way to get a pointcloud. Looking at the way the addon is sctructured, I am wondering if there is a way to do this in openCL, rather than going back and forth from the CPU-GPU.

1 Like