Re: Scan (app) > import/optimize (PC) > export

Posted by matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Scan-app-import-optimize-PC-export-tp2634p2637.html

Hi Christian,

Thx for sharing the database, don't worry we can recover your scan with RTAB-Map Desktop as you will see below.

Scan with RTAB-Map on Phab2Pro

Yes, if you are ok with a point cloud, go for it it will take less RAM. A mesh hides stuff behind, so maybe easier to visualize. Note that regardless how much the pointcloud/mesh is decimated for rendering, the point cloud at highest resolution is always saved in the database (to be reconstructed at any resolution afterward).

Disable Drift Correction, that option will disappear in next release. You will see below that I disabled that when reprocessing the database.

Importing .db to RTAB-Map

In that case, the drift correction added slightly more errors to map, so it is why not optimized was better. I've found that RTAB-Map didn't find loop closures too. I reprocessed the database with 400 features per image instead of 200 and without drift correction. Because there are more features per image, 10 loop closures could be detected, correcting the map at three places (the red links in yellow circles).


Steps to re-process the database with new parameters
1- Open the database and answer Yes to update the parameters, then close the database.
2- My Source panel (disabled "database stamps as input rate" to reprocess faster the database, here 5Hz):


3- Set detection rate and image buffer to 0 to process all images (they may be already at 0 if you answered Yes to last question when selecting the database):


4- Disabled neighbor refining (called "Drift Correction" on RTAB-Map Tango) and set back Motion estimation to visual only (was set to Vis+ICP because of drift correction):



5- Close Preferences and click Play. Hopefully RTAB-Map will detect the same loop closures as mine above.

About GTSAM: GTSAM would be already selected for graph optimization as RTAB-Map Tango uses it. The parameter is here:


EXPORTING Point Cloud from RTAB-Map

I just changed the default reconstruction flavor to Dense since mesh reconstruction is now a lot better with Poisson. When assembling the point clouds, there are no differences between both, unless you want to save point clouds separately and keep the point clouds organized. However, for meshing, the approaches are very different between Organized and Dense.

The bug where the textures are missing from the OBJ should be fixed in the 0.11.14 binaries that I re-uploaded wednesday. If you downloaded the initial 0.11.14 binaries (Monday), please re-download them.

Export examples with the resulting map above


Results below are point cloud or mesh directly exported from RTAB-Map 0.11.14. Doing Post-Processing to detect more loop closures did not correct much more the map than with only the loop closures detected online (results shown without Post-Processing).

A) (~0m20s export time, 10K faces, OBJ 1.6MB+0.7MB jpg) Default Parameters, with Dense + Meshing(Poisson depth=8) + 80 % Mesh decimation +  texturing (with output texture 1024x1024):


B) (~0m30s export time, 68K faces, OBJ 10MB+10MB jpg) Default Parameters, with Dense + Meshing(Poisson depth=8) + texturing (with output texture 4096x4096):


C) (~0m50s sec export time, 46K faces, OBJ 7MB+11MB jpg) Default Parameters, with Dense + Meshing(Poisson depth=9) + 80% Mesh decimation + texturing (with output texture 4096x4096):


D) (~1m40s sec export time, 1.2M faces, PLY 23MB) Default Parameters, with Dense + Meshing(Poisson depth=10) + no texturing (max transfer color radius=0.2m):


E) (~2m00s sec export time, 254K faces, OBJ 39MB+11MB jpg sketchfab link) Default Parameters, with Dense + Meshing(Poisson depth=9) + texturing (with output texture  4096x4096):


F) (~8m00s sec export time, 2.1M faces, OBJ 150MB+144MB jpg) Default Parameters, with Dense + Meshing(Poisson depth=10) + texturing (with output texture 16384x16384):


EDIT Oups I clicked "Post Message" instead of "Preview Message". I was about to write that I uploaded the model E to Sketchfab here: https://skfb.ly/ZZVP .

Note that we could also regenerate the point clouds at 1 decimation to get a lot more points to mesh. I tried but it was too long (I waited 10 min and the meshing was not done yet). I didn't try with higher Poisson depth than 10 on that dataset, but probably it could add even more precision to geometry. However, I think very high Poisson depth would not smooth the geometry noise.

EDIT 2 A texture resolution comparison:


cheers,
Mathieu