Stereo Matching Computer Vision CSE576, Spring 2005 Richard Szeliski.

Slides:



Advertisements
Similar presentations
Gratuitous Picture US Naval Artillery Rangefinder from World War I (1918)!!
Advertisements

Stereo Many slides adapted from Steve Seitz. Binocular stereo Given a calibrated binocular stereo pair, fuse it to produce a depth image Where does the.
Recap from Previous Lecture Tone Mapping – Preserve local contrast or detail at the expense of large scale contrast. – Changing the brightness within.
Stereo.
776 Computer Vision Jan-Michael Frahm, Enrique Dunn Spring 2012.
MultiView Stereo Steve Seitz CSE590SS: Vision for Graphics.
Last Time Pinhole camera model, projection
Project 3 extension: Wednesday at noon Final project proposal extension: Friday at noon >consult with Steve, Rick, and/or Ian now! Project 2 artifact winners...
Computer Vision CSE576, Spring 2005 Richard Szeliski
CS6670: Computer Vision Noah Snavely Lecture 17: Stereo
Multiple View Geometry : Computational Photography Alexei Efros, CMU, Fall 2005 © Martin Quinn …with a lot of slides stolen from Steve Seitz and.
Project 2 winners Think about Project 3 Guest lecture on Monday: Aseem Announcements.
Direct Methods for Visual Scene Reconstruction Paper by Richard Szeliski & Sing Bing Kang Presented by Kristin Branson November 7, 2002.
Stereo Matching Vision for Graphics CSE 590SS, Winter 2001 Richard Szeliski.
Multi-view stereo Many slides adapted from S. Seitz.
Stereo Binocular Stereo Calibration (finish up) Next Time Motivation
Stereopsis Mark Twain at Pool Table", no date, UCR Museum of Photography.
The plan for today Camera matrix
CS 223b 1 More on stereo and correspondence. CS 223b 2 =?f g Mostpopular For each window, match to closest window on epipolar line in other image. (slides.
3D from multiple views : Rendering and Image Processing Alexei Efros …with a lot of slides stolen from Steve Seitz and Jianbo Shi.
CSCE 641 Computer Graphics: Image-based Modeling Jinxiang Chai.
Lecture 10: Stereo and Graph Cuts
Project 1 grades out Announcements. Multiview stereo Readings S. M. Seitz and C. R. Dyer, Photorealistic Scene Reconstruction by Voxel Coloring, International.
Announcements Project Update Extension: due Friday, April 20 Create web page with description, results Present your project in class (~10min/each) on Friday,
CSE473/573 – Stereo Correspondence
Announcements PS3 Due Thursday PS4 Available today, due 4/17. Quiz 2 4/24.
Stereo Guest Lecture by Li Zhang
Project 1 artifact winners Project 2 questions Project 2 extra signup slots –Can take a second slot if you’d like Announcements.
Stereo Matching & Energy Minimization Vision for Graphics CSE 590SS, Winter 2001 Richard Szeliski.
Midterm went out on Tuesday (due next Tuesday) Project 3 out today Announcements.
Multiple View Geometry : Computational Photography Alexei Efros, CMU, Fall 2006 © Martin Quinn …with a lot of slides stolen from Steve Seitz and.
Accurate, Dense and Robust Multi-View Stereopsis Yasutaka Furukawa and Jean Ponce Presented by Rahul Garg and Ryan Kaminsky.
Stereo matching Class 10 Read Chapter 7 Tsukuba dataset.
Review: Binocular stereo If necessary, rectify the two stereo images to transform epipolar lines into scanlines For each pixel x in the first image Find.
CSCE 641 Computer Graphics: Image-based Modeling Jinxiang Chai.
What have we leaned so far? Camera structure Eye structure Project 1: High Dynamic Range Imaging.
Computer Vision Spring ,-685 Instructor: S. Narasimhan WH 5409 T-R 10:30am – 11:50am Lecture #15.
Stereo Readings Trucco & Verri, Chapter 7 –Read through 7.1, 7.2.1, 7.2.2, 7.3.1, 7.3.2, and 7.4, –The rest is optional. Single image stereogram,
Camera Calibration & Stereo Reconstruction Jinxiang Chai.
What have we leaned so far? Camera structure Eye structure Project 1: High Dynamic Range Imaging.
Announcements Project 1 artifact winners Project 2 questions
Structure from images. Calibration Review: Pinhole Camera.
Recap from Monday Image Warping – Coordinate transforms – Linear transforms expressed in matrix form – Inverse transforms useful when synthesizing images.
Stereo Readings Szeliski, Chapter 11 (through 11.5) Single image stereogram, by Niklas EenNiklas Een.
Stereo Many slides adapted from Steve Seitz.
Project 2 code & artifact due Friday Midterm out tomorrow (check your ), due next Fri Announcements TexPoint fonts used in EMF. Read the TexPoint.
Stereo Many slides adapted from Steve Seitz. Binocular stereo Given a calibrated binocular stereo pair, fuse it to produce a depth image image 1image.
Computer Vision, Robert Pless
Computer Vision Lecture #10 Hossam Abdelmunim 1 & Aly A. Farag 2 1 Computer & Systems Engineering Department, Ain Shams University, Cairo, Egypt 2 Electerical.
Bahadir K. Gunturk1 Phase Correlation Bahadir K. Gunturk2 Phase Correlation Take cross correlation Take inverse Fourier transform  Location of the impulse.
Lecture 16: Stereo CS4670 / 5670: Computer Vision Noah Snavely Single image stereogram, by Niklas EenNiklas Een.
Digital Image Processing
776 Computer Vision Jan-Michael Frahm Spring 2012.
Solving for Stereo Correspondence Many slides drawn from Lana Lazebnik, UIUC.
Paper presentation topics 2. More on feature detection and descriptors 3. Shape and Matching 4. Indexing and Retrieval 5. More on 3D reconstruction 1.
Project 2 due today Project 3 out today Announcements TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA.
Project 2 artifacts—vote now!! Project 3 questions? Start thinking about final project ideas, partners Announcements.
Project 3 code & artifact due Tuesday Final project proposals due noon Wed (by ) –One-page writeup (from project web page), specifying: »Your team.
Energy minimization Another global approach to improve quality of correspondences Assumption: disparities vary (mostly) smoothly Minimize energy function:
CSE 185 Introduction to Computer Vision Stereo 2.
Stereo CS4670 / 5670: Computer Vision Noah Snavely Single image stereogram, by Niklas EenNiklas Een.
Noah Snavely, Zhengqi Li
Lecture 11 Homogeneous coordinates. Stereo.
CS4670 / 5670: Computer Vision Kavita Bala Lec 27: Stereo.
Announcements Midterms graded (handed back at end of lecture)
What have we learned so far?
Announcements Midterm due now Project 2 artifacts: vote today!
Computer Vision CSE576, Spring 2005 Richard Szeliski
Announcements Project 3 out today (help session at end of class)
Stereo vision Many slides adapted from Steve Seitz.
Presentation transcript:

Stereo Matching Computer Vision CSE576, Spring 2005 Richard Szeliski

CSE 576, Spring 2008Stereo matching2 Stereo Matching Given two or more images of the same scene or object, compute a representation of its shape What are some possible applications? ?

CSE 576, Spring 2008Stereo matching3 Face modeling From one stereo pair to a 3D head model [Frederic Deverney, INRIA]Frederic Deverney

CSE 576, Spring 2008Stereo matching4 Z-keying: mix live and synthetic Takeo Kanade, CMU (Stereo Machine)Stereo Machine

CSE 576, Spring 2008Stereo matching5 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]

CSE 576, Spring 2008Stereo matching6 More view interpolation Spline-based depth map inputdepth imagenovel view [Szeliski & Kang ‘95]

CSE 576, Spring 2008Stereo matching7 View Morphing Morph between pair of images using epipolar geometry [Seitz & Dyer, SIGGRAPH’96]

CSE 576, Spring 2008Stereo matching8 Video view interpolation

CSE 576, Spring 2008Stereo matching9

CSE 576, Spring 2008Stereo matching10 Virtualized Reality TM [Takeo Kanade et al., CMU] collect video from 50+ stream reconstruct 3D model sequences steerable version used for SuperBowl XXV “eye vision”eye vision

CSE 576, Spring 2008Stereo matching11 Real-time stereo Used for robot navigation (and other tasks) Software-based real-time stereo techniques Nomad robot Nomad robot searches for meteorites in Antartica

CSE 576, Spring 2008Stereo matching12 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?

CSE 576, Spring 2008Stereo matching13 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

CSE 576, Spring 2008Stereo matching14 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

CSE 576, Spring 2008Stereo matching15 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

CSE 576, Spring 2008Stereo matching16 Stereo: epipolar geometry Match features along epipolar lines viewing ray epipolar plane epipolar line

CSE 576, Spring 2008Stereo matching17 Stereo image pair

CSE 576, Spring 2008Stereo matching18 Public Library, Stereoscopic Looking Room, Chicago, by Phillips, 1923 Anaglyphs ony.com/freestuff.html (Wikipedia for images)

CSE 576, Spring 2008Stereo matching19 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

CSE 576, Spring 2008Stereo matching20 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]

CSE 576, Spring 2008Stereo matching21 Rectification BAD!

CSE 576, Spring 2008Stereo matching22 Rectification GOOD!

CSE 576, Spring 2008Stereo matching23 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)

CSE 576, Spring 2008Stereo matching24 Your 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 Improvement: match windows This should look familar...

CSE 576, Spring 2008Stereo matching25 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?

CSE 576, Spring 2008Stereo matching26 Neighborhood size Smaller neighborhood: more details Larger neighborhood: fewer isolated mistakes w = 3w = 20

CSE 576, Spring 2008Stereo matching27 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]

CSE 576, Spring 2008Stereo matching28 Stereo: certainty modeling Compute certainty map from correlations input depth map certainty map

CSE 576, Spring 2008Stereo matching29 Plane Sweep Stereo Sweep family of planes through volume each plane defines an image  composite homography virtual camera composite input image projective re-sampling of (X,Y,Z)  projective re-sampling of (X,Y,Z)

CSE 576, Spring 2008Stereo matching30 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

CSE 576, Spring 2008Stereo matching31 Plane sweep stereo Re-order (pixel / disparity) evaluation loops for every pixel,for every disparity for every disparity for every pixel compute cost compute cost

CSE 576, Spring 2008Stereo matching32 Stereo matching framework 1.For every disparity, compute raw matching costs Why use a robust function? occlusions, other outliers Can also use alternative match criteria

CSE 576, Spring 2008Stereo matching33 Stereo matching framework 2.Aggregate costs spatially Here, we are using a box filter (efficient moving average implementation) Can also use weighted average, [non-linear] diffusion…

CSE 576, Spring 2008Stereo matching34 Stereo matching framework 3.Choose winning disparity at each pixel 4.Interpolate to sub-pixel accuracy d E(d)E(d) d*

CSE 576, Spring 2008Stereo matching35 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

CSE 576, Spring 2008Stereo matching36 Stereo with Non-Linear Diffusion Problem with traditional approach: gets confused near discontinuities New approach: use iterative (non-linear) aggregation to obtain better estimate provably equivalent to mean-field estimate of Markov Random Field

CSE 576, Spring 2008Stereo matching37 Linear diffusion Average energy with neighbors + starting value windowdiffusion

CSE 576, Spring 2008Stereo matching38 Feature-based stereo Match “corner” (interest) points Interpolate complete solution

