Skip to content

Commit 96a9e86

Browse files
authored
Merge pull request #13 from colmap/shaohui/update-25-06-12
Update to the latest doc.
2 parents 32ea99c + db6eb97 commit 96a9e86

33 files changed

+4651
-1258
lines changed

_sources/cli.rst.txt

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,25 +117,38 @@ The available commands can be listed using the command::
117117
automatic_reconstructor
118118
bundle_adjuster
119119
color_extractor
120+
database_cleaner
120121
database_creator
122+
database_merger
121123
delaunay_mesher
122124
exhaustive_matcher
123125
feature_extractor
124126
feature_importer
127+
hierarchical_mapper
125128
image_deleter
129+
image_filterer
126130
image_rectifier
127131
image_registrator
128132
image_undistorter
133+
image_undistorter_standalone
129134
mapper
130135
matches_importer
131136
model_aligner
132137
model_analyzer
138+
model_comparer
133139
model_converter
140+
model_cropper
134141
model_merger
135142
model_orientation_aligner
143+
model_splitter
144+
model_transformer
136145
patch_match_stereo
146+
point_filtering
137147
point_triangulator
148+
pose_prior_mapper
138149
poisson_mesher
150+
project_generator
151+
rig_configurator
139152
rig_bundle_adjuster
140153
sequential_matcher
141154
spatial_matcher
@@ -209,6 +222,8 @@ available as ``colmap [command]``:
209222
- ``mapper``: Sparse 3D reconstruction / mapping of the dataset using SfM after
210223
performing feature extraction and matching.
211224

225+
- ``pose_prior_mapper`` Sparse 3D reconstruction / mapping using pose priors.
226+
212227
- ``hierarchical_mapper``: Sparse 3D reconstruction / mapping of the dataset
213228
using hierarchical SfM after performing feature extraction and matching.
214229
This parallelizes the reconstruction process by partitioning the scene into
@@ -254,6 +269,8 @@ available as ``colmap [command]``:
254269
e.g., when a refinement of the intrinsics is needed or
255270
after running the ``image_registrator``.
256271

272+
- ``database_cleaner``: Clean specific or all database tables.
273+
257274
- ``database_creator``: Create an empty COLMAP SQLite database with the
258275
necessary database schema information.
259276

@@ -269,21 +286,27 @@ available as ``colmap [command]``:
269286
- ``model_orientation_aligner``: Align the coordinate axis of a model using a
270287
Manhattan world assumption.
271288

289+
- ``model_comparer``: Compare statistics of two reconstructions.
290+
272291
- ``model_converter``: Convert the COLMAP export format to another format,
273292
such as PLY or NVM.
274293

275294
- ``model_cropper``: Crop model to specific bounding box described in GPS or
276295
model coordinate system.
277296

297+
- ``model_merger``: Attempt to merge two disconnected reconstructions,
298+
if they have common registered images.
299+
278300
- ``model_splitter``: Divide model in rectangular sub-models specified from
279301
file containing bounding box coordinates, or max extent of sub-model, or
280302
number of subdivisions in each dimension.
281303

282-
- ``model_merger``: Attempt to merge two disconnected reconstructions,
283-
if they have common registered images.
304+
- ``model_transformer``: Transform coordinate frame of a model.
284305

285306
- ``color_extractor``: Extract mean colors for all 3D points of a model.
286307

308+
- ``rig_configurator``: Configure rigs and frames after feature extraction.
309+
287310
- ``vocab_tree_builder``: Create a vocabulary tree from a database with
288311
extracted images. This is an offline procedure and can be run once, while the
289312
same vocabulary tree can be reused for other datasets. Note that, as a rule of

