JanMichael Frahm Enrique Dunn Spring 2012 From Previous Lecture Homographies Fundamental matrix Normalized 8point Algorithm Essential Matrix Plane Homography for Calibrated Cameras ID: 225087
Download Presentation The PPT/PDF document "776 Computer Vision" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
776 Computer Vision
Jan-Michael
Frahm
, Enrique Dunn
Spring 2012Slide2
From Previous Lecture
Homographies
Fundamental matrix
Normalized 8-point Algorithm
Essential MatrixSlide3
Plane Homography
for Calibrated Cameras
In the calibrated case
Two cameras P=K[I |0] and P’ = K’[R | t]
A plane π=(
nT,d) TThe homography is given by x’=Hx H = K’(R – tnT/d)K-1
For the plane at infinity
H
= K’RK
-1Slide4
The Fundamental Matrix F
P
0
m
0
L
l
1
M
m
1
M
P
1
H
m
0
Epipole
e
1
F
= [e]
x
H
= Fundamental MatrixSlide5
The eight-point algorithm
x
= (
u
,
v
, 1)
T
,
x’
= (
u’, v’, 1)TMinimize:under the constraintF33 = 1Slide6
Essential Matrix
(Longuet-Higgins, 1981)
Epipolar
constraint: Calibrated case
X
x
x’
The vectors
x
,
t
, and
Rx’
are coplanar
slide: S.
LazebnikSlide7
Essential
Matrix
Epipolar
constraint: Calibrated case
X
x
x’
The vectors
x
,
t
, and
Rx’
are coplanar
slide: S.
Lazebnik
Cubic constraint Slide8
Today: Binocular
stereo
Given a calibrated binocular stereo pair, fuse it to produce a depth image
Where does the depth information come from?Slide9
Binocular stereo
Given a calibrated binocular stereo pair, fuse it to produce a depth image
Humans can do it
Stereograms: Invented by Sir Charles Wheatstone, 1838Slide10
Binocular stereo
Given a calibrated binocular stereo pair, fuse it to produce a depth image
Humans can do it
Autostereograms: www.magiceye.comSlide11
Binocular stereo
Given a calibrated binocular stereo pair, fuse it to produce a depth image
Humans can do it
Autostereograms: www.magiceye.comSlide12
Real-time stereo
Used for robot navigation (and other tasks)
Software-based real-time stereo techniques
Nomad robot
searches for meteorites in Antartica
http://www.frc.ri.cmu.edu/projects/meteorobot/index.html
slide: R.
SzeliskiSlide13
Stereo image pair
slide: R.
SzeliskiSlide14
Public Library, Stereoscopic Looking Room, Chicago, by Phillips, 1923
Anaglyphs
http://www.rainbowsymphony.com/freestuff.html
(Wikipedia for images)
slide: R.
SzeliskiSlide15
Stereo: epipolar geometry
Match features along epipolar lines
viewing ray
epipolar plane
epipolar line
slide: R.
SzeliskiSlide16
Simplest Case: Parallel images
Image planes of cameras are parallel to each other and to the baseline
Camera centers are at same height
Focal lengths are the same
slide: S.
LazebnikSlide17
Simplest Case: Parallel images
Image planes of cameras are parallel to each other and to the baseline
Camera centers are at same height
Focal lengths are the same
Then, epipolar lines fall along the horizontal scan lines of the images
slide: S.
LazebnikSlide18
Essential matrix for parallel images
R = I t
= (
T
, 0, 0)
Epipolar constraint:
t
x
x’Slide19
Essential matrix for parallel images
Epipolar constraint:
R = I t
= (
T
, 0, 0)
The y-coordinates of corresponding points are the same!
t
x
x’Slide20
Depth from disparity
f
x
x’
Baseline
B
z
O
O’
X
f
Disparity is inversely proportional to depth!Slide21
Depth Sampling
Depth sampling for integer pixel disparity
Quadratic precision loss with depth!Slide22
Depth Sampling
Depth sampling for wider baselineSlide23
Depth Sampling
Depth sampling is in O(resolution
6
)Slide24
Stereo: epipolar geometry
for
two
images (or images with collinear camera centers), can find
epipolar
linesepipolar lines are the projection of the pencil of planes passing through the centersRectification: warping the input images (perspective transformation) so that epipolar lines are horizontalslide: R. SzeliskiSlide25
Rectification
Project each image onto same plane, which is parallel to the epipole
Resample lines (and shear/stretch) to place lines in correspondence, and minimize distortion
[Loop and Zhang, CVPR
’
99]
slide: R.
SzeliskiSlide26
Rectification
BAD!
slide: R.
SzeliskiSlide27
Rectification
GOOD!
slide: R.
SzeliskiSlide28
Problem: Rectification for forward moving cameras
Required image can become very large (infinitely large) when the
epipole
is in the image
Alternative rectifications are available using
epipolar lines directly in the imagesPollefeys et al. 1999, “A simple and efficient method for general motion”, ICCVSlide29
Your basic stereo algorithm
For each epipolar line
For each pixel in the left image
compare with every pixel on same epipolar line in right image
pick pixel with minimum match cost
Improvement: match
windows
This should look familar...
slide: R.
SzeliskiSlide30
Image registration (revisited)
How do we determine correspondences?
block matching
or
SSD
(sum squared differences)d is the disparity (horizontal motion)How big should the neighborhood be?
slide: R.
SzeliskiSlide31
Finding correspondences
apply feature matching criterion (e.g., correlation or Lucas-Kanade) at
all
pixels simultaneously
search only over epipolar lines (many fewer candidate positions)
slide: R.
SzeliskiSlide32
Matching cost
disparity
Left
Right
scanline
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
slide: S.
LazebnikSlide33
Left
Right
scanline
Correspondence search
SSD
slide: S.
LazebnikSlide34
Left
Right
scanline
Correspondence search
Norm. corr
slide: S.
LazebnikSlide35
Neighborhood size
Smaller neighborhood: more details
Larger neighborhood: fewer isolated mistakes
w = 3 w = 20
slide: R.
SzeliskiSlide36
Matching criteria
Raw pixel values (correlation)
Band-pass filtered images [Jones & Malik 92]
“
Corner
” like features [Zhang, …]Edges [many people…]Gradients [Seitz 89; Scharstein 94]Rank statistics [Zabih & Woodfill 94]Intervals [Birchfield and Tomasi 96]Overview of matching metrics and their performance:H. Hirschmüller and D. Scharstein, “Evaluation of Stereo Matching Costs on Images with Radiometric Differences”, PAMI 2008
slide: R.
SzeliskiSlide37
Adaptive Weighting
Boundary Preserving
More CostlySlide38
Failures of correspondence search
Textureless surfaces
Occlusions, repetition
Non-Lambertian surfaces, specularities
slide: S.
LazebnikSlide39
Stereo: certainty modeling
Compute certainty map from correlations
input depth map certainty map
slide: R.
SzeliskiSlide40
Results with window search
Window-based matching
Ground truth
Data
slide: S.
LazebnikSlide41
Better methods exist...
Graph cuts
Ground truth
For the latest and greatest:
http://www.middlebury.edu/stereo/
Y. Boykov, O. Veksler, and R. Zabih,
Fast Approximate Energy Minimization via Graph Cuts
, PAMI 2001
slide: S.
LazebnikSlide42
How can we improve window-based matching?
The similarity constraint is
local
(each reference window is matched independently)
Need to enforce
non-local correspondence constraintsslide: S. LazebnikSlide43
Non-local constraints
Uniqueness
For any point in one image, there should be at most one matching point in the other image
slide: S.
LazebnikSlide44
Non-local constraints
Uniqueness
For any point in one image, there should be at most one matching point in the other image
Ordering
Corresponding points should be in the same order in both views
slide: S. LazebnikSlide45
Non-local constraints
Uniqueness
For any point in one image, there should be at most one matching point in the other image
Ordering
Corresponding points should be in the same order in both views
Ordering constraint doesn’t holdslide: S. LazebnikSlide46
Non-local constraints
Uniqueness
For any point in one image, there should be at most one matching point in the other image
Ordering
Corresponding points should be in the same order in both views
SmoothnessWe expect disparity values to change slowly (for the most part)slide: S. LazebnikSlide47
Scanline stereo
Try to coherently match pixels on the entire scanline
Different scanlines are still optimized independently
Left image
Right image
slide: S.
LazebnikSlide48
“Shortest paths” for scan-line stereo
Left image
Right image
Can be implemented with dynamic programming
Ohta & Kanade ’85, Cox et al. ‘96
correspondence
q
p
Left occlusion
t
Right
occlusion
s
Slide credit: Y. BoykovSlide49
Coherent stereo on 2D grid
Scanline stereo generates streaking artifacts
Can’t use dynamic programming to find spatially coherent disparities/ correspondences on a 2D grid
slide: S.
LazebnikSlide50
Stereo matching as energy minimization
I
1
I
2
D
Energy functions of this form can be minimized using
graph cuts
Y. Boykov, O. Veksler, and R. Zabih,
Fast Approximate Energy Minimization via Graph Cuts
, PAMI 2001
W
1
(i )W2(i+D(i ))D(
i
)
data termsmoothness termslide: S. LazebnikSlide51
Active stereo with structured light
Project “structured” light patterns onto the object
Simplifies the correspondence problem
Allows us to use only one camera
camera
projector
L. Zhang, B. Curless, and S. M. Seitz.
Rapid Shape Acquisition Using Color Structured Light and Multi-pass Dynamic Programming.
3DPVT
2002
slide: S.
LazebnikSlide52
Active stereo with structured light
L. Zhang, B. Curless, and S. M. Seitz.
Rapid Shape Acquisition Using Color Structured Light and Multi-pass Dynamic Programming.
3DPVT
2002
slide: S.
LazebnikSlide53
Active stereo with structured light
http://en.wikipedia.org/wiki/Structured-light_3D_scanner
slide: S.
LazebnikSlide54
Kinect: Structured infrared light
http://bbzippo.wordpress.com/2010/11/28/kinect-in-infrared/
slide: S.
LazebnikSlide55
Laser scanning
Optical triangulation
Project a single stripe of laser light
Scan it across the surface of the object
This is a very precise version of structured light scanning
Digital Michelangelo Project
Levoy et al.http://graphics.stanford.edu/projects/mich/
Source: S. SeitzSlide56
Laser scanned models
The Digital Michelangelo Project
, Levoy et al.
Source: S. SeitzSlide57
Laser scanned models
The Digital Michelangelo Project
, Levoy et al.
Source: S. SeitzSlide58
Laser scanned models
The Digital Michelangelo Project
, Levoy et al.
Source: S. SeitzSlide59
Laser scanned models
The Digital Michelangelo Project
, Levoy et al.
Source: S. SeitzSlide60
Laser scanned models
The Digital Michelangelo Project
, Levoy et al.
Source: S. Seitz
1.0 mm resolution (56 million triangles) Slide61
Aligning range images
A single range scan is not sufficient to describe a complex surface
Need techniques to register multiple range images
B.
Curless
and M. Levoy, A Volumetric Method for Building Complex Models from Range Images, SIGGRAPH 1996Slide62
Aligning range images
A single range scan is not sufficient to describe a complex surface
Need techniques to register multiple range images
… which brings us to
multi-view stereo