C++ library for computing homographies with support in MATLAB and Python.
This repository contains four solvers for computing homographies with simultaneous radial distortion correction and/or incorporating IMU data.
Authors (year) | Number of points | Minimal | Radial distortion coeff. | IMU data | General homography | Separarate intrinsic/extrinsic |
---|---|---|---|---|---|---|
Fitzgibbon (2001) | 5 | ✔️ | ✔️ | |||
Kukelova et al. (2015) | 5 | ✔️ | ✔️ (2) | ✔️ | ||
Valtonen Örnhag et al. (2020) | 4 | ✔️ | ✔️ | ✔️ | ||
Valtonen Örnhag et al. (2021) | 3 | ✔️ | ✔️ | ✔️ | ||
4 | ✔️ | ✔️ | ✔️ | ✔️ |
The solvers by Valtonen Örnhag et al. are original implementations, the other are re-implementations. If you use the code in your work, please cite the following articles:
@InProceedings {valtonen-ornhag-etal-2020-icpr,
author = {Valtonen~{\"O}rnhag, Marcus and Persson, Patrik and Wadenb{\"a}ck, M{\aa}rten and {\AA}str{\"o}m, Kalle and Heyden, Anders},
title = {Minimal Solvers for Indoor UAV Positioning},
booktitle = {Proceedings of the 25th International Conference on Pattern Recognition (ICPR)},
month = {January},
year = {2021},
pages = {1136-1143}
}
@InProceedings{valtonen-ornhag-etal-2021-wacv,
author = {Valtonen~{\"O}rnhag, Marcus and Persson, Patrik and Wadenb{\"a}ck, M{\aa}rten and {\AA}str{\"o}m, Kalle and Heyden, Anders},
title = {Efficient Real-Time Radial Distortion Correction for UAVs},
booktitle = {Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)},
month = {January},
year = {2021},
pages = {1751-1760}
}
The source code depends on Eigen 3 (older versions not compatible). Installation for Ubuntu/Debian:
$ apt-get install libeigen3-dev
The source code has been compiled and tested on Ubuntu 18.04 (Bionic Beaver) with g++-7 to g++-9 as well as clang++-7 to clang++-9. Furthermore, it is tested on OSX with Xcode 10-12.
It is possible to MEX-compile the solver and use it in MATLAB. Check the
compile_mex.m
function in the MATLAB directory. You may have to change the path to Eigen,
e.g. /usr/local/include/eigen3
.
The official python repository is python-homlib. A pre-alpha release is available at PyPi, and can be installed using
$ pip install homlib
Many of the solvers were generated using the automatic generator proposed by Larsson et al. "Efficient Solvers for Minimal Problems by Syzygy-based Reduction" (CVPR 2017)