FangGet/BundleFusion_Ubuntu_Pangolin

Pangolin display slow due to marching cubes

wuqs-net opened this issue · 3 comments

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?

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.

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!

It has been a time since I debug this project.
I guess the simplest way is to add a box param for this function:

march_cube = g_marchingCubesHashSDF->extractIsoSurfaceGPUNoChrunk ( g_sceneRep->getHashData(), g_sceneRep->getHashParams(), g_rayCast->getRayCastData() );

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