Bundler from GUI results in good image/point alignment, yet Bundler from commandline does not.

173 views
Skip to first unread message

jerb...@gmail.com

unread,
Sep 10, 2018, 2:52:17 PM9/10/18
to COLMAP
If I walk through the steps in the GUI to create a dense pointcloud, from initial DB creation all the way to Fusion, I can Export Model As a Bundler (.out + .txt) file set and when I bring these into Meshlab, the images line up with the pointcloud.

However, when I run the script (command line), although the pointcloud looks fine, the images seem to be zoomed in, and are not aligned properly. This creates a problem for me in a few areas, including when I need to project the photos as a texture onto the resulting mesh.

Thoughts?

proper alignment shown in screencap of Meshlab
Bundler file set created from GUI

GUI_aligned.jpg



misalignment shown in screencap of Meshlab
Bundler file set created from attached command line script

commandline_misaligned.jpg



#####################
## script
#####################
DATASET_PATH=$DATASET_TOP_PATH/01_face
echo $DATASET_PATH
colmap feature_extractor \
    --database_path $DATASET_PATH/db.db \
    --image_path $DATASET_PATH

colmap exhaustive_matcher \
    --database_path $DATASET_PATH/db.db

mkdir $DATASET_PATH/sparse

colmap mapper \
    --database_path $DATASET_PATH/db.db \
    --image_path $DATASET_PATH \
    --export_path $DATASET_PATH/sparse

mkdir $DATASET_PATH/dense

colmap image_undistorter \
    --image_path $DATASET_PATH \
    --input_path $DATASET_PATH/sparse/0 \
    --output_path $DATASET_PATH/dense \
    --output_type COLMAP \
    --max_image_size 2000

colmap dense_stereo \
    --workspace_path $DATASET_PATH/dense \
    --workspace_format COLMAP \
    --DenseStereo.geom_consistency true

colmap dense_fuser \
    --workspace_path $DATASET_PATH/dense \
    --workspace_format COLMAP \
    --input_type geometric \
    --output_path $DATASET_PATH/dense/fused.ply

colmap model_converter --input_path $DATASET_PATH/sparse/0 --output_path $DATASET_PATH/dense/images/cmdLine_export.nvm --output_type nvm
colmap model_converter --input_path $DATASET_PATH/sparse/0 --output_path $DATASET_PATH/dense/images/cmdLine_export.out --output_type bundler

Johannes Schönberger

unread,
Sep 13, 2018, 2:54:14 AM9/13/18
to col...@googlegroups.com
You are converting the distorted sparse reconstruction to the bundler format. But your are loading the undistorted dense reconstruction. You can resolve the issue by converting the “dense/sparse/” folder.

On 10 Sep 2018, at 20:52, jerb...@gmail.com wrote:

If I walk through the steps in the GUI to create a dense pointcloud, from initial DB creation all the way to Fusion, I can Export Model As a Bundler (.out + .txt) file set and when I bring these into Meshlab, the images line up with the pointcloud.

However, when I run the script (command line), although the pointcloud looks fine, the images seem to be zoomed in, and are not aligned properly. This creates a problem for me in a few areas, including when I need to project the photos as a texture onto the resulting mesh.

Thoughts?

proper alignment shown in screencap of Meshlab
Bundler file set created from GUI

<GUI_aligned.jpg>



misalignment shown in screencap of Meshlab
Bundler file set created from attached command line script

<commandline_misaligned.jpg>

--
You received this message because you are subscribed to the Google Groups "COLMAP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to colmap+un...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/colmap/51dfa8a8-1597-47f2-aa38-4a07bc27a2a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<GUI_aligned.jpg>
<commandline_misaligned.jpg>

Jeremy Bot

unread,
Sep 13, 2018, 10:01:04 AM9/13/18
to col...@googlegroups.com
Ah! Of course.  That makes sense.  Will take a look at this later today and share results. Thank you for the reply! 

You received this message because you are subscribed to a topic in the Google Groups "COLMAP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/colmap/qdzYHsLhIpo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to colmap+un...@googlegroups.com.

To post to this group, send email to col...@googlegroups.com.

jerb...@gmail.com

unread,
Sep 17, 2018, 7:06:22 PM9/17/18
to COLMAP
Sorry for the delay, I had to re-install colmap due to system problems, and seems that colmap went through a bit of an upgrade which broke my scripts.  All is fixed now with my scripts...

...included the changes you recommended, and my problem is FIXED!! The photos and points are lining up.

Thank you!

- Jer
Reply all
Reply to author
Forward
0 new messages