_sources/concepts.rst.txt

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
.. _concepts:
2+
3+
Key Concepts
4+
============
5+
6+
Starting from COLMAP 3.12, the concepts of rigs and frames have been introduced
7+
to enable a principled modeling of multi-sensor platforms as well as 360° panorama
8+
images. These concepts provide a structured framework to organize sensors and
9+
their measurements, enabling more flexible calibration and fusion of diverse
10+
data types (e.g., see :ref:`rig-support`).
11+
12+
These additions are backward-compatible and do not affect the traditional, default usage
13+
of COLMAP for single-camera capture setups.
14+
15+
16+
.. _sensors:
17+
18+
Sensors and Measurements
19+
------------------------
20+
21+
A **sensor** is a device that captures data about the environment, producing
22+
measurements at specific timestamps. The most common sensor type is the camera,
23+
which captures images as its measurements. Other examples include IMUs
24+
(Inertial Measurement Units), which record acceleration and angular velocity,
25+
and GNSS receivers, which provide absolute position data.
26+
27+
Currently, COLMAP supports only cameras and their image measurements, though the
28+
sensor concept is designed to extend to other types such as IMUs and GNSS for
29+
future support of multi-modal data fusion.
30+
31+
32+
.. _rigs:
33+
34+
Rigs
35+
----
36+
37+
A **rig** models a platform composed of multiple sensors with fixed relative poses,
38+
enabling synchronized and consistent multi-sensor data collection. Examples
39+
include stereo camera setups, headworn AR/VR devices, and autonomous driving
40+
sensor suites. It can also be virtual — for example, a rig modeling multiple
41+
virtual cameras arranged to capture overlapping views used to create seamless
42+
360° panoramic images.
43+
44+
In COLMAP, each sensor must be uniquely associated with exactly one rig. Each rig
45+
has a single reference sensor that defines its origin. For example, in a stereo
46+
camera rig, one camera is designated as the reference sensor with an identity
47+
`sensor_from_rig` pose, while the second camera’s pose is defined relative to
48+
this reference. In a single-camera setup, the camera itself serves as the sole
49+
reference sensor for its rig.
50+
51+
52+
.. _frames:
53+
54+
Frames
55+
------
56+
57+
A **frame** represents a rig captured at a single timestamp, containing measurements
58+
from one or more sensors within that rig. For example, if a rig consists of
59+
three sensors, a frame may include measurements from all three sensors, or only
60+
a subset, depending on availability. This concept allows association of multi-sensor
61+
data at specific points in time.
62+
63+
For instance, in a stereo camera rig recording video, each frame corresponds to a
64+
set of two images—one from each camera—captured at the same moment.
65+
66+

_sources/database.rst.txt

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ Database Format
55

66
COLMAP stores all extracted information in a single SQLite database file. The
77
database can be accessed with the database management toolkit in the COLMAP GUI,
8-
the provided C++ database API (see ``src/colmap/scene/database.h``), or with a scripting
9-
language of your choice (see ``scripts/python/database.py``).
8+
the provided C++ database API (see ``src/colmap/scene/database.h``), or using
9+
Python with pycolmap.
1010

1111
The database contains the following tables:
1212

13+
- rigs
1314
- cameras
15+
- frames
1416
- images
1517
- keypoints
1618
- descriptors
@@ -20,6 +22,22 @@ The database contains the following tables:
2022
To initialize an empty SQLite database file with the required schema, you can
2123
either create a new project in the GUI or execute `src/colmap/exe/database_create.cc`.
2224

25+
26+
Rigs and Sensors
27+
----------------
28+
29+
The relation between rigs and sensors (cameras, etc.) is 1-to-N with one sensor
30+
being chosen as the reference sensor to define the origin of the rig. Each sensor
31+
must only be part of one rig.
32+
33+
34+
Rigs and Frames
35+
---------------
36+
37+
The relation between rigs and frames is 1-to-N, where a frame defines a specific
38+
instance of the rig with all or a subset of sensors exposed at the same time.
39+
40+
2341
Cameras and Images
2442
------------------
2543

@@ -68,8 +86,8 @@ only X and Y must be provided and the other keypoint columns can be set to zero.
6886
The rest of the reconstruction pipeline only uses the keypoint locations.
6987

7088

71-
Matches
72-
-------
89+
Matches and two-view geometries
90+
-------------------------------
7391

7492
Feature matching stores its output in the `matches` table and geometric
7593
verification in the `two_view_geometries` table. COLMAP only uses the data in

_sources/faq.rst.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,6 @@ new images within this reconstruction, you can follow these steps::
290290

291291
colmap vocab_tree_matcher \
292292
--database_path $PROJECT_PATH/database.db \
293-
--VocabTreeMatching.vocab_tree_path /path/to/vocab-tree.bin \
294293
--VocabTreeMatching.match_list_path /path/to/image-list.txt
295294

