Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract only valid surfels from GPU to CPU #5

Closed
BruceCanovas opened this issue Feb 22, 2018 · 4 comments
Closed

Extract only valid surfels from GPU to CPU #5

BruceCanovas opened this issue Feb 22, 2018 · 4 comments

Comments

@BruceCanovas
Copy link

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

@martinruenz
Copy link
Owner

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.

@BruceCanovas
Copy link
Author

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.

@martinruenz
Copy link
Owner

Cool, if this works nicely a pull request would be welcome! :)

@BruceCanovas
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants