stereo vision
play

Stereo Vision 16-385 Computer Vision (Kris Kitani) Carnegie Mellon - PowerPoint PPT Presentation

Stereo Vision 16-385 Computer Vision (Kris Kitani) Carnegie Mellon University Whats different between these two images? Objects that are close move more or less? The amount of horizontal movement is inversely proportional to The amount


  1. Stereo Vision 16-385 Computer Vision (Kris Kitani) Carnegie Mellon University

  2. What’s different between these two images?

  3. Objects that are close move more or less?

  4. The amount of horizontal movement is inversely proportional to …

  5. The amount of horizontal movement is inversely proportional to … … the distance from the camera.

  6. X image plane O 0 O

  7. X image plane x 0 x f f O 0 O

  8. X Z x 0 x f f O 0 O

  9. X Z x 0 x f f O 0 O (baseline) b

  10. X X Z = x f Z x 0 x f f O 0 O (baseline) b

  11. X X Z = x = x 0 b − X f Z f Z x 0 x f f O 0 O (baseline) b

  12. X X Z = x = x 0 b − X f Z f Z x 0 x f f O 0 O (baseline) b Disparity d = x − x 0 = bf Z

  13. X X Z = x = x 0 b − X f Z f Z x 0 x f f O 0 O (baseline) b Disparity inversely proportional d = x − x 0 to depth = bf Z

  14. Real-time stereo sensing Nomad robot searches for meteorites in Antartica http://www.frc.ri.cmu.edu/projects/meteorobot/index.html

  15. Subaru Eyesight system Pre-collision braking

  16. How so you compute depth from a stereo pair?

  17. 1. Rectify images 
 (make epipolar lines horizontal) 2. For each pixel a. Find epipolar line b. Scan line for best match c. Compute depth from disparity Z = bf d

  18. How can you make the epipolar lines horizontal?

  19. It’s hard to make the image planes exactly parallel

  20. How can you make the epipolar lines horizontal?

  21. How can you make the epipolar lines horizontal? When this relationship holds: R = I t = ( T , 0, 0) x x’ t

  22. How can you make the epipolar lines horizontal? When this relationship holds: R = I t = ( T , 0, 0) Let’s try this out… 0 0 0 & # $ ! x E t R 0 0 T = × = − $ ! 0 T 0 $ ! % " x’ This always has to hold t x T E x 0 , " =

  23. How can you make the epipolar lines horizontal? When this relationship holds: R = I t = ( T , 0, 0) Let’s try this out… 0 0 0 & # $ ! x E t R 0 0 T = × = − $ ! 0 T 0 $ ! % " x’ This always has to hold t x T E x 0 , " = Write out the constraint 0 0 0 u 0 ! . + ' $ ' $ % " % " , ) ( ) ( ) u v 1 0 0 T v 0 u v 1 T 0 ! − = − = % " % " , ) % " % " 0 T 0 1 T v , ) ! - * & # & #

  24. How can you make the epipolar lines horizontal? When this relationship holds: R = I t = ( T , 0, 0) Let’s try this out… 0 0 0 & # $ ! x E t R 0 0 T = × = − $ ! 0 T 0 $ ! % " x’ This always has to hold t x T E x 0 , " = The image of a 3D point will always be on the same Write out the constraint horizontal line 0 0 0 u 0 ! . + ' $ ' $ % " % " , ) ( ) ( ) u v 1 0 0 T v 0 u v 1 T 0 Tv T v ! ! − = − = = % " % " , ) % " % " 0 T 0 1 T v , ) ! - * & # & # y coordinate is always the same!

  25. What is stereo rectification?

  26. What is stereo rectification?

  27. What is stereo rectification? Reproject image planes onto a common plane parallel to the line between camera centers

  28. What is stereo rectification? Reproject image planes onto a common plane parallel to the line between camera centers Need two homographies (3x3 transform), one for each input image reprojection C. Loop and Z. Zhang. Computing Rectifying Homographies for Stereo Vision.Computer Vision and Pattern Recognition, 1999.

  29. Stereo Rectification 1. Rotate the right camera by R 
 (aligns camera coordinate system orientation only) 2. Rotate ( rectify ) the left camera so that the epipole is at infinity 3. Rotate ( rectify ) the right camera so that the epipole is at infinity 4. Adjust the scale

  30. Stereo Rectification: 1. Compute E to get R 2. Rotate right image by R 3. Rotate both images by R rect 4. Scale both images by H

  31. Stereo Rectification: rotate by R 1. Compute E to get R 2. Rotate right image by R 3. Rotate both images by R rect 4. Scale both images by H

  32. Stereo Rectification: 1. Compute E to get R 2. Rotate right image by R 3. Rotate both images by R rect 4. Scale both images by H

  33. Stereo Rectification: rotate by R rect rotate by R rect 1. Compute E to get R 2. Rotate right image by R 3. Rotate both images by R rect 4. Scale both images by H

  34. Stereo Rectification: 1. Compute E to get R 2. Rotate right image by R 3. Rotate both images by R rect 4. Scale both images by H

  35. Stereo Rectification: scale by H scale by H 1. Compute E to get R 2. Rotate right image by R 3. Rotate both images by R rect 4. Scale both images by H

  36. Stereo Rectification: 1. Compute E to get R 2. Rotate right image by R 3. Rotate both images by R rect 4. Scale both images by H

  37. What can we do after rectification?

  38. Setting the epipole to infinity 
 (Building R rect from e ) r >   1 epipole e r > Let R rect = Given: (using SVD on E)   2 (translation from E) r > 3 T r 1 = e 1 = epipole coincides with translation vector || T || 1 cross product of e and ⇥ − T y 0 ⇤ T x r 2 = the direction vector of q T 2 x + T 2 the optical axis y r 3 = r 1 × r 2 orthogonal vector

  39. T orthogonal If and r 2 r 3 r 1 = e 1 = || T || r >     ? 1 e 1  = r > ? R rect e 1 = then 2 e 1    r > ? 3 e 1

  40. T orthogonal If and r 2 r 3 r 1 = e 1 = || T || r >     1 1 e 1 r >  = R rect e 1 = 0 then 2 e 1    r > 0 3 e 1 Where is this point located on the image plane?

  41. T orthogonal If and r 2 r 3 r 1 = e 1 = || T || r >     1 1 e 1 r >  = R rect e 1 = 0 then 2 e 1    r > 0 3 e 1 Where is this point located on the image plane? At x-infinity

  42. Stereo Rectification Algorithm 1. Estimate E using the 8 point algorithm (SVD) 2. Estimate the epipole e (SVD of E ) 3. Build R rect from e 4. Decompose E into R and T 5. Set R 1 = R rect and R 2 = RR rect 6. Rotate each left camera point (warp image) 
 [x’ y’ z’] = R 1 [x y z] 7. Rectified points as p = f/z’[x’ y’ z’] 8. Repeat 6 and 7 for right camera points using R 2

  43. Stereo Rectification Algorithm 1. Estimate E using the 8 point algorithm 2. Estimate the epipole e (solve Ee =0) 3. Build R rect from e 4. Decompose E into R and T 5. Set R 1 = R rect and R 2 = RR rect 6. Rotate each left camera point x’~ Hx where H = KR 1 
 *You may need to alter the focal length (inside K ) to keep points within the original image size 7. Repeat 6 and 7 for right camera points using R 2

  44. Unrectified

  45. Unrectified Rectified

  46. Unrectified Rectified

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