Skip to content

Commit 56a1f79

Browse files
committed
Update dev documentation
1 parent 22e30f1 commit 56a1f79

37 files changed

Lines changed: 7246 additions & 4827 deletions

_sources/bibliography.rst.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ Bibliography
88
"Accurate, dense, and robust multiview stereopsis."
99
Transactions on Pattern Analysis and Machine Intelligence, 2010.
1010
11+
.. [garland1997] Garland, Michael, and Heckbert, Paul S.
12+
"Surface simplification using quadric error metrics."
13+
Proceedings of SIGGRAPH, 1997.
14+
1115
.. [hofer16] Hofer, M., Maurer, M., and Bischof, H.
1216
Efficient 3D Scene Abstraction Using Line Segments,
1317
Computer Vision and Image Understanding, 2016.
@@ -37,5 +41,9 @@ Bibliography
3741
.. [lowe04] Lowe, David G. "Distinctive image features from scale-invariant
3842
keypoints". International journal of computer vision 60.2 (2004): 91-110.
3943
44+
.. [waechter2014] Waechter, Michael and Moehrle, Nils and Goesele, Michael.
45+
"Let there be color! Large-scale texturing of 3D reconstructions."
46+
European Conference on Computer Vision, 2014.
47+
4048
.. [wu13] Wu, Changchang. "Towards linear-time incremental structure from
4149
motion." International Conference 3D Vision, 2013.

_sources/cli.rst.txt

Lines changed: 114 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ of commands as an alternative to the automatic reconstruction command::
4646
$ colmap exhaustive_matcher \
4747
--database_path $DATASET_PATH/database.db
4848

49-
$ mkdir $DATASET_PATH/sparse
49+
$ mkdir -p $DATASET_PATH/sparse
5050

5151
$ colmap mapper \
5252
--database_path $DATASET_PATH/database.db \
5353
--image_path $DATASET_PATH/images \
5454
--output_path $DATASET_PATH/sparse
5555

56-
$ mkdir $DATASET_PATH/dense
56+
$ mkdir -p $DATASET_PATH/dense
5757

5858
$ colmap image_undistorter \
5959
--image_path $DATASET_PATH/images \
@@ -81,6 +81,48 @@ of commands as an alternative to the automatic reconstruction command::
8181
--input_path $DATASET_PATH/dense \
8282
--output_path $DATASET_PATH/dense/meshed-delaunay.ply
8383

84+
# Optionally simplify a dense mesh to reduce its size.
85+
$ colmap mesh_simplifier \
86+
--input_path $DATASET_PATH/dense/meshed-poisson.ply \
87+
--output_path $DATASET_PATH/dense/meshed-poisson-simplified.ply \
88+
--MeshSimplification.target_face_ratio 0.25
89+
90+
# Optionally texture a mesh using the undistorted images.
91+
$ colmap mesh_texturer \
92+
--workspace_path $DATASET_PATH/dense \
93+
--input_path $DATASET_PATH/dense/meshed-poisson.ply \
94+
--output_path $DATASET_PATH/dense/textured
95+
96+
To use the global SfM pipeline instead of the incremental mapper, replace the
97+
``mapper`` step with ``global_mapper``. The global mapper depends on good focal
98+
length priors, so if reliable intrinsics are not available (e.g., from EXIF or
99+
lab calibration), you should run ``view_graph_calibrator`` first. This step is
100+
optional but recommended to improve the quality of global SfM, as was always
101+
the default in `GLOMAP <https://github.com/colmap/glomap>`_. Note that
102+
``view_graph_calibrator`` modifies camera intrinsics and two-view geometries
103+
in the database in-place, so it is recommended to work on a copy of the
104+
database::
105+
106+
$ colmap feature_extractor \
107+
--database_path $DATASET_PATH/database.db \
108+
--image_path $DATASET_PATH/images
109+
110+
$ colmap exhaustive_matcher \
111+
--database_path $DATASET_PATH/database.db
112+
113+
# Optional but often needed: calibrate intrinsics from the view graph.
114+
# This modifies the database in-place, so work on a copy.
115+
$ cp $DATASET_PATH/database.db $DATASET_PATH/database_global.db
116+
$ colmap view_graph_calibrator \
117+
--database_path $DATASET_PATH/database_global.db
118+
119+
$ mkdir -p $DATASET_PATH/sparse
120+
121+
$ colmap global_mapper \
122+
--database_path $DATASET_PATH/database_global.db \
123+
--image_path $DATASET_PATH/images \
124+
--output_path $DATASET_PATH/sparse
125+
84126
If you want to run COLMAP on a computer without an attached display (e.g.,
85127
cluster or cloud service), COLMAP automatically switches to use CUDA if
86128
supported by your system. If no CUDA enabled device is available, you can
@@ -124,6 +166,9 @@ The available commands can be listed using the command::
124166
exhaustive_matcher
125167
feature_extractor
126168
feature_importer
169+
geometric_verifier
170+
global_mapper
171+
guided_geometric_verifier
127172
hierarchical_mapper
128173
image_deleter
129174
image_filterer
@@ -133,8 +178,11 @@ The available commands can be listed using the command::
133178
image_undistorter_standalone
134179
mapper
135180
matches_importer
181+
mesh_simplifier
182+
mesh_texturer
136183
model_aligner
137184
model_analyzer
185+
model_clusterer
138186
model_comparer
139187
model_converter
140188
model_cropper
@@ -149,10 +197,12 @@ The available commands can be listed using the command::
149197
poisson_mesher
150198
project_generator
151199
rig_configurator
200+
rotation_averager
152201
sequential_matcher
153202
spatial_matcher
154203
stereo_fusion
155204
transitive_matcher
205+
view_graph_calibrator
156206
vocab_tree_builder
157207
vocab_tree_matcher
158208
vocab_tree_retriever
@@ -167,8 +217,12 @@ the available options, e.g.::
167217

