Stereo Matching 16-385 Computer Vision (Kris Kitani) Carnegie - - PowerPoint PPT Presentation

stereo matching
SMART_READER_LITE
LIVE PREVIEW

Stereo Matching 16-385 Computer Vision (Kris Kitani) Carnegie - - PowerPoint PPT Presentation

Stereo Matching 16-385 Computer Vision (Kris Kitani) Carnegie Mellon University What is stereo rectification? Reproject image planes onto a common plane parallel to the line between camera centers Recall: Stereo Rectification What can we


slide-1
SLIDE 1

Stereo Matching

16-385 Computer Vision (Kris Kitani)

Carnegie Mellon University

slide-2
SLIDE 2

Recall: Stereo Rectification

Reproject image planes onto a common plane parallel to the line between camera centers What is stereo rectification?

slide-3
SLIDE 3

What can we do after rectification?

slide-4
SLIDE 4

Depth Estimation via Stereo Matching

slide-5
SLIDE 5
slide-6
SLIDE 6
  • 1. Rectify images 


(make epipolar lines horizontal)

  • 2. For each pixel
  • a. Find epipolar line
  • b. Scan line for best match
  • c. Compute depth from disparity

Z = bf d

slide-7
SLIDE 7

Stereo Block Matching

Matching cost disparity Left Right scanline

  • Slide a window along the epipolar line and compare contents of

that window with the reference window in the left image

  • Matching cost: SSD or normalized correlation
slide-8
SLIDE 8

SSD

slide-9
SLIDE 9

Normalized cross-correlation

slide-10
SLIDE 10

Similarity Measure Formula

Sum of Absolute Differences (SAD) Sum of Squared Differences (SSD) Zero-mean SAD Locally scaled SAD Normalized Cross Correlation (NCC) SAD SSD NCC Ground truth

slide-11
SLIDE 11

Effect of window size

W = 3 W = 20

slide-12
SLIDE 12

Effect of window size

W = 3 W = 20

Smaller window + More detail

  • More noise

Larger window + Smoother disparity maps

  • Less detail
  • Fails near boundaries
slide-13
SLIDE 13

When will stereo block matching fail?

slide-14
SLIDE 14

When will stereo block matching fail? textureless regions repeated patterns specularities

slide-15
SLIDE 15

Improving Stereo Block Matching

slide-16
SLIDE 16

Block matching Ground truth What are some problems with the result?

slide-17
SLIDE 17

How can we improve depth estimation?

slide-18
SLIDE 18

How can we improve depth estimation?

Too many discontinuities. We expect disparity values to change slowly. Let’s make an assumption: depth should change smoothly

slide-19
SLIDE 19

Stereo matching 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

slide-20
SLIDE 20

{ {

data term smoothness term

energy function (for one pixel)

slide-21
SLIDE 21

{ {

(block matching result) (smoothness function) Want each pixel to find a good match in the other image Adjacent pixels should (usually) move about the same amount data term smoothness term

energy function (for one pixel)

slide-22
SLIDE 22

SSD distance between windows centered at I(x, y) and J(x+ d(x,y), y)

data term

slide-23
SLIDE 23

4-­‑connected ¡ neighborhood 8-­‑connected ¡ neighborhood

: set of neighboring pixels

SSD distance between windows centered at I(x, y) and J(x+ d(x,y), y)

smoothness term

slide-24
SLIDE 24

“Potts model” L1 distance

smoothness term

slide-25
SLIDE 25

Dynamic Programming

Can minimize this independently per scanline using dynamic programming (DP) : minimum cost of solution such that d(x,y) = d

slide-26
SLIDE 26

Match only Match & smoothness (via graph cut) Ground Truth

  • Y. Boykov, O. Veksler, and R. Zabih, Fast Approximate Energy Minimization via Graph Cuts, PAMI 2001