/colmap_sparse_recon

🏡 multi-view 3d recon using COLMAP

Primary LanguagePython

colmap_sparse_recon

Sturcture-from-Motion using COLMAP

  • input: unordered images
  • outputs: the pose estimates for registered images and the reconstructed scene structure as a set of points

How to use

  1. prepare data and build colmap

    • Download the original data provided by DTU or the preprocessed data by MVSNet (Yao et al.)
    • Build colmap (we use the version 3.6, the other versions should be OK)
    • modify the dataset_path, colmap_exe_path in colmap_sparse_recon.py or colmap_sparse_recon_posed.py
  2. sparse reconstruction using colmap

    • For DTU (images with known camera poses) python colmap_sparse_recon_posed.py. You can download the triangulated sparse point cloud for DTU via GoogleDrive or BaiduNetDisk, Fetch Code: 3puk

    • For Tanks and Temples training set python colmap_sparse_recon.py

    • the results of the sparse reconstruction cloud be represented as cameras.bin, images.bin and points3D.bin

  3. convert sparse points to sparse depth map

    • run python colmap_sparse_to_depth.py, the sparse depth map is saved as the pfm file
    • the resolution of the sparse depth map could be adjusted by modifying the new_w and new_h

Visualization

  1. Visualize the sparse points

    • Use COLMAP GUI --> File --> Import model --> Select the sparse folder which contains cameras, images and points3D files (.bin/.txt)
  2. Visualize the sparse depth map

    • python visualize_sparse.py xxx.pfm
RGB image structure-from-motion
sparse depth map colmap depth map

More about the sparse points generated by SfM

The research works which adopt the sparse points to boost the accuracy of multi-view geometric reconstruction:

Acknowledgement

The image set of SceauxCastle is provided by the author of OpenMVG.