Computer Vision TexPoint fonts used in EMF: AAA Niels Chr Overgaard 2010 Lecture 8: Structure from...
-
Upload
penelope-bullis -
Category
Documents
-
view
217 -
download
2
Transcript of Computer Vision TexPoint fonts used in EMF: AAA Niels Chr Overgaard 2010 Lecture 8: Structure from...
Computer Vision
Niels Chr Overgaard2010
Lecture 8: Structure from Motion
•RANSAC•Structure from motion problem•Structure estimation•Motion estimation•Structure and motion estimation
Goal: To understand the general ideas andSome of the methods.
Read: Forsyth & PonceChapter: 12 - 13
Datorseende vt-10 Föreläsning 8
RANSACRandom sampling concensus
RANSAC - is a general probabilistic method for model estimation given noisy and contaminated data.
Example: Line fitting (15 noisy + 5 outliers)
Theory Practice
Datorseende vt-10 Föreläsning 8
RANSAC – algorithm (outline)
1.Input:• S = data points• n = sample size• k = number of iterations• t = threshold for godness of fit• ( d = sufficient number of inliers (optional) )
2.Loop: repeat k times• Pick n-sample at random from S• Fit model to sample• Count #inliers (i.e. points in S fitting the model within threshold t)• Store sample and inliers if better than the previous one.• ( Stop if #inliers > d (optional) )
3.Finalization:• Fit model to the inliers of the best sample obtained.
Datorseende vt-10 Föreläsning 8
Example: line fitting (again)
Recall our situation: 20 points given, 5 outliers:
Sample size: n = 2. Number of iterations: k>6 (we use k=7)Threshold for goodness of fit: d=0.5 (wrt. scale in figure)
Datorseende vt-10 Föreläsning 8
The final line estimation:
Notice: Exhaustive search for the line with most inliers requires 190 iterations!
RANSAC: How many iterations?
Let w denote (#inliers)/(#data points).
n = the sample size (n=2 for lines, n=4 for plane homographies)
k iterations.
The probability that a random n-sample is correct:
The probability that k random n-sample contains at least one outlier each:
Choose k so large that the fraction of failures is smaller than a given tolerance z.
nw
knw )1(
Sampel storlek Andelen outliers
N 5% 10% 20% 25% 30% 40% 50%
2 2 3 5 6 7 11 17
3 3 4 7 9 11 19 35
4 3 5 9 13 17 34 72
5 4 6 12 17 26 57 146
6 4 7 16 24 37 97 293
7 4 8 20 33 54 163 588
8 5 9 26 44 78 272 1177från Hartley & Zisserman
RANSAC: k for p=1-z=0.99
Datorseende vt-10 Föreläsning 8
The Structure from Motion Problem
•Many cameras (images)•Many scene points•Estimate all of them!
Let us see how this is done in principle