新建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
参考: