776 Computer Vision Jan-Michael Frahm, Enrique Dunn Spring 2012.

Slides:



Advertisements
Similar presentations
875: Recent Advances in Geometric Computer Vision & Recognition
Advertisements

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
Jan-Michael Frahm, Enrique Dunn Spring 2012
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.
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.
Stereo Matching Vision for Graphics CSE 590SS, Winter 2001 Richard Szeliski.
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.
Lecture 10: Stereo and Graph Cuts
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.
VZvZ r t b image cross ratio Measuring height B (bottom of object) T (top of object) R (reference point) ground plane H C scene cross ratio  scene points.
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
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,
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,
Computational Photography lecture 19 – How the Kinect 1 works? CS 590 Spring 2014 Prof. Alex Berg (Credits to many other folks on individual slides)
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.
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.
stereo Outline : Remind class of 3d geometry Introduction
Digital Image Processing
776 Computer Vision Jan-Michael Frahm Spring 2012.
Solving for Stereo Correspondence Many slides drawn from Lana Lazebnik, UIUC.
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.
Multiple View Geometry and Stereo. Overview Single camera geometry – Recap of Homogenous coordinates – Perspective projection model – Camera calibration.
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
Epipolar Geometry and Stereo Vision
제 5 장 스테레오.
CS4670 / 5670: Computer Vision Kavita Bala Lec 27: Stereo.
Stereo and Structure from Motion
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?
Stereo vision Many slides adapted from Steve Seitz.
Presentation transcript:

776 Computer Vision Jan-Michael Frahm, Enrique Dunn Spring 2012

From Previous Lecture Homographies Fundamental matrix Normalized 8-point Algorithm Essential Matrix

Plane Homography for Calibrated Cameras In the calibrated case o Two cameras P=K[I |0] and P’ = K’[R | t] o A plane π=(n T,d) T The homography is given by x’=Hx H = K’(R – tn T /d)K -1 For the plane at infinity H = K’RK -1

The Fundamental Matrix F P0P0 m0m0 L l1l1 M m1m1 M P1P1 Hm0Hm0 Epipole e1e1 F = [e] x H = Fundamental Matrix

The eight-point algorithm x = (u, v, 1) T, x’ = (u’, v’, 1) T Minimize: under the constraint F 33 = 1

Essential Matrix (Longuet-Higgins, 1981) Epipolar constraint: Calibrated case X xx’ The vectors x, t, and Rx’ are coplanar slide: S. Lazebnik

Essential Matrix Epipolar constraint: Calibrated case X xx’ The vectors x, t, and Rx’ are coplanar slide: S. Lazebnik Cubic constraint

Today: Binocular stereo Given a calibrated binocular stereo pair, fuse it to produce a depth image Where does the depth information come from?

Binocular stereo Given a calibrated binocular stereo pair, fuse it to produce a depth image o Humans can do it Stereograms: Invented by Sir Charles Wheatstone, 1838

Binocular stereo Given a calibrated binocular stereo pair, fuse it to produce a depth image o Humans can do it Autostereograms:

Binocular stereo Given a calibrated binocular stereo pair, fuse it to produce a depth image o Humans can do it Autostereograms:

Real-time stereo Used for robot navigation (and other tasks) o Software-based real-time stereo techniques Nomad robot Nomad robot searches for meteorites in Antartica slide: R. Szeliski

Stereo image pair slide: R. Szeliski

Public Library, Stereoscopic Looking Room, Chicago, by Phillips, 1923Anaglyphs ony.com/freestuff.html (Wikipedia for images) slide: R. Szeliski

Stereo: epipolar geometry Match features along epipolar lines viewing ray epipolar plane epipolar line slide: R. Szeliski

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 slide: S. Lazebnik

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 slide: S. Lazebnik

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

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

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

Depth Sampling Depth sampling for integer pixel disparity Quadratic precision loss with depth!

Depth Sampling Depth sampling for wider baseline

Depth Sampling Depth sampling is in O(resolution 6 )

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 slide: R. Szeliski

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] slide: R. Szeliski

