Last Time Pinhole camera model, projection

Slides:



Advertisements
Similar presentations
Lecture 11: Two-view geometry
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.
MASKS © 2004 Invitation to 3D vision Lecture 7 Step-by-Step Model Buidling.
Lecture 8: Stereo.
Stereo.
Epipolar lines epipolar lines Baseline O O’ epipolar plane.
Camera calibration and epipolar geometry
Stereo and Epipolar geometry
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.
Computer Vision : CISC 4/689 Adaptation from: Prof. James M. Rehg, G.Tech.
Stereo & Iterative Graph-Cuts Alex Rav-Acha Vision Course Hebrew University.
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
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
Stereo and Structure from Motion
Stereo Computation using Iterative Graph-Cuts
CSE473/573 – Stereo Correspondence
Announcements PS3 Due Thursday PS4 Available today, due 4/17. Quiz 2 4/24.
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 “Stereo matching” is the correspondence problem –For a point in Image #1, where is the corresponding point in Image #2? C1C1 C2C2 ? ? C1C1.
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,
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.
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.
Stereo Vision Reading: Chapter 11 Stereo matching computes depth from two or more images Subproblems: –Calibrating camera positions. –Finding all corresponding.
Geometry 3: Stereo Reconstruction Introduction to Computer Vision Ronen Basri Weizmann Institute of Science.
Stereo Readings Szeliski, Chapter 11 (through 11.5) Single image stereogram, by Niklas EenNiklas Een.
Stereo Many slides adapted from Steve Seitz.
CS 4487/6587 Algorithms for Image Analysis
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
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
Feature Matching. Feature Space Outlier Rejection.
Digital Image Processing
Solving for Stereo Correspondence Many slides drawn from Lana Lazebnik, UIUC.
A global approach Finding correspondence between a pair of epipolar lines for all pixels simultaneously Local method: no guarantee we will have one to.
Project 2 due today Project 3 out today Announcements TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA.
Correspondence and Stereopsis Original notes by W. Correa. Figures from [Forsyth & Ponce] and [Trucco & Verri]
John Morris Stereo Vision (continued) Iolanthe returns to the Waitemata Harbour.
Advanced Computer Vision Chapter 11 Stereo Correspondence Presented by: 蘇唯誠 指導教授 : 傅楸善 博士.
Media Processor Lab. Media Processor Lab. Trellis-based Parallel Stereo Matching Media Processor Lab. Sejong univ.
Energy minimization Another global approach to improve quality of correspondences Assumption: disparities vary (mostly) smoothly Minimize energy function:
Correspondence and Stereopsis. Introduction Disparity – Informally: difference between two pictures – Allows us to gain a strong sense of depth Stereopsis.
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
CS 6501: 3D Reconstruction and Understanding Stereo Cameras
CS4670 / 5670: Computer Vision Kavita Bala Lec 27: Stereo.
Geometry 3: Stereo Reconstruction
What have we learned so far?
Chapter 11: Stereopsis Stereopsis: Fusing the pictures taken by two cameras and exploiting the difference (or disparity) between them to obtain the depth.
Stereo vision Many slides adapted from Steve Seitz.
Presentation transcript:

Last Time Pinhole camera model, projection A taste of projective geometry Two view geometry: Homography Epipolar geometry, the essential matrix Camera calibration, the fundamental matrix

Epipolar Lines epipolar plane epipolar lines epipolar lines O O’ Baseline

Stereo Vision Objective: 3D reconstruction Input: 2 (or more) images taken with calibrated cameras Output: 3D structure of scene Steps: Rectification Matching Depth estimation

Rectification We will assume images have been rectified so that epipolar lines correspond to scan lines Image planes of cameras are parallel. Focal points are at same height. Focal lengths same. Then, epipolar lines fall along the horizontal scan lines of the images Any stereo pair can be rectified by rotating and scaling the two image planes (=homography) so that they become parallel to baseline

Rectification Image Reprojection reproject image planes onto common plane parallel to baseline Notice, only focal point of camera really matters (Seitz)

Cyclopean Coordinates Origin at midpoint between camera centers Axes parallel to those of the two (rectified) cameras

Disparity The difference is called “disparity” d is inversely related to Z: greater sensitivity to nearby points d is directly related to b: sensitivity to small baseline

Main Step: Correspondence Search What to match? Objects? More identifiable, but difficult to compute Pixels? Easier to handle, but maybe ambiguous Edges? Collections of pixels (regions)?

Matching objects vs. Pixels Left Right scanline

Random Dot Stereogram Using random dot pairs Julesz showed that recognition is not needed for stereo

Random Dot in Motion

Finding Matches Under what conditions pixels can be matched? Ignoring specularities, we can assume that matching pixels have the same brightness (constant brightness assumption) Still, changes in gain and sensitivity may change the values of pixels Common solution: Use larger windows Normalized correlation Pros and cons: Small window: accurate match is more likely Large window: fewer candidates We need a method to eliminate false matches

Window Size W = 3 W = 20 Small window: accurate match is more likely Large window: less false positives W = 3 W = 20

Constraining the Search Restrict search to epipolar lines (1D search) Use larger elements (larger windows, edges, regions) Problem: large elements may be distorted Enforce smoothness Problem: discontinuities at object boundaries Enforce ordering Problem: not always true

1D Search

1D Search More efficient Fewer false matches SSD error disparity

Ordering

Ordering

Correspondence as Optimization Most stereo algorithms attempt to minimize a functional that usually consists of two terms: where - penalizes for quality of a match (unary) - penalizes non smooth (or even non fronto-parallel) reconstructions (binary) Many different optimization approaches were proposed

Comparison of Stereo Algorithms Scene Ground truth D. Scharstein and R. Szeliski. "A Taxonomy and Evaluation of Dense Two-Frame Stereo Correspondence Algorithms," International Journal of Computer Vision, 47 (2002), pp. 7-42.

Scharstein and Szeliski

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

Graph Cuts Graph cuts Ground truth

Stereo Algorithms We’ll briefly review several algorithms: Dynamic programming Minimal cut/Max flow Space carving Graph cut optimization

?

1D Methods: Dynamic Programming Discretize the 3-D space Find the correct curve at every slice (A slice = epipolar plane)

Dynamic programming Find correspondences of each epipolar line separately

Dynamic programming

Dynamic programming How do we find the best curve? Assign weight of all edges insertion match deletion

Dynamic programming How do we find the best curve? Assign weight of all edges Find shortest path Dijkstra insertion match deletion

Results

Dynamic programming Advantages Simple, efficient Globally optimal Disadvantages Each slice computed independently (smoothness is not enforced between slices) Problems due to discretization (tilted planes)

Min Cut/Max Flow

Min Cut/Max Flow

Min Cut/Max Flow

Min Cut/Max Flow

Min Cut/Max Flow Objective: find the optimal cut using all the slices simultaneously.

Min Cut/Max Flow Construct a graph: Every voxel (3-D point in space) is a node Every node is connected to its 6 neighbors

Min Cut/Max Flow Weights on the edges: Data cost: change in pixel value data data

Min Cut/Max Flow Weights on the edges: Data cost: change in pixel value Smoothness cost: change in depth smooth smooth smooth smooth

Min Cut/Max Flow Weights on the edges: Data cost: change in pixel value Smoothness cost: change in depth

Min Cut/Max Flow Source Add source and sink Find min cut … ∞ ∞ Sink

Min Cut/Max Flow Data penalty Smoothness penalty

Results Input Min cut Dynamic programming

Min Cut/Max Flow Advantages All slices are optimized simultaneously Efficient Disadvantages Extension to multi-camera is difficult Discretization

Space Carving Multi-view stereo Every point in space corresponds to a match in the images Compute data term for each match

Space Carving Multi-view stereo Every point in space corresponds to a match in the images Compute data term for each match (“photo-consistency”) 0.2 0.3 0.9 0.8 0.4 0.5

Space Carving Dynamic data term (taking occlusion into account) Order of sweep is important

Space Carving

Space Carving Done for all slices simultaneously

Space Carving Done for all slices simultaneously

Space Carving Done for all slices simultaneously

Space Carving Computes a bound on the object, the visual hull More camera views: better result

Space Carving: Results

Space Carving: Results

Space Carving Advantages True multi-views stereo Handles occlusion Disadvantages Limited to visual hull Lacks smoothness term Noise may introduce holes, allowing for noise may thicken shape Discretization

Graph Cut Optimization Stereo is a minimization problem Possible solution: local search (gradient descent) Problem: inefficient, local minima Instead, search larger areas at every iteration

Graph Cut Optimization … 2 1 k Construct a graph to represent the problem: Nodes: Pixels (in first image) k discrete depth values Edges: From every pixel node to a depth node (data term) Neighboring nodes (smoothness) Assign weights corresponding to pixel intensities to get a global cost function depths pixels

Graph Cut Optimization Objective: Multiway cut Edges: Every pixel remains connected to one depth node Edges between neighboring nodes only if they are connected to same depth node Nodes are assigned the depth that they are connected to Multiway cut is NP-complete, solve iteratively … 1 2 3 k … … depths pixels

Graph Cut Optimization α-β swap Nodes labeled α or β, (i.e., connected to or ) can change their labeling to α or β Edges between neighbors are updated according to the new labeling Other edges are not changed Finding best swap = min cut! … 1 2 3 k α β … … pixels depths

Graph Cut Optimization Example: 1-2 swap … … 1 2 k 1 2 3 3 k … … … …

Graph Cut Optimization Example: 1-2 swap … 1 … 2 3 k 1 2 3 k … … Connect the nodes labeled 1 or 2 to both labels

Graph Cut Optimization Example: 1-2 swap … … 1 1 3 k 3 k Mark 1 as source and 2 as sink Find minimal cut 2 2

Graph Cut Optimization Example: 1-2 swap … 1 3 k … 1 2 3 k Erase edges that were on the cut Result: a new labeling of the 1,2 nodes 2

Graph Cut Optimization Start with an arbitrary labeling For every pair {α, β} є {1,…,k} Find the best α-β swap (minimizing the function) Update the graph (add and erase edges) Quit when no pair improves the cost function Induce pixel labels

Graph Cuts: Results

Graph Cut Optimization 1 … 2 3 k Advantages State of the art results Efficient Bound on approximation quality Same technique can be applied to other problems (e.g., image restoration) Disadvantages Discretization Occlusion Still room for improvement

Summary Stereo vision: shape reconstruction from two or more images Steps: Rectification Correspondence search Depth estimation Algorithms: Dynamic programming Min cut/max flow Space carving Graph cuts