CSE 576, Spring 2008Stereo matching39 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

CSE 576, Spring 2008Stereo matching40 Energy minimization 1-D example: approximating splines z x,y d x,y

CSE 576, Spring 2008Stereo matching41 Relaxation How can we get the best solution? Differentiate energy function, set to 0

CSE 576, Spring 2008Stereo matching42 Relaxation Iteratively improve a solution by locally minimizing the energy: relax to solution Earliest application: WWII numerical simulations z x,y d x,y d x+1,y

CSE 576, Spring 2008Stereo matching43 Dynamic programming Evaluate best cumulative cost at each pixel

CSE 576, Spring 2008Stereo matching44 Dynamic programming 1-D cost function

CSE 576, Spring 2008Stereo matching45 Dynamic programming Disparity space image and min. cost path

CSE 576, Spring 2008Stereo matching46 Dynamic programming Sample result (note horizontal streaks) [Intille & Bobick]

CSE 576, Spring 2008Stereo matching47 Dynamic programming Can we apply this trick in 2D as well? d x,y d x-1,y d x,y-1 d x-1,y-1 No: d x,y-1 and d x-1,y may depend on different values of d x-1,y-1

CSE 576, Spring 2008Stereo matching48 Graph cuts Solution technique for general 2D problem

CSE 576, Spring 2008Stereo matching49 Graph cuts  -  swap  expansion modify smoothness penalty based on edges compute best possible match within integer disparity

CSE 576, Spring 2008Stereo matching50 Graph cuts Two different kinds of moves:

CSE 576, Spring 2008Stereo matching51 Bayesian inference Formulate as statistical inference problem Prior model p P (d) Measurement modelp M (I L, I R | d) Posterior model p M (d | I L, I R )  p P (d) p M (I L, I R | d) Maximum a Posteriori (MAP estimate): maximize p M (d | I L, I R )

CSE 576, Spring 2008Stereo matching52 Markov Random Field Probability distribution on disparity field d(x,y) Enforces smoothness or coherence on field

CSE 576, Spring 2008Stereo matching53 Measurement model Likelihood of intensity correspondence Corresponds to Gaussian noise for quadratic 

CSE 576, Spring 2008Stereo matching54 MAP estimate Maximize posterior likelihood Equivalent to regularization (energy minimization with smoothness constraints)

CSE 576, Spring 2008Stereo matching55 Why Bayesian estimation? Principled way of determining cost function Explicit model of noise and prior knowledge Admits a wider variety of optimization algorithms: gradient descent (local minimization) stochastic optimization (Gibbs Sampler) mean-field optimization graph theoretic (actually deterministic) [Zabih] [loopy] belief propagation large stochastic flips [Swendsen-Wang]

CSE 576, Spring 2008Stereo matching56 Depth Map Results Input imageSum Abs Diff Mean fieldGraph cuts

CSE 576, Spring 2008Stereo matching57 Stereo evaluation

CSE 576, Spring 2008Stereo matching58 Stereo—best algorithms

CSE 576, Spring 2008Stereo matching59 Traditional stereo Advantages: works very well in non-occluded regions Disadvantages: restricted to two images (not) gets confused in occluded regions can’t handle mixed pixels

Multi-View Stereo

CSE 576, Spring 2008Stereo matching61 Stereo Reconstruction Steps Calibrate cameras Rectify images Compute disparity Estimate depth f uu’ baseline z CC’ X f

CSE 576, Spring 2008Stereo matching62 Choosing the Baseline What’s the optimal baseline? Too small: large depth error Too large: difficult search problem Large Baseline Small Baseline

CSE 576, Spring 2008Stereo matching63 Effect of Baseline on Estimation

CSE 576, Spring 2008Stereo matching64

CSE 576, Spring 2008Stereo matching65 Multibaseline Stereo Basic Approach Choose a reference view Use your favorite stereo algorithm BUT –replace two-view SSD with SSD over all baselines Limitations Must choose a reference view Visibility: select which frames to match [Kang, Szeliski, Chai, CVPR’01]

