Skip to content

Commit

Permalink
Added all methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioRAgostinho committed May 16, 2019
1 parent eb29c78 commit 7a9a338
Show file tree
Hide file tree
Showing 7 changed files with 860 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build
dist
*.egg-info*
__pycache__
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## Introduction

A Python 3 implementation of the absolute pose estimation method for minimal configurations of mixed points and lines introduced by Zhou et al. in

> Lipu Zhou, Jiamin Ye, and Michael Kaess. A Stable Algebraic Camera Pose Estimation for Minimal Configurations of 2D/3D Point and Line Correspondences. In Asian Conference on Computer Vision, 2018.
This package also includes an implementation the robustified version of Kukelova et al. E3Q3 method presented in


> Zuzana Kukelova, Jan Heller, and Andrew Fitzgibbon. Efficient intersection of three quadrics and applications in computer vision. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016.

They are clearly isolated, so if you're only interested in E3Q3 you can import it separate from everything else.
```python
from zhou_accv_2018 import e3q3
```

**License:** Apache 2.0

## Installing

Clone this repo and invoke from its root folder
```
python setup.py install
```

## Interesting Facts

Despite being a Python implementation, the majority of code is written in C. It is a really small section if compared with the extent of the full implementation, but it is way bigger than everything else in its sheer byte size! There are some really long expressions in a very small fraction of the code which Python's interpreter simply couldn't parse, so I've relegated that job to a C compiler.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
numpy
48 changes: 48 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
from setuptools import setup
from distutils.core import Extension



def install_requires():
"""Generate list with dependency requirements"""

deps = []
with open("requirements.txt", "r") as f:
for line in f:
deps.append(line[:-1])
return deps


def long_description():
with open("README.md", "r") as f:
return f.read()


e3q3c_module = Extension("zhou_accv_2018.e3q3c", sources=["zhou_accv_2018/e3q3cmodule.c"])

setup(
name="zhou_accv_2018",
version="1.0.0",
license="Apache 2.0",
description="A Stable Algebraic Camera Pose Estimation for Minimal Configurations of 2D/3D Point and Line Correspondences.",
long_description=long_description(),
long_description_content_type="text/markdown",
install_requires=install_requires(),
author="Sérgio Agostinho",
author_email="sergio@sergioagostinho.com",
url="https://github.com/SergioRAgostinho/zhou-accv-2018",
packages=["zhou_accv_2018"],
ext_modules=[e3q3c_module],
python_requires=">=3.5",
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering",
],
)
Loading

0 comments on commit 7a9a338

Please sign in to comment.