C/C++教程

已知数据集位姿,直接Colmap稠密重建

本文主要是介绍已知数据集位姿,直接Colmap稠密重建,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

新建colmap项目:Pipe,将数据集的真实位姿复制到/home/xzx/code/colmap/Pipe/created/sparse
在这里插入图片描述
不进行稀疏重建,直接执行MVS步骤生成深度图。

稀疏重建(三角剖分)对于稠密重建并不是必须的。在已知相机Pose的情况下可以直接进行稠密重建,首先在 Pipe目录下运行命令:
在这里插入图片描述
在这里插入图片描述

colmap image_undistorter --image_path images --input_path created/sparse --output_path dense
xzx@xzx-legion-ren7000p:~/code/colmap/Pipe$ colmap image_undistorter --image_path images --input_path created/sparse --output_path dense

==============================================================================
Reading reconstruction
==============================================================================

 => Reconstruction with 14 images and 2473 points

==============================================================================
Image undistortion
==============================================================================

Undistorted image found; copying to location: dense/images/dslr_images_undistorted/DSC_0647.JPG
Undistorted image found; copying to location: dense/images/dslr_images_undistorted/DSC_0646.JPG
Undistorted image found; copying to location: Undistorted image found; copying to location: dense/images/dslr_images_undistorted/DSC_0643.JPGdense/images/dslr_images_undistorted/DSC_0644.JPG
Undistorted image found; copying to location: dense/images/dslr_images_undistorted/DSC_0638.JPG
Undistorted image found; copying to location: dense/images/dslr_images_undistorted/DSC_0636.JPG
Undistorting image [1/14]
Undistorted image found; copying to location: Undistorted image found; copying to location: dense/images/dslr_images_undistorted/DSC_0641.JPG
Undistorted image found; copying to location: dense/images/dslr_images_undistorted/DSC_0639.JPG

Undistorted image found; copying to location: dense/images/dslr_images_undistorted/DSC_0635.JPG
Undistorted image found; copying to location: dense/images/dslr_images_undistorted/DSC_0634.JPG
dense/images/dslr_images_undistorted/DSC_0642.JPG
Undistorted image found; copying to location: dense/images/dslr_images_undistorted/DSC_0645.JPG
Undistorted image found; copying to location: dense/images/dslr_images_undistorted/DSC_0640.JPG
Undistorted image found; copying to location: dense/images/dslr_images_undistorted/DSC_0637.JPG
Undistorting image [2/14]
Undistorting image [3/14]
Undistorting image [4/14]
Undistorting image [5/14]
Undistorting image [6/14]
Undistorting image [7/14]
Undistorting image [8/14]
Undistorting image [9/14]
Undistorting image [10/14]
Undistorting image [11/14]
Undistorting image [12/14]
Undistorting image [13/14]
Undistorting image [14/14]
Writing reconstruction...
Writing configuration...
Writing scripts...
Elapsed time: 0.000 [minutes]

我们需要指定最小深度 depth_min 和最大深度 depth_max 来执行mvs,具体数值根据场景来定:

colmap patch_match_stereo --workspace_path dense --PatchMatchStereo.depth_min 0.0 --PatchMatchStereo.depth_max 20.0

在这里插入图片描述
参考:

  1. COLMAP已知相机内外参数重建稀疏/稠密模型 http://www.mamicode.com/info-detail-2838274.html
这篇关于已知数据集位姿,直接Colmap稠密重建的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!