• Stars
    star
    425
  • Rank 102,094 (Top 3 %)
  • Language
    C++
  • License
    Other
  • Created over 5 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The MAGSAC algorithm for robust model fitting without using an inlier-outlier threshold

Important news

I am happy to announce that MAGSAC++ had been included in OpenCV. You can check the documentation at link. A comparison of OpenCV MAGSAC++ with the other robust estimators is at link thanks to Dmytro Mishkin.

OpenCV USAC Benchmark

The MAGSAC and MAGSAC++ algorithms for robust model fitting without using a single inlier-outlier threshold

The MAGSAC and MAGSAC++ algorithms proposed for robust model estimation without a single inlier-outlier threshold.

The MAGSAC paper is available at Link.

The MAGSAC++ available at Link.

Both methods are explained in the Latest developments in RANSAC presentation from CVPR tutorial RANSAC in 2020.

Experiments on homography, fundamental matrix, essential matrix, and 6D pose estimation are shown in the corresponding presentation from the tutorial RANSAC in 2020.

Tested on OpenCV 3.46 and 4.3. To run the executable with the examples, copy the "data" folder next to the executable or set the path in the main() function.

If you use the algorithm, please cite

@inproceedings{barath2019magsac,
	author = {Barath, Daniel and Matas, Jiri and Noskova, Jana},
	title = {{MAGSAC}: marginalizing sample consensus},
	booktitle = {Conference on Computer Vision and Pattern Recognition},
	year = {2019},
}

@inproceedings{barath2019magsacplusplus,
	author = {Barath, Daniel and Noskova, Jana and Ivashechkin, Maksym and Matas, Jiri},
	title = {{MAGSAC}++, a fast, reliable and accurate robust estimator},
	booktitle = {Conference on Computer Vision and Pattern Recognition},
	year = {2020},
}

Installation C++

To build and install C++-only MAGSAC/MAGSAC++, clone or download this repository and then build the project by CMAKE.

$ git clone https://github.com/danini/magsac --recursive
$ cd build
$ cmake ..
$ make

Install Python package and compile C++

python3 ./setup.py install

or

pip3 install -e .

Example project

To build the sample project showing examples of fundamental matrix, homography and essential matrix fitting, set variable CREATE_SAMPLE_PROJECT = ON when creating the project in CMAKE.

Next to the executable, copy the data folder and, also, create a results folder.

Jupyter Notebook example

The example for homography fitting is available at: notebook.

The example for fundamental matrix fitting is available at: notebook.

The example for essential matrix fitting is available at: notebook.

An example comparing different samplers on fundamental matrix estimation is available at: notebook.

Requirements

  • Eigen 3.0 or higher
  • CMake 2.8.12 or higher
  • OpenCV 3.0 or higher
  • A modern compiler with C++17 support
  • GFlags

Performance of MAGSAC++

MAGSAC++ is the state of the art according to "RANSAC in 2020" CVPR tutorial's experiments.

Performance of MAGSAC

MAGSAC is the state of the art according to the recent study Yin et.al."Image Matching across Wide Baselines: From Paper to Practice", 2020.

IMW-benchmark

IMW-Challenge

More Repositories

1

graph-cut-ransac

The Graph-Cut RANSAC algorithm proposed in paper: Daniel Barath and Jiri Matas; Graph-Cut RANSAC, Conference on Computer Vision and Pattern Recognition, 2018. It is available at http://openaccess.thecvf.com/content_cvpr_2018/papers/Barath_Graph-Cut_RANSAC_CVPR_2018_paper.pdf
C++
429
star
2

progressive-x

The Progressive-X algorithm proposed in paper: Daniel Barath and Jiri Matas; Progressive-X: Efficient, Anytime, Multi-Model Fitting Algorithm, International Conference on Computer Vision, 2019. It is available at https://arxiv.org/pdf/1906.02290
Jupyter Notebook
70
star
3

homography-benchmark

Python
65
star
4

pose-graph-initialization

C++
43
star
5

affine-correspondences-for-camera-geometry

C
43
star
6

multi-h

The C++ implementation of Multi-H algorithm, which is a multi-plane fitting technique. If you use this work for Academic purposes, please cite Barath, D. and Matas, J. and Hajder, L., Multi-H: Efficient Recovery of Tangent Planes in Stereo Images. 27th British Machine Vision Conference, 2016
C++
32
star
7

homography-from-sift-features

MATLAB
27
star
8

multi-x

The Multi-X algorithm proposed in paper: Daniel Barath and Jiri Matas, Multi-class model fitting by energy-minimization and mode-seeking, European Conference on Computer Vision, 2018. It is available at http://openaccess.thecvf.com/content_ECCV_2018/papers/Daniel_Barath_Multi-Class_Model_Fitting_ECCV_2018_paper.pdf
C++
15
star
9

five-point-fundamental

The Matlab implementation of the 5 point fundamental matrix estimator. If you use this work for Academic purposes, please cite Barath, D., Five-point fundamental matrix estimation for uncalibrated cameras, Conference on Computer Vision and Pattern Recognition, 2018
MATLAB
14
star
10

absolute-pose-from-oriented-and-scaled-features

C++
13
star
11

clustering-in-consensus-space

Jupyter Notebook
11
star
12

cvpr2022-affine-tutorial

The official site of the CVPR 2022 Affine Correspondences and Their Applications tutorial
SCSS
11
star
13

learning-good-models-in-ransac

10
star
14

recovering-affine-features

D. Barath, "Recovering affine features from orientation-and scale-invariant ones", Asian Conference on Computer Vision (ACCV), 2019
MATLAB
5
star
15

robust-line-based-estimator

Jupyter Notebook
3
star
16

sutd_hololens_mapping

Python
2
star