Stereo vision Many slides adapted from Steve Seitz.

Slides:



Advertisements
Similar presentations
CSE473/573 – Stereo and Multiple View Geometry
Advertisements

875: Recent Advances in Geometric Computer Vision & Recognition
Stereo Vision Reading: Chapter 11
Public Library, Stereoscopic Looking Room, Chicago, by Phillips, 1923.
Gratuitous Picture US Naval Artillery Rangefinder from World War I (1918)!!
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.
Stereo and Projective Structure from Motion
Recap from Previous Lecture Tone Mapping – Preserve local contrast or detail at the expense of large scale contrast. – Changing the brightness within.
Lecture 8: Stereo.
Stereo.
776 Computer Vision Jan-Michael Frahm, Enrique Dunn Spring 2012.
Last Time Pinhole camera model, projection
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.
Stereopsis Mark Twain at Pool Table", no date, UCR Museum of Photography.
The plan for today Camera matrix
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.
Stereo and Structure from Motion
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.
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.
3-D Scene u u’u’ Study the mathematical relations between corresponding image points. “Corresponding” means originated from the same 3D point. Objective.
Epipolar Geometry and Stereo Vision Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 04/12/11 Many slides adapted from Lana Lazebnik,
9 – Stereo Reconstruction
CSCE 641 Computer Graphics: Image-based Modeling Jinxiang Chai.
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,
Epipolar Geometry and Stereo Vision Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 03/05/15 Many slides adapted from Lana Lazebnik,
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.
Lecture 12 Stereo Reconstruction II Lecture 12 Stereo Reconstruction II Mata kuliah: T Computer Vision Tahun: 2010.
Recap from Monday Image Warping – Coordinate transforms – Linear transforms expressed in matrix form – Inverse transforms useful when synthesizing images.
Epipolar geometry Epipolar Plane Baseline Epipoles Epipolar Lines
Stereo Vision Reading: Chapter 11 Stereo matching computes depth from two or more images Subproblems: –Calibrating camera positions. –Finding all corresponding.
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
Lec 22: Stereo CS4670 / 5670: Computer Vision Kavita Bala.
CSE 185 Introduction to Computer Vision Stereo. Taken at the same time or sequential in time stereo vision structure from motion optical flow Multiple.
Lecture 16: Stereo CS4670 / 5670: Computer Vision Noah Snavely Single image stereogram, by Niklas EenNiklas Een.
stereo Outline : Remind class of 3d geometry Introduction
776 Computer Vision Jan-Michael Frahm Spring 2012.
Solving for Stereo Correspondence Many slides drawn from Lana Lazebnik, UIUC.
11/05/15 How the Kinect Works Computational Photography Derek Hoiem, University of Illinois Photo frame-grabbed from:
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 3 code & artifact due Tuesday Final project proposals due noon Wed (by ) –One-page writeup (from project web page), specifying: »Your team.
Multiple View Geometry and Stereo. Overview Single camera geometry – Recap of Homogenous coordinates – Perspective projection model – Camera calibration.
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
Epipolar Geometry and Stereo Vision
제 5 장 스테레오.
Stereo CSE 455 Linda Shapiro.
CS4670 / 5670: Computer Vision Kavita Bala Lec 27: Stereo.
CSE 455 Ali Farhadi Several slides from Larry Zitnick and Steve Seitz
STEREOPSIS The Stereopsis Problem: Fusion and Reconstruction
Stereo and Structure from Motion
How the Kinect Works Computational Photography
Announcements Midterms graded (handed back at end of lecture)
Thanks to Richard Szeliski and George Bebis for the use of some slides
What have we learned so far?
Computer Vision Stereo Vision.
Presentation transcript:

Stereo vision Many slides adapted from Steve Seitz

What is stereo vision? Generic problem formulation: given several images of the same object or scene, compute a representation of its 3D shape

What is stereo vision? Generic problem formulation: given several images of the same object or scene, compute a representation of its 3D shape “Images of the same object or scene” Arbitrary number of images (from two to thousands) Arbitrary camera positions (isolated cameras or video sequence) Cameras can be calibrated or uncalibrated “Representation of 3D shape” Depth maps Meshes Point clouds Patch clouds Volumetric models Layered models

