Title: Stereo matching Class 7
1Stereo matchingClass 7
- Read Chapter 7 of tutorial
- http//cat.middlebury.edu/stereo/
Tsukuba dataset
2Stereo
- Standard stereo geometry
- Stereo matching
- Correlation
- Optimization (DP, GC)
- General camera configuration
- Rectification
- Plane-sweep
- Multi-view stereo
3Standard stereo geometry
pure translation along X-axis
4Standard stereo geometry
5Stereo matching
- Search is limited to epipolar line (1D)
- Look for most similar pixel
?
6Aggregation
- Use more than one pixel
- Assume neighbors have similar disparities
- Use correlation window containing pixel
- Allows to use SSD, ZNCC, Census, etc.
7Comparing image regions
- Compare intensities pixel-by-pixel
I(x,y)
I(x,y)
Dissimilarity measures
Sum of Square Differences
8Comparing image regions
- Compare intensities pixel-by-pixel
I(x,y)
I(x,y)
Similarity measures
Zero-mean Normalized Cross Correlation
9Comparing image regions
- Compare intensities pixel-by-pixel
I(x,y)
I(x,y)
Similarity measures
Census
125 126 125
127 128 130
129 132 135
0 0 0
0 1
1 1 1
only compare bit signature
(Real-time chip from TYZX based on Census)
10Aggregation window sizes
- Small windows
- disparities similar
- more ambiguities
- accurate when correct
- Large windows
- larger disp. variation
- more discriminant
- often more robust
- use shiftable windows to deal with
discontinuities
(Illustration from Pascal Fua)
11Occlusions
(Slide from Pascal Fua)
12(No Transcript)
13Real-time stereo on GPU
(Yang and Pollefeys, CVPR2003)
- Computes Sum-of-Square-Differences (use
pixelshader) - Hardware mip-map generation for aggregation over
window - Trade-off between small and large support window
290M disparity hypothesis/sec (Radeon9800pro) e.g.
512x512x36disparities at 30Hz
GPU is great for vision too!
14Exploiting scene constraints
15Ordering constraint
surface slice
surface as a path
6
5
occlusion left
4
3
1
2
4,5
6
1
2,3
2,3
4
5
6
occlusion right
1
3
6
2
1
4,5
16Uniqueness constraint
- In an image pair each pixel has at most one
corresponding pixel - In general one corresponding pixel
- In case of occlusion there is none
17Disparity constraint
surface slice
surface as a path
bounding box
disparity band
constant disparity surfaces
18Stereo matching
- Constraints
- epipolar
- ordering
- uniqueness
- disparity limit
- Trade-off
- Matching cost (data)
- Discontinuities (prior)
Consider all paths that satisfy the
constraints pick best using dynamic programming
19Hierarchical stereo matching
Allows faster computation Deals with large
disparity ranges
Downsampling (Gaussian pyramid)
Disparity propagation
20Disparity map
image I(x,y)
image I(x,y)
Disparity map D(x,y)
(x,y)(xD(x,y),y)
21Example reconstruct image from neighboring images
22(No Transcript)
23Energy minimization
(Slide from Pascal Fua)
24Graph Cut
(general formulation requires multi-way cut!)
(Slide from Pascal Fua)
25Simplified graph cut
(Roy and Cox ICCV98)
(Boykov et al ICCV99)
26(No Transcript)
27Stereo matching with general camera configuration
28Image pair rectification
29Planar rectification
Distortion minimization (uncalibrated)
Bring two views to standard stereo setup (moves
epipole to ?) (not possible when in/close to
image)
30(No Transcript)
31Polar rectification
(Pollefeys et al. ICCV99)
Polar re-parameterization around
epipoles Requires only (oriented) epipolar
geometry Preserve length of epipolar lines Choose
?? so that no pixels are compressed
original image
rectified image
Works for all relative motions Guarantees minimal
image size
32original image pair
planar rectification
polar rectification
33Example Béguinage of Leuven
Does not work with standard Homography-based
approaches
34Example Béguinage of Leuven
35General iso-disparity surfaces
(Pollefeys and Sinha, ECCV04)
Example polar rectification preserves disp.
Application Active vision
Also interesting relation to human horopter
36Stereo camera configurations
(Slide from Pascal Fua)
37Multi-camera configurations
(illustration from Pascal Fua)
Okutami and Kanade
38Multi-view depth fusion
(Koch, Pollefeys and Van Gool. ECCV98)
- Compute depth for every pixel of reference image
- Triangulation
- Use multiple views
- Up- and down sequence
- Use Kalman filter
Allows to compute robust texture
39Plane-sweep multi-view matching
- Simple algorithm for multiple cameras
- no rectification necessary
- doesnt deal with occlusions
Collins96 Roy and Cox98 (GC) Yang et
al.02/03 (GPU)
40Space Carving
413D Reconstruction from Calibrated Images
Scene Volume V
Input Images (Calibrated)
Goal Determine transparency, radiance of points
in V
42Discrete Formulation Voxel Coloring
Discretized Scene Volume
Input Images (Calibrated)
Goal Assign RGBA values to voxels in
V photo-consistent with images
43Complexity and Computability
Discretized Scene Volume
3
N voxels C colors
44Issues
- Theoretical Questions
- Identify class of all photo-consistent scenes
- Practical Questions
- How do we compute photo-consistent models?
45Voxel Coloring Solutions
- 1. C2 (silhouettes)
- Volume intersection Martin 81, Szeliski 93
- 2. C unconstrained, viewpoint constraints
- Voxel coloring algorithm Seitz Dyer 97
- 3. General Case
- Space carving Kutulakos Seitz 98
46Reconstruction from Silhouettes (C 2)
Binary Images
Approach Backproject each silhouette Intersect
backprojected volumes
47Volume Intersection
- Reconstruction Contains the True Scene
- But is generally not the same
- In the limit get visual hull
- Complement of all lines that dont intersect S
48Voxel Algorithm for Volume Intersection
- Color voxel black if on silhouette in every image
- O(MN3), for M images, N3 voxels
- Dont have to search 2N3 possible scenes!
49Properties of Volume Intersection
- Pros
- Easy to implement, fast
- Accelerated via octrees Szeliski 1993
- Cons
- No concavities
- Reconstruction is not photo-consistent
- Requires identification of silhouettes
50Voxel Coloring Solutions
- 1. C2 (silhouettes)
- Volume intersection Martin 81, Szeliski 93
- 2. C unconstrained, viewpoint constraints
- Voxel coloring algorithm Seitz Dyer 97
- 3. General Case
- Space carving Kutulakos Seitz 98
51Voxel Coloring Approach
Visibility Problem in which images is each
voxel visible?
52The Global Visibility Problem
Which points are visible in which images?
53Depth Ordering visit occluders first!
Scene Traversal
Condition depth order is view-independent
54Panoramic Depth Ordering
- Cameras oriented in many different directions
- Planar depth ordering does not apply
55Panoramic Depth Ordering
Layers radiate outwards from cameras
56Panoramic Layering
Layers radiate outwards from cameras
57Panoramic Layering
Layers radiate outwards from cameras
58Compatible Camera Configurations
Depth-Order Constraint Scene outside convex hull
of camera centers
59Calibrated Image Acquisition
Selected Dinosaur Images
- Calibrated Turntable
- 360 rotation (21 images)
Selected Flower Images
60Voxel Coloring Results (Video)
Dinosaur Reconstruction 72 K voxels colored 7.6
M voxels tested 7 min. to compute on a 250MHz
SGI
Flower Reconstruction 70 K voxels colored 7.6 M
voxels tested 7 min. to compute on a 250MHz SGI
61Limitations of Depth Ordering
- A view-independent depth order may not exist
Need more powerful general-case
algorithms Unconstrained camera
positions Unconstrained scene geometry/topology
62Voxel Coloring Solutions
- 1. C2 (silhouettes)
- Volume intersection Martin 81, Szeliski 93
- 2. C unconstrained, viewpoint constraints
- Voxel coloring algorithm Seitz Dyer 97
- 3. General Case
- Space carving Kutulakos Seitz 98
63Space Carving Algorithm
Image 1
Image N
...
64Convergence
- Consistency Property
- The resulting shape is photo-consistent
- all inconsistent points are removed
- Convergence Property
- Carving converges to a non-empty shape
- a point on the true scene is never removed
65What is Computable?
V
True Scene
- The Photo Hull is the UNION of all
photo-consistent scenes in V - It is a photo-consistent scene reconstruction
- Tightest possible bound on the true scene
- Computable via provable Space Carving Algorithm
66Space Carving Algorithm
- The Basic Algorithm is Unwieldy
- Complex update procedure
- Alternative Multi-Pass Plane Sweep
- Efficient, can use texture-mapping hardware
- Converges quickly in practice
- Easy to implement
67Space Carving Algorithm
- Step 1 Initialize V to volume containing true
scene - Step 2 For every voxel on surface of V
- test photo-consistency of voxel
- if voxel is inconsistent, carve it
- Step 3 Repeat Step 2 until all voxels
consistent - Convergence
- Always converges to a photo-consistent model
- (when all assumptions are met)
- Good results on difficult real-world scenes
68Multi-Pass Plane Sweep
- Sweep plane in each of 6 principle directions
- Consider cameras on only one side of plane
- Repeat until convergence
True Scene
Reconstruction
69Multi-Pass Plane Sweep
- Sweep plane in each of 6 principle directions
- Consider cameras on only one side of plane
- Repeat until convergence
70Multi-Pass Plane Sweep
- Sweep plane in each of 6 principle directions
- Consider cameras on only one side of plane
- Repeat until convergence
71Multi-Pass Plane Sweep
- Sweep plane in each of 6 principle directions
- Consider cameras on only one side of plane
- Repeat until convergence
72Multi-Pass Plane Sweep
- Sweep plane in each of 6 principle directions
- Consider cameras on only one side of plane
- Repeat until convergence
73Multi-Pass Plane Sweep
- Sweep plane in each of 6 principle directions
- Consider cameras on only one side of plane
- Repeat until convergence
74Multi-Pass Plane Sweep
- Sweep plane in each of 6 principle directions
- Consider cameras on only one side of plane
- Repeat until convergence
75Multi-Pass Plane Sweep
- Sweep plane in each of 6 principle directions
- Consider cameras on only one side of plane
- Repeat until convergence
76Multi-Pass Plane Sweep
- Sweep plane in each of 6 principle directions
- Consider cameras on only one side of plane
- Repeat until convergence
77Multi-Pass Plane Sweep
- Sweep plane in each of 6 principle directions
- Consider cameras on only one side of plane
- Repeat until convergence
78Multi-Pass Plane Sweep
- Sweep plane in each of 6 principle directions
- Consider cameras on only one side of plane
- Repeat until convergence
79Multi-Pass Plane Sweep
- Sweep plane in each of 6 principle directions
- Consider cameras on only one side of plane
- Repeat until convergence
80Multi-Pass Plane Sweep
- Sweep plane in each of 6 principle directions
- Consider cameras on only one side of plane
- Repeat until convergence
81Multi-Pass Plane Sweep
- Sweep plane in each of 6 principle directions
- Consider cameras on only one side of plane
- Repeat until convergence
82Multi-Pass Plane Sweep
- Sweep plane in each of 6 principle directions
- Consider cameras on only one side of plane
- Repeat until convergence
83Multi-Pass Plane Sweep
- Sweep plane in each of 6 principle directions
- Consider cameras on only one side of plane
- Repeat until convergence
84Multi-Pass Plane Sweep
- Sweep plane in each of 6 principle directions
- Consider cameras on only one side of plane
- Repeat until convergence
85Multi-Pass Plane Sweep
- Sweep plane in each of 6 principle directions
- Consider cameras on only one side of plane
- Repeat until convergence
86Multi-Pass Plane Sweep
- Sweep plane in each of 6 principle directions
- Consider cameras on only one side of plane
- Repeat until convergence
87Multi-Pass Plane Sweep
- Sweep plane in each of 6 principle directions
- Consider cameras on only one side of plane
- Repeat until convergence
88Multi-Pass Plane Sweep
- Sweep plane in each of 6 principle directions
- Consider cameras on only one side of plane
- Repeat until convergence
89Multi-Pass Plane Sweep
- Sweep plane in each of 6 principle directions
- Consider cameras on only one side of plane
- Repeat until convergence
90Space Carving Results African Violet
Input Image (1 of 45)
Reconstruction
Reconstruction
Reconstruction
91Space Carving Results Hand
Input Image (1 of 100)
Views of Reconstruction
92Other Features
- Coarse-to-fine Reconstruction
- Represent scene as octree
- Reconstruct low-res model first, then refine
- Hardware-Acceleration
- Use texture-mapping to compute voxel projections
- Process voxels an entire plane at a time
- Limitations
- Need to acquire calibrated images
- Restriction to simple radiance models
- Bias toward maximal (fat) reconstructions
- Transparency not supported
93(No Transcript)
94Probalistic Space Carving
Broadhurst et al. ICCV01
95The Master's Lodge Image Sequence
Bayesian
96Space-carving for specular surfaces (Yang,
Pollefeys Welch 2003)
Extended photoconsistency
I Light Intensity Object Color
N Normal vector L Lighting vector
V View Vector R Reflection vector
97Experiment
98Animated Views
Our result
99Other Approaches
Level-Set Methods Faugeras Keriven
1998 Evolve implicit function by solving
PDEs
100- Graph-cut-based approach
- Refine using surface evolution
e.g. Sinha et al. ICCV07
101Interesting comparison of multi-view stereo
approaches
http//vision.middlebury.edu/mview/
102Next class structured light and active scanning