New version with some improvements including much faster and more accurate essential matrix estimation (and fundamental matrix with known intrinsics) is available in the branch version2
. If no issues will be raised then new branch will be merged with master.
Solvers for:
- Affine matrix (3 points)
- Homography matrix (4 points)
- Fundamental matrix (7 and 8 points)
- Essential matrix (5 points)
- Perspective projection matrix (3 points P3P, linear 6 points)
Install and run:
git submodule update --init
mkdir build && cd build
cmake ..
make -j $(nproc)
./vsac
Install Python bindings:
python3 ./setup.py install
Run Python example:
python3 python/example.py
Libraries:
- OpenCV (required)
- Eigen (optional, recommended)
- LAPACK (optional)
Note, to run essential matrix estimation either Eigen or LAPACK has to be installed.
If your own CMakeLists.txt is used then include add_definitions(-DHAVE_LAPACK)
and add_definitions(-DHAVE_EIGEN)
in case any of these libraries is available.
Under lib
directory there are Eigen
headers that are included in case Eigen library is not installed, otherwise this directory can be deleted.
File with example code is samples/samples.cpp
. For Python it is python/example.py
.
The VSAC framework enables to add new methods and solvers. To do it you need:
- Implement your new method as a derived class.
- Add a name of your method in the
inlude/vsac.hpp
enum. - Expand if condition in the
src/init.cpp
to choose your method.
Older VSAC version is integrated into OpenCV could be run with the following flags:
- USAC_PROSAC
- USAC_ACCURATE
- USAC_PARALLEL
- USAC_DEFAULT
- USAC_FAST
- USAC_MAGSAC
@InProceedings{Ivashechkin_2021_ICCV,
author = {Ivashechkin, Maksym and Barath, Daniel and Matas, Ji\v{r}{\'\i}},
title = {VSAC: Efficient and Accurate Estimator for H and F},
booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
month = {October},
year = {2021},
pages = {15243-15252}
}