What is stereo vision? Generic problem formulation: given several images of the same object or scene, compute a representation of its 3D shape

What is stereo vision? Narrower formulation: given a calibrated binocular stereo pair, fuse it to produce a depth image image 1 image 2 Dense depth map

What is stereo vision? Narrower formulation: given a calibrated binocular stereo pair, fuse it to produce a depth image Humans can do it Stereograms: Invented by Sir Charles Wheatstone, 1838

What is stereo vision? Narrower formulation: given a calibrated binocular stereo pair, fuse it to produce a depth image Humans can do it Autostereograms: www.magiceye.com

What is stereo vision? Narrower formulation: given a calibrated binocular stereo pair, fuse it to produce a depth image Humans can do it Autostereograms: www.magiceye.com

Application of stereo: Robotic exploration Nomad robot searches for meteorites in Antartica Real-time stereo on Mars

Application: View Interpolation This is a stereo pair captured in our lab. This is the disparity obtained by our approach. Notice that the thin structures and narrow holes are accounted for. Right Image

Application: View Interpolation This is a stereo pair captured in our lab. This is the disparity obtained by our approach. Notice that the thin structures and narrow holes are accounted for. Left Image

Application: View Interpolation This is a stereo pair captured in our lab. This is the disparity obtained by our approach. Notice that the thin structures and narrow holes are accounted for. Disparity

Application: View Interpolation This is the result of view interpolating using extracted depth information.

Basic stereo matching algorithm For each pixel in the first image Find corresponding epipolar line in the right image Examine all pixels on the epipolar line and pick the best match Triangulate the matches to get depth information Simplest case: epipolar lines are scanlines When does this happen?

Simplest Case: Parallel images Image planes of cameras are parallel to each other and to the baseline Camera centers are at same height Focal lengths are the same

Simplest Case: Parallel images Image planes of cameras are parallel to each other and to the baseline Camera centers are at same height Focal lengths are the same Then, epipolar lines fall along the horizontal scan lines of the images

Essential matrix for parallel images Epipolar constraint: R = I t = (T, 0, 0) x x’ t

Essential matrix for parallel images Epipolar constraint: R = I t = (T, 0, 0) x x’ t The y-coordinates of corresponding points are the same!

Depth from disparity Disparity is inversely proportional to depth! f x Baseline B z O O’ X Disparity is inversely proportional to depth!

Stereo image rectification

Stereo image rectification reproject image planes onto a common plane parallel to the line between optical centers pixel motion is horizontal after this transformation two homographies (3x3 transform), one for each input image reprojection C. Loop and Z. Zhang. Computing Rectifying Homographies for Stereo Vision. IEEE Conf. Computer Vision and Pattern Recognition, 1999.

Rectification example

Basic stereo matching algorithm If necessary, rectify the two stereo images to transform epipolar lines into scanlines For each pixel x in the first image Find corresponding epipolar scanline in the right image Examine all pixels on the scanline and pick the best match x’ Compute disparity x-x’ and set depth(x) = 1/(x-x’)

Correspondence problem Multiple matching hypotheses satisfy the epipolar constraint, but which one is correct?

Correspondence problem Let’s make some assumptions to simplify the matching problem The baseline is relatively small (compared to the depth of scene points) Then most scene points are visible in both views Also, matching regions are similar in appearance

Correspondence problem Let’s make some assumptions to simplify the matching problem The baseline is relatively small (compared to the depth of scene points) Then most scene points are visible in both views Also, matching regions are similar in appearance Additional constraints Uniqueness Ordering Continuity

Correspondence search with similarity constraint Left Right scanline Matching cost disparity Slide a window along the right scanline and compare contents of that window with the reference window in the left image Matching cost: SSD or normalized correlation

Correspondence search with similarity constraint Left Right scanline SSD

Correspondence search with similarity constraint Left Right scanline Norm. corr

Effect of window size W = 3 W = 20 Smaller window Larger window More detail More noise Larger window Smoother disparity maps Less detail smaller window: more detail, more noise bigger window: less noise, more detail

The similarity constraint Corresponding regions in two images should be similar in appearance …and non-corresponding regions should be different When will the similarity constraint fail?

Limitations of similarity constraint Occlusions, repetition Textureless surfaces Non-Lambertian surfaces, specularities

