geometric transformations ransac and morphing
play

Geometric Transformations, RANSAC and Morphing CS448V Computational - PowerPoint PPT Presentation

Geometric Transformations, RANSAC and Morphing CS448V Computational Video Manipulation April 2019 In previous lecture In previous lecture Feature detection In previous lecture Feature detection [0.1, 0.6, ...] Feature description


  1. 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

  2. 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

  3. 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

  4. 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

  5. RANSAC RANdom SAmple Consensus How many iterations?

  6. RANSAC RANdom SAmple Consensus How many iterations? p probability that a given data point is valid (an inlier)

  7. 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

  8. 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

  9. 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

  10. 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)

  11. 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)

  12. 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

  13. 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

  14. 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

  15. 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

  16. 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

  17. 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

  18. 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 )

  19. 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)

  20. 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)

  21. 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)

  22. 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)

  23. 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)

  24. Geometric Transformations

  25. Review — homogeneous coordinates [ x , y ,1] ∼ [ λ x , λ y , λ ]

  26. Review — homogeneous coordinates Cartesian coordinates [ x , y ,1] ∼ [ λ x , λ y , λ ]

  27. Review — homogeneous coordinates Cartesian coordinates [ x , y ,1] ∼ [ λ x , λ y , λ ] [ x , y ,0] Point at infinity

  28. Review — homogeneous coordinates Cartesian coordinates [ x , y ,1] ∼ [ λ x , λ y , λ ] [ x , y ,0] Point at infinity [0,0,0] Omitted

  29. 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

  30. 1 0 t x 0 1 t y 0 0 1 Translation

  31. cos θ − sin θ t x sin θ cos θ t y 0 0 1 Translation + rotation = Rigid, Euclidean

  32. s cos θ − s sin θ t x s sin θ s cos θ t y 0 0 1 Translation + rotation + uniform scale = Similarity

  33. a b t x c d t y 0 0 1 Translation + rotation + scale + shear = Affine

  34. a b t x c d t y e f 1 Projective, Perspective, Homography

  35. Transformation Preserves Degrees of freedom Transformation Preserves Degrees of freedom Translation Rigid Similarity A ffi ne Projective

  36. Transformation Preserves Degrees of freedom Transformation Preserves Degrees of freedom Translation Rigid Similarity A ffi ne Projective Straight lines Projective

  37. Transformation Preserves Degrees of freedom Transformation Preserves Degrees of freedom Translation Rigid Similarity A ffi ne Parallelism A ffi ne Projective Straight lines Projective

  38. 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

  39. 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

  40. 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

  41. 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

  42. 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

  43. 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

  44. 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

  45. 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

  46. 2D Homographies

  47. 2D Homographies [Szeliski & Shum ’97] connect between 3D scenes viewed by a rotating camera

  48. 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

  49. 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)

  50. Non-linear

  51. ̂ ̂ 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

  52. ̂ ̂ 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

  53. ̂ ̂ 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

  54. Beier & Neely ‘92

  55. Q Q ′ � v X v X ′ � u u P ′ � P Destination Image Source Image

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend