Stereo & Iterative Graph-Cuts Alex Rav-Acha Vision Course Hebrew University.

Slides:



Advertisements
Similar presentations
Algorithms for MAP estimation in Markov Random Fields Vladimir Kolmogorov University College London Tutorial at GDR (Optimisation Discrète, Graph Cuts.
Advertisements

Graph Cut Algorithms for Computer Vision & Medical Imaging Ramin Zabih Computer Science & Radiology Cornell University Joint work with Y. Boykov, V. Kolmogorov,
Introduction to Markov Random Fields and Graph Cuts Simon Prince
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.
The University of Ontario CS 4487/9687 Algorithms for Image Analysis Multi-Label Image Analysis Problems.
Graph-Based Image Segmentation
1 s-t Graph Cuts for Binary Energy Minimization  Now that we have an energy function, the big question is how do we minimize it? n Exhaustive search is.
Lecture 8: Stereo.
Markov Random Fields (MRF)
Epipolar lines epipolar lines Baseline O O’ epipolar plane.
Optimal solution of binary problems Much material taken from :  Olga Veksler, University of Western Ontario
Last Time Pinhole camera model, projection
More on Stereo. Outline Fast window-based correlationFast window-based correlation DiffusionDiffusion Energy minimizationEnergy minimization Graph cutsGraph.
Computer Vision : CISC 4/689 Adaptation from: Prof. James M. Rehg, G.Tech.
2010/5/171 Overview of graph cuts. 2010/5/172 Outline Introduction S-t Graph cuts Extension to multi-label problems Compare simulated annealing and alpha-
Stereo Binocular Stereo Calibration (finish up) Next Time Motivation
MRF Labeling With Graph Cut CMPUT 615 Nilanjan Ray.
Stereopsis Mark Twain at Pool Table", no date, UCR Museum of Photography.
The plan for today Camera matrix
Lecture 10: Stereo and Graph Cuts
Stereo Computation using Iterative Graph-Cuts
Comp 775: Graph Cuts and Continuous Maximal Flows Marc Niethammer, Stephen Pizer Department of Computer Science University of North Carolina, Chapel Hill.
Measuring Uncertainty in Graph Cut Solutions Pushmeet Kohli Philip H.S. Torr Department of Computing Oxford Brookes University.
Graph-Cut Algorithm with Application to Computer Vision Presented by Yongsub Lim Applied Algorithm Laboratory.
Computer vision: models, learning and inference
Fast Approximate Energy Minimization via Graph Cuts
A Selective Overview of Graph Cut Energy Minimization Algorithms Ramin Zabih Computer Science Department Cornell University Joint work with Yuri Boykov,
Michael Bleyer LVA Stereo Vision
Graph Cut & Energy Minimization
Graph Cut Algorithms for Binocular Stereo with Occlusions
Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.
Binocular Stereo. Topics Principle basic equation epipolar line features and strategies for matching Case study Block matching Relaxation DP stereo.
CS774. Markov Random Field : Theory and Application Lecture 13 Kyomin Jung KAIST Oct
Interactive Graph Cuts for Optimal Boundary & Region Segmentation of Objects in N-D Images (Fri) Young Ki Baik, Computer Vision Lab.
Geometry 3: Stereo Reconstruction Introduction to Computer Vision Ronen Basri Weizmann Institute of Science.
Stereo Many slides adapted from Steve Seitz.
Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.
CS 4487/6587 Algorithms for Image Analysis
Stereo Many slides adapted from Steve Seitz. Binocular stereo Given a calibrated binocular stereo pair, fuse it to produce a depth image image 1image.
Algorithms for MAP estimation in Markov Random Fields Vladimir Kolmogorov University College London.
Computer Vision, Robert Pless
1 Markov Random Fields with Efficient Approximations Yuri Boykov, Olga Veksler, Ramin Zabih Computer Science Department CORNELL UNIVERSITY.
Max Flow – Min Cut Problem. Directed Graph Applications Shortest Path Problem (Shortest path from one point to another) Max Flow problems (Maximum material.
Lecture 19: Solving the Correspondence Problem with Graph Cuts CAP 5415 Fall 2006.
Presenter : Kuang-Jui Hsu Date : 2011/3/24(Thur.).
Lecture 16: Stereo CS4670 / 5670: Computer Vision Noah Snavely Single image stereogram, by Niklas EenNiklas Een.
Gaussian Mixture Models and Expectation-Maximization Algorithm.
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.
Graph Algorithms for Vision Amy Gale November 5, 2002.
Project 2 due today Project 3 out today Announcements TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA.
Lecture 05 29/11/2011 Shai Avidan Roy Josef Jevnisek הבהרה : החומר המחייב הוא החומר הנלמד בכיתה ולא זה המופיע / לא מופיע במצגת.
Markov Random Fields in Vision
Energy functions f(p)  {0,1} : Ising model Can solve fast with graph cuts V( ,  ) = T[  ] : Potts model NP-hard Closely related to Multiway Cut Problem.
Hebrew University Image Processing Exercise Class 8 Panoramas – Stitching and Blending Min-Cut Stitching Many slides from Alexei Efros.
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.
Markov Random Fields Tomer Michaeli Graduate Course
Markov Random Fields with Efficient Approximations
Richard Anderson Lecture 23 Network Flow
Lecture 22 Network Flow, Part 2
Geometry 3: Stereo Reconstruction
Graph Cut Weizhen Jing
Haim Kaplan and Uri Zwick
Lecture 31: Graph-Based Image Segmentation
Richard Anderson Lecture 21 Network Flow
Problem Solving 4.
Lecture 21 Network Flow, Part 1
Lecture 22 Network Flow, Part 2
Presentation transcript:

Stereo & Iterative Graph-Cuts Alex Rav-Acha Vision Course Hebrew University

The stereo problem

Both images are very similar (like images that you see with your two eyes) Most of the pixels in the left image are present in the right image (except for few occlusions)

After rectification: all correspondences are along the same horizontal scan lines The stereo problem (pixels in one image simply shift horizontally in the other image)

The stereo problem The horizontal shifts between the images are sometimes called: “disparities” The Disparities relates to depth: Closer objects have larger disparities.

The stereo problem: compute the disparity map between two images

Traditional Approaches Matching rigid windows around each pixel Each window is matched independently Modern approaches Finding coherent correspondences for all pixels - “Graph cuts” - “Belief Propagation”

Window-Based Approach Compute a cost for each location Location with the lowest cost wins

General Problem : Ambiguity LeftRight scanline

Window-Based Approach Small Window Large Window noisy in low texture areas blurred boundaries

Results with best window size (still not good enough) Window-based matching (best window size) Ground truth

Graph Cuts Ground truthGraph cuts

Maximum flow problem Max flow problem: –Each edge is a “pipe” –Find the largest flow F of “water” that can be sent from the “source” to the “sink” along the pipes –Edge weights give the pipe’s capacity “source” A graph with two terminals S T “sink” a flow F

Minimum cut problem Min cut problem: –Find the cheapest way to cut the edges so that the “source” is completely separated from the “sink” –Edge weights now represent cutting “costs” a cut C “source” A graph with two terminals S T “sink”

Max flow/Min cut theorem Max Flow = Min Cut: –Maximum flow saturates the edges along the minimum cut. –Ford and Fulkerson, 1962 –Problem reduction! Ford and Fulkerson gave first polynomial time algorithm for globally optimal solution “source” A graph with two terminals S T “sink”

Min-Cut: Important Rule No subset of the cut can also be a cut This is not a minimal cut

Energy Minimization Using Iterative Graph cuts Fast Approximate Energy Minimization via Graph Cuts Yuri Boykov, Olga Veksler and Ramin Zabih Pami 2001

To do better we need a better model of images We can make reasonable assumptions about the surfaces in the world Usually assume that the surfaces are smooth Can pose the problem of finding the corresponding points as an energy (or cost) minimization: how well the pixels match up for different disparities neighboring pixels have similar disparities f-assignment

To do better we need a better model of images We can make reasonable assumptions about the surfaces in the world Usually assume that the surfaces are smooth Can pose the problem of finding the corresponding points as an energy (or cost) minimization: Data term is calculated for each pixels Smoothness is calculated on neighbor pixels f-assignment p,q-pixels

Example for Smoothness terms Quadratic L1 Truncated L1 Potts model

Constructing a Graph to Solve the Stereo Problem

The labels of each pixel are the possible disparity values

Constructing a Graph to Solve the Stereo Problem

Relation between the Energy and the Graph labeling problem Data term Smoothness term p q 1 10 {f p =10} {f q =2}

Relation between the Energy and the Graph labeling problem Data term Smoothness term p q 1 10 D p (10) V (p,q) (1, 10)

Iterative graph-cuts Use an iterative scheme to find a “good” local optimum of the energy function. In each iteration: convert the original multi-label problem to a binary one, and solve it by finding a minimal graph-cut (max-flow). The most popular scheme is the expansion move. -expansion: set the label of each pixel to be either or the current label.

Types of Moves Problem: A lot of local minima A Single Pixel Move

Types of Moves Any pixel can change its label to alpha Expansion Move

Types of Moves Claim (without proof): The difference between the optimal solution and the solution from the iterative expansion moves is bounded Expansion Move

Energy Minimization Algorithm 1.Start with arbitrary labeling f 2.Set success = 0 3.For each label –Find –If set and success =1 4.If success =1 goto (2) 5.Return f

Conditions on the Smoothness for using expansion moves: In other words: V should be a metric Note : The Quadratic smoothness is not a metric

For each pair of vertices such that we add a ‘dummy’ vertex (together with the respective edges as shown in the table).

The Relation between the cut and the Energy Given a cut C, we define a labelling f c by: The cost of a cut C is |C| = E(f C ) (plus a constant) If the cut C separates p and

The Relation between the cut and the Energy

Conditions on the Smoothness for using expansion moves: In other words: V should be a metric