A tutorial for colmap to openMVS

COLMAP步骤

Step1 特征提取

colmap feature_extractor \
--SiftExtraction.use_gpu 0 \
--database_path $PROJECT/database.db\
--image_path $DATA_ROOT/$PROJECT/images

Step2 特征匹配

colmap exhaustive_matcher\
--SiftMatching.use_gpu 0\
--database_path $PROJECT/database.db

Step3 SFM/空中三角测量

colmap mapper\
--database_path $PROJECT/database.db \
--image_path $DATA_ROOT/$PROJECT/images \
--output_path $PROJECT/sparse 

Step4 影像去畸变

colmap image_undistorter \
--image_path $DATA_ROOT/$PROJECT/images \
--input_path $PROJECT/sparse/0 \
--output_path $PROJECT/dense \
--output_type COLMAP \
  • here --output_type, you could find the usage at colmap

Step5 模型转换

(将所有相机模型转换为针孔pinhole模型)

colmap model_converter \
--input_path $PROJECT/dense/sparse \
--output_path $PROJECT/dense/sparse  \
--output_type TXT
  • Under this step, you will see three txt file will be created at $PROJECT/dense/sparse dir.
  • cameras.txt, images.txt, point3D.txt
  • But you could choice another place to save them.
  • And PINHOLE is in cameras.txt you will see.

OpenMVS步骤

Step6 格式转换

InterfaceCOLMAP \
--working-folder $(pwd)/$PROJECT/ \
--input-file $(pwd)/$PROJECT/ \
--output-file $(pwd)/$PROJECT/model_colmap.mvs

Step7 密集重建

DensifyPointCloud \
--input-file $(pwd)/$PROJECT/model_colmap.mvs \
--working-folder $(pwd)/$PROJECT/ \
--output-file $(pwd)/$PROJECT/model_dense.mvs \
--archive-type -1 \
  • Here --archive-type -1 must be set

Step8 表面重建/构网

ReconstructMesh --input-file $(pwd)/$PROJECT/model_dense.mvs \
--working-folder $(pwd)/$PROJECT/ \
--output-file $(pwd)/$PROJECT/model_dense_mesh.mvs

Step9 网格精化

RefineMesh \
--resolution-level 1 \
--input-file $(pwd)/$PROJECT/model_dense_mesh.mvs \
--working-folder $(pwd)/$PROJECT/ \
--output-file $(pwd)/$PROJECT/model_dense_mesh_refine.mvs

Step10 纹理映射

TextureMesh \
--export-type obj \
--output-file $(pwd)/$PROJECT/model.obj \
--working-folder $(pwd)/$PROJECT/ \
--input-file $(pwd)/$PROJECT/model_dense_mesh_refine.mvs
  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值