COLMAP Wrapper
About
Colmap wrapper is a library to work with colmap projects. The purpose is the simplification to read e.g. rgb images, depth images, camera poses, sparse point clouds etc. Additionally a visualization for a colmap project is provided.
Installation
Make sure that you have a Python version >=3.8 installed.
This repository is tested on Python 3.8+ and can currently only be installed from PyPi.
pip install colmap-wrapper
Usage
Single Reconstruction
To visualize a single reconstruction from COLMAP, the following code reads all colmap elements and visualizes them. For this case an example reconstruction project is provided as shown at the top of the readme.
from colmap_wrapper.colmap import COLMAP
from colmap_wrapper.visualization import ColmapVisualization
from colmap_wrapper.data.download import Dataset
downloader = Dataset()
downloader.download_bunny_dataset()
project = COLMAP(project_path=downloader.file_path, load_images=True, image_resize=0.3)
colmap_project = project.projects
# Acess camera, images and sparse + dense point cloud
camera = colmap_project.cameras
images = colmap_project.images
sparse = colmap_project.get_sparse()
dense = colmap_project.get_dense()
# Visualize COLMAP Reconstruction
project_vs = ColmapVisualization(colmap_project)
project_vs.visualization(frustum_scale=0.7, image_type='image')
Multiple Incomplete Reconstruction
In case of an incomplete reconstruction colmap creates partial reconstructions. In this case a list of reconstructions can be called as shown below.
from colmap_wrapper.colmap import COLMAP
from colmap_wrapper.visualization import ColmapVisualization
project = COLMAP(project_path="[PATH2COLMAP_PROJECT]", load_images=True, image_resize=0.3)
# project.projects is a list containing single colmap projects
for COLMAP_MODEL in project.projects:
project_vs = ColmapVisualization(colmap=COLMAP_MODEL)
project_vs.visualization(frustum_scale=0.7, image_type='image')
References
- PyExifTool: A library to communicate with the ExifTool command- application. If you have trouble installing it please refer to the PyExifTool-Homepage.
# For Ubuntu users:
wget https://exiftool.org/Image-ExifTool-12.51.tar.gz
gzip -dc Image-ExifTool-12.51.tar.gz | tar -xf -
cd Image-ExifTool-12.51
perl Makefile.PL
make test
sudo make install
- To Visualize the Reconstruction on an OSM-Map the implementation from GPS-visualization-Python is used. A guide to visualize gps data can be found on Medium .
Metadata
Release files for colmap-wrapper 1.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| colmap_wrapper-1.1.5.tar.gz | 19.4 kB | Without provenance | Details for colmap_wrapper-1.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| colmap_wrapper-1.1.5-py3-none-any.whl | Python 3 | none | any | Details for colmap_wrapper-1.1.5-py3-none-any.whl |
Total release size: 41.9 kB
Release files / colmap_wrapper-1.1.5.tar.gz
| Download URL | colmap_wrapper-1.1.5.tar.gz |
|---|---|
| Size | 19.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13b15659450cb759e183e351824a67fc23675cbf8b7f2ce3a0cf5a32c4b63497
|
|
BLAKE2b-256 checksum How to use checksums |
1febd0350800c5faae34d1b28df1f9673c6c3d8455bf694d9193a8484ca78ab3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / colmap_wrapper-1.1.5-py3-none-any.whl
| Download URL | colmap_wrapper-1.1.5-py3-none-any.whl |
|---|---|
| Size | 22.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d418c831130039360417e158a6fcc5b80ec17b03975fa874a9f8ced3f3462b5e
|
|
BLAKE2b-256 checksum How to use checksums |
4f9c1f85eacb8de927f7d0a913e16206c2483630ebf46f824ac93b71c100f1db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for colmap-wrapper 1.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.