60 likes | 258 Views
Parallel implementation of RAndom SAmple Consensus (RANSAC). Adarsh Kowdle. Algorithm description. Iterative method to estimate parameters of a mathematical model from a set of observed data, which contains outliers A simple form of RANSAC considered for the project.
E N D
Parallel implementation of RAndomSAmple Consensus (RANSAC) Adarsh Kowdle
Algorithm description • Iterative method to estimate parameters of a mathematical model from a set of observed data, which contains outliers • A simple form of RANSAC considered for the project
Algorithm description • Step 1: Randomly sample the data to obtain two points • Step 2: Determine the parameters of the line joining these two points • Step 3: Evaluate the distance of every other points from this line=> serves as error function to be minimized • Step 4: Repeat Step 1 till the required number of iterations have been completed • Step 5: The resulting line parameters represents the best line fit for the given observations of 2D points.
Parallel design proposed - OpenMP Suppose that there are 10000 data points Master randomly samples data points and passes it to the threads Master Thread 2 Thread 1 Thread 3 Thread N Data points in shared memory, instantiate threads to compute error Thread 2 Thread 1 Thread 3 Thread N Different variants of the code tried out
Results and conclusions • Extracted data points offline using Matlab – about 10000 data points • The data points were created by adding noise to it a known line, so, best fit line is known • Implemented the parallel version of RANSAC using OpenMP directives and tested with these data points • Performance • Serial code took 0.24 seconds for 5000 iterations • OpenMP parallel implementation takes 0.05 seconds for 5000 iterations
Results and conclusions • A parallel version of RANSAC has been implemented • With the use of OMP directives, a five-folddecrease in time taken has been achieved which is significant