Part1:install from source
https://colmap.github.io/install.html
编译过程可能的error(类似):
You must set CMAKE_CUDA_ARCHITECTURES to e.g. 'native', 'all-major', '70'
solution:cmakelists第87行添加
set(CMAKE_CUDA_ARCHITECTURES "native")
Part2:cmd running
#1. 特征提取
colmap feature_extractor \
--database_path ./data/database.db \
--image_path ./data/images
#2. 特征点匹配
colmap exhaustive_matcher \
--database_path ./data/database.db
#3. 稀疏重建
mkdir sparse
colmap mapper \
--database_path ./data/database.db \
--image_path ./data/images \
--output_path ./data/sparse
#4. 图像去形变
mkdir dense
colmap image_undistorter \
--image_path ./data/images \
--input_path ./data/sparse/0 \
--output_path ./data/dense \
--output_type COLMAP
#5. 稠密重建
colmap patch_match_stereo \
--workspace_path ./data/dense \
--workspace_format COLMAP \
--PatchMatchStereo.geom_consistency true
#6. 融合生成点云
colmap stereo_fusion \
--workspace_path ./data/dense \
--workspace_format COLMAP \
--input_type geometric \
--output_path ./data/dense/fused.ply
#7. 建立mesh模型
This may need a long time
# type one poisson重建
colmap poisson_mesher \
--input_path ./data/dense/fused.ply \
--output_path ./data/dense/meshed-poisson.ply
# type two delaunay重建
colmap delaunay_mesher \
--input_path ./data/dense \
--output_path ./data/dense/meshed-delaunay.ply