FangGet / BundleFusion_Ubuntu_Pangolin

a porting for BundleFusion working on ubuntu, with Pangolin as visualizer
Other
124 stars 33 forks source link

Pangolin display slow due to marching cubes #14

Closed wuqs-net closed 3 years ago

wuqs-net commented 3 years ago

Hello! Thanks for the great work!

As I run the program with visualization on, it runs slower and slower. It comes to my attention that the CUDAMarchingCubesHashSDF::extractIsoSurfaceGPUNoChrunk function takes a lot of time (~500ms) to run, which makes the display slow.

Maybe update the model display in a incremental way instead of doing the entire marching cubes every time? Any ideas on how to improve?

FangGet commented 3 years ago

yeap, this function takes too much time as the point cloud becomes bigger and bigger. If you do not care about loop closure, try to apply streaming-like marching cube extracting (only extract points inside a sphere), but if loop closure is concerned, I guess a full marching cube is necessary.

wuqs-net commented 3 years ago

streaming-like marching cube extracting

Is there code for it in the project? I'm still new to this topic. Any hint will be helpful, thank you!

FangGet commented 3 years ago

It has been a time since I debug this project. I guess the simplest way is to add a box param for this function: https://github.com/FangGet/BundleFusion_Ubuntu_Pangolin/blob/d3390f9017ddcdf31c69d65155ef356c4a5b2dd6/src/BundleFusion.cpp#L334

this "extractIsoSurfaceGPUNoChrunk" function requires a box parameter, you may extract a box level marching cube