Ifeoma Nwogu i on csritedu Lecture 12 Robust line fitting and RANSAC Mathematical Models Compact Understanding of the World Input Prediction Model Playing Golf Mathematical Models Example ID: 783639
Download The PPT/PDF document "CSCI 631 Foundations of Computer Vision" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
CSCI 631Foundations of Computer Vision
Ifeoma
Nwogu
i
on
@
cs.rit.edu
Lecture
12 – Robust line fitting and RANSAC
Slide2Mathematical Models
Compact Understanding of the World
Input
Prediction
Model
Playing
Golf
Slide3Mathematical Models - Example
Face Recognition with varying expressions
Too Easy…
Slide4Mathematical Models
Face Recognition with varying expressions
Learn Model
Feature Space
Slide5Fitting Curves/Learning Data Manifolds
Fitting Line
Fitting Quadratic Curve
Learning Manifolds
Fitting Higher Degree
Polynomials
I.
Least Squares
Slide6Line FittingGoal: Find a line that best explains the observed data
Target: y
i
Data: xiLine parameter:
w,bLine Model:
yi = w xi + b
Fitting Line
Slide7Line Model: yi = w x
i
+ bToo many samples!
Minimize error:min. ∑(yi
- w xi + b)2
Line Fitting
Fitting Line
w,b
i=1
N
Slide8#Samples(m) vs #Model-Parameters(n)
Case 1 (m=n): Unique Solution
w=X\y
No least square requires
Slide9#Samples(m)
vs
#Model-Parameters(n)
Case 2 (m>n): Over-determined system of equations
No Solution exists!
Hence, we minimize error (fitting)
Slide10#Samples(m) vs #Model-Parameters(n)
Case 3 (m<n): Under-determined system of equations
Infinite Solutions exist!
Which one to choose?
Slide11Computer Vision - A Modern ApproachSet: FittingSlides by D.A. Forsyth
Robustness
As we have seen, squared error can be a source of bias in the presence of noise points
One fix is EM -
details in F&P textbookAnother is an M-estimator (we will look at this shortly)
Square nearby distances,
threshold far awayA third is RANSAC Search for good points
Slide12Computer Vision - A Modern ApproachSet: FittingSlides by D.A. Forsyth
Slide13Computer Vision - A Modern ApproachSet: FittingSlides by D.A. Forsyth
Slide14Computer Vision - A Modern ApproachSet: FittingSlides by D.A. Forsyth
Slide15Computer Vision - A Modern ApproachSet: FittingSlides by D.A. Forsyth
Slide16Computer Vision - A Modern ApproachSet: FittingSlides by D.A. Forsyth
Plot showing varying
s
Slide17Computer Vision - A Modern ApproachSet: FittingSlides by D.A. Forsyth
Slide18Computer Vision - A Modern ApproachSet: FittingSlides by D.A. Forsyth
Too small
Slide19Computer Vision - A Modern ApproachSet: FittingSlides by D.A. Forsyth
Too large
Slide20Computer Vision - A Modern ApproachSet: FittingSlides by D.A. Forsyth
Slide21III. RANSAC
Random Sample Consensus
Used for Parametric Matching/Model FittingApplications:
Slide22Line FittingFit the best possible Line to these points
Brute Force Search – 2
N
possibilities!!!Not FeasibleBetter Strategy?
Slide23How RANSAC WorksRandom Search – Much Faster!!!
Slide24Line Fitting using RANSACIteration 1
Slide25Line Fitting using RANSACIteration 1
Slide26Line Fitting using RANSACIteration 1
Slide27Line Fitting using RANSACIteration 2
Slide28Line Fitting using RANSACIteration 2
Slide29Line Fitting using RANSACIteration 2
Slide30Line Fitting using RANSAC…
Iteration 5
Slide31Line Fitting using RANSACIteration 5
Slide32Line Fitting using RANSACIteration 5
Slide33Why RANSAC Works?
Inliers
vs
OutliersP(selecting outliers) =
17C2/27
C2 + 17
C110C1/27C
2 = 0.48
Slide34Why RANSAC Works?
Inliers
vs
OutliersP(selecting outliers) 17
C2/27
C2 + 17
C110C1/27
C2 = 0.48After 5 iterations…P(selecting outliers) = (0.48)5
= 0.026
Slide35Why RANSAC Works?
In general:
p = 1 – (1 - w
n)k
Where, p = probability for selecting inliers
w = ratio of inliers to total #pointsn = minimum #points required (for line = 2, circle =3)
k = #iterations
Slide36RANSAC Algorithms
Slide37Schedule
Last class
End of segmentation discussion
TodayRobust model fittingReadings for today:
Forsyth and Ponce chapter 9;
37
Slide38Slide CreditsSvetlana
Lazebnik
– UIUCDerek
Hoiem – UIUCDavid Forsyth - UIUC
38
Slide39Next classObject detection and recognition
Readings for next lecture:
Forsyth and
Ponce chapter 17 and 18 Szelinski
chapter 14Readings for today: Forsyth
and Ponce chapter 10
39
Slide40Questions
40