pycolmap 3.10.dev0__cp312-cp312-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pycolmap-3.10.dev0.data/platlib/FreeImage-c6f1252e798b14e2c78db7236b8e8ebd.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/Iex-3_2-fdd207ecd2435fbefa8594cf6bac6e42.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/IlmThread-3_2-3f1e925f6300289f1b994536c64dcfdc.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/Imath-3_1-e5348926bce7468ef9a0b81cc3e90289.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/OpenEXR-3_2-2d0406abd803b529c46a80e0b50796b9.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/OpenEXRCore-3_2-2d9a8f9061528eaea394d76b186ea571.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/boost_filesystem-vc144-mt-x64-1_85-f067f9ed486db4834c0d1a7df3189e1b.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/boost_program_options-vc144-mt-x64-1_85-2e1824dab5bd231d4fa282e398c0b648.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/ceres-61b28aeca8e223f3fbc47f58603f8e06.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/deflate-03f5a9337e7b36f61977f33fda571878.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/gflags-42f790d2cf73751c43bc0ae5d6c35e27.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/glog-f2c4c633c583af361fc08448f1b3cc9a.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/jpeg62-8b57b7594d3b7aa46293dff855de275e.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/lcms2-a36c7d906a2afd5a0d351950441031f6.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/libamd-d9d0a4400d3207d3e686fcb08b5d818c.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/libcamd-54fce890c31ef057aad348e9ec072915.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/libccolamd-a6efb768968d8bf94d49343e7b7c8543.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/libcholmod-99fedc389f2f5ee569725faf598fb20c.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/libcolamd-8598768563f8a57d591be5e99c2f2def.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/libgcc_s_seh-1-1a6a3ffc779ffca2e2680f5ccce530de.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/libgfortran-5-1433bf2fc9362157088b7323782cd327.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/liblapack-33c5ae9de32ce90859555b5315faf319.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/liblzma-29fac5ea8a2444770a63b4eb277f11f9.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/libpng16-879680e3df35a6e0ebf408b2872cd379.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/libquadmath-0-f35ef621b617d5b1bedda957cd47034d.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/libsharpyuv-33d9eb8be681f297d957c8edb481f7f7.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/libspqr-194c79ac68cd6679cbee93ffd3b150a3.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/libwebp-22c3769c12e027ed8afc4b004369236f.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/libwebpdecoder-6625733bee7470ef2639a9eaf68b2467.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/libwebpmux-d5f10c74a5daa0455edeaa04d9e760b9.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/libwinpthread-1-747825cbaa4dbe2782431fcf59477996.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/lz4-8ce5532d03be31aac2b216865b54f595.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/msvcp140-5b69162e1e1ecdaec9dd8dc330c27ddc.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/openblas-67a685d4dacb64c4febd62528d7c249a.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/openjp2-102e352909272c529b59a3dc2f1844dd.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/raw-1d39394d8615eca4aa3e700e86903fb3.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/sqlite3-ac1862382228bb4d89c7f3a84d337bd5.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/tiff-30c128b526ba84dcbca92a294af8f110.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/vcomp140-8a6328b999684c5720952a651c616fa4.dll +0 -0
- pycolmap-3.10.dev0.data/platlib/zlib1-cb8d9f2cf9d19c9b37548c8033d77b9e.dll +0 -0
- pycolmap-3.10.dev0.dist-info/DELVEWHEEL +2 -0
- pycolmap-3.10.dev0.dist-info/METADATA +329 -0
- pycolmap-3.10.dev0.dist-info/RECORD +45 -0
- pycolmap-3.10.dev0.dist-info/WHEEL +5 -0
- pycolmap.cp312-win_amd64.pyd +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Version: 1.7.1
|
|
2
|
+
Arguments: ['C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-egk5f74t\\cp312-win_amd64\\build\\venv\\Scripts\\delvewheel', 'repair', '-v', '--add-path', 'D:/a/colmap/colmap/build/vcpkg_installed/x64-windows-release/bin', '-w', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-egk5f74t\\cp312-win_amd64\\repaired_wheel', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-egk5f74t\\cp312-win_amd64\\built_wheel\\pycolmap-3.10.dev0-cp312-cp312-win_amd64.whl']
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: pycolmap
|
|
3
|
+
Version: 3.10.dev0
|
|
4
|
+
Summary: COLMAP bindings
|
|
5
|
+
Author-Email: Mihai Dusmanu <mihai.dusmanu@gmail.com>, Paul-Edouard Sarlin <psarlin@ethz.ch>, Philipp Lindenberger <plindenbe@ethz.ch>
|
|
6
|
+
License: BSD-3-Clause
|
|
7
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
8
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
9
|
+
Project-URL: Repository, https://github.com/colmap/pycolmap
|
|
10
|
+
Requires-Python: >=3.7
|
|
11
|
+
Requires-Dist: numpy
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
|
|
14
|
+
# Python bindings for COLMAP
|
|
15
|
+
|
|
16
|
+
PyCOLMAP exposes to Python most capabilities of
|
|
17
|
+
[COLMAP](https://colmap.github.io/) for Structure-from-Motion and
|
|
18
|
+
Multiview-stereo, such as reconstruction pipelines & objects and geometric
|
|
19
|
+
estimators.
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
Pre-built wheels for Python 3.8/3.9/3.10 on Linux, macOS 10/11/12 (both Intel
|
|
24
|
+
and Apple Silicon), and Windows can be installed using pip:
|
|
25
|
+
```bash
|
|
26
|
+
pip install pycolmap
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The wheels are automatically built and pushed to
|
|
30
|
+
[PyPI](https://pypi.org/project/pycolmap/) at each release. They are currently
|
|
31
|
+
not built with CUDA support, which requires building from source.
|
|
32
|
+
|
|
33
|
+
<details>
|
|
34
|
+
<summary>[Building PyCOLMAP from source - click to expand]</summary>
|
|
35
|
+
|
|
36
|
+
1. Install COLMAP from source following [the official guide](https://colmap.github.io/install.html).
|
|
37
|
+
|
|
38
|
+
3. Build PyCOLMAP:
|
|
39
|
+
- On Linux and macOS:
|
|
40
|
+
```bash
|
|
41
|
+
python -m pip install .
|
|
42
|
+
```
|
|
43
|
+
- On Windows, after installing COLMAP [via VCPKG](https://colmap.github.io/install.html#id3), run in powershell:
|
|
44
|
+
```powershell
|
|
45
|
+
python -m pip install . `
|
|
46
|
+
--cmake.define.CMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" `
|
|
47
|
+
--cmake.define.VCPKG_TARGET_TRIPLET="x64-windows"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
</details>
|
|
51
|
+
|
|
52
|
+
## Reconstruction pipeline
|
|
53
|
+
|
|
54
|
+
PyCOLMAP provides bindings for multiple steps of the standard reconstruction pipeline:
|
|
55
|
+
|
|
56
|
+
- extracting and matching SIFT features
|
|
57
|
+
- importing an image folder into a COLMAP database
|
|
58
|
+
- inferring the camera parameters from the EXIF metadata of an image file
|
|
59
|
+
- running two-view geometric verification of matches on a COLMAP database
|
|
60
|
+
- triangulating points into an existing COLMAP model
|
|
61
|
+
- running incremental reconstruction from a COLMAP database
|
|
62
|
+
- dense reconstruction with multi-view stereo
|
|
63
|
+
|
|
64
|
+
Sparse & Dense reconstruction from a folder of images can be performed with:
|
|
65
|
+
```python
|
|
66
|
+
output_path: pathlib.Path
|
|
67
|
+
image_dir: pathlib.Path
|
|
68
|
+
|
|
69
|
+
output_path.mkdir()
|
|
70
|
+
mvs_path = output_path / "mvs"
|
|
71
|
+
database_path = output_path / "database.db"
|
|
72
|
+
|
|
73
|
+
pycolmap.extract_features(database_path, image_dir)
|
|
74
|
+
pycolmap.match_exhaustive(database_path)
|
|
75
|
+
maps = pycolmap.incremental_mapping(database_path, image_dir, output_path)
|
|
76
|
+
maps[0].write(output_path)
|
|
77
|
+
# dense reconstruction
|
|
78
|
+
pycolmap.undistort_images(mvs_path, output_path, image_dir)
|
|
79
|
+
pycolmap.patch_match_stereo(mvs_path) # requires compilation with CUDA
|
|
80
|
+
pycolmap.stereo_fusion(mvs_path / "dense.ply", mvs_path)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
PyCOLMAP can leverage the GPU for feature extraction, matching, and multi-view
|
|
84
|
+
stereo if COLMAP was compiled with CUDA support. Similarly, PyCOLMAP can run
|
|
85
|
+
Delaunay Triangulation if COLMAP was compiled with CGAL support. This requires
|
|
86
|
+
to build the package from source and is not available with the PyPI wheels.
|
|
87
|
+
|
|
88
|
+
All of the above steps are easily configurable with python dicts which are
|
|
89
|
+
recursively merged into their respective defaults, for example:
|
|
90
|
+
```python
|
|
91
|
+
pycolmap.extract_features(database_path, image_dir, sift_options={"max_num_features": 512})
|
|
92
|
+
# equivalent to
|
|
93
|
+
ops = pycolmap.SiftExtractionOptions()
|
|
94
|
+
ops.max_num_features = 512
|
|
95
|
+
pycolmap.extract_features(database_path, image_dir, sift_options=ops)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
To list available options and their default parameters:
|
|
99
|
+
|
|
100
|
+
```python
|
|
101
|
+
help(pycolmap.SiftExtractionOptions)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
For another example of usage, see [`example.py`](./example.py) or
|
|
105
|
+
[`hloc/reconstruction.py`](https://github.com/cvg/Hierarchical-Localization/blob/master/hloc/reconstruction.py).
|
|
106
|
+
|
|
107
|
+
## Reconstruction object
|
|
108
|
+
|
|
109
|
+
We can load and manipulate an existing COLMAP 3D reconstruction:
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
import pycolmap
|
|
113
|
+
reconstruction = pycolmap.Reconstruction("path/to/reconstruction/dir")
|
|
114
|
+
print(reconstruction.summary())
|
|
115
|
+
|
|
116
|
+
for image_id, image in reconstruction.images.items():
|
|
117
|
+
print(image_id, image)
|
|
118
|
+
|
|
119
|
+
for point3D_id, point3D in reconstruction.points3D.items():
|
|
120
|
+
print(point3D_id, point3D)
|
|
121
|
+
|
|
122
|
+
for camera_id, camera in reconstruction.cameras.items():
|
|
123
|
+
print(camera_id, camera)
|
|
124
|
+
|
|
125
|
+
reconstruction.write("path/to/reconstruction/dir/")
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The object API mirrors the COLMAP C++ library. The bindings support many other operations, for example:
|
|
129
|
+
|
|
130
|
+
- projecting a 3D point into an image with arbitrary camera model:
|
|
131
|
+
```python
|
|
132
|
+
uv = camera.img_from_cam(image.cam_from_world * point3D.xyz)
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
- aligning two 3D reconstructions by their camera poses:
|
|
136
|
+
```python
|
|
137
|
+
rec2_from_rec1 = pycolmap.align_reconstructions_via_reprojections(reconstruction1, reconstrution2)
|
|
138
|
+
reconstruction1.transform(rec2_from_rec1)
|
|
139
|
+
print(rec2_from_rec1.scale, rec2_from_rec1.rotation, rec2_from_rec1.translation)
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
- exporting reconstructions to text, PLY, or other formats:
|
|
143
|
+
```python
|
|
144
|
+
reconstruction.write_text("path/to/new/reconstruction/dir/") # text format
|
|
145
|
+
reconstruction.export_PLY("rec.ply") # PLY format
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Estimators
|
|
149
|
+
|
|
150
|
+
We provide robust RANSAC-based estimators for absolute camera pose
|
|
151
|
+
(single-camera and multi-camera-rig), essential matrix, fundamental matrix,
|
|
152
|
+
homography, and two-view relative pose for calibrated cameras.
|
|
153
|
+
|
|
154
|
+
All RANSAC and estimation parameters are exposed as objects that behave
|
|
155
|
+
similarly as Python dataclasses. The RANSAC options are described in
|
|
156
|
+
[`colmap/optim/ransac.h`](https://github.com/colmap/colmap/blob/main/src/colmap/optim/ransac.h#L43-L72)
|
|
157
|
+
and their default values are:
|
|
158
|
+
|
|
159
|
+
```python
|
|
160
|
+
ransac_options = pycolmap.RANSACOptions(
|
|
161
|
+
max_error=4.0, # for example the reprojection error in pixels
|
|
162
|
+
min_inlier_ratio=0.01,
|
|
163
|
+
confidence=0.9999,
|
|
164
|
+
min_num_trials=1000,
|
|
165
|
+
max_num_trials=100000,
|
|
166
|
+
)
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Absolute pose estimation
|
|
170
|
+
|
|
171
|
+
For instance, to estimate the absolute pose of a query camera given 2D-3D correspondences:
|
|
172
|
+
```python
|
|
173
|
+
# Parameters:
|
|
174
|
+
# - points2D: Nx2 array; pixel coordinates
|
|
175
|
+
# - points3D: Nx3 array; world coordinates
|
|
176
|
+
# - camera: pycolmap.Camera
|
|
177
|
+
# Optional parameters:
|
|
178
|
+
# - estimation_options: dict or pycolmap.AbsolutePoseEstimationOptions
|
|
179
|
+
# - refinement_options: dict or pycolmap.AbsolutePoseRefinementOptions
|
|
180
|
+
answer = pycolmap.absolute_pose_estimation(points2D, points3D, camera)
|
|
181
|
+
# Returns: dictionary of estimation outputs or None if failure
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
2D and 3D points are passed as Numpy arrays or lists. The options are defined in
|
|
185
|
+
[`estimators/absolute_pose.cc`](./pycolmap/estimators/absolute_pose.h#L100-L122)
|
|
186
|
+
and can be passed as regular (nested) Python dictionaries:
|
|
187
|
+
|
|
188
|
+
```python
|
|
189
|
+
pycolmap.absolute_pose_estimation(
|
|
190
|
+
points2D, points3D, camera,
|
|
191
|
+
estimation_options=dict(ransac=dict(max_error=12.0)),
|
|
192
|
+
refinement_options=dict(refine_focal_length=True),
|
|
193
|
+
)
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Absolute Pose Refinement
|
|
197
|
+
|
|
198
|
+
```python
|
|
199
|
+
# Parameters:
|
|
200
|
+
# - cam_from_world: pycolmap.Rigid3d, initial pose
|
|
201
|
+
# - points2D: Nx2 array; pixel coordinates
|
|
202
|
+
# - points3D: Nx3 array; world coordinates
|
|
203
|
+
# - inlier_mask: array of N bool; inlier_mask[i] is true if correpondence i is an inlier
|
|
204
|
+
# - camera: pycolmap.Camera
|
|
205
|
+
# Optional parameters:
|
|
206
|
+
# - refinement_options: dict or pycolmap.AbsolutePoseRefinementOptions
|
|
207
|
+
answer = pycolmap.pose_refinement(cam_from_world, points2D, points3D, inlier_mask, camera)
|
|
208
|
+
# Returns: dictionary of refinement outputs or None if failure
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Essential matrix estimation
|
|
212
|
+
|
|
213
|
+
```python
|
|
214
|
+
# Parameters:
|
|
215
|
+
# - points1: Nx2 array; 2D pixel coordinates in image 1
|
|
216
|
+
# - points2: Nx2 array; 2D pixel coordinates in image 2
|
|
217
|
+
# - camera1: pycolmap.Camera of image 1
|
|
218
|
+
# - camera2: pycolmap.Camera of image 2
|
|
219
|
+
# Optional parameters:
|
|
220
|
+
# - options: dict or pycolmap.RANSACOptions (default inlier threshold is 4px)
|
|
221
|
+
answer = pycolmap.essential_matrix_estimation(points1, points2, camera1, camera2)
|
|
222
|
+
# Returns: dictionary of estimation outputs or None if failure
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### Fundamental matrix estimation
|
|
226
|
+
|
|
227
|
+
```python
|
|
228
|
+
answer = pycolmap.fundamental_matrix_estimation(
|
|
229
|
+
points1,
|
|
230
|
+
points2,
|
|
231
|
+
[options], # optional dict or pycolmap.RANSACOptions
|
|
232
|
+
)
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Homography estimation
|
|
236
|
+
|
|
237
|
+
```python
|
|
238
|
+
answer = pycolmap.homography_matrix_estimation(
|
|
239
|
+
points1,
|
|
240
|
+
points2,
|
|
241
|
+
[options], # optional dict or pycolmap.RANSACOptions
|
|
242
|
+
)
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Two-view geometry estimation
|
|
246
|
+
|
|
247
|
+
COLMAP can also estimate a relative pose between two calibrated cameras by
|
|
248
|
+
estimating both E and H and accounting for the degeneracies of each model.
|
|
249
|
+
|
|
250
|
+
```python
|
|
251
|
+
# Parameters:
|
|
252
|
+
# - camera1: pycolmap.Camera of image 1
|
|
253
|
+
# - points1: Nx2 array; 2D pixel coordinates in image 1
|
|
254
|
+
# - camera2: pycolmap.Camera of image 2
|
|
255
|
+
# - points2: Nx2 array; 2D pixel coordinates in image 2
|
|
256
|
+
# Optional parameters:
|
|
257
|
+
# - matches: Nx2 integer array; correspondences across images
|
|
258
|
+
# - options: dict or pycolmap.TwoViewGeometryOptions
|
|
259
|
+
answer = pycolmap.estimate_calibrated_two_view_geometry(camera1, points1, camera2, points2)
|
|
260
|
+
# Returns: pycolmap.TwoViewGeometry
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
The `TwoViewGeometryOptions` control how each model is selected. The output
|
|
264
|
+
structure contains the geometric model, inlier matches, the relative pose (if
|
|
265
|
+
`options.compute_relative_pose=True`), and the type of camera configuration,
|
|
266
|
+
which is an instance of the enum `pycolmap.TwoViewGeometryConfiguration`.
|
|
267
|
+
|
|
268
|
+
### Camera argument
|
|
269
|
+
|
|
270
|
+
Some estimators expect a COLMAP camera object, which can be created as follows:
|
|
271
|
+
|
|
272
|
+
```python
|
|
273
|
+
camera = pycolmap.Camera(
|
|
274
|
+
model=camera_model_name_or_id,
|
|
275
|
+
width=width,
|
|
276
|
+
height=height,
|
|
277
|
+
params=params,
|
|
278
|
+
)
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
The different camera models and their extra parameters are defined in
|
|
282
|
+
[`colmap/src/colmap/sensor/models.h`](https://github.com/colmap/colmap/blob/main/src/colmap/sensor/models.h).
|
|
283
|
+
For example for a pinhole camera:
|
|
284
|
+
|
|
285
|
+
```python
|
|
286
|
+
camera = pycolmap.Camera(
|
|
287
|
+
model='SIMPLE_PINHOLE',
|
|
288
|
+
width=width,
|
|
289
|
+
height=height,
|
|
290
|
+
params=[focal_length, cx, cy],
|
|
291
|
+
)
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
Alternatively, we can also pass a camera dictionary:
|
|
295
|
+
|
|
296
|
+
```python
|
|
297
|
+
camera_dict = {
|
|
298
|
+
'model': COLMAP_CAMERA_MODEL_NAME_OR_ID,
|
|
299
|
+
'width': IMAGE_WIDTH,
|
|
300
|
+
'height': IMAGE_HEIGHT,
|
|
301
|
+
'params': EXTRA_CAMERA_PARAMETERS_LIST
|
|
302
|
+
}
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
## SIFT feature extraction
|
|
307
|
+
|
|
308
|
+
```python
|
|
309
|
+
import numpy as np
|
|
310
|
+
import pycolmap
|
|
311
|
+
from PIL import Image, ImageOps
|
|
312
|
+
|
|
313
|
+
# Input should be grayscale image with range [0, 1].
|
|
314
|
+
img = Image.open('image.jpg').convert('RGB')
|
|
315
|
+
img = ImageOps.grayscale(img)
|
|
316
|
+
img = np.array(img).astype(np.float) / 255.
|
|
317
|
+
|
|
318
|
+
# Optional parameters:
|
|
319
|
+
# - options: dict or pycolmap.SiftExtractionOptions
|
|
320
|
+
# - device: default pycolmap.Device.auto uses the GPU if available
|
|
321
|
+
sift = pycolmap.Sift()
|
|
322
|
+
|
|
323
|
+
# Parameters:
|
|
324
|
+
# - image: HxW float array
|
|
325
|
+
keypoints, descriptors = sift.extract(img)
|
|
326
|
+
# Returns:
|
|
327
|
+
# - keypoints: Nx4 array; format: x (j), y (i), scale, orientation
|
|
328
|
+
# - descriptors: Nx128 array; L2-normalized descriptors
|
|
329
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
pycolmap.cp312-win_amd64.pyd,sha256=sT55yFsiwVTWAsiTfxQsaeJ7yg_8beQYB8UwWka79_M,7453184
|
|
2
|
+
pycolmap-3.10.dev0.data/platlib/boost_filesystem-vc144-mt-x64-1_85-f067f9ed486db4834c0d1a7df3189e1b.dll,sha256=lJ8fgEKJsdZtVfmBE0noCli6RPLXIx0sBJaeGjhR67E,147456
|
|
3
|
+
pycolmap-3.10.dev0.data/platlib/boost_program_options-vc144-mt-x64-1_85-2e1824dab5bd231d4fa282e398c0b648.dll,sha256=IEndFRURQy2ygPQuG6hl4hvMbW4Uc-H4tDSp0cEUyo8,344576
|
|
4
|
+
pycolmap-3.10.dev0.data/platlib/ceres-61b28aeca8e223f3fbc47f58603f8e06.dll,sha256=GUDZKogoAd8V6tb11p2fAl0Wz0IICsr4XV9GGJgt8Fs,1317888
|
|
5
|
+
pycolmap-3.10.dev0.data/platlib/deflate-03f5a9337e7b36f61977f33fda571878.dll,sha256=FmWM_IGXLjrgNzOOOlark0HcnclfAL3mhK9wVU1RdvE,86528
|
|
6
|
+
pycolmap-3.10.dev0.data/platlib/FreeImage-c6f1252e798b14e2c78db7236b8e8ebd.dll,sha256=NYr3ShPNX5w8w4Pgo-NaT17sQGFMsFbYx3A3pdZQ7J0,949760
|
|
7
|
+
pycolmap-3.10.dev0.data/platlib/gflags-42f790d2cf73751c43bc0ae5d6c35e27.dll,sha256=bghfaWCAq4PmXAobSRH2D4sjC_MxavPq-lVDp3_Xxj4,120832
|
|
8
|
+
pycolmap-3.10.dev0.data/platlib/glog-f2c4c633c583af361fc08448f1b3cc9a.dll,sha256=77ps5fBGJdLij_fhqcbKZYkwc_2YehOr9jH-pcS9VCU,211456
|
|
9
|
+
pycolmap-3.10.dev0.data/platlib/Iex-3_2-fdd207ecd2435fbefa8594cf6bac6e42.dll,sha256=ERVFrATcXJ0VACVrG-kfSYqYaGy-JkQ1MKx5fF5lOxQ,282112
|
|
10
|
+
pycolmap-3.10.dev0.data/platlib/IlmThread-3_2-3f1e925f6300289f1b994536c64dcfdc.dll,sha256=UjUdBdVh6Fdj3ohOALlnC6iZ6mUvDqfw_5n87jqDnyo,45568
|
|
11
|
+
pycolmap-3.10.dev0.data/platlib/Imath-3_1-e5348926bce7468ef9a0b81cc3e90289.dll,sha256=pNKbLPqYgTSiuBu_WUcqYWho8m6AjKhzut7BT5_fzH0,337408
|
|
12
|
+
pycolmap-3.10.dev0.data/platlib/jpeg62-8b57b7594d3b7aa46293dff855de275e.dll,sha256=QILNBL_hxWO9lTYa3iJbT_y51syDBa3p_1lgRoEkuAQ,678912
|
|
13
|
+
pycolmap-3.10.dev0.data/platlib/lcms2-a36c7d906a2afd5a0d351950441031f6.dll,sha256=MtGqFtRAUoYz2LpTBeWaYBBtZ5HO85c2gdN1kuBWttk,358912
|
|
14
|
+
pycolmap-3.10.dev0.data/platlib/libamd-d9d0a4400d3207d3e686fcb08b5d818c.dll,sha256=fZO7ms4xg2cbn5FDnh4jDpGDkZGlegZg-yUI2i0lB18,36864
|
|
15
|
+
pycolmap-3.10.dev0.data/platlib/libcamd-54fce890c31ef057aad348e9ec072915.dll,sha256=svbwDoXEg3u_mRsf13auqAOOx1bTwmHqhmIUxZtKIQo,39936
|
|
16
|
+
pycolmap-3.10.dev0.data/platlib/libccolamd-a6efb768968d8bf94d49343e7b7c8543.dll,sha256=2Z1E08Q_-ufhUz2CgrZrOG6TtasgCflkZjn7V4uscag,48128
|
|
17
|
+
pycolmap-3.10.dev0.data/platlib/libcholmod-99fedc389f2f5ee569725faf598fb20c.dll,sha256=nKBqUaChs6hMnJ75aekN3aLKIwIH6DyVjTG6zuvqFYE,1212416
|
|
18
|
+
pycolmap-3.10.dev0.data/platlib/libcolamd-8598768563f8a57d591be5e99c2f2def.dll,sha256=SbuMXYkuZRz2KcMbDdEVE8d21qNkO0wggNrtTTVZofo,32256
|
|
19
|
+
pycolmap-3.10.dev0.data/platlib/libgcc_s_seh-1-1a6a3ffc779ffca2e2680f5ccce530de.dll,sha256=QsdIPxTWyaGVu3IDojo4NAG1cl1wTGWZcQJQ5agP0H4,150707
|
|
20
|
+
pycolmap-3.10.dev0.data/platlib/libgfortran-5-1433bf2fc9362157088b7323782cd327.dll,sha256=rVjlurQxSY4Cqyyx3alktHVV-FziqFbxhjB4ecafK_4,3306867
|
|
21
|
+
pycolmap-3.10.dev0.data/platlib/liblapack-33c5ae9de32ce90859555b5315faf319.dll,sha256=_MYd3UJhOWywPl60atMn-E0Lyu-X5DI1l_2E3G6mEX0,8110023
|
|
22
|
+
pycolmap-3.10.dev0.data/platlib/liblzma-29fac5ea8a2444770a63b4eb277f11f9.dll,sha256=wO_Mpq1oSx9FS5x7ArlFM104YmnMvllCShBl36CM-Kk,187904
|
|
23
|
+
pycolmap-3.10.dev0.data/platlib/libpng16-879680e3df35a6e0ebf408b2872cd379.dll,sha256=g0mMTAU5ePRToMuq8g2uowXNZ7EW7qZqbsQAby8THwk,202240
|
|
24
|
+
pycolmap-3.10.dev0.data/platlib/libquadmath-0-f35ef621b617d5b1bedda957cd47034d.dll,sha256=t6eokUDTG1lu2-_jCCwNvF3mWVOMYAg95M8uBoGMHlc,380848
|
|
25
|
+
pycolmap-3.10.dev0.data/platlib/libsharpyuv-33d9eb8be681f297d957c8edb481f7f7.dll,sha256=Zk9iCRarZeSTjor9KCUfawn-nirG8OKy4I4zbmBZSc0,26112
|
|
26
|
+
pycolmap-3.10.dev0.data/platlib/libspqr-194c79ac68cd6679cbee93ffd3b150a3.dll,sha256=RE5JTP21mtjIGF7ntI09kqfev4DO_l5tgO9kuuHC1P4,184320
|
|
27
|
+
pycolmap-3.10.dev0.data/platlib/libwebp-22c3769c12e027ed8afc4b004369236f.dll,sha256=T4WLzhIN_44NGfJHLbeTGm5JmVlXbI2g8vcwNEXCT68,373760
|
|
28
|
+
pycolmap-3.10.dev0.data/platlib/libwebpdecoder-6625733bee7470ef2639a9eaf68b2467.dll,sha256=cTmxskjHTjZxyiLOA2F5WWJU6lBs3WBEkDVmw_vy_jM,162304
|
|
29
|
+
pycolmap-3.10.dev0.data/platlib/libwebpmux-d5f10c74a5daa0455edeaa04d9e760b9.dll,sha256=MLqIgvVM49ao6AEufoDeb_PoEu2lTBoIcRbZYxQRilI,41472
|
|
30
|
+
pycolmap-3.10.dev0.data/platlib/libwinpthread-1-747825cbaa4dbe2782431fcf59477996.dll,sha256=u8vl646AbzU3WF1MmDK07hX4ZhcyilZmldfTcoqjcO4,60798
|
|
31
|
+
pycolmap-3.10.dev0.data/platlib/lz4-8ce5532d03be31aac2b216865b54f595.dll,sha256=LOOpIjCmQzT_o8mZ9bOd-fxfu1WEH0lG1W6poEHMaG8,121344
|
|
32
|
+
pycolmap-3.10.dev0.data/platlib/msvcp140-5b69162e1e1ecdaec9dd8dc330c27ddc.dll,sha256=hUSON2360YWXQK7aolRLVl6Kbk4uVV3mxGOPSrGyiEM,621960
|
|
33
|
+
pycolmap-3.10.dev0.data/platlib/openblas-67a685d4dacb64c4febd62528d7c249a.dll,sha256=1kowYk4VZw3kiEQxYAQzAMCuu7LDAFnYkCl57P8aKeY,1732096
|
|
34
|
+
pycolmap-3.10.dev0.data/platlib/OpenEXR-3_2-2d0406abd803b529c46a80e0b50796b9.dll,sha256=bIuXMWsr4BTJyLvSDo8_A9Rl8K4dksNmHtJD1P5Do58,2906624
|
|
35
|
+
pycolmap-3.10.dev0.data/platlib/OpenEXRCore-3_2-2d9a8f9061528eaea394d76b186ea571.dll,sha256=_0WPVHB0Ropk7IkagHL9lHKGdUbRx68XXZucFQVhTUA,2234880
|
|
36
|
+
pycolmap-3.10.dev0.data/platlib/openjp2-102e352909272c529b59a3dc2f1844dd.dll,sha256=fBPUc5Hez3fAQqDAYLNzM_O8_BTuHNHDvwIe0lV1pL8,354816
|
|
37
|
+
pycolmap-3.10.dev0.data/platlib/raw-1d39394d8615eca4aa3e700e86903fb3.dll,sha256=B0yJts228b9bGRc5pe41uq9tEnxEfAD683m4qr1yMZM,1117184
|
|
38
|
+
pycolmap-3.10.dev0.data/platlib/sqlite3-ac1862382228bb4d89c7f3a84d337bd5.dll,sha256=4wgXn5MYu4h80OuRskPivoepEYf_ZOpn17-Jck7-jaE,1063424
|
|
39
|
+
pycolmap-3.10.dev0.data/platlib/tiff-30c128b526ba84dcbca92a294af8f110.dll,sha256=2_WF-UbBhoBwtgqcduuZKxOW9WwCV3z00UwgHWslnL0,458752
|
|
40
|
+
pycolmap-3.10.dev0.data/platlib/vcomp140-8a6328b999684c5720952a651c616fa4.dll,sha256=SLLP-kKlBkuime_xczdT9PoELZ1FLEnBHU-tJzYPeK4,192104
|
|
41
|
+
pycolmap-3.10.dev0.data/platlib/zlib1-cb8d9f2cf9d19c9b37548c8033d77b9e.dll,sha256=_aGgBClMRUGvLJRk1oWcPMBblZCaL2iTZ9wk-6n3yUc,90624
|
|
42
|
+
pycolmap-3.10.dev0.dist-info/DELVEWHEEL,sha256=_GQIik4abRQ8j0ln1-uK_R8P4RHGtYiMOtzgXaXRBbU,492
|
|
43
|
+
pycolmap-3.10.dev0.dist-info/METADATA,sha256=1XlwMBCEmDAf6sTt-LgM-5CG-Y_MCqSfZswficB3Ius,10745
|
|
44
|
+
pycolmap-3.10.dev0.dist-info/RECORD,,
|
|
45
|
+
pycolmap-3.10.dev0.dist-info/WHEEL,sha256=raYSa41uyR3RTepDjt2zOjIhE3VDFqzbUhfN84nsytA,105
|
|
Binary file
|