一.COLMAP单步重建:
1.路径:
$ DATASET_PATH=/path/to/dataset
2.特征提取:
$ colmap feature_extractor \
--database_path $DATASET_PATH/database.db \
--image_path $DATASET_PATH/images
3.exhaustive_matcher
$ colmap exhaustive_matcher \
--database_path $DATASET_PATH/database.db
4.稀疏重建:
$ mkdir $DATASET_PATH/sparse
$ colmap mapper \
--database_path $DATASET_PATH/database.db \
--image_path $DATASET_PATH/images \
--output_path $DATASET_PATH/sparse
5.稠密重建:
$ mkdir $DATASET_PATH/dense
(1)图像去畸变:
$ colmap image_undistorter \
--image_path $DATASET_PATH/images \
--input_path $DATASET_PATH/sparse/0 \
--output_path $DATASET_PATH/dense \
--output_type COLMAP \
--max_image_size 2000
(2)在这里进行模型转换,以便用OpenMVS处理:
$ colmap model_converter \
--input_path $DATASET_PATH/dense/sparse \
--output_path $DATASET_PATH/dense/sparse \
--output_type TXT
会在dense/sparse文件夹中发现cameras.txt,images.txt和points3D.txt三个文件
(3)PMS:
$ colmap patch_match_stereo \
--workspace_path $DATASET_PATH/dense \
--workspace_format COLMAP \
--PatchMatchStereo.geom_consistency true
(4)stereo fusion:
$ colmap stereo_fusion \
--workspace_path $DATASET_PATH/dense \
--workspace_format COLMAP \
--input_type geometric \
--output_path $DATASET_PATH/dense/fused.ply
(5)poisson
在/openMVS/make/bin中打开终端命令行:
$ ./InterfaceCOLMAP -i /path/to/project/dense/sparse
-o /path/to/project/dense/sparse/cene.mvs
--image-folder /path/to/images
openMVS部分后面补充
版权声明:本文为weixin_43644829原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。