Does anyone know how to make a pointcloud efficiently with ofxKinectForWindows2 from elliot wooods?
So there was a pretty efficient solution inside the addon, if I had only slowed down a looked. The code si actually part of the debug draw for the device (the OF part not the native MS stuff);
kinect.getColorSource()->getTexture().bind(); auto opts = ofxKFW2::Source::Depth::PointCloudOptions(false, ofxKFW2::Source::Depth::PointCloudOptions::TextureCoordinates::ColorCamera); auto mesh = kinect.getDepthSource()->getMesh(opts); mesh.draw(); kinect.getColorSource()->getTexture().unbind();
I am sure there are better ways to do it, but this is working for me and very low latency. Inside the device.cpp file
(https://github.com/elliotwoods/ofxKinectForWindows2/blob/master/src/ofxKinectForWindows2/Device.cpp) there are more examples of some variations.