Rectification BAD! slide: R. Szeliski

Rectification GOOD! slide: R. Szeliski

Problem: Rectification for forward moving cameras Required image can become very large (infinitely large) when the epipole is in the image Alternative rectifications are available using epipolar lines directly in the images o Pollefeys et al. 1999, “A simple and efficient method for general motion”, ICCV

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... slide: R. Szeliski

Image registration (revisited) How do we determine correspondences? o block matching or SSD (sum squared differences) d is the disparity (horizontal motion) How big should the neighborhood be? slide: R. Szeliski

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) slide: R. Szeliski

Matching cost disparity LeftRight scanline Correspondence search 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 slide: S. Lazebnik

LeftRight scanline Correspondence search SSD slide: S. Lazebnik

LeftRight scanline Correspondence search Norm. corr slide: S. Lazebnik

Neighborhood size Smaller neighborhood: more details Larger neighborhood: fewer isolated mistakes w = 3w = 20 slide: R. Szeliski

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] Intervals [Birchfield and Tomasi 96] Overview of matching metrics and their performance: o H. Hirschmüller and D. Scharstein, “Evaluation of Stereo Matching Costs on Images with Radiometric Differences”, PAMI 2008 slide: R. Szeliski

Adaptive Weighting Boundary Preserving More Costly

Failures of correspondence search Textureless surfaces Occlusions, repetition Non-Lambertian surfaces, specularities slide: S. Lazebnik

Stereo: certainty modeling Compute certainty map from correlations input depth map certainty map slide: R. Szeliski

Results with window search Window-based matchingGround truth Data slide: S. Lazebnik

Better methods exist... Graph cuts Ground truth For the latest and greatest: Y. Boykov, O. Veksler, and R. Zabih, Fast Approximate Energy Minimization via Graph Cuts, PAMI 2001Fast Approximate Energy Minimization via Graph Cuts slide: S. Lazebnik

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 slide: S. Lazebnik

Non-local constraints Uniqueness o For any point in one image, there should be at most one matching point in the other image slide: S. Lazebnik

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

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

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

Scanline stereo Try to coherently match pixels on the entire scanline Different scanlines are still optimized independently Left imageRight image slide: S. Lazebnik

“Shortest paths” for scan-line stereo Left imageRight image Can be implemented with dynamic programming Ohta & Kanade ’85, Cox et al. ‘96 correspondence q p Left occlusion t Right occlusion s 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 slide: S. Lazebnik

Stereo matching as energy minimization I1I1 I2I2 D 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 2001Fast Approximate Energy Minimization via Graph Cuts W1(i )W1(i )W 2 (i+D(i )) D(i )D(i ) data term smoothness term slide: S. Lazebnik

Active stereo with structured light Project “structured” light patterns onto the object o Simplifies the correspondence problem o 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 2002Rapid Shape Acquisition Using Color Structured Light and Multi-pass Dynamic Programming. slide: S. Lazebnik

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 2002Rapid Shape Acquisition Using Color Structured Light and Multi-pass Dynamic Programming. slide: S. Lazebnik

Active stereo with structured light slide: S. Lazebnik

Kinect: Structured infrared light slide: S. Lazebnik

Laser scanning Optical triangulation o Project a single stripe of laser light o Scan it across the surface of the object o This is a very precise version of structured light scanning Digital Michelangelo Project Levoy et al. Source: S. Seitz

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

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

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

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

Laser scanned models The Digital Michelangelo Project, Levoy et al. Source: S. Seitz 1.0 mm resolution (56 million triangles)

Aligning range images A single range scan is not sufficient to describe a complex surface Need techniques to register multiple range images B. Curless and M. Levoy, A Volumetric Method for Building Complex Models from Range Images, SIGGRAPH 1996A Volumetric Method for Building Complex Models from Range Images

Aligning range images A single range scan is not sufficient to describe a complex surface Need techniques to register multiple range images … which brings us to multi-view stereo