https://arxiv.org/abs/2006.05926
http://www.gil-ba.com/sep_f/SeparableF.html
This repository contains a C++ implementation of the Separable Four Points Fundamental Matrix Finding algorithm.
- Optionally, resizing the images to a smaller size.
- Matching line segments with at least 4 points between two images.
- Running RANSAC to find the longest segments with most inliers, and picking the lines with the max angle.
- For each line, sampling 4 more points for a RANSAC to compute the fundamental matrix.
- Returning the matrix with the most inliers
- Optionally, computing a matrix from the inliers.
-
To build and run on windows using VS 2017, provided a .sln with complete tests and a tester
-
Integration (pending, Oct 20) to opencv is available on https://github.com/AmirOfir/opencv_contrib/tree/Separable_Fundemental_matrix
Use standard installation using cmake. -
To build and run on python (tested on windows 10, anaconda, python 3.7.7, opencv 4.1.1):
python setup.py install -
To build and run on python (tested on ubuntu Ubuntu 20.04.1 LTS, anaconda, python 3.7.7, opencv 3.7):
python setup_linux.py install -
Importing to the python script
import sepfm -
For finding a fundamental matrix:
sepfm.findSeparableMat(img1_points, img2_points, img_height, img_width) -
For running opencv code with full RANSAC:
sepfm.findFundamentalMatRegular(img1_points, img2_points)
-
Tester directory contains a set of images with corresponding point sets in csv format.
python tester\test.py -
Time comparing against full RANSAC are available
python tester\times.py
Please, do not hesitate reaching us for bug reports, features and exposure of additional arguments to python. For contribution please contact Gil Ben-Arzi. Please credit and cite.