Robust Line Fitting: RANSAC, Least Squares, and Probabilistic - Prof. Shishir Shah, Study notes of Computer Science

Various methods for fitting lines to data points, including least squares, total least squares, and probabilistic approaches. It also discusses the challenges of dealing with many lines or uncertain data and introduces ransac as a solution. The mathematical concepts behind these methods and provides references for further study.

Typology: Study notes

Pre 2010

Uploaded on 08/17/2009

koofers-user-t82
koofers-user-t82 🇺🇸

10 documents

1 / 66

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Fitting: Data to Model
Acknowledgement: Notes by Profs. R. Szeliski, S. Seitz, S. Lazebnik, and S. Shah
COSC 6373
Computer Vision
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42

Partial preview of the text

Download Robust Line Fitting: RANSAC, Least Squares, and Probabilistic - Prof. Shishir Shah and more Study notes Computer Science in PDF only on Docsity!

Fitting: Data to Model

Acknowledgement: Notes by Profs. R. Szeliski, S. Seitz, S. Lazebnik, and S. Shah

COSC 6373

Computer Vision

Fitting: Concepts and recipes

Least squares line fitting

Data: ( x 1 , y 1 ), …, ( xn , yn ) Line equation: yi = m xi + b Find ( m , b ) to minimize ( x i , y i

y=mx+b

Least squares line fitting

Data: ( x 1 , y 1 ), …, ( xn , yn ) Line equation: yi = m xi + b Find ( m , b ) to minimize Normal equations: least squares solution to XB=Y ( x i , y i

y=mx+b

Total least squares

Distance between point ( xn , yn ) and line ax+by=d ( a 2 +b 2 = 1): | ax + by – d | Find ( a , b , d ) to minimize the sum of squared perpendicular distances (^) ( x i , y i

ax+by=d Unit normal: N= ( a, b )

Total least squares

Distance between point ( xn , yn ) and line ax+by=d ( a 2 +b 2 = 1): | ax + by – d | Find ( a , b , d ) to minimize the sum of squared perpendicular distances (^) ( x i , y i

ax+by=d Unit normal: N= ( a, b ) d = a n xi + b n i = 1 n ∑ (^) i = 1 yi n ∑ =^ ax^ +^ by Solution to ( U T U ) N = 0, subject to || N || 2 = 1: eigenvector of U T U associated with the smallest eigenvalue (least squares solution to homogeneous linear system UN = 0 )

Total least squares

N = ( a , b ) second moment matrix

Least squares as likelihood maximization

  • Generative model : line points are corrupted by Gaussian noise in the direction perpendicular to the line (^) ( x , y ) ax+by=d ( u , v ) ε point on the line noise: zero-mean Gaussian with std. dev. σ normal direction

Probabilistic fitting: General concepts

  • Likelihood:

Probabilistic fitting: General concepts

  • Likelihood:
  • Log-likelihood:

Probabilistic fitting: General concepts

  • Likelihood:
  • Log-likelihood:
  • Maximum likelihood estimation:
  • Maximum a posteriori (MAP) estimation: prior

Least squares for general curves

  • We would like to minimize the sum of squared geometric distances between the data points

and the curve

( x i , y i

d(( x i , y i

), C )

curve C

Least squares for conics

  • Equation of a general conic:

C( a , x ) = a · x = ax

2

+ bxy + cy

2

+ dx + ey + f = 0,

a = [ a, b, c, d, e, f],

x = [ x

2

, xy, y

2

, x, y, 1]

  • Minimizing the geometric distance is non-linear even for a conic
  • Algebraic distance: C( a , x )
  • Algebraic distance minimization by linear least squares:

Least squares for conics

  • Least squares system: D a = 0
  • Need constraint on a to prevent trivial solution
  • Discriminant: b 2 - 4 ac  Negative: ellipse  Zero: parabola  Positive: hyperbola
  • Minimizing squared algebraic distance subject to constraints leads to a generalized eigenvalue problem  Many variations possible
  • For more information:  A. Fitzgibbon, M. Pilu, and R. Fisher, Direct least-squares fitting of ellipses, EEE Transactions on Pattern Analysis and Machine Intelligence, 21(5), 476--480, May 1999