martinruenz / co-fusion

Co-Fusion: Real-time Segmentation, Tracking and Fusion of Multiple Objects

Home Page:http://visual.cs.ucl.ac.uk/pubs/cofusion/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extract only valid surfels from GPU to CPU

BruceCanovas opened this issue · comments

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

You are right, at the moment the easiest solution is to use downloadMap and then to filter on the CPU, see:

if (conf > model->getConfidenceThreshold()) {

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.