1 of 49

Nima Kalantari

CSCE 448/748 - Computational Photography

Stereo

Many slides from Steve Seitz

2 of 49

Depth of a scene

Credit: PetaPixel

3 of 49

Depth of a scene

Credit: Li & Snavely

4 of 49

Depth ambiguity

5 of 49

Depth ambiguity

  • Structure and depth are inherently ambiguous from single views.

Images from Lana Lazebnik

6 of 49

Forced Perspective

7 of 49

8 of 49

Stereo Vision

  • Not that important for humans, especially at longer distances. Perhaps 10% of people are stereo blind.
  • Many animals don’t have much stereo overlap in their fields of view

9 of 49

What cues help us to perceive 3d shape and depth?

10 of 49

11 of 49

12 of 49

13 of 49

Shading

[Figure from Prados & Faugeras 2006]

14 of 49

Shading

Credit: scientificamerican.com

15 of 49

Texture

16 of 49

Focus/defocus

[figs from H. Jin and P. Favaro, 2002]

Images from same point of view, different camera parameters

3d shape / depth estimates

17 of 49

Motion

Figures from L. Zhang

http://www.brainconnection.com/teasers/?main=illusion/motion-shape

18 of 49

Stereo photography

Invented by Charles Wheatstone 1838

19 of 49

Stereo photography

20 of 49

Credit: http://www.johnsonshawmuseum.org/

21 of 49

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

22 of 49

Basic Idea

Credit: https://people.well.com/user/jimg/stereo/stereo_list.html

23 of 49

24 of 49

Stereo

scene point

optical center

image plane

25 of 49

Stereo

Basic Principle: Triangulation

    • Gives reconstruction as intersection of two rays
    • Requires
      • camera pose (calibration)
      • point correspondence

26 of 49

Assume parallel optical axes, known camera parameters (i.e., calibrated cameras). What is expression for Z?

Similar triangles (pl, P, pr) and (Ol, P, Or):

Geometry for a simple stereo system

disparity

+

̶

 

27 of 49

Depth from disparity

image I(x,y)

image I´(x´,y´)

Disparity map D(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

28 of 49

General case, with calibrated cameras

  • The two cameras need not have parallel optical axes.

Vs.

29 of 49

  • Given p in left image, where can corresponding point p’ be?

Stereo correspondence constraints

30 of 49

Stereo correspondence constraints

31 of 49

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 connecting the world point and optical centers.

Epipolar constraint

32 of 49

  • Epipolar Plane

Epipole

Epipolar Line

Baseline

Epipolar geometry

Epipole

Epipolar plane: plane containing baseline and world point

Epipole: point of intersection of baseline with image plane

Epipolar line: intersection of epipolar plane with the image plane

Baseline: line joining the camera centers

33 of 49

Epipolar constraint

This is useful because it reduces the correspondence problem to a 1D search along an epipolar line.

Image from Andrew Zisserman

34 of 49

Example

35 of 49

What do the epipolar lines look like?

Ol

Or

Ol

Or

1.

2.

36 of 49

Example: converging cameras

Figure from Hartley & Zisserman

37 of 49

Figure from Hartley & Zisserman

Example: parallel cameras

Where are the epipoles?

38 of 49

The correspondence problem

Epipolar geometry constrains our search, but we still have a difficult correspondence problem.

39 of 49

Basic stereo matching algorithm

  • For each pixel x in the first image
    • Find corresponding epipolar scanline in the right image
    • Examine all pixels on the scanline and pick the best match x’
    • Compute disparity x-x’ and set depth(x) = fB/(x-x’)

40 of 49

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

Matching cost

disparity

Left

Right

scanline

41 of 49

Correspondence search

Left

Right

scanline

SSD

42 of 49

Correspondence search

Left

Right

scanline

Norm. corr

43 of 49

Correspondence problem

Source: Andrew Zisserman

Parallel camera example: epipolar lines are corresponding image scanlines

44 of 49

Correspondence problem

Neighborhoods of corresponding points are similar in intensity patterns.

Source: Andrew Zisserman

45 of 49

Correlation-based window matching

Source: Andrew Zisserman

46 of 49

Textureless regions

Textureless regions are non-distinct; high ambiguity for matches.

Source: Andrew Zisserman

47 of 49

Effect of window size

Source: Andrew Zisserman

48 of 49

Effect of window size

W = 3

W = 20

  • Smaller window

+ More detail

    • More noise

  • Larger window

+ Smoother disparity maps

    • Less detail

49 of 49

Results with window search

Window-based matching

Ground truth

Data