CSE 576, Spring 2008Stereo matching66 Epipolar-Plane Images [Bolles 87] Lesson: Beware of occlusions

CSE 576, Spring 2008Stereo matching67 Active stereo with structured light Project “structured” light patterns onto the object simplifies the correspondence problem camera 2 camera 1 projector camera 1 projector Li Zhang’s one-shot stereo

CSE 576, Spring 2008Stereo matching68 Spacetime Stereo Li Zhang, Noah Snavely, Brian Curless, Steve Seitz

CSE 576, Spring 2008Stereo matching69 Summary Applications Image rectification Matching criteria Local algorithms (aggregation & diffusion) Optimization algorithms energy (cost) formulation & Markov Random Fields mean-field; dynamic programming; stochastic; graph algorithms Multi-View stereo visibility, occlusion-ordered sweeps

CSE 576, Spring 2008Stereo matching70 Bibliography D. Scharstein and R. Szeliski. A taxonomy and evaluation of dense two- frame stereo correspondence algorithms. International Journal of Computer Vision, 47(1):7-42, May R. Szeliski. Stereo algorithms and representations for image-based rendering. In British Machine Vision Conference (BMVC'99), volume 2, pages , Nottingham, England, September G. M. Nielson, Scattered Data Modeling, IEEE Computer Graphics and Applications, 13(1), January 1993, pp S. B. Kang, R. Szeliski, and J. Chai. Handling occlusions in dense multi- view stereo. In CVPR'2001, vol. I, pages , December Y. Boykov, O. Veksler, and Ramin Zabih, Fast Approximate Energy Minimization via Graph Cuts, Unpublished manuscript, A.F. Bobick and S.S. Intille. Large occlusion stereo. International Journal of Computer Vision, 33(3), September pp D. Scharstein and R. Szeliski. Stereo matching with nonlinear diffusion. International Journal of Computer Vision, 28(2): , July 1998

CSE 576, Spring 2008Stereo matching71 Volume Intersection Martin & Aggarwal, “Volumetric description of objects from multiple views”, Trans. Pattern Analysis and Machine Intelligence, 5(2), 1991, pp Szeliski, “Rapid Octree Construction from Image Sequences”, Computer Vision, Graphics, and Image Processing: Image Understanding, 58(1), 1993, pp Voxel Coloring and Space Carving Seitz & Dyer, “Photorealistic Scene Reconstruction by Voxel Coloring”, Proc. Computer Vision and Pattern Recognition (CVPR), 1997, pp Seitz & Kutulakos, “Plenoptic Image Editing”, Proc. Int. Conf. on Computer Vision (ICCV), 1998, pp Kutulakos & Seitz, “A Theory of Shape by Space Carving”, Proc. ICCV, 1998, pp Bibliography

CSE 576, Spring 2008Stereo matching72 Related References Bolles, Baker, and Marimont, “Epipolar-Plane Image Analysis: An Approach to Determining Structure from Motion”, International Journal of Computer Vision, vol 1, no 1, 1987, pp Faugeras & Keriven, “Variational principles, surface evolution, PDE's, level set methods and the stereo problem", IEEE Trans. on Image Processing, 7(3), 1998, pp Szeliski & Golland, “Stereo Matching with Transparency and Matting”, Proc. Int. Conf. on Computer Vision (ICCV), 1998, Roy & Cox, “A Maximum-Flow Formulation of the N-camera Stereo Correspondence Problem”, Proc. ICCV, 1998, pp Fua & Leclerc, “Object-centered surface reconstruction: Combining multi-image stereo and shading", International Journal of Computer Vision, 16, 1995, pp Narayanan, Rander, & Kanade, “Constructing Virtual Worlds Using Dense Stereo”, Proc. ICCV, 1998, pp Bibliography