Ubuntu20下openMVG+openMVS实现三维重建

一、openmvg

首先在ubuntu下安装openmvg,过程一般不会出错,接下来才是使用openmvg。

ubuntu下 openMVG编译安装_ykwjt的博客-CSDN博客

openmvg的使用过程参考此处ubuntu16.04+openMVG+openMVS(三):实现自己数据的三维重建 - 灰信网(软件开发博客聚合),但是由于openmvg的版本问题,部分命令出现了报错的现象,本文纠正了这些错误。

首先在此处下载数据集https://github.com/openMVG/ImageDataset_SceauxCastle,依次执行如下指令

openMVG_main_SfMInit_ImageListing -i image -o output/matches -f 3399
openMVG_main_ComputeFeatures output/matches/sfm_data.json -o output/matches/
最后-o后面是个文件夹路径,如果缺少最后面的斜线/,就会出错
openMVG_main_ComputeMatches -i output/matches/sfm_data.json -o output/matches/matches.txt
此处-o是一个文件,以.txt结尾
openMVG_main_SfM -i output/matches/sfm_data.json -o output/out_Incremental_Reconstruction --match_file output/matches/matches.txt
此处不再是openMVG_main_IncrementalSfM命令,新版本改为openMVG_main_SfM,不然就会提示找不到命令,坑了我好久。最好不用-m,改用--match_file.
openMVG_main_ExportUndistortedImages -i output/matches/sfm_data.json  -o output/out_Incremental_Reconstruction/image
cd ~/Desktop/text/output/out_Incremental_Reconstruction 
openMVG_main_openMVG2openMVS -i sfm_data.bin -o scene.mvs

经过以上六步,openmvg就可以结束了。

容易出现的问题:openMVG_main_IncrementalSfM: command not found

ERROR: [main_SfM.cpp:409] Cannot load the match file

参考此处解决:ComputeMatches PairWiseMatches Error · Issue #1955 · openMVG/openMVG · GitHub

 二、OPENMVS

1、DensifyPointCloud 密集点云

将/home/cc/openMVS_build/bin文件夹及其子文件拷贝至一个新建文件夹内,再将undistortedimage文件夹和scene.mvs复制到新建文件夹的bin目录下,执行以下指令。

./DensifyPointCloud scene.mvs
./ReconstructMesh scene_dense.mvs
./RefineMesh scene_dense_mesh.mvs
./TextureMesh scene_dense_mesh_refine.mvs
./Viewer scene_dense_mesh_refine_texture.mvs

 

  • 3
    点赞
  • 47
    收藏
    觉得还不错? 一键收藏
  • 22
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值