Skip to content

path-robotics/GRANSAC

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GRANSAC: Multi-threaded generic RANSAC implemetation

This is a header-only, multi-threaded implementation of the RANSAC algorithm, used widely in computer vision.

Unlikely most other implementations, this is a generic implementation which can be adopted for any problem. The user has to implement a class that inherits the AbstractModel class. Using RANSAC afterwards should just work.

Dependencies

This library uses C++11 features, so a suitable compiler is required (GCC 4.7+, Visual Studio 2013+). Additionally, OpenMP is needed for multi-threading.

Optionally, to build the line fiting example, OpenCV and CMake are required.

Usage

Just include the header GRANSAC.hpp in your application. The AbstractModel class needs to be inherited to implement a suitable model for your application.

Example: Line Fitting

To demonstrate how to use the library a line fitting example is included. To build this example do the following:

$ pwd
<SOME_DIR>/GRANSAC
$ mkdir build && cd build
$ cmake ../examples/
$ make
$ ./LineFittingSample 1000 500

Running LineFittingSample should display a window with random 2D points around the diagonal. Green points show inliers.

RANSAC line fitting example

License

GRANSAC is released under an MIT License.

Contact

Srinath Sridhar ([email protected]) Max Planck Institute for Informatics

Note on building with GTest on Ubuntu

Installing libgtest-dev only installs the source files. You must build the libraries manually and copy (or symlink) them to an appropriate directory.

sudo apt install libgtest-dev
cd /usr/src/gtest
sudo cmake CMakeLists.txt
sudo make
sudo cp *.a /usr/lib

About

Multi-threaded generic RANSAC implemetation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 95.4%
  • CMake 4.6%