3D Photography: Stereo Matching
Kevin Köser, Marc Pollefeys Spring 2012
http://cvg.ethz.ch/teaching/2012spring/3dphoto/
3D Photography: Stereo Matching Kevin Kser, Marc Pollefeys Spring - - PowerPoint PPT Presentation
3D Photography: Stereo Matching Kevin Kser, Marc Pollefeys Spring 2012 http://cvg.ethz.ch/teaching/2012spring/3dphoto/ Stereo & Multi-View Stereo Tsukuba dataset http://cat.middlebury.edu/stereo/ Stereo Standard stereo geometry
http://cvg.ethz.ch/teaching/2012spring/3dphoto/
http://cat.middlebury.edu/stereo/ Tsukuba dataset
(Slide from Pascal Fua)
1 2 3 4,5 6 1 2,3 4 5 6 2 1 3 4,5 6 1 2,3 4 5 6
surface slice surface as a path
surface slice surface as a path
bounding box
use reconstructed features to determine bounding box
constant disparity surfaces
Optimal path (dynamic programming ) Similarity measure (SSD or NCC) Constraints
Trade-off
Consider all paths that satisfy the constraints pick best using dynamic programming
Downsampling
(Gaussian pyramid)
Disparity propagation
Allows faster computation Deals with large disparity ranges
image I(x,y) image I´(x´,y´) Disparity map D(x,y)
(x´,y´)=(x+D(x,y),y)
(Slide from Pascal Fua)
(Slide from Pascal Fua)
(general formulation requires multi-way cut!)
(Boykov et al ICCV‘99) (Roy and Cox ICCV‘98)
Bring two views to standard stereo setup (moves epipole to ) (not possible when in/close to image)
~ image size
(calibrated)
Distortion minimization
(uncalibrated)
Polar re-parameterization around epipoles Requires only (oriented) epipolar geometry Preserve length of epipolar lines Choose so that no pixels are compressed
rectified image
(Pollefeys et al. ICCV’99) Works for all relative motions Guarantees minimal image size
polar rectification planar rectification
image pair
Does not work with standard Homography-based approaches
(Slide from Pascal Fua)
Okutami and Kanade
(illustration from Pascal Fua)
(Gallup et al., CVPR08)
Variable Baseline/Resolution Stereo: comparison
pixel of reference image
(Koch, Pollefeys and Van Gool. ECCV‘98)
Allows to compute robust texture
Collins’96; Roy and Cox’98 (GC); Yang et al.’02/’03 (GPU)
Scene Volume V Input Images (Calibrated)
Discretized Scene Volume Input Images (Calibrated)
photo-consistent with images
Discretized Scene Volume N voxels C colors
3
All Scenes (CN3) Photo-Consistent Scenes True Scene
Identify class of all photo-consistent scenes
How do we compute photo-consistent models?
Volume intersection [Martin 81, Szeliski 93]
Voxel coloring algorithm [Seitz & Dyer 97]
Space carving [Kutulakos & Seitz 98]
Volume intersection [Martin 81, Szeliski 93]
Voxel coloring algorithm [Seitz & Dyer 97]
Space carving [Kutulakos & Seitz 98]
Unknown Scene
Known Scene
Layers
Scene Traversal
Scene outside convex hull of camera centers
360° rotation (21 images)
Selected Dinosaur Images Selected Flower Images
Dinosaur Reconstruction
72 K voxels colored 7.6 M voxels tested 7 min. to compute
Flower Reconstruction
70 K voxels colored 7.6 M voxels tested 7 min. to compute
p q
Volume intersection [Martin 81, Szeliski 93]
Voxel coloring algorithm [Seitz & Dyer 97]
Space carving [Kutulakos & Seitz 98]
Image 1 Image N
…... Initialize to a volume V containing the true scene Repeat until convergence Choose a voxel on the current surface Carve if not photo-consistent Project to visible input images
The resulting shape is photo-consistent
all inconsistent points are removed
Carving converges to a non-empty shape
a point on the true scene is never removed
The Photo Hull is the UNION of all photo-consistent scenes in V
True Scene V Photo Hull V
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
True Scene Reconstruction
Input Image (1 of 45) Reconstruction Reconstruction Reconstruction
Input Image (1 of 100) Views of Reconstruction
projections
voxel occluded
Broadhurst et al. ICCV’01
Bayesian
The Master's Lodge Image Sequence
I
Light Intensity Object Color
N
Normal vector
L
Lighting vector
V
View Vector
R
Reflection vector
color of the light Diffuse color Saturation point 1 1 1
Reflected Light in RGB color space Dielectric Materials (such as plastic and glass)
(Yang, Pollefeys & Welch 2003)
Extended photoconsistency:
Our result
Level-Set Methods [Faugeras & Keriven 1998]
Evolve implicit function by solving PDE’s
More recent level-set/PDE approaches by Pons et al., CVPR05, Gargallo et al. ICCV07, Kalin and Kremers ECCV08, …
(x)
constant offset)
middle volume
photoconsistency cost to voxels Slides from [Vogiatzis et al. CVPR2005]
Source Sink Slides from [Vogiatzis et al. CVPR2005]
Source Sink Cost of a cut (x) dS S
cut 3D Surface S
[Boykov and Kolmogorov ICCV 2001]
Slides from [Vogiatzis et al. CVPR2005]
Source Sink Minimum cut Minimal 3D Surface under photo-consistency metric
[Boykov and Kolmogorov ICCV 2001]
Slides from [Vogiatzis et al. CVPR2005]
surface for
views Slides from [Vogiatzis et al. CVPR2005]
Self occlusion Slides from [Vogiatzis et al. CVPR2005]
Self occlusion Slides from [Vogiatzis et al. CVPR2005]
N threshold on angle between normal and viewing direction threshold= ~60 Slides from [Vogiatzis et al. CVPR2005]
Normalised cross correlation Use all remaining cameras pair wise Average all NCC scores Slides from [Vogiatzis et al. CVPR2005]
Average NCC = C Voxel score = 1 - exp( -tan2[(C-1)/4] / 2 )
0 1 = 0.05 in all experiments
Slides from [Vogiatzis et al. CVPR2005]
Slides from [Vogiatzis et al. CVPR2005]
Slides from [Vogiatzis et al. CVPR2005]
Slides from [Vogiatzis et al. CVPR2005]
Slides from [Vogiatzis et al. CVPR2005]
Slides from [Vogiatzis et al. CVPR2005]
[Vogiatzis et al. PAMI2007]
L.D. Cohen and I. Cohen. Finite-element methods for active contour models and balloons for 2-d and 3-d
Slides from [Vogiatzis et al. CVPR2005]
L.D. Cohen and I. Cohen. Finite-element methods for active contour models and balloons for 2-d and 3-d images. PAMI, 15(11):1131– 1147, November 1993.
(x) dS - dV S V Slides from [Vogiatzis et al. CVPR2005]
Slides from [Vogiatzis et al. CVPR2005]
Slides from [Vogiatzis et al. CVPR2005]
wij SOURCE
h j i
[Boykov and Kolmogorov ICCV 2001] Slides from [Vogiatzis et al. CVPR2005]
116 Address Memory and Computational Overhead (Sinha et. al. 2007)
– Compute Photo-consistency only where it is needed – Detect Interior Pockets using Visibility
117
Cell (Tetrahedron) Face (triangle) Unknown surface
118
Detect crossing faces by testing photo-consistency
119
If none of the faces of a cell are crossing faces, that cell cannot any surface element.
120
121
Final Mesh shown with Photo-consistency
122
Use Visibility of the Photo-consistent Patches Also proposed by Hernandez et. al. 2007, Labatut et.
123
Source Sink Solution re-projected into the original silhouette
124
Every such ray must meet the real surface at least once
125
along the ray
Photo-consistency Surface
126
Source Sink
127
Before After
128
After graph-cut
After local refinement
36 images 2000 x 3000 pixels
20 images Running Time: Graph Construction : 25 mins Graph-cut : 5 mins Local Refinement : 20 mins 20 images 640 x 480 pixels
130 36 images 36 images
131
48 images 47 images 24 images
[Sinha and Pollefeys ICCV05]
(Kolev et al. ECCV2008) includes relaxed silhouette constraint
http://vision.middlebury.edu/mview/