Skip to content

Commit cca5268

Browse files
authored
Upload 3.12 legacy + update doc (#17)
1 parent 718dd6a commit cca5268

File tree

121 files changed

+27819
-317
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+27819
-317
lines changed

_sources/cameras.rst.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,29 @@ COLMAP implements different camera models of varying complexity. If no intrinsic
55
parameters are known a priori, it is generally best to use the simplest camera
66
model that is complex enough to model the distortion effects:
77

8-
- `SIMPLE_PINHOLE`, `PINHOLE`: Use these camera models, if your images are
8+
- ``SIMPLE_PINHOLE``, ``PINHOLE``: Use these camera models, if your images are
99
undistorted a priori. These use one and two focal length parameters,
1010
respectively. Note that even in the case of undistorted images, COLMAP could
1111
try to improve the intrinsics with a more complex camera model.
12-
- `SIMPLE_RADIAL`, `RADIAL`: This should be the camera model of choice, if the
12+
- ``SIMPLE_RADIAL``, ``RADIAL``: This should be the camera model of choice, if the
1313
intrinsics are unknown and every image has a different camera calibration,
1414
e.g., in the case of Internet photos. Both models are simplified versions of
15-
the `OPENCV` model only modeling radial distortion effects with one and two
15+
the ``OPENCV`` model only modeling radial distortion effects with one and two
1616
parameters, respectively.
17-
- `OPENCV`, `FULL_OPENCV`: Use these camera models, if you know the calibration
17+
- ``OPENCV``, ``FULL_OPENCV``: Use these camera models, if you know the calibration
1818
parameters a priori. You can also try to let COLMAP estimate the parameters,
1919
if you share the intrinsics for multiple images. Note that the automatic
2020
estimation of parameters will most likely fail, if every image has a separate
2121
set of intrinsic parameters.
22-
- `SIMPLE_RADIAL_FISHEYE`, `RADIAL_FISHEYE`, `OPENCV_FISHEYE`, `FOV`,
23-
`THIN_PRISM_FISHEYE`, `RAD_TAN_THIN_PRISM_FISHEYE`: Use these camera models
22+
- ``SIMPLE_RADIAL_FISHEYE``, ``RADIAL_FISHEYE``, ``OPENCV_FISHEYE``, ``FOV``,
23+
``THIN_PRISM_FISHEYE``, ``RAD_TAN_THIN_PRISM_FISHEYE``: Use these camera models
2424
for fisheye lenses and note that all other models are not really capable of
25-
modeling the distortion effects of fisheye lenses. The `FOV` model is used by
26-
Google Project Tango (make sure to not initialize `omega` to zero).
25+
modeling the distortion effects of fisheye lenses. The ``FOV`` model is used by
26+
Google Project Tango (make sure to not initialize ``omega`` to zero).
2727

2828
You can inspect the estimated intrinsic parameters by double-clicking specific
2929
images in the model viewer or by exporting the model and opening the
30-
`cameras.txt` file.
30+
``cameras.txt`` file.
3131

3232
To achieve optimal reconstruction results, you might have to try different
3333
camera models for your problem. Generally, when the reconstruction fails and the

_sources/cli.rst.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ the available options, e.g.::
164164
$ colmap feature_extractor -h
165165

166166
Options can either be specified via command-line or by defining
167-
them in a .ini project file passed to `--project_path`.
167+
them in a .ini project file passed to ``--project_path``.
168168

169169
-h [ --help ]
170170
--project_path arg
@@ -195,7 +195,7 @@ the available options, e.g.::
195195

196196

197197
The available options can either be provided directly from the command-line or
198-
through a `.ini` file provided to ``--project_path``.
198+
through a ``.ini`` file provided to ``--project_path``.
199199

200200

201201
Commands

_sources/concepts.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ virtual cameras arranged to capture overlapping views used to create seamless
4444
In COLMAP, each sensor must be uniquely associated with exactly one rig. Each rig
4545
has a single reference sensor that defines its origin. For example, in a stereo
4646
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
47+
``sensor_from_rig`` pose, while the second camera’s pose is defined relative to
4848
this reference. In a single-camera setup, the camera itself serves as the sole
4949
reference sensor for its rig.
5050

_sources/database.rst.txt

Lines changed: 23 additions & 23 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 execute ``src/colmap/exe/database_create.cc``.
2424

2525

2626
Rigs and Sensors
@@ -47,7 +47,7 @@ intrinsic parameters (focal length, principal point, distortion, etc.), while
4747
every image has separate extrinsic parameters (orientation and location).
4848

4949
The intrinsic parameters of cameras are stored as contiguous binary blobs in
50-
`float64`, ordered as specified in ``src/colmap/sensor/models.h``. COLMAP only
50+
``float64``, ordered as specified in ``src/colmap/sensor/models.h``. COLMAP only
5151
uses cameras that are referenced by images, all other cameras are ignored.
5252

5353
The ``name`` column in the images table is the unique relative path in the image
@@ -62,23 +62,23 @@ and ``camera_id > 0``.
6262
Keypoints and Descriptors
6363
-------------------------
6464

65-
The detected keypoints are stored as row-major `float32` binary blobs, where the
65+
The detected keypoints are stored as row-major ``float32`` binary blobs, where the
6666
first two columns are the X and Y locations in the image, respectively. COLMAP
67-
uses the convention that the upper left image corner has coordinate `(0, 0)` and
68-
the center of the upper left most pixel has coordinate `(0.5, 0.5)`. If the
67+
uses the convention that the upper left image corner has coordinate ``(0, 0)`` and
68+
the center of the upper left most pixel has coordinate ``(0.5, 0.5)``. If the
6969
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
7373
(see ``src/feature/types.h`` for details).
7474

75-
The extracted descriptors are stored as row-major `uint8` binary blobs, where
75+
The extracted descriptors are stored as row-major ``uint8`` binary blobs, where
7676
each row describes the feature appearance of the corresponding entry in the
7777
keypoints table. Note that COLMAP only supports 128-D descriptors for now, i.e.
78-
the `cols` column must be 128.
78+
the ``cols`` column must be 128.
7979

80-
In both tables, the `rows` table specifies the number of detected features per
81-
image, while `rows=0` means that an image has no features. For feature matching
80+
In both tables, the ``rows`` table specifies the number of detected features per
81+
image, while ``rows=0`` means that an image has no features. For feature matching
8282
and geometric verification, every image must have a corresponding keypoints and
8383
descriptors entry. Note that only vocabulary tree matching with fast spatial
8484
verification requires meaningful values for the local feature geometry, i.e.,
@@ -89,10 +89,10 @@ The rest of the reconstruction pipeline only uses the keypoint locations.
8989
Matches and two-view geometries
9090
-------------------------------
9191

92-
Feature matching stores its output in the `matches` table and geometric
93-
verification in the `two_view_geometries` table. COLMAP only uses the data in
94-
`two_view_geometries` for reconstruction. Every entry in the two tables stores
95-
the feature matches between two unique images, where the `pair_id` is the
92+
Feature matching stores its output in the ``matches`` table and geometric
93+
verification in the ``two_view_geometries`` table. COLMAP only uses the data in
94+
``two_view_geometries`` for reconstruction. Every entry in the two tables stores
95+
the feature matches between two unique images, where the ``pair_id`` is the
9696
row-major, linear index in the upper-triangular match matrix, generated as
9797
follows::
9898

@@ -102,23 +102,23 @@ follows::
102102
else:
103103
return 2147483647 * image_id1 + image_id2
104104

105-
and image identifiers can be uniquely determined from the `pair_id` as::
105+
and image identifiers can be uniquely determined from the ``pair_id`` as::
106106

107107
def pair_id_to_image_ids(pair_id):
108108
image_id2 = pair_id % 2147483647
109109
image_id1 = (pair_id - image_id2) / 2147483647
110110
return image_id1, image_id2
111111

112-
The `pair_id` enables efficient database queries, as the matches tables may
112+
The ``pair_id`` enables efficient database queries, as the matches tables may
113113
contain several hundred millions of entries. This scheme limits the maximum
114114
number of images in a database to 2147483647 (maximum value of signed 32-bit
115-
integers), i.e. `image_id` must be smaller than 2147483647.
115+
integers), i.e. ``image_id`` must be smaller than 2147483647.
116116

