Sample-Implementation of the Ransac-Algorithm for a linear Model (using Qt + OpenCV)


Intro

Ransac-Algorithm is explained on Wikipedia (http://en.wikipedia.org/wiki/RANSAC).

My observation-set is a linear 16bit-distribution with noise (y=a*x+b+noise).

Noise (gaussian-distribution) is generated by using the polar form of the Box-Muller transformation (see http://www.taygeta.com/random/gaussian.html).


Implementation

Download http://www.joerg-reiling.de/ransac/ransac.tgz


Build-Instructions On Linux / Ubuntu 10.10


Output

Running the executable, several data-files will be generated. Use gnuplot („gnuplot> plot './0.dat'“) to examine the outputs.

0.dat“ contains the raw observation-set:

0


The file with highest index contains the best fit:

1


Joerg Reiling / Vers. 1.0 / 2010-12-17 / www.joerg-reiling.de