lecture 17 multi view geometry
play

Lecture 17: Multi-view Geometry 1 Announcements New IA - PowerPoint PPT Presentation

Lecture 17: Multi-view Geometry 1 Announcements New IA office hours, starting next week Instead of raising your hand: send a message, then (after I answer) unmute and ask your question Please send us feedback!


  1. Lecture 17: Multi-view Geometry 1

  2. 
 
 
 
 Announcements • New IA office hours, starting next week 
 • Instead of raising your hand: send a message, then (after I answer) unmute and ask your question Please send us feedback! • 2

  3. Today • Review image formation • Epipolar geometry • Image alignment 3

  4. Recall: homogeneous coordinates Representing translations: homogeneous image coordinates Converting from homogeneous coordinates: 4 Source: N. Snavely

  5. Recall: camera parameters Camera w y (x, y, z) COP u v Three important coordinate systems: 1. World coordinates x o 2. Camera coordinates “The World” 3. Image coordinates z How do we project a given world point (x, y, z) to an image point? 5 Source: N. Snavely

  6. Recall: camera parameters intrinsics rotation translation 6 Source: N. Snavely

  7. Estimating depth from multiple views 7

  8. Stereo vision ~50cm ~6cm 8 Source: Torralba, Isola, Freeman

  9. 1, 2, N eyes 9 Source: Torralba, Isola, Freeman

  10. 1, 2, N eyes 10 Source: Torralba, Isola, Freeman

  11. 1, 2, N eyes 11 Source: Torralba, Isola, Freeman

  12. Depth without objects Random dot stereograms (Bela Julesz) Julesz, 1971 Source: Torralba, Isola, Freeman 12

  13. 13 Source: Torralba, Isola, Freeman

  14. Geometry for a simple stereo system Z 1 x L f X 1 14 Source: Torralba, Isola, Freeman

  15. Geometry for a simple stereo system Z 1 Z? x L f X 1 15 Source: Torralba, Isola, Freeman

  16. Geometry for a simple stereo system Z 1 Z 2 Z? x L x R f f X 1 X 2 T 16 Source: Torralba, Isola, Freeman

  17. Geometry for a simple stereo system Z 1 Z 2 Z? x L x R f f X 1 X 2 T 17 Similar triangles Source: Torralba, Isola, Freeman

  18. Geometry for a simple stereo system Z 1 Z 2 Z? x L x R f f X 1 X 2 T 18 Similar triangles Source: Torralba, Isola, Freeman

  19. Geometry for a simple stereo system Z 1 Z 2 Similar triangles: Z? T+X L -X R = x R Z-f x L f f X 1 X 2 T 19 Source: Torralba, Isola, Freeman

  20. Geometry for a simple stereo system Z 1 Z 2 Similar triangles: Z? T+X L -X R T = x R Z-f Z x L f f X 1 X 2 T 20 Source: Torralba, Isola, Freeman

  21. Geometry for a simple stereo system Z 1 Z 2 Similar triangles: Z? T+X L -X R T = x R Z-f Z x L f f X 1 X 2 Solving for Z: Disparity T T Z = f X L - X R 21 Source: Torralba, Isola, Freeman

  22. In 3D camera 2 camera 1 T 22 Source: Torralba, Isola, Freeman

  23. Disparity map Right image Left image Second picture is ~1m to the right 23 Source: Torralba, Isola, Freeman

  24. Disparity map Right image Left image 24 Source: Torralba, Isola, Freeman

  25. Disparity map Right image Left image 25 Source: Torralba, Isola, Freeman

  26. Disparity map I’(x,y) I’(x,y) = I(x+D(x,y), y) I(x,y) a Z(x,y) = D(x,y) D(x,y) 26 Source: Torralba, Isola, Freeman

  27. Finding correspondences We only need to search for matches along horizontal lines. 27 Source: Torralba, Isola, Freeman

  28. Basic stereo algorithm For each “epipolar line” For each pixel in the left image • compare with every pixel on same epipolar line in right image • pick pixel with minimum match cost CSE 576, Spring 2008 Stereo matching 28 Source: R. Szeliski

  29. Computing disparity 29 Source: Torralba, Isola, Freeman

  30. But you can learn depth from a single image 30 Source: Torralba, Isola, Freeman

  31. General case • The two cameras need not have parallel optical axes. 31 Source: Torralba, Isola, Freeman

  32. 32 Source: Torralba, Isola, Freeman

  33. Do we need to search for matches only along horizontal lines? 33 Source: Torralba, Isola, Freeman

  34. Do we need to search for matches only along horizontal lines? 34 Source: Torralba, Isola, Freeman

  35. Do we need to search for matches only along horizontal lines? It looks like we need to search everywhere... are there any constraints 
 that can guide the search? 35 Source: Torralba, Isola, Freeman

  36. Stereo correspondence constraints Camera 2 Camera 1 p’ ? p O’ O If we see a point in camera 1, are there any constraints on where we 
 will find it on camera 2? 36 Source: Torralba, Isola, Freeman

  37. Stereo correspondence constraints p’ ? p O’ O 37 Source: Torralba, Isola, Freeman

  38. Epipolar constraint p’ ? p O’ O 38 Source: Torralba, Isola, Freeman

  39. Some terminology p’ ? p O’ O 39 Source: Torralba, Isola, Freeman

  40. Some terminology p’ ? p Baseline O’ O Baseline: the line connecting the two camera centers Epipole : point of intersection of baseline with the image plane 40 Source: Torralba, Isola, Freeman

  41. Some terminology p’ ? p epipole epipole Baseline O’ O Baseline: the line connecting the two camera centers Epipole : point of intersection of baseline with the image plane 41 Source: Torralba, Isola, Freeman

  42. Some terminology epipolar plane p’ ? p O’ O Baseline: the line connecting the two camera centers Epipole : point of intersection of baseline with the image plane Epipolar plane: the plane that contains the two camera centers and a 3D point in the world 42 Source: Torralba, Isola, Freeman

  43. Some terminology epipolar line epipolar line p’ ? p O’ O Baseline: the line connecting the two camera centers Epipole : point of intersection of baseline with the image plane Epipolar plane: the plane that contains the two camera centers and a 3D point in the world Epipolar line : intersection of the epipolar plane with each image plane 43 Source: Torralba, Isola, Freeman

  44. Epipolar constraint epipolar line p’ ? p O’ O We can search for matches across epipolar lines All epipolar lines intersect at the epipoles 44 Source: Torralba, Isola, Freeman

  45. The fundamental matrix p’ p O’ O If we observe a point in one image, its position in the other image is constrained to lie on line defined by above. p T F p’ = 0 F: fundamental matrix p, p’: image points in homogeneous coordinates 45 Source: Torralba, Isola, Freeman

  46. The fundamental matrix p’ p O’ O Closely related to projection matrix: (p T F) p’ = 0 u T p’ = 0 K, K’: intrinsics matrices 46 R, t: relative pose u: a line induced by p See Hartley and Zisserman for derivation p, p’: image points in homogeneous coordinates

  47. Example: converging cameras Figure from Hartley & Zisserman Source: Kristen Grauman

  48. Image rectification 48 Source: A. Efros

  49. Active stereo with structured light Li Zhang’s one-shot stereo camera 1 camera 1 projector projector camera 2 Li Zhang, Brian Curless, and Steven M. Seitz. Rapid Shape Acquisition Using Color Structured Light and Multi-pass Dynamic Programming. In Proceedings of the 1st International Symposium on 3D Data Processing, Visualization, and Transmission (3DPVT) , Padova, Italy, June 19-21, 2002, pp. 24-36. CSE 576, Spring 2008 Stereo matching Source: R. Szeliski 49

  50. CSE 576, Spring 2008 Stereo matching 50

  51. 51

  52. 52

  53. 53

  54. Making panoramas Future problem set! Source: N. Snavely

  55. Image alignment Why don’t these image line up exactly? Source: N. Snavely

  56. Recall: affine transformations what happens when we change this row? affine transformation Source: N. Snavely

  57. Projective Transformations aka Homographies aka Planar Perspective Maps Called a homography (or planar perspective map) Source: N. Snavely

  58. Homographies Note that this can be 0! A “point at infinity” Source: N. Snavely

  59. Points at infinity Source: N. Snavely

  60. Homography Example: two pictures taken by rotating the camera: If we try to build a panorama by overlapping them: 60 Source: Torralba, Isola, Freeman

  61. Homography Example: two pictures taken by rotating the camera: With a homography you can map both images into a single camera: 61 Source: Torralba, Isola, Freeman

  62. Why does this work? Step 1: Convert pixels in image 2 to Image 2 rays in camera 2’s coordinate system. Optical Center Step 2: Convert rays in camera 2’s coordinates to rays in camera 1’s coordinates. Image 1 Step 3: Convert rays in camera 1’s coordinates to pixels in image 1’s coordinates. How do we map points in image 2 into image 1? image 1 image 2 intrinsics extrinsics 3x3 homography (rotation only) Source: N. Snavely

  63. Plane-to-plane homography image plane in front image plane below black area where no pixel maps to Source: N. Snavely

  64. Homographies • Homographies … – Affine transformations, and – Projective warps • Properties of projective transformations: – Origin does not necessarily map to origin – Lines map to lines – Parallel lines do not necessarily remain parallel – Ratios are not preserved – Closed under composition Source: N. Snavely

  65. 2D image transformations Source: N. Snavely

  66. Image warping Given a coordinate transformation ( x’ , y’ ) = T ( x,y ) and a source image f ( x,y ), how do we compute a transformed image g ( x’ , y’ ) = f ( T ( x , y ))? T ( x,y ) y’ y x x’ f ( x,y ) g ( x’,y’ ) Source: N. Snavely

Recommend


More recommend