117-
The binary blobs in the matches tables are row-major `uint32` matrices, where
118-
the left column are zero-based indices into the features of `image_id1` and the
119-
second column into the features of `image_id2`. The column `cols` must be 2 and
120-
the `rows` column specifies the number of feature matches.
117+
The binary blobs in the matches tables are row-major ``uint32`` matrices, where
118+
the left column are zero-based indices into the features of ``image_id1`` and the
119+
second column into the features of ``image_id2``. The column ``cols`` must be 2 and
120+
the ``rows`` column specifies the number of feature matches.
121121

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

_sources/faq.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Share intrinsics
3838

3939
COLMAP supports shared intrinsics for arbitrary groups of images and camera
4040
models. Images share the same intrinsics, if they refer to the same camera, as
41-
specified by the `camera_id` property in the database. You can add new cameras
41+
specified by the ``camera_id`` property in the database. You can add new cameras
4242
and set shared intrinsics in the database management tool. Please, refer to
4343
:ref:`Database Management <database-management>` for more information.
4444

_sources/format.rst.txt

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Binary File Format
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
1212
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`
13+
parsed using the C++ reconstruction API under ``src/colmap/scene/reconstruction_io.h``
1414
or using the Python API provided by pycolmap.
1515

1616

@@ -22,10 +22,10 @@ Any variable name ending with ``*_idx`` should be considered as an ordered,
2222
contiguous zero-based index. In general, any variable name ending with ``*_id``
2323
should be considered as an unordered, non-contiguous identifier.
2424

25-
For example, the unique identifiers of cameras (`CAMERA_ID`), images
26-
(`IMAGE_ID`), and 3D points (`POINT3D_ID`) are unordered and are most likely not
27-
contiguous. This also means that the maximum `POINT3D_ID` does not necessarily
28-
correspond to the number 3D points, since some `POINT3D_ID`'s are missing due to
25+
For example, the unique identifiers of cameras (``CAMERA_ID``), images
26+
(``IMAGE_ID``), and 3D points (``POINT3D_ID``) are unordered and are most likely not
27+
contiguous. This also means that the maximum ``POINT3D_ID`` does not necessarily
28+
correspond to the number 3D points, since some ``POINT3D_ID``'s are missing due to
2929
filtering during the reconstruction, etc.
3030

3131

@@ -36,18 +36,18 @@ Sparse Reconstruction
3636
By default, COLMAP uses a binary file format (machine-readable, fast) for
3737
storing sparse models. In addition, COLMAP provides the option to store the
3838
sparse models as text files (human-readable, slow). In both cases, the
39-
information is split into multiples files for the information about `rigs`,
40-
`cameras`, `frames`, `images`, and `points`. Any directory containing these
39+
information is split into multiples files for the information about ``rigs``,
40+
``cameras``, ``frames``, ``images``, and ``points``. Any directory containing these
4141
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
42+
``.bin`` and the text files the file extension ``.txt``. Note that when loading a
4343
model from a directory which contains both binary and text files, COLMAP prefers
4444
the binary format.
4545

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
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
4848
fully backwards compatible in that models without these files can be read and
4949
trivial rigs and frames will be automatically initialized. Furthermore, newer
50-
output reconstructions' `cameras` and `images` files are fully compatible with
50+
output reconstructions' ``cameras`` and ``images`` files are fully compatible with
5151
old outputs.
5252

5353
To export the currently selected model in the GUI, choose ``File > Export
@@ -56,7 +56,7 @@ model``. To export all reconstructed models in the current dataset, choose
5656
for convenience, the current project configuration for importing the model to
5757
COLMAP. To import the exported models, e.g., for visualization or to resume the
5858
reconstruction, choose ``File > Import model`` and select the folder containing
59-
the `cameras`, `images`, and `points3D` files.
59+
the ``cameras``, ``images``, and ``points3D`` files.
6060

6161
To convert between the binary and text format in the GUI, you can load the model
6262
using ``File > Import model`` and then export the model in the desired output
@@ -76,7 +76,7 @@ Text Format
7676
-----------
7777

7878
COLMAP exports the following three text files for every reconstructed model:
79-
`rigs.txt`, `cameras.txt`, `frames.txt`, `images.txt`, and `points3D.txt`.
79+
``rigs.txt``, ``cameras.txt``, ``frames.txt``, ``images.txt``, and ``points3D.txt``.
8080
Comments start with a leading "#" character and are ignored. The first comment
8181
lines briefly describe the format of the text files, as described in more
8282
detailed on this page.
@@ -114,9 +114,9 @@ Here, the dataset contains 3 cameras based using different distortion models
114114
with the same sensor dimensions (width: 3072, height: 2304). The length of
115115
parameters is variable and depends on the camera model. For the first camera,
116116
there are 3 parameters with a single focal length of 2559.81 pixels and a
117-
principal point at pixel location `(1536, 1152)`. The intrinsic parameters of a
117+
principal point at pixel location ``(1536, 1152)``. The intrinsic parameters of a
118118
camera can be shared by multiple images, which refer to cameras using the unique
119-
identifier `CAMERA_ID`.
119+
identifier ``CAMERA_ID``.
120120

121121

122122
frames.txt
@@ -152,8 +152,8 @@ dataset using two lines per image, e.g.::
152152

153153
Here, the first two lines define the information of the first image, and so on.
154154
The reconstructed pose of an image is specified as the projection from world to
155-
the camera coordinate system of an image using a quaternion `(QW, QX, QY, QZ)`
156-
and a translation vector `(TX, TY, TZ)`. The quaternion is defined using the
155+
the camera coordinate system of an image using a quaternion ``(QW, QX, QY, QZ)``
156+
and a translation vector ``(TX, TY, TZ)``. The quaternion is defined using the
157157
Hamilton convention, which is, for example, also used by the Eigen library. The
158158
coordinates of the projection/camera center are given by ``-R^t * T``, where
159159
``R^t`` is the inverse/transpose of the 3x3 rotation matrix composed from the
@@ -162,7 +162,7 @@ system of an image is defined in a way that the X axis points to the right, the
162162
Y axis to the bottom, and the Z axis to the front as seen from the image.
163163

164164
Both images in the example above use the same camera model and share intrinsics
165-
(`CAMERA_ID = 1`). The image name is relative to the selected base image folder
165+
(``CAMERA_ID = 1``). The image name is relative to the selected base image folder
166166
of the project. The first image has 3 keypoints and the second image has 2
167167
keypoints, while the location of the keypoints is specified in pixel
168168
coordinates. Both images observe 2 3D points and note that the last keypoint of
@@ -183,8 +183,8 @@ dataset using one line per point, e.g.::
183183
63376 2.01848 0.108877 -0.0260841 102 209 250 1.73449 16 6519 15 7322 14 7212 8 3991
184184
63371 1.71102 0.28566 0.53475 245 251 249 0.612829 118 4140 117 4473
185185

186-
Here, there are three reconstructed 3D points, where `POINT2D_IDX` defines the
187-
zero-based index of the keypoint in the `images.txt` file. The error is given in
186+
Here, there are three reconstructed 3D points, where ``POINT2D_IDX`` defines the
187+
zero-based index of the keypoint in the ``images.txt`` file. The error is given in
188188
pixels of reprojection error and is only updated after global bundle adjustment.
189189

190190

@@ -223,11 +223,11 @@ COLMAP uses the following workspace folder structure::
223223
+── run-colmap-geometric.sh
224224
+── run-colmap-photometric.sh
225225

226-
Here, the `images` folder contains the undistorted images, the `sparse` folder
227-
contains the sparse reconstruction with undistorted cameras, the `stereo` folder
228-
contains the stereo reconstruction results, `point-cloud.ply` and `mesh.ply` are
229-
the results of the fusion and meshing procedure, and `run-colmap-geometric.sh`
230-
and `run-colmap-photometric.sh` contain example command-line usage to perform
226+
Here, the ``images`` folder contains the undistorted images, the ``sparse`` folder
227+
contains the sparse reconstruction with undistorted cameras, the ``stereo`` folder
228+
contains the stereo reconstruction results, ``point-cloud.ply`` and ``mesh.ply`` are
229+
the results of the fusion and meshing procedure, and ``run-colmap-geometric.sh``
230+
and ``run-colmap-photometric.sh`` contain example command-line usage to perform
231231
the dense reconstruction.
232232

233233

@@ -237,7 +237,7 @@ Depth and Normal Maps
237237

238238
The depth maps are stored as mixed text and binary files. The text header
239239
defines the dimensions of the image in the format ``with&height&channels&``
240-
followed by row-major `float32` binary data. For depth maps ``channels=1`` and
240+
followed by row-major ``float32`` binary data. For depth maps ``channels=1`` and
241241
for normal maps ``channels=3``. The depth and normal maps can be conveniently
242242
read with Python using the functions in ``scripts/python/read_dense.py`` and
243243
with Matlab using the functions in ``scripts/matlab/read_depth_map.m`` and
@@ -251,7 +251,7 @@ Consistency Graphs
251251
The consistency graph defines, for all pixels in an image, the source images a
252252
pixel is consistent with. The graph is stored as a mixed text and binary file,
253253
while the text part is equivalent to the depth and normal maps and the binary
254-
part is a continuous list of `int32` values in the format
254+
part is a continuous list of ``int32`` values in the format
255255
``<row><col><N><image_idx1>...<image_idxN>``. Here, ``(row, col)`` defines the
256256
location of the pixel in the image followed by a list of ``N`` image indices.
257257
The indices are specified w.r.t. the ordering in the ``images.txt`` file.

_sources/gui.rst.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Graphical User Interface
55

66
The graphical user interface of COLMAP provides access to most of the available
77
functionality and visualizes the reconstruction process in "real-time". To start
8-
the GUI, you can run the pre-built packages (Windows: `COLMAP.bat`, Mac:
9-
`COLMAP.app`), execute ``colmap gui`` if you installed COLMAP or execute
8+
the GUI, you can run the pre-built packages (Windows: ``COLMAP.bat``, Mac:
9+
``COLMAP.app``), execute ``colmap gui`` if you installed COLMAP or execute
1010
``./src/colmap/exe/colmap gui`` from the CMake build folder. The GUI application
1111
requires an attached display with at least OpenGL 3.2 support. Registered images
1212
are visualized in red and reconstructed points in their average point color

0 commit comments

Comments
 (0)