Important note: If you are only interested in using the library under Matlab, now there is a precompiled mex-library for 64-bit systems available. You can download it from:
Windows: http://laurentkneip.github.io/publications/opengv.mexw64
Mac OSX: http://laurentkneip.github.io/publications/opengv.mexmaci64
These versions have been added around March 2016, so please be aware that later additions may not be included in this distribution. You can go immediately to Use under Matlab to receive further instructions on the Matlab interface.
The OpenGV library aims at unifying geometric computer vision algorithms for calibrated camera pose computation within a single efficient C++-library. OpenGV stands for Open Geometric Vision. It contains classical central and more recent non-central absolute and relative camera pose computation algorithms, as well as triangulation and point-cloud alignment functionalities, all extended by non-linear optimization and RANSAC contexts. It contains a flexible C++-interface as well as Matlab and Python wrappers, and eases the comparison of different geometric vision algorithms. A benchmark to compare the various solutions for one particular problem against each other is included in the Matlab stuff.
The library is described in the paper (Please cite if you use it for your research!):
- L. Kneip, P. Furgale, "OpenGV: A unified and generalized approach to real-time calibrated geometric vision", Proc. of The IEEE International Conference on Robotics and Automation (ICRA), Hong Kong, China. May 2014.
The library has been developped in the context of the following papers.
- L. Kneip, D. Scaramuzza, R. Siegwart, "A Novel Parametrization of the Perspective-Three-Point Problem for a Direct Computation of Absolute Camera Position and Orientation", Proc. of The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Colorado Springs, USA. June 2011.
- L. Kneip, M. Chli, R. Siegwart, "Robust Real-Time Visual Odometry with a Single Camera and an IMU", Proc. of The British Machine Vision Conference (BMVC), Dundee, UK. August 2011.
- T. Kazik, L. Kneip, J. Nikolic, M. Pollefeys, R. Siegwart, "Real-Time 6D Stereo Visual Odometry with Non-Overlapping Fields of View", Proc. of The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Providence, USA. June 2012.
- L. Kneip, R. Siegwart, M. Pollefeys, "Finding the Exact Rotation Between Two Images Independently of the Translation", Proc. of The European Conference on Computer Vision (ECCV), Florence, Italy. October 2012.
- L. Kneip, P. Furgale, R. Siegwart, "Using Multi-Camera Systems in Robotics: Efficient Solutions to the NPnP Problem", Proc. of The IEEE International Conference on Robotics and Automation (ICRA), Karlsruhe, Germany. May 2013.
- L. Kneip, S. Lynen, "Direct Optimization of Frame-to-Frame Rotation", Proc. of The International Conference on Computer Vision (ICCV), Sydney, Australia. December 2013.
- L. Kneip, H. Li, "Efficient Computation of Relative Pose for Multi-Camera Systems", In Proc. of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Columbus, USA. June 2014.
- L. Kneip, H. Li, Y. Seo, "UPnP: An optimal O(n) solution to the absolute pose problem with universal applicability", In Proc. of The European Conference on Computer Vision (ECCV), Zurich, Switzerland. September 2014.
Please cite the OpenGV paper as well as the corresponding paper if you use OpenGV to work on a particular problem.
Getting started
OpenGV features the following set of algorithms:
-
Absolute camera pose computation:
-
absolute pose computation with known rotation
-
two P3P-algorithms (Kneip, Gao)
-
generalized P3P
-
the EPnP algorithm by Lepetit and Fua
-
an extension of the EPnP algorithm to the non-central case (Kneip)
-
the generalized absolute pose solver presented at ICRA 2013 (Kneip)
-
non-linear optimization over n correspondences (both central and non-central)
-
the UPnP algorithm presented at ECCV 2014 (both central and non-central, and minimal and non-minimal)
-
Relative camera-pose computation:
-
2-point algorithm for computing the translation with known relative rotation
-
2-point algorithm for deriving the rotation in a pure-rotation situation
-
n-point algorithm for deriving the rotation in a pure-rotation situation
-
5-point algorithm by Stewenius
-
5-point algorithm by Nister
-
5-point algorithm to solve for rotations directly (by Kneip)
-
7-point algorithm
-
8-point algorithm by Longuet-Higgins
-
6-point algorithm by Henrik Stewenius for generalized relative pose
-
17-point algorithm by Hongdong Li
-
non-linear optimization over n correspondences (both central and non-central)
-
relative rotation as an iterative eigenproblem (by Kneip)
-
generalized reltive rotation for multi-camera systems as an iterative eigenproblem (by Kneip)
-
Two methods for point-triangulation
-
Arun's method for aligning point clouds
-
Generic sample-consensus problems for most algorithms useable with Ransac
-
Math tools:
-
Generic Sturm-sequence implementation for numerical root-finding
-
Algebraic root finding
-
Cayley rotations
-
Unit/Benchmarking tests for all algorithms
-
Matlab interface
-
Python interface
The aim of OpenGV is to make these algorithms accessible to real-time computer vision and robotics-related tasks, that require efficient pose computation of calibrated cameras. It is also intended to serve as a benchmarking framework for testing and comparing different solutions to geometric-vision problems. The library realizes a clean separation between 2D-2D, 2D-3D, and 3D-3D registration tasks. It thus provides a somewhat missing block between image-processing libraries (e.g. OpenCV) and more exhaustive non-linear optimization frameworks (e.g. g2o, ceres). By working exclusively with 3D unit bearing-vectors, it allows to be applied in conjunction with any optical projection system.
Please consult the following sub-pages to get a step-by-step introduction to the library: