Stereo
EECS 442 β Prof. David Fouhey Winter 2019, University of Michigan
http://web.eecs.umich.edu/~fouhey/teaching/EECS442_W19/
Stereo EECS 442 Prof. David Fouhey Winter 2019, University of - - PowerPoint PPT Presentation
Stereo EECS 442 Prof. David Fouhey Winter 2019, University of Michigan http://web.eecs.umich.edu/~fouhey/teaching/EECS442_W19/ Congrats to P2 Kaggle Winners (Gold) William Dong (0.673) (Silver) Chockalingam Ravi Sundaram (0.669)
EECS 442 β Prof. David Fouhey Winter 2019, University of Michigan
http://web.eecs.umich.edu/~fouhey/teaching/EECS442_W19/
Congrats to P2 Kaggle Winners
Demon, Izzy P, Mega Flygon, Naive, and goblue
Two-View Stereo
Slide credit: S. Seitz
Stereo
Slide credit: S. Lazebnik
https://petapixel.com/2018/03/07/two-photographers-unknowingly-shot-millisecond-time/
https://petapixel.com/2018/03/07/two-photographers-unknowingly-shot-millisecond-time/
https://petapixel.com/2018/03/07/two-photographers-unknowingly-shot-millisecond-time/
Stereograms
Humans can fuse pairs of images to get a sensation of depth
Stereograms: Invented by Sir Charles Wheatstone, 1838
Slide credit: S. Lazebnik
Stereograms
Slide credit: S. Lazebnik
Stereograms
What about this?
Slide Credit: S. Lazebnik, but idea of random dot sterogram is due to B. Julesz
Stereograms
Bela Julesz: Random Dot Stereogram Shows that stereo can operate without recognition
Slide Credit: S. Lazebnik, but idea of random dot sterogram is due to B. Julesz
Stereograms
Humans can fuse pairs of images to get a sensation of depth
Autostereograms: www.magiceye.com
Slide credit: S. Lazebnik
Stereograms
Humans can fuse pairs of images to get a sensation of depth
Autostereograms: www.magiceye.com
Slide credit: S. Lazebnik
Problem formulation
Given a calibrated binocular stereo pair, fuse it to produce a depth image
image 1 image 2 Dense depth map
Slide credit: S. Lazebnik
Basic stereo matching algorithm
Slide credit: S. Lazebnik
Simplest Case: Parallel images
cameras are parallel to each other and to the baseline
same height
Slide credit: S. Lazebnik
Simplest Case: Parallel images
cameras are parallel to each other and to the baseline
same height
along the horizontal scan lines of the images
Slide credit: S. Lazebnik
Essential matrix for parallel images
πππβ² = 0 π = ππ πΊ πΊ = π± π’ = [π, 0,0] Whatβs R? Whatβs t?
T p p' y
z x π = ππ πΊ = βπ π
π£ π€ 1 βπ π π£β² π€β² 1 = 0 πβ²π€ = ππ€
The y-coordinates of corresponding points are the same!
π£ π€ 1 βπ πβ²π€ = 0 βππ€ + πβ²π€ = 0
Slide credit: S. Lazebnik
Stereo image rectification
Slide credit: S. Lazebnik
Stereo image rectification
Reproject image planes onto a common plane parallel to the line between optical centers
Rectifying Homographies for Stereo
Slide credit: S. Lazebnik
Rectification example
Slide credit: S. Lazebnik
Another rectification example
Unrectified Rectified
Slide credit: S. Lazebnik
Basic stereo matching algorithm
transform epipolar lines into scanlines
match
Slide credit: S. Lazebnik
Correspondence Search
Left Right scanline disparity Matching cost
Slide window along the right scanline, compare contents of that window with reference window on left Matching cost: SSD or normalized correlation
Slide credit: S. Lazebnik
Correspondence Search
Left Right scanline Disparity Matching cost Sum of squared differences ΰ·
π
ππ β π
π 2
Slide credit: S. Lazebnik
Correspondence Search
Left Right scanline Disparity Matching cost Normalized correlation
ΰ· π¦π = π¦π β mean π¦ std(π¦)
Slide credit: S. Lazebnik
Basic stereo matching algorithm
epipolar lines into scanlines
Slide credit: S. Lazebnik
Triangulation: Older History
diagram introducing the idea of triangulation into the science of
baseline, e.g. the cities of Brussels and Antwerp, the location of other cities, e.g. Middelburg, Ghent etc., can be found by taking a compass direction from each end of the baseline, and plotting where the two directions cross. This was only a theoretical presentation of the concept β due to topographical restrictions, it is impossible to see Middelburg from either Brussels or Antwerp. Nevertheless, the figure soon became well known all across Europe.
Slide credit: S. Lazebnik
Triangulation: Modern History
Depth from disparity
f f x x' B2 B1 π¦ π = πΆ1 π¨
By similar triangles
βπ¦β² π = πΆ2 π¨
Similarly by similar triangles
z
Diagram adapted from S. Lazebnik
Depth from disparity
Baseline B B=B1+B2
f x x' B2 B1 βπ¦β² π = πΆ2 π¨
Add them
π¦ β π¦β² π = πΆ1 + πΆ2 π¨ π¦ β π¦β² = ππΆ π¨ f z π¦ π = πΆ1 π¨
Disparity
Diagram adapted from S. Lazebnik
Depth from disparity
f f x x' B1 B2 z π¦β² π = πΆ2 π¨ π¦ π = πΆ1 π¨
Subtract them
π¦ β π¦β² π = πΆ1 β πΆ2 π¨ π¦ β π¦β² = ππΆ π¨ B
Diagram adapted from S. Lazebnik
Basic stereo matching algorithm
epipolar lines into scanlines
Slide credit: S. Lazebnik
Failures of Correspondence Search
Image credit: S. Lazebnik
Textureless regions. Why?
? ? ? ?
Failures of Correspondence Search
Image credit: S. Lazebnik
? ?
Repeated Patterns. Why?
Failures of Correspondence Search
Image credit: S. Lazebnik
Specular Surfaces. Why?
Effect of window size
+ More detail
+ Smoother disparity maps
W = 3 W = 20
Image credit: S. Lazebnik
Results with window search
Window-based matching Ground truth Data
Image credit: S. Lazebnik
Better methods exist...
Graph cuts Ground truth
For the latest and greatest: http://www.middlebury.edu/stereo/
Minimization via Graph Cuts, PAMI 2001
Image credit: S. Lazebnik
Improving Window-based Matching
cues.
Uniqueness
Ordering
a b c abc abc
Ordering
a b c adbc abdc d
Smoothness
(for the most part)
scanline
programming) independently
Scanline Stereo
Left image Right image
Slide credit: S. Lazebnik
βShortest pathsβ for scan-line stereo
Left image Right image
Can be implemented with dynamic programming Ohta & Kanade β85, Cox et al. β96 left
S
right
S
q p
Left
t
Right
s
C
C
I Iο’
corr
C
Slide credit: Y. Boykov
Coherent Stereo on 2D Grid
coherent disparities on a 2D grid
Slide credit: S. Lazebnik
Stereo Matching as Optimization
I1 I2 D W1(i) W2(i+D(i)) D(i)
πΉ πΈ = ΰ·
π
π
1 π β π 2 π + πΈ π 2
+ π ΰ·
neighbors π,π
π πΈ π β πΈ(π)
Data term Smoothness term Solvable by graph cuts for certain smoothnesses Ο
via Graph Cuts, PAMI 2001
Slide credit: S. Lazebnik
Is This Doable by Deep Network?
I1 I2 D W1(i) W2(i+D(i)) D(i)
πΉ πΈ = ΰ·
π
π
1 π β π 2 π + πΈ π 2
+ π ΰ·
neighbors π,π
π πΈ π β πΈ(π)
Data term Smoothness term Easy solution: replace the data term with a network
Deep Learning For Stereo
β¦ P(match)
concatenate outputs, learn multilayer perception
Same weights
Deep Learning For Stereo
svm/hinge loss
prediction of match/no match
Same weights
π¦/ π¦ π¦β²/ π¦β² π¦ππ¦β²
Stereo datasets
Slide credit: S. Lazebnik
Active stereo with structured light
camera projector
Light and Multi-pass Dynamic Programming. 3DPVT 2002
Slide credit:
Active stereo with structured light
Light and Multi-pass Dynamic Programming. 3DPVT 2002
Slide credit:
Kinect: Structured infrared light
http://bbzippo.wordpress.com/2010/11/28/kinect-in-infrared/
Slide credit:
Apple TrueDepth
https://www.cnet.com/new s/apple-face-id-truedepth- how-it-works/
Slide credit:
Laser scanning
Digital Michelangelo Project Levoy et al.
http://graphics.stanford.edu/projects/mich/
Source: S. Seitz Slide credit:
Laser scanned models
The Digital Michelangelo Project, Levoy et al.
Source: S. Seitz
Laser scanned models
The Digital Michelangelo Project, Levoy et al.
Source: S. Seitz
Laser scanned models
The Digital Michelangelo Project, Levoy et al.
Source: S. Seitz
Laser scanned models
Source: S. Seitz
1.0 mm resolution (56 million triangles)
The Digital Michelangelo Project, Levoy et al.
Aligning range images
SIGGRAPH 1996