296295
colmap image_registrator \

_sources/format.rst.txt

Lines changed: 51 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ Binary File Format
99

1010
Note that all binary data is stored using little endian byte ordering. All x86
1111
processors are little endian and thus no special care has to be taken when
12-
reading COLMAP binary data on most platforms.
12+
reading COLMAP binary data on most platforms. The data can be most conveniently
13+
parsed using the C++ reconstruction API under `src/colmap/scene/reconstruction_io.h`
14+
or using the Python API provided by pycolmap.
1315

1416

1517
=======================
@@ -34,11 +36,19 @@ Sparse Reconstruction
3436
By default, COLMAP uses a binary file format (machine-readable, fast) for
3537
storing sparse models. In addition, COLMAP provides the option to store the
3638
sparse models as text files (human-readable, slow). In both cases, the
37-
information is split into three files for the information about `cameras`,
38-
`images`, and `points`. Any directory containing those three files constitutes a
39-
sparse model. The binary files have the file extension `.bin` and the text files
40-
the file extension `.txt`. Note that when loading a model from a directory which
41-
contains both binary and text files, COLMAP prefers the binary format.
39+
information is split into multiples files for the information about `rigs`,
40+
`cameras`, `frames`, `images`, and `points`. Any directory containing these
41+
files constitutes a sparse model. The binary files have the file extension
42+
`.bin` and the text files the file extension `.txt`. Note that when loading a
43+
model from a directory which contains both binary and text files, COLMAP prefers
44+
the binary format.
45+
46+
Note that older versions of COLMAP had no rig support and thus the `rigs` and
47+
`frames` files may be missing. The reconstruction I/O routines in COLMAP are
48+
fully backwards compatible in that models without these files can be read and
49+
trivial rigs and frames will be automatically initialized. Furthermore, newer
50+
output reconstructions' `cameras` and `images` files are fully compatible with
51+
old outputs.
4252

4353
To export the currently selected model in the GUI, choose ``File > Export
4454
model``. To export all reconstructed models in the current dataset, choose
@@ -66,9 +76,25 @@ Text Format
6676
-----------
6777

6878
COLMAP exports the following three text files for every reconstructed model:
69-
`cameras.txt`, `images.txt`, and `points3D.txt`. Comments start with a leading
70-
"#" character and are ignored. The first comment lines briefly describe the
71-
format of the text files, as described in more detailed on this page.
79+
`rigs.txt`, `cameras.txt`, `frames.txt`, `images.txt`, and `points3D.txt`.
80+
Comments start with a leading "#" character and are ignored. The first comment
81+
lines briefly describe the format of the text files, as described in more
82+
detailed on this page.
83+
84+
85+
rigs.txt
86+
-----------
87+
88+
This file contains the configured rigs and sensors, e.g.::
89+
90+
# Rig calib list with one line of data per calib:
91+
# RIG_ID, NUM_SENSORS, REF_SENSOR_TYPE, REF_SENSOR_ID, SENSORS[] as (SENSOR_TYPE, SENSOR_ID, HAS_POSE, [QW, QX, QY, QZ, TX, TY, TZ])
92+
# Number of rigs: 1
93+
1 2 CAMERA 1 CAMERA 2 1 -0.9999701516465348 -0.0011120266840749639 -0.0075347911527510894 0.0012985125893421306 -0.19316906391350164 0.00085222218993398979 0.0070758955539026785
94+
2 1 CAMERA 3
95+
96+
Here, the dataset contains two rigs: the first rig has two cameras and the second
97+
one has 1 camera.
7298

7399

74100
cameras.txt
@@ -93,6 +119,22 @@ camera can be shared by multiple images, which refer to cameras using the unique
93119
identifier `CAMERA_ID`.
94120

95121

