Closed BruceCanovas closed 6 years ago
You are right, at the moment the easiest solution is to use downloadMap and then to filter on the CPU, see: https://github.com/martinruenz/co-fusion/blob/457c3a0c0c0fb1b40194790d8814f001397e3130/Core/CoFusion.cpp#L703
Alternatively you could write an OpenGL-based filter using Transform Feedback or similar.
Thank you, I ended up using transform feedback and an atomic counter to get the number of valid points. It is maybe not the smartest way but it seems to make the trick.
Cool, if this works nicely a pull request would be welcome! :)
Ok I will just take time to see how it works as I am quit new with github and clean a bit what I've added before.
Hi,
I am actually using your solution as part of ROS node and was wondering if there was a way to get directly from the GPU only the valid surfels. Because model->downloadMap() extracts even the invalid surfels and so as to publish a point cloud it would be faster to loop only through valid ones. Or do you have a hint about what can I change in the source code to make it possible?
Thank you