xmba15 / simple_parallel_line_fitting

simple parallel line fitting using RANSAC linear least squares

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ“ 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


About

simple parallel line fitting using RANSAC linear least squares


Languages

Language:Julia 50.3%Language:Python 49.7%