Stereo: Disparity and Matching

Similar documents
CS4495/6495 Introduction to Computer Vision. 3B-L3 Stereo correspondence

Stereo. Outline. Multiple views 3/29/2017. Thurs Mar 30 Kristen Grauman UT Austin. Multi-view geometry, matching, invariant features, stereo vision

Stereo. 11/02/2012 CS129, Brown James Hays. Slides by Kristen Grauman

Recap: Features and filters. Recap: Grouping & fitting. Now: Multiple views 10/29/2008. Epipolar geometry & stereo vision. Why multiple views?

Project 4 Results. Representation. Data. Learning. Zachary, Hung-I, Paul, Emanuel. SIFT and HoG are popular and successful.

Think-Pair-Share. What visual or physiological cues help us to perceive 3D shape and depth?

CS 4495 Computer Vision A. Bobick. Motion and Optic Flow. Stereo Matching

Chaplin, Modern Times, 1936

CS 4495 Computer Vision A. Bobick. Motion and Optic Flow. Stereo Matching

Final project bits and pieces

Stereo vision. Many slides adapted from Steve Seitz

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

Computer Vision Lecture 17

Computer Vision Lecture 17

Miniature faking. In close-up photo, the depth of field is limited.

Public Library, Stereoscopic Looking Room, Chicago, by Phillips, 1923

Epipolar Geometry and Stereo Vision

Mosaics wrapup & Stereo

There are many cues in monocular vision which suggests that vision in stereo starts very early from two similar 2D images. Lets see a few...

Stereo. Many slides adapted from Steve Seitz

Multi-View Geometry (Ch7 New book. Ch 10/11 old book)

Fundamental matrix. Let p be a point in left image, p in right image. Epipolar relation. Epipolar mapping described by a 3x3 matrix F

Project 2 due today Project 3 out today. Readings Szeliski, Chapter 10 (through 10.5)

CS5670: Computer Vision

BIL Computer Vision Apr 16, 2014

EECS 442 Computer vision. Stereo systems. Stereo vision Rectification Correspondence problem Active stereo vision systems

Project 3 code & artifact due Tuesday Final project proposals due noon Wed (by ) Readings Szeliski, Chapter 10 (through 10.5)

Recap from Previous Lecture

What have we leaned so far?

Introduction à la vision artificielle X

Epipolar Geometry and Stereo Vision

Multiple View Geometry

Epipolar Geometry and Stereo Vision

Multiple View Geometry

Lecture 14: Computer Vision

Lecture 10: Multi view geometry

Epipolar Geometry and Stereo Vision

Stereo II CSE 576. Ali Farhadi. Several slides from Larry Zitnick and Steve Seitz

Lecture 10: Multi-view geometry

CEng Computational Vision

6.819 / 6.869: Advances in Computer Vision Antonio Torralba and Bill Freeman. Lecture 11 Geometry, Camera Calibration, and Stereo.

Lecture 9 & 10: Stereo Vision

Image Based Reconstruction II

Ninio, J. and Stevens, K. A. (2000) Variations on the Hermann grid: an extinction illusion. Perception, 29,

CS 2770: Intro to Computer Vision. Multiple Views. Prof. Adriana Kovashka University of Pittsburgh March 14, 2017

Fundamentals of Stereo Vision Michael Bleyer LVA Stereo Vision

Kinect Device. How the Kinect Works. Kinect Device. What the Kinect does 4/27/16. Subhransu Maji Slides credit: Derek Hoiem, University of Illinois

Colorado School of Mines. Computer Vision. Professor William Hoff Dept of Electrical Engineering &Computer Science.

Multi-stable Perception. Necker Cube

Human Body Recognition and Tracking: How the Kinect Works. Kinect RGB-D Camera. What the Kinect Does. How Kinect Works: Overview

Basic distinctions. Definitions. Epstein (1965) familiar size experiment. Distance, depth, and 3D shape cues. Distance, depth, and 3D shape cues

COMP 558 lecture 22 Dec. 1, 2010

Lecture 6 Stereo Systems Multi-view geometry

Why is computer vision difficult?

Cameras and Stereo CSE 455. Linda Shapiro

Stereo imaging ideal geometry

Image Rectification (Stereo) (New book: 7.2.1, old book: 11.1)

Computer Vision I. Announcements. Random Dot Stereograms. Stereo III. CSE252A Lecture 16

Finally: Motion and tracking. Motion 4/20/2011. CS 376 Lecture 24 Motion 1. Video. Uses of motion. Motion parallax. Motion field

CS 4495 Computer Vision. Segmentation. Aaron Bobick (slides by Tucker Hermans) School of Interactive Computing. Segmentation

Depth from two cameras: stereopsis

Announcements. Stereo Vision Wrapup & Intro Recognition

Stereo CSE 576. Ali Farhadi. Several slides from Larry Zitnick and Steve Seitz

Stereo and Epipolar geometry

Introduction to Computer Vision. Week 10, Winter 2010 Instructor: Prof. Ko Nishino

Depth from two cameras: stereopsis

Multi-view stereo. Many slides adapted from S. Seitz

Computer Vision I. Announcement. Stereo Vision Outline. Stereo II. CSE252A Lecture 15

Stereo Vision A simple system. Dr. Gerhard Roth Winter 2012

Today. Stereo (two view) reconstruction. Multiview geometry. Today. Multiview geometry. Computational Photography

Lecture 14: Basic Multi-View Geometry

Lecture 6 Stereo Systems Multi- view geometry Professor Silvio Savarese Computational Vision and Geometry Lab Silvio Savarese Lecture 6-24-Jan-15

Assignment 2: Stereo and 3D Reconstruction from Disparity

Stereo Matching. Stereo Matching. Face modeling. Z-keying: mix live and synthetic

Correspondence and Stereopsis. Original notes by W. Correa. Figures from [Forsyth & Ponce] and [Trucco & Verri]

EE795: Computer Vision and Intelligent Systems

Stereo. Shadows: Occlusions: 3D (Depth) from 2D. Depth Cues. Viewing Stereo Stereograms Autostereograms Depth from Stereo

Outline. Immersive Visual Communication Pipeline. Lec 02 Human Vision System

Dense 3D Reconstruction. Christiano Gava

Passive 3D Photography

Lecture'9'&'10:'' Stereo'Vision'

3D Photography: Stereo Matching

7. The Geometry of Multi Views. Computer Engineering, i Sejong University. Dongil Han

Robert Collins CSE486, Penn State Lecture 08: Introduction to Stereo

PERCEIVING DEPTH AND SIZE

Stereovision. Binocular disparity

Stereo Vision. MAN-522 Computer Vision

Colorado School of Mines. Computer Vision. Professor William Hoff Dept of Electrical Engineering &Computer Science.

Last time: Disparity. Lecture 11: Stereo II. Last time: Triangulation. Last time: Multi-view geometry. Last time: Epipolar geometry

Final Exam Study Guide

Dense 3D Reconstruction. Christiano Gava

Outline. Segmentation & Grouping. Examples of grouping in vision. Grouping in vision. Grouping in vision 2/9/2011. CS 376 Lecture 7 Segmentation 1

Recovering structure from a single view Pinhole perspective projection

Announcements. Stereo Vision II. Midterm. Example: Helmholtz Stereo Depth + Normals + BRDF. Stereo

Stereo Epipolar Geometry for General Cameras. Sanja Fidler CSC420: Intro to Image Understanding 1 / 33

Stereo Wrap + Motion. Computer Vision I. CSE252A Lecture 17

CS5670: Computer Vision

Perception II: Pinhole camera and Stereo Vision

12/3/2009. What is Computer Vision? Applications. Application: Assisted driving Pedestrian and car detection. Application: Improving online search

3D Sensing and Reconstruction Readings: Ch 12: , Ch 13: ,

Transcription:

CS 4495 Computer Vision Aaron Bobick School of Interactive Computing

Administrivia PS2 is out. But I was late. So we pushed the due date to Wed Sept 24 th, 11:55pm. There is still *no* grace period. To avoid confusion, the submission site will close at the time it s due. If you miss it you can send email to me and the TAs and plead your case. Pretty soon we will have no sympathy for presuming that everything works. Read; FP chapter 7

Stereo: A Special case of Multiple views Multi-view geometry, matching, invariant features, stereo vision Lowe Hartley and Zisserman

Why multiple views? Structure and depth are inherently ambiguous from single views. Images from Lana Lazebnik

Why multiple views? Structure and depth are inherently ambiguous from single views. P1 P2 P1 =P2 Optical center

How do we see depth? What cues help us to perceive 3d shape and depth? What about one eye first?

Perspective effects S. Seitz

K. Grauman CS 4495 Computer Vision A. Bobick Shading

Texture [From A.M. Loh. The recovery of 3-D structure using visual texture patterns. PhD thesis]

Focus/defocus Images from same point of view, different camera parameters 3d shape / depth estimates [figs from H. Jin and P. Favaro, 2002]

Motion Figures from L. Zhang http://www.brainconnection.com/teasers/?main=illusion/motion-shape

Estimating scene shape from one eye Shape from X : Shading, Texture, Focus, Motion Very popular circa 1980

But we (and lots of creatures) have two eyes! Stereo: shape from motion between two views infer 3d shape of scene from two (multiple) images from different viewpoints Main idea: scene point optical center image plane

Stereo photography and stereo viewers Take two pictures of the same subject from two slightly different viewpoints and display so that each eye sees only one of the images. Invented by Sir Charles Wheatstone 1838

People fascinated by 3D

http://www.johnsonshawmuseum.org

Public Library, Stereoscopic Looking Room, Chicago, by Phillips, 1923

Teesta suspension bridge-darjeeling, India

Mark Twain at Pool Table", no date, UCR Museum of Photography

Stereo photography and stereo viewers When I grew up

Stereo photography and stereo viewers When I grew up You guys..

The Basic Idea: Two slightly different images http://www.well.com/~jimg/stereo/stereo_list.html

So how do humans do it?

Random dot stereograms Julesz 1960: Do we identify local brightness patterns before fusion (monocular process) or after (binocular)? To test: pair of synthetic images obtained by randomly spraying black dots on white objects

Forsyth & Ponce CS 4495 Computer Vision A. Bobick Random dot stereograms

Random dot stereograms

Random dot stereograms When viewed monocularly, they appear random; when viewed stereoscopically, see 3d structure. Conclusion: human binocular fusion not based upon matching large scale structures or any processing of the individual images Imaginary cyclopean retina that combines the left and right image stimuli as a single unit. Later discovered the cells in the brain s visual cortex that create this percept

Estimating depth with stereo Stereo: shape from motion between two views We ll need to consider: Info on camera pose ( calibration ) Image point correspondences scene point optical center image plane

Estimating depth with stereo Stereo: shape from motion between two views We ll need to consider: Info on camera pose ( calibration ) Image point correspondences scene point optical center image plane

Geometry for a simple stereo system First, assuming parallel optical axes, known camera parameters (i.e., calibrated cameras) Figure is looking down on the cameras and image planes Baseline B, focal length f Point P is distance Z in camera coordinate systems f Optic Axis COP L Z B P Optic Axis COP R

Geometry for a simple stereo system Point P projects into left and right images. P Distance is positive in left image, and negative in right x l Z x r f p l p r COP L B COP R

Geometry for a simple stereo system What is the expression for Z? Similar triangles (p l, P, p r ) and (C L,P, C r ): x l Z P x r B x + x l Z f r = B Z f p l p r Z f B = x x l r COP L B COP R Disparity is inversely proportional to depth

Depth from disparity image I(x,y) Disparity map D(x,y) image I (x,y ) (x,y )=(x+d(x,y), y) So if we could find the corresponding points in two images, we could estimate relative depth

Depth from disparity image I(x,y) Disparity map D(x,y) image I (x,y ) (x,y )=(x+d(x,y), y) So if we could find the corresponding points in two images, we could estimate relative depth

General case, with calibrated cameras The two cameras need not have parallel optical axes and image planes. Vs.

Stereo correspondence constraints Given p in left image, where can corresponding point p be?

Stereo correspondence constraints In perspective projection, lines project into lines. So the line containing the center of projection and the point p in the left image must project to a line in the right image.

Epipolar constraint Geometry of two views constrains where the corresponding pixel for some image point in the first view must occur in the second view.

Epipolar constraint Geometry of two views constrains where the corresponding pixel for some image point in the first view must occur in the second view. It must be on the line carved out by a plane the epipolar plane connecting the world point and optical centers.

Epipolar geometry: terms Baseline: line joining the camera centers Epipole: point of intersection of baseline with image plane Epipolar plane: plane containing baseline and world point Epipolar line: intersection of epipolar plane with the image plane All epipolar lines intersect at the epipole An epipolar plane intersects the left and right image planes in epipolar lines Why is the epipolar constraint useful?

Epipolar constraint This is useful because it reduces the correspondence problem to a 1D search along an epipolar line. Image from Andrew Zisserman

What do the epipolar lines look like? 1. O l O r 2. O l O r

What do the epipolar lines look like?

Example: converging cameras Figure from Hartley & Zisserman

Example: parallel cameras Where are the epipoles? Figure from Hartley & Zisserman

For now assume parallel image planes Assume parallel image planes Assume same focal lengths Assume epipolar lines are horizontal Assume epipolar lines are at the same y location in the image That s a lot of assuming, but it allows us to move to the correspondence problem which you will be solving!

Correspondence problem Multiple match hypotheses satisfy epipolar constraint, but which is correct? Figure from Gee & Cipolla 1999

Correspondence problem Beyond the hard constraint of epipolar geometry, there are soft constraints to help identify corresponding points Similarity Uniqueness Ordering Disparity gradient To find matches in the image pair, we will assume Most scene points visible from both views Image regions for the matches are similar in appearance

Dense correspondence search For each epipolar line Adapted from Li Zhang For each pixel / window in the left image compare with every pixel / window on same epipolar line in right image pick position with minimum match cost (e.g., SSD, normalized correlation)

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

Correspondence problem Intensity profiles Source: Andrew Zisserman

Correspondence problem Neighborhoods of corresponding points are similar in intensity patterns. Source: Andrew Zisserman

Correlation-based window matching

Correlation-based window matching

Correlation-based window matching

Correlation-based window matching

Correlation-based window matching??? Textureless regions are non-distinct; high ambiguity for matches.

Effect of window size Source: Andrew Zisserman

Effect of window size W = 3 W = 20 Want window large enough to have sufficient intensity variation, yet small enough to contain only pixels with about the same disparity. Figures from Li Zhang

Correspondence problem Beyond the hard constraint of epipolar geometry, there are soft constraints to help identify corresponding points Similarity Disparity gradient depth doesn t change too quickly. Uniqueness Ordering

Uniqueness constraint Up to one match in right image for every point in left image Figure from Gee & Cipolla 1999

Problem: Occlusion Uniqueness says up to match per pixel When is there no match? Occluded pixels

Ordering constraint Points on same surface (opaque object) will be in same order in both views Figure from Gee & Cipolla 1999

Ordering constraint Won t always hold, e.g. consider transparent object, or an occluding surface Figures from Forsyth & Ponce

Stereo results Data from University of Tsukuba Similar results on other images without ground truth Scene Ground truth

Results with window search Window-based matching (best window size) Ground truth

Better solutions Beyond individual correspondences to estimate disparities: Optimize correspondence assignments jointly Scanline at a time (DP) Full 2D grid (graph cuts)

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

Shortest paths for scan-line stereo Right occlusion Left image I Right image I S left one-to-one q t Left occlusion Left occlusion Right occlusion s p S right Can be implemented with dynamic programming Ohta & Kanade 85, Cox et al. 96, Intille & Bobick, 01 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 as energy minimization What defines a good stereo correspondence? 1. Match quality Want each pixel to find a good match in the other image 2. Smoothness If two pixels are adjacent, they should (usually) move about the same amount

Stereo matching as energy minimization I 1 I 2 D W 1 (i) W 2 (i+d(i)) D(i) E = α Edata ( I1, I 2, D) + β Esmooth ( D) E = ( W ( i) W ( i D( i ) 2 + data 1 2 )) 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 ( D( i) D( j ) Esmooth = ρ ) neighbors i, j Source: Steve Seitz

Better results State of the art method Boykov et al., Fast Approximate Energy Minimization via Graph Cuts, International Conference on Computer Vision, September 1999. Ground truth For the latest and greatest: http://www.middlebury.edu/stereo/

Challenges Low-contrast ; textureless image regions Occlusions Violations of brightness constancy (e.g., specular reflections) Really large baselines (foreshortening and appearance change) Camera calibration errors