Estimate Camera Parameters and Sparse Point Cloud with COLMAP
COLMAP processes the input images to estimate camera intrinsics and extrinsics. It also generates a sparse point cloud, which serves as the geometric foundation for training a 3D Gaussian Splatting model.
In this tutorial, COLMAP is run directly from the command line to provide full control over feature extraction, matching, and triangulation. This approach allows you to inspect intermediate results and troubleshoot issues more easily.
Why not use the default Nerfstudio pipeline?
The Nerfstudio CLI includes a wrapper for COLMAP through ns-process-data
, but it uses default parameters defined in the pipeline’s codebase. These defaults work in many cases but often fail on real-world scenes that require parameter tuning.
For example, when the sample dataset was processed using the default wrapper, COLMAP registered only 2 images out of 84:
Starting with 84 images
Colmap matched 2 images
COLMAP only found poses for 2.38% of the images. This is low.
This can be caused by a variety of reasons, such as poor scene coverage,
blurry images, or large exposure changes.
Nerfstudio recommends increasing image overlap or improving capture quality. While these are valid suggestions, in many cases you can still get usable results by adjusting COLMAP parameters directly.
The following sections walk through the exact command-line steps used to produce a successful reconstruction for this dataset.
COLMAP operations
The COLMAP workflow includes three major stages:
- Feature extraction: Detects distinctive visual features (such as SIFT keypoints) in each image.
- Feature matching: Finds reliable correspondences between features across image pairs.
- Sparse 3D reconstruction: Estimates camera intrinsics and extrinsics and generates a sparse point cloud of the scene.
Although these operations can be performed using the COLMAP GUI, the command-line interface is preferred in this tutorial for two reasons:
- It enables fine-tuned parameter control for each stage.
- It supports automation for processing multiple datasets.
Data folder structure
Below is an example of the dataset structure expected by COLMAP and gsplat:
<dataset_root>/
├── images/
│ ├── image_0001.jpg
│ ├── image_0002.jpg
│ └── ...
├── images_2/
│ ├── image_0001.jpg
│ └── ...
├── images_4/
│ ├── image_0001.jpg
│ └── ...
├── sparse/ # COLMAP sparse reconstruction outputs
│ └── 0/ # Default subfolder for the reconstructed scene
│ ├── cameras.bin
│ ├── images.bin
│ ├── points3D.bin
│ └── project.ini
└── colmap.db # COLMAP-generated database
Notes
- Filenames such as
image_0001.jpg
are for illustration only. Consistent and sequential names are recommended for clarity, but there are no strict naming requirements. images_2
andimages_4
contain 2× and 4× downsampled versions of the original images. These are used with--data_factor 2
or--data_factor 4
during training. Additional folders (such asimages_8/
) can be added as needed.sparse/0/
contains the output from COLMAP’s sparse reconstruction. If COLMAP produces more than one disconnected model from the input images, it creates additional subfolders such assparse/1
,sparse/2
, and so on.colmap.db
is the database generated during feature extraction and matching. It stores keypoints, matches, and camera intrinsics.
A sample dataset that follows this structure is included in the repository: datasets/plush-dog. It can be used for testing or as a reference when preparing your own scenes.
© 2025 SmartDataScan.
This section is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.