122+
frames.txt
123+
----------
124+
125+
This file contains the frames, where a frame defines a specific
126+
instance of a rig with all or a subset of sensors exposed at the same time, e.g.::
127+
128+
# Frame list with one line of data per frame:
129+
# FRAME_ID, RIG_ID, RIG_FROM_WORLD[QW, QX, QY, QZ, TX, TY, TZ], NUM_DATA_IDS, DATA_IDS[] as (SENSOR_TYPE, SENSOR_ID, DATA_ID)
130+
# Number of frames: 151
131+
1 1 0.99801363919752195 0.040985139360073107 0.041890917712361225 -0.023111584553400576 -5.2666546897987896 -0.17120007823690631 0.12300519697527648 2 CAMERA 1 1 CAMERA 2 2
132+
2 2 0.99816472047267968 0.037605501383281774 0.043101511724657163 -0.019881568259519072 -5.1956060695789192 -0.20794508616745555 0.14967533910764824 1 CAMERA 3 3
133+
134+
Here, the dataset contains two frames, where frame 1 is an instance of rig 1 and
135+
frame 2 an instance of rig 2.
136+
137+
96138
images.txt
97139
----------
98140

_sources/index.rst.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,10 @@ support (special credits to `Torsten Sattler <https://tsattler.github.io>`_).
105105

106106
install
107107
tutorial
108+
concepts
108109
database
109110
cameras
111+
rigs
110112
format
111113
datasets
112114
gui

_sources/install.rst.txt

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ are not officially signed. The provided COLMAP binaries are automatically built
4141
from GitHub Actions CI machines. If you do not trust them, you can build from
4242
source as described below.
4343

44+
Docker
45+
------
46+
47+
COLMAP provides a pre-built Docker image with CUDA support. For detailed
48+
instructions on how to build and run COLMAP using Docker, please refer to the
49+
`Docker documentation <https://github.com/colmap/colmap/tree/main/docker>`__.
4450

4551
-----------------
4652
Build from Source
@@ -75,7 +81,6 @@ Dependencies from the default Ubuntu repositories::
7581
libboost-graph-dev \
7682
libboost-system-dev \
7783
libeigen3-dev \
78-
libflann-dev \
7984
libfreeimage-dev \
8085
libmetis-dev \
8186
libgoogle-glog-dev \
@@ -86,7 +91,12 @@ Dependencies from the default Ubuntu repositories::
8691
qtbase5-dev \
8792
libqt5opengl5-dev \
8893
libcgal-dev \
89-
libceres-dev
94+
libceres-dev \
95+
libcurl4-openssl-dev \
96+
libopenblas-openmp-dev
97+
98+
Notice that compiling against OpenBLAS requires the OpenMP version
99+
under Debian/Ubuntu because of `this issue <https://github.com/facebookresearch/faiss/wiki/Troubleshooting#surprising-faiss-openmp-and-openblas-interaction>`__.
90100

91101
To compile with **CUDA support**, also install Ubuntu's default CUDA package::
92102

@@ -138,8 +148,9 @@ Dependencies from `Homebrew <http://brew.sh/>`__::
138148
ninja \
139149
boost \
140150
eigen \
141-
flann \
142151
freeimage \
152+
curl \
153+
libomp \
143154
metis \
144155
glog \
145156
googletest \
@@ -148,14 +159,17 @@ Dependencies from `Homebrew <http://brew.sh/>`__::
148159
glew \
149160
cgal \
150161
sqlite3
162+
brew link --force libomp
151163

152164
Configure and compile COLMAP::
153165

154166
git clone https://github.com/colmap/colmap.git
155167
cd colmap
156168
mkdir build
157169
cd build
158-
cmake .. -GNinja -DCMAKE_PREFIX_PATH="$(brew --prefix qt@5)"
170+
cmake .. \
171+
-GNinja \
172+
-DQt5_DIR="$(brew --prefix qt@5)/lib/cmake/Qt5"
159173
ninja
160174
sudo ninja install
161175

@@ -268,7 +282,7 @@ with the source code ``hello_world.cc``::
268282
options.AddRequiredOption("message", &message);
269283
options.Parse(argc, argv);
270284

271-
std::cout << colmap::StringPrintf("Hello %s!", message.c_str()) << std::endl;
285+
std::cout << colmap::StringPrintf("Hello %s!\n", message.c_str());
272286

273287
return EXIT_SUCCESS;
274288
}

_sources/license.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dependencies may affect the resulting COLMAP license.
88

99
.. code-block:: text
1010
11-
Copyright (c) 2023, ETH Zurich and UNC Chapel Hill.
11+
Copyright (c), ETH Zurich and UNC Chapel Hill.
1212
All rights reserved.
1313
1414
Redistribution and use in source and binary forms, with or without

0 commit comments

Comments
 (0)