Skip to content

simple parallel line fitting using RANSAC linear least squares

Notifications You must be signed in to change notification settings

xmba15/simple_parallel_line_fitting

Repository files navigation

📝 simple parallel line fitting using RANSAC Linear Least Squares approximation


  • fitting of 2 parallel lines: see details about the formulation in reference [2]

  • fitting of 2 parallel parabolas: not the official text-book definition, but here 2 parallel parabolas p0, p1 are defined by: ax2+bx+c0 (p0); ax2+bx+c1 (p1). Then the parallel parabola fitting can be formulated by the following least squares problem:

🎉 TODO


  • fitting of two parallel lines, demo code
  • fitting of two parallel parabola, demo code
  • add julia code (just to practice julia)

🎛 Dependencies


  • python
python -m pip install -r requirements.txt
  • julia
pkg> activate .
pkg> instantiate

🏃 How to Run


  • python

    • demo for fitting of two parallel lines
    python demo_parallel_line_fitting.py
    • demo for fitting of two parabolas
    python demo_parallel_parabola_fitting.py
  • julia

    • demo for fitting of two parallel lines
    julia --project=. demo_parallel_line_fitting.jl
    • demo for fitting of two parallel parabolas
    julia --project=. demo_parallel_parabola_fitting.jl

You can also call the demo scripts from julia REPL with include syntax. This will reduce the latency for code loading and compilation for the second run on REPL. However, you will always suffer from loading and compilation latency if running directly from command line.

💎 References