需要指定相机焦距-f,大致可以由图像长乘以1.2估计得到,例如图像长宽为1280×720,则焦距估计为1280×1.2=1536。(或者可以点击图像属性看,一般自己拍的能显示焦距,网图的话可能就没有这个信息)
openMVG_main_SfMInit_ImageListing -i /home/zll/restruct/picture -o /home/zll/restruct/match -f 4800 openMVG_main_ComputeFeatures -i /home/zll/restruct/match/sfm_data.json -o /home/zll/restruct/match -m SIFT openMVG_main_PairGenerator -i /home/zll/restruct/match/sfm_data.json -o /home/zll/restruct/match/pairs.bin openMVG_main_ComputeMatches -i /home/zll/restruct/match/sfm_data.json -p /home/zll/restruct/match/pairs.bin -o /home/zll/restruct/match/matches.putatives.bin openMVG_main_GeometricFilter -i /home/zll/restruct/match/sfm_data.json -m /home/zll/restruct/match/matches.putatives.bin -o /home/zll/restruct/match/matches.f.bin openMVG_main_SfM --sfm_engine INCREMENTAL --input_file /home/zll/restruct/match/sfm_data.json --match_dir /home/zll/restruct/match --output_dir /home/zll/restruct/reconstruction openMVG_main_ComputeSfM_DataColor -i /home/zll/restruct/reconstruction/sfm_data.bin -o /home/zll/restruct/reconstruction/colorized.ply
openMVS可以很好地与openMVG对接,其主要的作用是进行稠密点云重建、网格重建与纹理映射。-d 4与–resolution-level=4的作用是为了简化运算,减小了重建的网格数量与精细程度
openMVG_main_openMVG2openMVS -i /home/zll/restruct/reconstruction/sfm_data.bin -o /home/zll/restruct/mvs/scene.mvs -d /home/zll/restruct/picture /usr/local/bin/OpenMVS/DensifyPointCloud scene.mvs --dense-config-file Densifu.ini --resolution-level 1 --number-views 7 -w /home/zll/restruct/mvs /usr/local/bin/OpenMVS/ReconstructMesh scene_dense.mvs -w /home/zll/restruct/mvs /usr/local/bin/OpenMVS/RefineMesh --resolution-level=4 scene_dense_mesh.mvs -w /home/zll/restruct/mvs /usr/local/bin/OpenMVS/TextureMesh scene_dense_mesh_refine.mvs --decimate 0.5 -w /home/zll/restruct/mvs
/usr/local/bin/OpenMVS/Viewer /home/zll/restruct/mvs/scene_dense_mesh_refine_texture.mvs
效果:
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/271761.html