Package: pydegensac
pydegensacThis repository contains an Python wrapper of RANSAC for homography and fundamental matrix estimation
from sparse correspondences. It implementsLO-RANSACandDEGENSAC.It was originally located inhttps://github.com/ducha-aiki/pyransac, but was renamed to avoid conflict with already existingpyransacin pypi from other author.PerformanceVanilla pydegensac implementation is marginally better than OpenCV one and with degeneracy-check enabled (DEGENSAC) it is the state of the art,
according to the recent study Yin et.al."Image Matching across Wide Baselines: From Paper to Practice", 2020.InstallationTo build and installpydegensac, you can use pip:pipinstallpydegensacOr clone or download this repository and then, from within the repository, run:python3./setup.pyinstallorpip3install.Building hints from Tomasz MalisiewiczCompiling pydegensac without a system-wide install.python3./setup.pybuildCompiling on Mac OS X computer
Use GCC instead of Clang. The most recent version on my machine (installed via brew) is gcc-8. Try this:CC=gcc-8python3./setup.pybuildCompiling on Ubuntu 18.04
You need LAPACK and a few other libraries and I always forget those specific package names. Take a look at my pydegensac Dockerfile to see the exact packages you need to apt install on an Ubuntu 18.04 system (https://github.com/quantombone/pydegensac-dockerfile/blob/master/Dockerfile)FROMubuntu:18.04update systemRUNapt-getclean
RUNapt-getupdate
RUNapt-getinstall-qy\gitpython3python3-setuptoolspython3-dev
RUNapt-getinstall-ycmakelibblas-devliblapack-devgfortran
RUNapt-getinstall-yg++gccdownload and build pydegensacRUN git clone https://github.com/ducha-aiki/pydegensac.git
WORKDIR pydegensac
RUN python3 ./setup.py buildcopy built assets into target directory (which will be a -v volume)CMDcp-R/pydegensac/build/lib.linux-x86_64-3.6/pydegensac/target_directorydockerfilehttps://github.com/quantombone/pydegensac-dockerfileExample of usageimportpydegensacH,mask=pydegensac.findHomography(src_pts,dst_pts,3.0)F,mask=pydegensac.findFundamentalMatrix(src_pts,dst_pts,3.0)See also thisnotebookwith simple exampleAnd thisnotebookwith detailed explanation of possible optionsRequirementsPython 3CMake 2.8.12 or higherLAPACK,BLAS (OpenBLAS, MKL, Atlas, ...)A modern compiler with C++11 supportCitationPlease cite us if you use this code:@InProceedings{Chum2003,
author="Chum, Ond{\v{r}}ej and Matas, Ji{\v{r}}{\'i} and Kittler, Josef",
title="Locally Optimized RANSAC",
booktitle="Pattern Recognition",
year="2003",
}

@inproceedings{Chum2005,
author = {Chum, Ondrej and Werner, Tomas and Matas, Jiri},
title = {Two-View Geometry Estimation Unaffected by a Dominant Plane},
booktitle = {CVPR},
year = {2005},
}

@article{Mishkin2015MODS,
      title = "MODS: Fast and robust method for two-view matching ",
      journal = "Computer Vision and Image Understanding ",
      year = "2015",
      issn = "1077-3142",
      doi = "http://dx.doi.org/10.1016/j.cviu.2015.08.005",
      url = "http://www.sciencedirect.com/science/article/pii/S1077314215001800",
      author = "Dmytro Mishkin and Jiri Matas and Michal Perdoch"
}AcknowledgementsThis wrapper part is based on greatBenjamin Jackpython_cpp_example.