168218
-h [ --help ]
169219
--default_random_seed arg (=0)
170-
--log_to_stderr arg (=1)
220+
--log_target arg (=stderr_and_file)
221+
{stderr, stdout, file, stderr_and_file}
222+
--log_path arg
171223
--log_level arg (=0)
224+
--log_severity arg (=0) 0:INFO, 1:WARNING, 2:ERROR, 3:FATAL
225+
--log_color arg (=1)
172226
--project_path arg
173227
--database_path arg
174228
--image_path arg
@@ -219,7 +273,12 @@ available as ``colmap [command]``:
219273
:ref:`Graphical User Interface <gui>` for more information.
220274

221275
- ``automatic_reconstructor``: Automatically reconstruct sparse and dense model
222-
for a set of input images.
276+
for a set of input images. Key options include ``--quality`` (LOW, MEDIUM,
277+
HIGH, EXTREME), ``--data_type`` (INDIVIDUAL, VIDEO, INTERNET) to tune settings
278+
for different capture scenarios, ``--feature`` (SIFT, ALIKED) to select the
279+
feature extraction algorithm, ``--mapper`` (INCREMENTAL, HIERARCHICAL, GLOBAL)
280+
to choose the SfM pipeline, and ``--mesher`` (POISSON, DELAUNAY) to select the
281+
surface reconstruction method.
223282

224283
- ``project_generator``: Generate project files at different quality settings.
225284

@@ -230,10 +289,27 @@ available as ``colmap [command]``:
230289
``spatial_matcher``, ``transitive_matcher``, ``matches_importer``:
231290
Perform feature matching after performing feature extraction.
232291

292+
- ``geometric_verifier``: Run standalone geometric verification on existing
293+
feature matches in the database. This estimates two-view geometries
294+
(fundamental/essential matrices, homographies) for matched image pairs.
295+
296+
- ``guided_geometric_verifier``: Run geometric verification guided by an
297+
existing sparse reconstruction. Uses the known relative camera poses to
298+
improve match verification results.
299+
233300
- ``mapper``: Sparse 3D reconstruction / mapping of the dataset using SfM after
234301
performing feature extraction and matching.
235302

236-
- ``pose_prior_mapper`` Sparse 3D reconstruction / mapping using pose priors.
303+
- ``global_mapper``: Sparse 3D reconstruction using the global SfM pipeline.
304+
Unlike the incremental ``mapper``, the global approach solves for all camera
305+
poses simultaneously using rotation averaging and global positioning. This
306+
can be faster for large datasets but may be less robust to outliers.
307+
The global mapper depends on reasonably good focal length priors to perform
308+
well. Run ``view_graph_calibrator`` before ``global_mapper`` to calibrate
309+
camera intrinsics and estimate relative poses from the view graph, or provide
310+
camera calibrations manually.
311+
312+
- ``pose_prior_mapper``: Sparse 3D reconstruction / mapping using pose priors.
237313

238314
- ``hierarchical_mapper``: Sparse 3D reconstruction / mapping of the dataset
239315
using hierarchical SfM after performing feature extraction and matching.
@@ -265,6 +341,19 @@ available as ``colmap [command]``:
265341
- ``delaunay_mesher``: Meshing of the reconstructed sparse or dense point cloud
266342
using a graph cut on the Delaunay triangulation and visibility voting.
267343

344+
- ``mesh_simplifier``: Simplify a triangle mesh (PLY format) using Quadric Error
345+
Metric (QEM) decimation. This reduces the number of faces in a mesh while
346+
preserving its overall shape and appearance. Key options include
347+
``--MeshSimplification.target_face_ratio`` to control the fraction of faces
348+
to retain (default 0.1), ``--MeshSimplification.max_error`` to set a maximum
349+
quadric error threshold (0 = disabled), and
350+
``--MeshSimplification.boundary_weight`` to control boundary edge preservation
351+
(default 1000). Supports multi-threaded initialization via
352+
``--MeshSimplification.num_threads``.
353+
354+
- ``mesh_texturer``: Produce a texture atlas and UV coordinates for a triangle
355+
mesh using calibrated multi-view images.
356+
268357
- ``image_registrator``: Register new images in the database against an existing
269358
model, e.g., when extracting features and matching newly added images in a
270359
database after running ``mapper``. Note that no bundle adjustment or
@@ -291,6 +380,10 @@ available as ``colmap [command]``:
291380

