1 / 70

Stereo Matching

Stereo Matching. Computer Vision CSE576, Spring 2005 Richard Szeliski. Stereo Matching. Given two or more images of the same scene or object, compute a representation of its shape What are some possible applications?. ?. Face modeling.

Download Presentation

Stereo Matching

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. Stereo Matching Computer VisionCSE576, Spring 2005Richard Szeliski

  2. Stereo Matching • Given two or more images of the same scene or object, compute a representation of its shape • What are some possible applications? ? Stereo matching

  3. Face modeling • From one stereo pair to a 3D head model[Frederic Deverney, INRIA] Stereo matching

  4. Z-keying: mix live and synthetic • Takeo Kanade, CMU (Stereo Machine) Stereo matching

  5. View Interpolation • Given two images with correspondences, morph (warp and cross-dissolve) between them [Chen & Williams, SIGGRAPH’93] • input depth image novel view[Matthies,Szeliski,Kanade’88] Stereo matching

  6. More view interpolation • Spline-based depth mapinput depth image novel view • [Szeliski & Kang ‘95] Stereo matching

  7. View Morphing • Morph between pair of images using epipolar geometry [Seitz & Dyer, SIGGRAPH’96] Stereo matching

  8. Video view interpolation Stereo matching

  9. Stereo matching

  10. Virtualized RealityTM • [Takeo Kanade et al., CMU] • collect video from 50+ stream • reconstruct 3D model sequences • steerable version used forSuperBowl XXV “eye vision” • http://www.cs.cmu.edu/afs/cs/project/VirtualizedR/www/VirtualizedR.html Stereo matching

  11. Real-time stereo Used for robot navigation (and other tasks) Software-based real-time stereo techniques • Nomad robot searches for meteorites in Antartica • http://www.frc.ri.cmu.edu/projects/meteorobot/index.html Stereo matching

  12. Additional applications • Real-time people tracking (systems from Pt. Gray Research and SRI) • “Gaze” correction for video conferencing [Ott,Lewis,Cox InterChi’93] • Other ideas? Stereo matching

  13. Stereo Matching • Given two or more images of the same scene or object, compute a representation of its shape • What are some possible representations? • depth maps • volumetric models • 3D surface models • planar (or offset) layers Stereo matching

  14. Stereo Matching • What are some possible algorithms? • match “features” and interpolate • match edges and interpolate • match all pixels with windows (coarse-fine) • use optimization: • iterative updating • dynamic programming • energy minimization (regularization, stochastic) • graph algorithms Stereo matching

  15. Outline (remainder of lecture) • Image rectification • Matching criteria • Local algorithms (aggregation) • iterative updating • Optimization algorithms: • energy (cost) formulation & Markov Random Fields • mean-field, stochastic, and graph algorithms • Multi-View stereo & occlusions Stereo matching

  16. epipolar line epipolar plane viewing ray Stereo: epipolar geometry • Match features along epipolar lines Stereo matching

  17. Stereo image pair Stereo matching

  18. Public Library, Stereoscopic Looking Room, Chicago, by Phillips, 1923 Anaglyphs http://www.rainbowsymphony.com/freestuff.html (Wikipedia for images) Stereo matching

  19. Stereo: epipolar geometry • for two images (or images with collinear camera centers), can find epipolar lines • epipolar lines are the projection of the pencil of planes passing through the centers • Rectification: warping the input images (perspective transformation) so that epipolar lines are horizontal Stereo matching

  20. Rectification • Project each image onto same plane, which is parallel to the epipole • Resample lines (and shear/stretch) to place lines in correspondence, and minimize distortion • [Loop and Zhang, CVPR’99] Stereo matching

  21. Rectification BAD! Stereo matching

  22. Rectification GOOD! Stereo matching

  23. Finding correspondences • apply feature matching criterion (e.g., correlation or Lucas-Kanade) at all pixels simultaneously • search only over epipolar lines (many fewer candidate positions) Stereo matching

  24. Your basic stereo algorithm For each epipolar line For each pixel in the left image • Improvement: match windows • This should look familar... • compare with every pixel on same epipolar line in right image • pick pixel with minimum match cost Stereo matching

  25. Image registration (revisited) • How do we determine correspondences? • block matching or SSD (sum squared differences)d is the disparity (horizontal motion) • How big should the neighborhood be? Stereo matching

  26. Neighborhood size • Smaller neighborhood: more details • Larger neighborhood: fewer isolated mistakes • w = 3 w = 20 Stereo matching

  27. Matching criteria • Raw pixel values (correlation) • Band-pass filtered images [Jones & Malik 92] • “Corner” like features [Zhang, …] • Edges [many people…] • Gradients [Seitz 89; Scharstein 94] • Rank statistics [Zabih & Woodfill 94] Stereo matching

  28. Stereo: certainty modeling • Compute certainty map from correlations • input depth map certainty map Stereo matching

  29. input image composite virtual camera Plane Sweep Stereo • Sweep family of planes through volume  projective re-sampling of (X,Y,Z) • each plane defines an image  composite homography Stereo matching

  30. Plane Sweep Stereo • For each depth plane • compute composite (mosaic) image — mean • compute error image — variance • convert to confidence and aggregate spatially • Select winning depth at each pixel Stereo matching

  31. Plane sweep stereo • Re-order (pixel / disparity) evaluation loopsfor every pixel, for every disparity for every disparity for every pixel compute cost compute cost Stereo matching

  32. Stereo matching framework • For every disparity, compute raw matching costsWhy use a robust function? • occlusions, other outliers • Can also use alternative match criteria Stereo matching

  33. Stereo matching framework • Aggregate costs spatially • Here, we are using a box filter(efficient moving averageimplementation) • Can also use weighted average,[non-linear] diffusion… Stereo matching

  34. Stereo matching framework • Choose winning disparity at each pixel • Interpolate to sub-pixel accuracy E(d) d* d Stereo matching

  35. Traditional Stereo Matching • Advantages: • gives detailed surface estimates • fast algorithms based on moving averages • sub-pixel disparity estimates and confidence • Limitations: • narrow baseline  noisy estimates • fails in textureless areas • gets confused near occlusion boundaries Stereo matching

  36. Feature-based stereo • Match “corner” (interest) points • Interpolate complete solution Stereo matching

  37. Data interpolation • Given a sparse set of 3D points, how do we interpolate to a full 3D surface? • Scattered data interpolation [Nielson93] • triangulate • put onto a grid and fill (use pyramid?) • place a kernel function over each data point • minimize an energy function Stereo matching

  38. Energy minimization • 1-D example: approximating splines dx,y zx,y Stereo matching

  39. Relaxation • How can we get the best solution? • Differentiate energy function, set to 0 Stereo matching

  40. Relaxation • Iteratively improve a solution by locally minimizing the energy: relax to solution • Earliest application: WWII numerical simulations zx,y dx+1,y dx,y dx+1,y Stereo matching

  41. Dynamic programming • Evaluate best cumulative cost at each pixel 0 0 0 0 0 1 1 1 1 1 Stereo matching

  42. Dynamic programming • 1-D cost function Stereo matching

  43. Dynamic programming • Disparity space image and min. cost path Stereo matching

  44. Dynamic programming • Sample result (note horizontal streaks) • [Intille & Bobick] Stereo matching

  45. Dynamic programming • Can we apply this trick in 2D as well? dx-1,y dx,y dx-1,y-1 dx,y-1 No: dx,y-1 anddx-1,y may depend on different values of dx-1,y-1 Stereo matching

  46. Graph cuts • Solution technique for general 2D problem Stereo matching

  47. Graph cuts • a-b swap • expansion modify smoothness penalty based on edges compute best possible match within integer disparity Stereo matching

  48. Graph cuts • Two different kinds of moves: Stereo matching

  49. Bayesian inference • Formulate as statistical inference problem • Prior model pP(d) • Measurement model pM(IL, IR| d) • Posterior model • pM(d | IL, IR)  pP(d) pM(IL, IR| d) • Maximum a Posteriori (MAP estimate): • maximize pM(d | IL, IR) Stereo matching

  50. Markov Random Field • Probability distribution on disparity field d(x,y) • Enforces smoothness or coherence on field Stereo matching

More Related