Project information

  • Category: Photogrammetry

Utilizing the power of COLMAP and OPENMVS, I created a 3d reconstruction pipeline that creates a 3d model of an object, using only video.

Unveiling the World in 3D: An Introduction to COLMAP and OpenMVS

Welcome to the captivating world of 3D reconstruction! 🌐📸

In today's digital landscape, the ability to transform a sequence of 2D images into a comprehensive 3D representation has become an awe-inspiring feat. Enter COLMAP and OpenMVS, two powerful open-source software tools that together unlock the doors to breathtaking 3D reconstruction.

Understanding COLMAP

COLMAP, a Structure-from-Motion (SfM) and Multi-View Stereo (MVS) pipeline, is a game-changer in the realm of image-based 3D reconstruction. Leveraging the information from images, it orchestrates the reconstruction process, unraveling intricate details and spatial relationships within a scene.

OpenMVS: Breathing Life into 3D

Enter OpenMVS, a companion to COLMAP, elevating the reconstruction process to new heights. Open Multi-View Stereo (OpenMVS) meticulously refines the generated 3D point cloud and delivers stunningly detailed 3D models. 🏞️🏰

Real-world Applications: Persad et al. Research Paper

Persad et al.'s groundbreaking research paper demonstrates the potency of COLMAP and OpenMVS in reconstructing whole muscle volume for high fideility human muscle dataset.

Tutorial (google colab code)

                    
        #@title Install COLMAP { vertical-output: true }

        %cd /content
        !sudo apt-get install colmap

        # @title Run COLMAP pipeline.
        # @markdown Computes SIFT features and saves them to the COLMAP DB.
        share_intrinsics = True
        colmap_rgb_dir = rgb_dir
        dataType= 'internet' #@param ['video','individual','internet']

        # @markdown Match the SIFT features between images. Use `exhaustive` if you only have a few images and use `vocab_tree` if you have a lot of images.

        match_method = 'exhaustive'  # @param ["exhaustive", "vocab_tree"]
        #@markdown Check this if you want to re-process SfM.
        overwrite = True  # @param {type: 'boolean'}
        workSpace=f'/content/{capture_name}/colmap'

        if overwrite and colmap_db_path.exists():
          colmap_db_path.unlink()
          modelout=colmap_out_path / '0'
          !rm -rf $modelout

        if match_method == 'exhaustive':
          !colmap automatic_reconstructor \
            --use_gpu 0 \
            --data_type "{str(dataType)}" \
            --single_camera 1 \
            --workspace_path "{str(workSpace)}" \
            --image_path "{str(colmap_rgb_dir)}" \
            --dense 0 \
            --quality extreme
        else:
          # Use this if you have lots of frames.
          vocab_path= colmap_dir / "vocab_tree_flickr100K_words32K.bin"
          if not vocab_path.exists():
            !wget https://demuc.de/colmap/vocab_tree_flickr100K_words32K.binm -P {colmap_dir}

          !colmap automatic_reconstructor \
            --use_gpu 0 \
            --data_type "{str(dataType)}" \
            --single_camera 1 \
            --workspace_path "{str(workSpace)}" \
            --image_path "{str(colmap_rgb_dir)}" \
            --dense 0 \
            --quality extreme \
            --vocab_tree_path "{str(vocab_path)}"


        # !colmap model_converter --input_path %currDir%\sparse\0 --output_path %currDir%\sparse --output_type txt
        !colmap model_converter --input_path /content/{capture_name}/colmap/sparse/0 --output_path /content/{capture_name}/colmap/model.nvm --output_type nvm

                    
                

Sources

  1. COLMAP - Structure-From-Motion and Multi-View Stereo
  2. Tutorial — COLMAP 3.9-dev documentation
  3. A curated list of papers & resources linked to 3D reconstruction from images - GitHub

This blog introduces the power of COLMAP and OpenMVS for 3D reconstruction, citing the research paper by Persad et al. as an application example (COLMAP Tutorial) (ResearchGate).