292381
- ``model_analyzer``: Print statistics about reconstructions.
293382

383+
- ``model_clusterer``: Split a reconstruction into smaller
384+
sub-model clusters. Useful for managing and processing large-scale
385+
reconstructions.
386+
294387
- ``model_aligner``: Align/geo-register model to coordinate system of given
295388
camera centers.
296389

@@ -328,6 +421,15 @@ available as ``colmap [command]``:
328421

329422
- ``vocab_tree_retriever``: Perform vocabulary tree based image retrieval.
330423

424+
- ``rotation_averager``: Run standalone rotation averaging on the view graph.
425+
Estimates global camera rotations from pairwise relative rotations.
426+
427+
- ``view_graph_calibrator``: Calibrate camera intrinsics using the view graph.
428+
Estimates focal lengths and other intrinsic parameters from pairwise
429+
geometric relations. Should be run before ``global_mapper``, if no good
430+
prior camera intrinsics are known, since the global mapper
431+
depends on reasonably good focal length priors to perform well.
432+
331433

332434
Visualization
333435
-------------
@@ -336,14 +438,17 @@ If you want to quickly visualize the outputs of the sparse or dense
336438
reconstruction pipelines, COLMAP offers you the following possibilities:
337439

338440
- The sparse point cloud obtained with the ``mapper`` can be visualized via the
339-
COLMAP GUI by importing the following files: choose ``File > Import Model``
340-
and select the folder where the three files, ``cameras.txt``, ``images.txt``,
341-
and ``points3d.txt`` are located.
441+
COLMAP GUI by importing the model files: choose ``File > Import Model``
442+
and select the folder containing the sparse model files (``cameras.txt``,
443+
``images.txt``, ``points3D.txt``, etc.).
342444

343445
- The dense point cloud obtained with the ``stereo_fusion`` can be visualized
344446
via the COLMAP GUI by importing ``fused.ply``: choose
345447
``File > Import Model from...`` and then select the file ``fused.ply``.
346448

347449
- The dense mesh model ``meshed-*.ply`` obtained with the ``poisson_mesher`` or
348450
the ``delaunay_mesher`` can currently not be visualized with COLMAP, instead
349-
you can use an external viewer, such as Meshlab.
451+
you can use an external viewer, such as Meshlab. Use the ``mesh_simplifier``
452+
command to reduce the mesh size for faster visualization or downstream
453+
processing. Use the ``mesh_texturer`` command to produce a textured mesh
454+
with a texture atlas that can be visualized in Meshlab or other 3D viewers.

_sources/database.rst.txt

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The database contains the following tables:
2020
- two_view_geometries
2121

2222
To initialize an empty SQLite database file with the required schema, you can
23-
either create a new project in the GUI or execute ``src/colmap/exe/database_create.cc``.
23+
either create a new project in the GUI or run the ``colmap database_creator`` command.
2424

2525

2626
Rigs and Sensors
@@ -70,12 +70,18 @@ keypoints have 4 columns, then the feature geometry is a similarity and the
7070
third column is the scale and the fourth column the orientation of the feature
7171
(according to SIFT conventions). If the keypoints have 6 columns, then the
7272
feature geometry is an affinity and the last 4 columns encode its affine shape
73-
(see ``src/feature/types.h`` for details).
73+
(see ``src/colmap/feature/types.h`` for details).
7474

75-
The extracted descriptors are stored as row-major ``uint8`` binary blobs, where
76-
each row describes the feature appearance of the corresponding entry in the
77-
keypoints table. Note that COLMAP only supports 128-D descriptors for now, i.e.
78-
the ``cols`` column must be 128.
75+
The extracted descriptors are stored as row-major binary blobs, where each row
76+
describes the feature appearance of the corresponding entry in the keypoints
77+
table. The data type and dimensionality depend on the feature extractor:
78+
79+
- **SIFT**: ``uint8`` descriptors with 128 dimensions (128 bytes per feature).
80+
- **ALIKED**: ``float32`` descriptors with 128 dimensions (512 bytes per feature).
81+
82+
The ``cols`` column in the descriptors table specifies the number of bytes per
83+
descriptor row. For ``uint8`` descriptors, this equals the descriptor dimension.
84+
For ``float32`` descriptors, this equals ``4 * dimension``.
7985

8086
In both tables, the ``rows`` table specifies the number of detected features per
8187
image, while ``rows=0`` means that an image has no features. For feature matching
@@ -121,4 +127,4 @@ the ``rows`` column specifies the number of feature matches.
121127

122128
The F, E, H blobs in the ``two_view_geometries`` table are stored as 3x3 matrices
123129
in row-major ``float64`` format. The meaning of the ``config`` values are documented
124-
in the ``src/estimators/two_view_geometry.h`` source file.
130+
in the ``src/colmap/estimators/two_view_geometry.h`` source file.

0 commit comments

Comments
 (0)