Hi @ixikos. As far as I know, the two active addons for KinectV2 are ofxKinectForWindows2 (Windows-only) and ofxMultiKinectV2 (Mac-only-ish*). As you've noticed, the API for ofxKFW2 is quite different from ofxKinect, but ofxMultiKinectV2 is pretty similar. That uses libfreenect2 which is cross-platform, though the addon itself is Mac-only and would require some additional work to get it to work on other platforms.
You could take a look at a different addon, ofxKinectBlobFinder, which I've updated to work with ofxKFW2 instead of ofxKinect, to see what types of updates are needed. Take a look at src/ofxKinecBlobFinder.h
& src/ofxKinecBlobFinder.h
:
https://github.com/dasaki/ofxKinectBlobFinder/compare/master...mattfelsen:kinectv2-kfw#diff-56c819567bf57b507ce5baca98ea2154
One of the biggest differences is there's no getWorldCoordinateAt()
, though you can see an example of how to do the mapping in these lines:
You could also look at the differences between ofxKinectProjectorToolkit and ofxKinectProjectorToolkitV2 to get a sense of the needed changes.
On a related note, I've been working on a new addon, ofxDepthCamera, to help solve this exact problem of addons for different cameras each having their own APIs for accessing camera streams. It's very much a work in progress, but I have successfully used it with ofxKinect on Mac & Windows, and ofxKFW2 on Windows, and only changing one line of code Image may be NSFW.
Clik here to view. If you do end up checking it out and have issues/questions, feel free to let me know.
Good luck!
Matt