colmap-wrapper


Namecolmap-wrapper JSON
Version 1.1.5 PyPI version JSON
download
home_pagehttps://github.com/meyerls/colmap-wrapper
SummaryCOLMAP Wrapper
upload_time2023-01-10 14:28:50
maintainer
docs_urlNone
authorLukas Meyer
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements numpy open3d opencv-contrib-python pyquaternion matplotlib tqdm wget pycolmap pyexiftool
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # COLMAP Wrapper

<a href="https://img.shields.io/pypi/pyversions/colmap-wrapper"><img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/colmap-wrapper"></a>
<a href="https://github.com/meyerls/colmap-wrapper/actions"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/workflow/status/meyerls/colmap-wrapper/Python%20package"></a>
<a href="https://github.com/meyerls/colmap_wrapper/blob/main/LICENSE"><img alt="license" src="https://img.shields.io/github/license/meyerls/colmap-wrapper"></a>

## 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.

<p align="center">
    <img width="40%" src="img/img_1.png">
    <img width="40%" src="img/img_2.png">
</p>

## 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](https://pypi.org/project/colmap-wrapper/).

 ````bash
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. 

```python
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.

```python
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](https://github.com/sylikc/pyexiftool): A library to communicate with the [ExifTool](https://exiftool.org)
  command- application. If you have trouble installing it please refer to the PyExifTool-Homepage. 
```bash
# 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](https://github.com/tisljaricleo/GPS-visualization-Python) is used. A guide to
  visualize gps data can be found
  on [Medium](https://towardsdatascience.com/simple-gps-data-visualization-using-python-and-open-street-maps-50f992e9b676)
  .

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/meyerls/colmap-wrapper",
    "name": "colmap-wrapper",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Lukas Meyer",
    "author_email": "lukas.meyer@fau.de",
    "download_url": "https://files.pythonhosted.org/packages/1f/eb/d0350800c5faae34d1b28df1f9673c6c3d8455bf694d9193a8484ca78ab3/colmap_wrapper-1.1.5.tar.gz",
    "platform": null,
    "description": "# COLMAP Wrapper\n\n<a href=\"https://img.shields.io/pypi/pyversions/colmap-wrapper\"><img alt=\"PyPI - Python Version\" src=\"https://img.shields.io/pypi/pyversions/colmap-wrapper\"></a>\n<a href=\"https://github.com/meyerls/colmap-wrapper/actions\"><img alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/workflow/status/meyerls/colmap-wrapper/Python%20package\"></a>\n<a href=\"https://github.com/meyerls/colmap_wrapper/blob/main/LICENSE\"><img alt=\"license\" src=\"https://img.shields.io/github/license/meyerls/colmap-wrapper\"></a>\n\n## About\n\nColmap wrapper is a library to work with colmap projects. The purpose is the simplification to read e.g. rgb images,\ndepth\nimages, camera poses, sparse point clouds etc. Additionally a visualization for a colmap project is provided.\n\n<p align=\"center\">\n    <img width=\"40%\" src=\"img/img_1.png\">\n    <img width=\"40%\" src=\"img/img_2.png\">\n</p>\n\n## Installation\n\nMake sure that you have a Python version >=3.8 installed.\n\nThis repository is tested on Python 3.8+ and can currently only be installed\nfrom [PyPi](https://pypi.org/project/colmap-wrapper/).\n\n ````bash\npip install colmap-wrapper\n ````\n\n## Usage\n\n### Single Reconstruction\n\nTo visualize a single reconstruction from COLMAP, the following code reads all colmap elements and visualizes them. For\nthis case an example reconstruction project is provided as shown at the top of the readme. \n\n```python\nfrom colmap_wrapper.colmap import COLMAP\nfrom colmap_wrapper.visualization import ColmapVisualization\nfrom colmap_wrapper.data.download import Dataset\n\ndownloader = Dataset()\ndownloader.download_bunny_dataset()\n\nproject = COLMAP(project_path=downloader.file_path, load_images=True, image_resize=0.3)\n\ncolmap_project = project.projects\n\n# Acess camera, images and sparse + dense point cloud\ncamera = colmap_project.cameras\nimages = colmap_project.images\nsparse = colmap_project.get_sparse()\ndense = colmap_project.get_dense()\n\n# Visualize COLMAP Reconstruction\nproject_vs = ColmapVisualization(colmap_project)\nproject_vs.visualization(frustum_scale=0.7, image_type='image')\n```\n\n### Multiple Incomplete Reconstruction\n\nIn case of an incomplete reconstruction colmap creates partial reconstructions. In this case a list of\nreconstructions can be called as shown below.\n\n```python\nfrom colmap_wrapper.colmap import COLMAP\nfrom colmap_wrapper.visualization import ColmapVisualization\n\nproject = COLMAP(project_path=\"[PATH2COLMAP_PROJECT]\", load_images=True, image_resize=0.3)\n\n# project.projects is a list containing single colmap projects\nfor COLMAP_MODEL in project.projects:\n    project_vs = ColmapVisualization(colmap=COLMAP_MODEL)\n    project_vs.visualization(frustum_scale=0.7, image_type='image')\n```\n\n## References\n\n* [PyExifTool](https://github.com/sylikc/pyexiftool): A library to communicate with the [ExifTool](https://exiftool.org)\n  command- application. If you have trouble installing it please refer to the PyExifTool-Homepage. \n```bash\n# For Ubuntu users:\nwget https://exiftool.org/Image-ExifTool-12.51.tar.gz\ngzip -dc Image-ExifTool-12.51.tar.gz | tar -xf -\ncd Image-ExifTool-12.51\nperl Makefile.PL\nmake test\nsudo make install\n```\n\n* To Visualize the Reconstruction on an OSM-Map the implementation\n  from [GPS-visualization-Python](https://github.com/tisljaricleo/GPS-visualization-Python) is used. A guide to\n  visualize gps data can be found\n  on [Medium](https://towardsdatascience.com/simple-gps-data-visualization-using-python-and-open-street-maps-50f992e9b676)\n  .\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "COLMAP Wrapper",
    "version": "1.1.5",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4f9c1f85eacb8de927f7d0a913e16206c2483630ebf46f824ac93b71c100f1db",
                "md5": "1fb1e05b582fa89fcaf1d2f34f4eebdd",
                "sha256": "d418c831130039360417e158a6fcc5b80ec17b03975fa874a9f8ced3f3462b5e"
            },
            "downloads": -1,
            "filename": "colmap_wrapper-1.1.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1fb1e05b582fa89fcaf1d2f34f4eebdd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 22538,
            "upload_time": "2023-01-10T14:28:49",
            "upload_time_iso_8601": "2023-01-10T14:28:49.216083Z",
            "url": "https://files.pythonhosted.org/packages/4f/9c/1f85eacb8de927f7d0a913e16206c2483630ebf46f824ac93b71c100f1db/colmap_wrapper-1.1.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1febd0350800c5faae34d1b28df1f9673c6c3d8455bf694d9193a8484ca78ab3",
                "md5": "995611547f27d4b12d048d11770fa5ab",
                "sha256": "13b15659450cb759e183e351824a67fc23675cbf8b7f2ce3a0cf5a32c4b63497"
            },
            "downloads": -1,
            "filename": "colmap_wrapper-1.1.5.tar.gz",
            "has_sig": false,
            "md5_digest": "995611547f27d4b12d048d11770fa5ab",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 19358,
            "upload_time": "2023-01-10T14:28:50",
            "upload_time_iso_8601": "2023-01-10T14:28:50.266089Z",
            "url": "https://files.pythonhosted.org/packages/1f/eb/d0350800c5faae34d1b28df1f9673c6c3d8455bf694d9193a8484ca78ab3/colmap_wrapper-1.1.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-10 14:28:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "meyerls",
    "github_project": "colmap-wrapper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "open3d",
            "specs": []
        },
        {
            "name": "opencv-contrib-python",
            "specs": []
        },
        {
            "name": "pyquaternion",
            "specs": [
                [
                    "==",
                    "0.9.9"
                ]
            ]
        },
        {
            "name": "matplotlib",
            "specs": []
        },
        {
            "name": "tqdm",
            "specs": [
                [
                    "==",
                    "4.64.0"
                ]
            ]
        },
        {
            "name": "wget",
            "specs": [
                [
                    "==",
                    "3.2"
                ]
            ]
        },
        {
            "name": "pycolmap",
            "specs": []
        },
        {
            "name": "pyexiftool",
            "specs": []
        }
    ],
    "lcname": "colmap-wrapper"
}
        
Elapsed time: 2.27661s