Results with window search Data Window-based matching Ground truth

Better methods exist... Graph cuts Ground truth Y. Boykov, O. Veksler, and R. Zabih, Fast Approximate Energy Minimization via Graph Cuts, PAMI 2001 For the latest and greatest: http://www.middlebury.edu/stereo/

How can we improve window-based matching? The similarity constraint is local (each reference window is matched independently) Need to enforce non-local correspondence constraints

Non-local constraints Uniqueness For any point in one image, there should be at most one matching point in the other image

Non-local constraints Uniqueness For any point in one image, there should be at most one matching point in the other image Ordering Corresponding points should be in the same order in both views

Non-local constraints Uniqueness For any point in one image, there should be at most one matching point in the other image Ordering Corresponding points should be in the same order in both views Ordering constraint doesn’t hold

Non-local constraints Uniqueness For any point in one image, there should be at most one matching point in the other image Ordering Corresponding points should be in the same order in both views Smoothness We expect disparity values to change slowly (for the most part)

Scanline stereo Try to coherently match pixels on the entire scanline Different scanlines are still optimized independently Left image Right image

“Shortest paths” for scan-line stereo Left image Right image Right occlusion s q Left occlusion t p correspondence Can be implemented with dynamic programming Ohta & Kanade ’85, Cox et al. ‘96 Slide credit: Y. Boykov

Coherent stereo on 2D grid Scanline stereo generates streaking artifacts Can’t use dynamic programming to find spatially coherent disparities/ correspondences on a 2D grid

Stereo matching as energy minimization D W1(i ) W2(i+D(i )) D(i ) MAP estimate of disparity image D:

Stereo matching as energy minimization D W1(i ) W2(i+D(i )) D(i ) Energy functions of this form can be minimized using graph cuts Y. Boykov, O. Veksler, and R. Zabih, Fast Approximate Energy Minimization via Graph Cuts, PAMI 2001

The role of the baseline Small Baseline Large Baseline Small baseline: large depth error Large baseline: difficult search problem Source: S. Seitz

Problem for wide baselines: Foreshortening Matching with fixed-size windows will fail! Possible solution: adaptively vary window size Another solution: model-based stereo

Model-based stereo Paul E. Debevec, Camillo J. Taylor, and Jitendra Malik. Modeling and Rendering Architecture from Photographs. SIGGRAPH 1996.

Model-based stereo key image offset image Paul E. Debevec, Camillo J. Taylor, and Jitendra Malik. Modeling and Rendering Architecture from Photographs. SIGGRAPH 1996.

Model-based stereo key image warped offset image displacement map Paul E. Debevec, Camillo J. Taylor, and Jitendra Malik. Modeling and Rendering Architecture from Photographs. SIGGRAPH 1996.

Active stereo with structured light Project “structured” light patterns onto the object simplifies the correspondence problem Allows us to use only one camera camera projector L. Zhang, B. Curless, and S. M. Seitz. Rapid Shape Acquisition Using Color Structured Light and Multi-pass Dynamic Programming. 3DPVT 2002

Active stereo with structured light L. Zhang, B. Curless, and S. M. Seitz. Rapid Shape Acquisition Using Color Structured Light and Multi-pass Dynamic Programming. 3DPVT 2002

Digital Michelangelo Project Laser scanning Digital Michelangelo Project http://graphics.stanford.edu/projects/mich/ Optical triangulation Project a single stripe of laser light Scan it across the surface of the object This is a very precise version of structured light scanning Source: S. Seitz

The Digital Michelangelo Project, Levoy et al. Laser scanned models The Digital Michelangelo Project, Levoy et al. Source: S. Seitz

The Digital Michelangelo Project, Levoy et al. Laser scanned models The Digital Michelangelo Project, Levoy et al. Source: S. Seitz

The Digital Michelangelo Project, Levoy et al. Laser scanned models The Digital Michelangelo Project, Levoy et al. Source: S. Seitz

The Digital Michelangelo Project, Levoy et al. Laser scanned models The Digital Michelangelo Project, Levoy et al. Source: S. Seitz

The Digital Michelangelo Project, Levoy et al. Laser scanned models The Digital Michelangelo Project, Levoy et al. Source: S. Seitz