RANSAC RANdom SAmple Consensus • Start with a model • 2 ( t x , t y ) How many parameters? • Minimal amount of data points n ? 1 pair • In each iteration • Sample n points • Fit model parameters • Find inliers (below some threshold) • Revise model parameters • Calculate error on all points, save best result
RANSAC RANdom SAmple Consensus • Start with a model • 2 ( t x , t y ) How many parameters? • Minimal amount of data points n ? 1 pair • In each iteration • Sample n points • Fit model parameters • Find inliers (below some threshold) • Revise model parameters • Calculate error on all points, save best result
RANSAC RANdom SAmple Consensus • Start with a model • 2 ( t x , t y ) How many parameters? • Minimal amount of data points n ? 1 pair • In each iteration • Sample n points • Fit model parameters • Find inliers (below some threshold) • Revise model parameters • Calculate error on all points, save best result
RANSAC RANdom SAmple Consensus • Start with a model 2 ( t x , t y ) • How many parameters? • Minimal amount of data points n ? 1 pair • In each iteration • Sample n points • Fit model parameters • Find inliers (below some threshold) • Revise model parameters Use best result • Calculate error on all points, save best result
RANSAC RANdom SAmple Consensus How many iterations?
RANSAC RANdom SAmple Consensus How many iterations? p probability that a given data point is valid (an inlier)
RANSAC RANdom SAmple Consensus How many iterations? p probability that a given data point is valid (an inlier) n amount of data points that define a transformation
RANSAC RANdom SAmple Consensus How many iterations? p probability that a given data point is valid (an inlier) n amount of data points that define a transformation M number of iterations
RANSAC RANdom SAmple Consensus How many iterations? p probability that a given data point is valid (an inlier) n amount of data points that define a transformation M number of iterations S probability of success after M iterations
RANSAC RANdom SAmple Consensus How many iterations? p probability that a given data point is valid (an inlier) n amount of data points that define a transformation M number of iterations S probability of success after M iterations Probability of a successful iteration (all points are inliers)
RANSAC RANdom SAmple Consensus How many iterations? p probability that a given data point is valid (an inlier) n amount of data points that define a transformation M number of iterations S probability of success after M iterations p n Probability of a successful iteration (all points are inliers)
RANSAC RANdom SAmple Consensus How many iterations? p probability that a given data point is valid (an inlier) n amount of data points that define a transformation M number of iterations S probability of success after M iterations p n Probability of a successful iteration (all points are inliers) Probability of a failed iteration
RANSAC RANdom SAmple Consensus How many iterations? p probability that a given data point is valid (an inlier) n amount of data points that define a transformation M number of iterations S probability of success after M iterations p n Probability of a successful iteration (all points are inliers) Probability of a failed iteration 1 − p n
RANSAC RANdom SAmple Consensus How many iterations? p probability that a given data point is valid (an inlier) n amount of data points that define a transformation M number of iterations S probability of success after M iterations p n Probability of a successful iteration (all points are inliers) Probability of a failed iteration 1 − p n Probability of all M iterations to fail
RANSAC RANdom SAmple Consensus How many iterations? p probability that a given data point is valid (an inlier) n amount of data points that define a transformation M number of iterations S probability of success after M iterations p n Probability of a successful iteration (all points are inliers) Probability of a failed iteration 1 − p n Probability of all M iterations to fail (1 − p n ) M
RANSAC RANdom SAmple Consensus How many iterations? p probability that a given data point is valid (an inlier) n amount of data points that define a transformation M number of iterations S probability of success after M iterations p n Probability of a successful iteration (all points are inliers) Probability of a failed iteration 1 − p n Probability of all M iterations to fail (1 − p n ) M Probability of success after M iterations
RANSAC RANdom SAmple Consensus How many iterations? p probability that a given data point is valid (an inlier) n amount of data points that define a transformation M number of iterations S probability of success after M iterations p n Probability of a successful iteration (all points are inliers) Probability of a failed iteration 1 − p n Probability of all M iterations to fail (1 − p n ) M Probability of success after M iterations S = 1 − (1 − p n ) M
RANSAC RANdom SAmple Consensus How many iterations? p probability that a given data point is valid (an inlier) n amount of data points that define a transformation M number of iterations S probability of success after M iterations p n Probability of a successful iteration (all points are inliers) Probability of a failed iteration 1 − p n Probability of all M iterations to fail (1 − p n ) M M = log(1 − S ) Probability of success after M iterations S = 1 − (1 − p n ) M log(1 − p n )
90 n = 1 67.5 M = log(1 − S ) log(1 − p n ) Number of iterations M 45 22.5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.99 0.999 0.9999 Probability of success S 10% inliers (p = 0.1)
10000 n = 1 n = 3 7500 M = log(1 − S ) log(1 − p n ) Number of iterations M 5000 2500 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.99 0.999 0.9999 Probability of success S 10% inliers (p = 0.1)
1000000 n = 1 n = 3 n = 5 750000 M = log(1 − S ) log(1 − p n ) Number of iterations M 500000 250000 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.99 0.999 0.9999 Probability of success S 10% inliers (p = 0.1)
1000000 n = 1 n = 3 n = 5 M = log(1 − S ) log(1 − p n ) Number of iterations M 1000 1 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.99 0.999 0.9999 Probability of success S 10% inliers (p = 0.1)
1000000 n = 1 n = 3 460,514 n = 5 M = log(1 − S ) log(1 − p n ) Number of iterations M 4603 1000 44 1 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.99 0.999 0.9999 Probability of success S 10% inliers (p = 0.1)
Geometric Transformations
Review — homogeneous coordinates [ x , y ,1] ∼ [ λ x , λ y , λ ]
Review — homogeneous coordinates Cartesian coordinates [ x , y ,1] ∼ [ λ x , λ y , λ ]
Review — homogeneous coordinates Cartesian coordinates [ x , y ,1] ∼ [ λ x , λ y , λ ] [ x , y ,0] Point at infinity
Review — homogeneous coordinates Cartesian coordinates [ x , y ,1] ∼ [ λ x , λ y , λ ] [ x , y ,0] Point at infinity [0,0,0] Omitted
Review — homogeneous coordinates 1 0 t x x + t x x [ 1 ] = y y + t y 0 1 t y 1 0 0 1 Translation as matrix multiplication
1 0 t x 0 1 t y 0 0 1 Translation
cos θ − sin θ t x sin θ cos θ t y 0 0 1 Translation + rotation = Rigid, Euclidean
s cos θ − s sin θ t x s sin θ s cos θ t y 0 0 1 Translation + rotation + uniform scale = Similarity
a b t x c d t y 0 0 1 Translation + rotation + scale + shear = Affine
a b t x c d t y e f 1 Projective, Perspective, Homography
Transformation Preserves Degrees of freedom Transformation Preserves Degrees of freedom Translation Rigid Similarity A ffi ne Projective
Transformation Preserves Degrees of freedom Transformation Preserves Degrees of freedom Translation Rigid Similarity A ffi ne Projective Straight lines Projective
Transformation Preserves Degrees of freedom Transformation Preserves Degrees of freedom Translation Rigid Similarity A ffi ne Parallelism A ffi ne Projective Straight lines Projective
Transformation Preserves Degrees of freedom Transformation Preserves Degrees of freedom Translation Rigid Similarity Angles Similarity A ffi ne Parallelism A ffi ne Projective Straight lines Projective
Transformation Preserves Degrees of freedom Transformation Preserves Degrees of freedom Translation Rigid Length Rigid Similarity Angles Similarity A ffi ne Parallelism A ffi ne Projective Straight lines Projective
Transformation Preserves Degrees of freedom Transformation Preserves Degrees of freedom Translation Orientation Translation Rigid Length Rigid Similarity Angles Similarity A ffi ne Parallelism A ffi ne Projective Straight lines Projective
Transformation Preserves Degrees of freedom Transformation Preserves Degrees of freedom Translation Orientation Translation Translation 2 Rigid Length Rigid Similarity Angles Similarity A ffi ne Parallelism A ffi ne Projective Straight lines Projective
Transformation Preserves Degrees of freedom Transformation Preserves Degrees of freedom Translation Orientation Translation Translation 2 Rigid Length Rigid Rigid 3 Similarity Angles Similarity A ffi ne Parallelism A ffi ne Projective Straight lines Projective
Transformation Preserves Degrees of freedom Transformation Preserves Degrees of freedom Translation Orientation Translation Translation 2 Rigid Length Rigid Rigid 3 Similarity Angles Similarity Similarity 4 A ffi ne Parallelism A ffi ne Projective Straight lines Projective
Transformation Preserves Degrees of freedom Transformation Preserves Degrees of freedom Translation Orientation Translation Translation 2 Rigid Length Rigid Rigid 3 Similarity Angles Similarity Similarity 4 A ffi ne Parallelism A ffi ne A ffi ne 6 Projective Straight lines Projective
Transformation Preserves Degrees of freedom Transformation Preserves Degrees of freedom Translation Orientation Translation Translation 2 Rigid Length Rigid Rigid 3 Similarity Angles Similarity Similarity 4 A ffi ne Parallelism A ffi ne A ffi ne 6 Projective Straight lines Projective Projective 8
2D Homographies
2D Homographies [Szeliski & Shum ’97] connect between 3D scenes viewed by a rotating camera
2D Homographies moving camera, plane [Szeliski & Shum ’97] Image from OpenCV documentation connect between 3D scenes connect between planes seen by different cameras viewed by a rotating camera
2D Homographies moving camera, plane [Szeliski & Shum ’97] Image from OpenCV documentation connect between 3D scenes connect between planes seen by different cameras viewed by a rotating camera We’ll revisit these in a later class (structure from motion, scene building)
Non-linear
̂ ̂ Non-linear 1 Quadratic x y ] = [ y a 0 a 1 a 2 a 3 a 4 a 5 [ b 5 ] x xy b 0 b 1 b 2 b 3 b 4 x 2 y 2 Or higher orders Polynomial
̂ ̂ Non-linear 1 Quadratic x y ] = [ y a 0 a 1 a 2 a 3 a 4 a 5 [ b 5 ] x xy b 0 b 1 b 2 b 3 b 4 x 2 y 2 Or higher orders Polynomial Radial
̂ ̂ Non-linear 1 Quadratic x y ] = [ y a 0 a 1 a 2 a 3 a 4 a 5 [ b 5 ] x xy b 0 b 1 b 2 b 3 b 4 x 2 y 2 Or higher orders Polynomial Radial Deformation fields
Beier & Neely ‘92
Q Q ′ � v X v X ′ � u u P ′ � P Destination Image Source Image
Recommend
More recommend