Skip to content
/ ransac Public

Implementation of RANSAC algorithm in python

Notifications You must be signed in to change notification settings

Maxsash/ransac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

RANSAC

Implementation of RANSAC algorithm in python 3. The code in ransac_main.py uses random data everytime it is run.

This random data is stored in data_x and data_y. (line 58) The main algorithm uses the properties of triangles to figure out the inliers and outliers.

At the beginning of the file (upto line 16) the various parameters can be changed.

Parameter description:

  • DEBUG_MODE
  • (line 5)

    can be toggled to print results and actions at various points of the code.

  • data_size
  • (line 8)

    is the number of samples. The more samples you take, the more time will the code take to run.

  • x_size
  • (line 9)

    is the range for x-cordinate, starting from zero.

  • y_size
  • (line 10)

    is the range for y-cordinate, starting from zero.

  • threshold_factor
  • li (line 13)

    defines the threshold for determinig inliers

  • threshold
  • (line 14)

    since the threshold depends on the size of graph. I have used a simple formula to relate them.

  • optimized_distance
  • (line 15)

    is used so that points that are too close together are not used since this was giving bad results.

  • angle_threshold
  • (line 16)

    is used to filter out points too far away from the model line.

About

Implementation of RANSAC algorithm in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages