COLMAP Tutorial: From Images to Accurate 3D Models
3D reconstruction is one of the critical approaches employed in photogrammetry, computer vision, robotics, and geospatial information system data processing. It makes it possible to reconstruct the shape of actual objects and scenes using a set of overlapping 2D images. COLMAP is an open-source structure-from-motion (SfM) and multi-view stereo (MVS) pipeline software for reconstruction of 3D models, camera pose, and dense point cloud from multiple images.
COLMAP software is used extensively in archaeology, documentation of cultural heritage, architectural modeling, aerial mapping using drones, scientific research, and computer vision applications.

What is COLMAP?
COLMAP is an open-source photogrammetry and computer vision software for reconstructing 3D structures from sets of images. It has both a graphical user interface (GUI) and a command-line interface (CLI). Thus, users can use the tool in interactive mode or include it in automated workflows.
COLMAP uses the following two techniques primarily:
Structure-from-Motion (SfM): This technique uses correspondences between features in multiple images to estimate cameras' positions and orientations as well as to reconstruct the sparse 3D structure of the scene.
Multi-View Stereo (MVS): With the help of camera parameters estimated with the SfM technique and multiple overlapping images, a denser reconstruction is computed.
The outputs of the process include camera calibration, camera poses, sparse point clouds, dense point clouds, depth maps, and 3D reconstruction itself.
Features of COLMAP
Several features are supported by COLMAP for performing 3D reconstruction based on images.
Feature Detection and Matching
COLMAP finds distinctive features in images and matches them from the overlapping images to provide correspondences among the cameras.
Camera Calibration and Pose Estimation
CAMERA calibration is performed by COLMAP, where camera parameters, such as intrinsic camera parameters including focal lengths and distortion model parameters) and pose (extrinsic) camera parameters are estimated. Predefined calibration parameters can also be used when applicable.
Sparse 3D Reconstruction
Sparse 3D reconstruction is done during the SfM process, where COLMAP constructs a 3D point cloud by triangulating corresponding features from the images.
Dense Point Cloud Creation
By using the Multi-View Stereo technique, COLMAP determines depths for areas in images and fuses all these depths to create dense point clouds.
Graphical Interface and Command Line Interface
GUI is used for interactive 3D reconstruction, while the CLI helps with a repeatable workflow and integration with other external programs for image processing.
Export/Import
Reconstructed point clouds and camera models can be exported and imported from/to various file formats.
Step-by-Step COLMAP Tutorial
Step 1: COLMAP Installation
Get a copy of COLMAP software from its official website or from the release page on GitHub. Choose a version compatible with your operating system.
Official sources:
Website: https://colmap.github.io/
Source code: https://github.com/colmap/colmap
Complete the installation procedure according to your operating system instructions. If you use the GPU-enabled version, make sure the necessary drivers are installed.
Upon completion, start the COLMAP GUI.
Step 2: Arrange the Image Dataset
Organize the image dataset in a project folder as follows:
colmap_project/
├── images/
│ ├── image_001.jpg
│ ├── image_002.jpg
│ ├── image_003.jpg
│ └── image_004.jpg
└── database.db
Images are saved in the images folder, while the database db file contains the metadata about images, the extracted features, and the matching data.
In the COLMAP GUI, create a new project and specify the database and images folders.
Step 3: Feature Extraction from Images
This process detects distinctive features and computes their descriptors that describe local appearances. This helps COLMAP identify the same locations in the various images.
In the user interface, select the feature extraction process, set the camera model, and feature extraction parameters.
When the images have been taken using the same camera and settings, the proper shared camera settings might be beneficial. The right setting will depend on whether the images were taken with the same physical camera, focal length, and image size.
COLMAP will store these features in the project database.
Step 4: Matching Features Between Images
Matching of features determines the correspondence between keypoints of photographs. Such correspondences are necessary in establishing camera relationships and reconstructing scene geometry.
COLMAP has several methods of matching that include:
Exhaustive matching: Matches all image pairs. This is helpful in smaller and unordered datasets.
Sequential matching: Prioritizes images that are close in the ordered dataset. Suitable for most video datasets or sequentially acquired images.
Spatial matching: Uses spatial relations to find potential pairs in the image when the location is known.
Vocabulary tree matching: Uses the method of image retrieval to find potential pairs in large datasets.
Select a matching algorithm based on dataset properties and acquisition method. The post-matching process involves checking whether there are enough correspondences to establish a connection between the photographs.
Step 5: Structure from Motion Reconstruction
In this step, estimation of camera poses and a sparse 3D point cloud is performed.
An incremental mapping approach is typically applied in COLMAP for image registration. Estimation of camera parameters, triangulation of corresponding points, and reconstruction optimization using bundle adjustment take place in this step.
Bundle adjustment optimizes the parameters of cameras and 3D points' positions in order to minimize the reprojection error.
The obtained sparse model consists of the following elements:
Camera poses
Camera calibration parameters
Sparse 3D points
Feature correspondences
View the sparse reconstruction in the COLMAP viewer. A successful reconstruction normally has a well-connected camera network, reasonable geometry, and not many misregistered images.
Some images may not register due to image overlap, texture, feature correspondence, and camera setup.
Step 6: Creation of Dense Point Cloud
Now that you have a good sparse reconstruction model, move on to dense reconstruction.
COLMAP uses the computed poses and intrinsic parameters to calculate the depths from different views and combines the computed depths into a dense point cloud.
In the GUI interface, click on the dense reconstruction process. It usually consists of three steps: image undistortion, stereo matching, and stereo fusion, depending on the COLMAP version.
Computationally, dense reconstruction is more intensive than sparse reconstruction. It depends on the image resolution, number of images, and scene complexity.
The result is a dense point cloud of the reconstructed scene.
Step 7: Construct a Mesh or Texture 3D Model
A point cloud is a description of a scene in terms of a set of 3D points. To produce a continuous surface for some application, a conversion of the point cloud to a polygon mesh may be carried out by means of the appropriate meshing tool.
COLMAP is designed to perform SfM and MVS tasks, with its basic reconstruction pipeline revolving around these. Other tools may be used for surface reconstruction, mesh cleaning, generation of textures, and visualization, depending on the desired output.
Some common post-processing actions may include:
Isolation of stray points and reconstruction artefacts
Outlier filtering
Surface reconstruction from the dense point cloud
Texture map generation or refinement
Mesh simplification for visualization
Output of the processed model into the proper format
This will depend on whether one needs an architectural model, a digital model, a terrain, or visualization materials.
Step 8: Export and Validate the Results
Export the reconstruction in a format usable in the target application. COLMAP supports its own formats for reconstructions, and point clouds can be exported or converted to other formats using utilities.
Some common downstream formats and applications include:
PLY: Point clouds and polygon meshes.
LAS/LAZ: Geospatial point cloud formats that need to be converted from the raw reconstruction.
OBJ: Polygon mesh and accompanying texture data.
GeoTIFF: Georeferenced raster products generated via a separate process chain.
Validate your model before use in measurements and analyses. Look for any missing surfaces, discrepancies in geometry, noisy point clouds, and poor image registration.
The COLMAP system is a highly versatile and free software suite that allows the user to reconstruct a 3D scene from images that overlap. It integrates Structure from Motion, camera pose estimation, bundle adjustment, and Multi-View Stereo to facilitate the creation of sparse and dense 3D reconstructions from photo sets.
Through the process of creating quality images, proper choice of matching techniques, checking the quality of the reconstruction, as well as validating the reconstruction geometry, the user can create reliable 3D reconstructions for use in computer vision and photogrammetry.
Nonetheless, the quality of the reconstruction will depend on factors such as the image set, camera settings, as well as whether there is reliable reference measurement data available.
To learn more about COLMAP and its geospatial capabilities, click here.
For more information or any questions regarding the LizardTech suite of products, please don't hesitate to contact us at:
Email: info@geowgs84.com
USA (HQ): (720) 702–4849
(A GeoWGS84 Corp Company)




Comments