1 / 50

Geometry of Images

Geometry of Images. Pinhole camera, projection A taste of projective geometry Two view geometry: Homography Epipolar geometry, the essential matrix Camera calibration, the fundamental matrix Stereo vision: 3D shape reconstruction from two views Factorization: reconstruction from many views.

wolfe
Télécharger la présentation

Geometry of Images

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Geometry of Images • Pinhole camera, projection • A taste of projective geometry • Two view geometry: • Homography • Epipolar geometry, the essential matrix • Camera calibration, the fundamental matrix • Stereo vision: 3D shape reconstruction from two views • Factorization: reconstruction from many views

  2. Geometry of Images

  3. Cameras • Camera obscura dates from 15th century • First photograph on record shown in the book - 1822 • Basic abstraction is the pinhole camera • Current cameras contain a lens and a recording device (film, CCD) • The human eye functions very much like a camera

  4. Camera Obscura "Reinerus Gemma-Frisius, observed an eclipse of the sun at Louvain on January 24, 1544, and later he used this illustration of the event in his book De Radio Astronomica et Geometrica, 1545. It is thought to be the first published illustration of a camera obscura..." Hammond, John H., The Camera Obscura, A Chronicle

  5. Why Not UsePinhole Camera • If pinhole is too big - many directions are averaged, blurring the image • Pinhole too small diffraction effects blur the image • Generally, pinhole cameras are dark, because a very small set of rays from a particular point hits the screen.

  6. Lenses

  7. Lenses • Lenses collect light from a large hole and direct it to a single point • Overcome the darkness of pinhole cameras • But there is a price • Focus • Radial distortions • Chromatic abberations • … • Pinhole is useful as a model

  8. Pinhole Camera

  9. Single View Geometry ∏ f

  10. Notation • O – Focal center • π – Image plane • Z – Optical axis • f – Focal length

  11. Projection y x f Y X Z

  12. Perspective Projection Homogeneous Coordinates

  13. Orthographic Projection • Projection rays are parallel • Image plane is fronto-parallel • (orthogonal to rays) • Focal center at infinity

  14. Scaled Orthographic Projection Also called “weak perspective”

  15. Pros and Cons of Projection Models • Weak perspective has simpler math. • Accurate when object is small and distant. • Most useful for recognition of objects. • Pinhole perspective much more accurate for scenes. • Used in structure from motion. • When accuracy really matters, we must model the real camera • Use perspective projection with other calibration parameters (e.g., radial lens distortion)

  16. World Cup 66: England-Germany

  17. World Cup 66: Second View

  18. World Cup 66: England-Germany Conclusion: no goal (missing 3 inches) (Reid and Zisserman, “Goal-directed video metrology”)

  19. Euclidean Geometry • Answers the question what objects have the same shape (= congruent) Same shapes are related by rotation and translation

  20. Projective Geometry • Answers the question what appearances (projections) represent the same shape Same shapes are related by a projective transformation

  21. Perspective Distortion Parallel lines meet at the horizon (“vanishing line”) Where do parallel lines meet?

  22. Line Perspective Pencil of rays Perspective mapping

  23. Plane Perspective

  24. Ideal points Projective transformation can map ∞ to a real point

  25. Coordinates in Euclidean Space Not in space 0 1 2 3 ∞

  26. Coordinates in Projective Line Points on a line P1 are represented as rays from origin in 2D, Origin is excluded from space “Ideal point” k(1,1) k(0,1) k(-1,1) k(2,1) -1 0 1 2 ∞ k(1,0)

  27. Coordinates in Projective Plane k(0,1,1) k(1,1,1) “Ideal point” k(0,0,1) k(1,0,1) k(x,y,0)

  28. 2D Projective Geometry: Basics • A point: • A line: we denote a line with a 3-vector • Points and lines are dual: p is on l if • Intersection of two lines: • A line through two points:

  29. Area of parallelogram bounded by u and v Cross Product Every entry is a determinant of the two other entries

  30. Ideal points Q: How many ideal points are there in P2? A: 1 degree of freedom family – the line at infinity

  31. Projective Transformation (Homography) • Any finite sequence of perspectivities is a projective transformation • Projective transformations map lines to lines • Represented by an invertible 3x3 linear transformation (up to scale), denote by H , or • Given homography H, how does it operate on lines?

  32. Euclidean Transformations (Isometries) Rotation: Translation:

  33. Hierarchy of Transformations • Isometry (Euclidean), • Similarity, • Affine, general linear • Projective,

  34. Invariants

  35. Perspective Projection Note: P and p are related by a scale factor, but it is a different factor for each point (depends on Z)

  36. Two View Geometry • When a camera changes position and orientation, the scene moves rigidly relative to the camera • In two cases this results in homography: • Camera rotates around its focal point • The scene is planar In this case the mapping from one image to the second is one to one and depth cannot be recovered • In the general case the induced motion is more complex and is captured by what is termed “epipolar geometry”

  37. Camera Rotation (R is 3x3 non-singular)

  38. Planar Scenes Scene • Intuitively A sequence of two perspectivities • Algebraically Camera 2 Camera 1

  39. Two Views Related by Homography Two images are related by homography: • One to one mapping from p to p’ • H contains 8 degrees of freedom • Given correspondences, each point determines 2 equations • 4 points are required to recover H • Depth cannot be recovered

  40. General Case: Epipolar Lines epipolar line

  41. Epipolar Plane P epipolar plane epipolar line epipolar line O O’ Baseline

  42. Epipole • Every plane through the baseline is an epipolar plane, and determines a pair of epipolar lines in the two images • Two systems of epipolar lines are obtained, each system intersects in a point, the epipole • The epipole is the projection of the center of the other camera epipolar plane epipolar lines epipolar lines O’ O Baseline

  43. Epipolar Lines To define an epipolar plane, we define the plane through the two camera centers O and O’ and some point P. This can be written algebraically (in some world coordinates as follows: P epipolar plane epipolar line epipolar line O O’ Baseline

  44. Epipolar Lines • Set world coordinates around the first camera • What to do with O’P? Every rotation changes the observed coordinate in the second image • We need to de-rotate to make the second image plane parallel to the first • Replacing by image points

  45. Essential Matrix • Denote this by: • Then • Define , then • E is called the “essential matrix”

  46. Essential Matrix • E is rank 2. Its (right and left) null spaces are the two epipoles • is linear and homogeneous in E, E can be recovered up to scale using 8 points • The additional constraint detE=0 reduces the needed points to 7 • In fact, there are only 5 degrees of freedom in E, • 3 for rotation • 2 for translation (up to scale), determined by epipole

  47. Internal Calibration • Camera parameters may be unknown: • (cx,cy) camera center, (ax,ay) pixel dimensions, b skew • Radial distortions are not accounted for

  48. Fundamental Matrix • F, the fundamental matrix, too is rank 2 • F has 7 d.o.f. (9 entries, homogeneous, and detF=0)

  49. Summary

More Related