Structure from images
Calibration
Review: Pinhole Camera
Review: Perspective Projection
Points go to Points Lines go to Lines Planes go to whole image or Half-planes Polygons go to Polygons
Review: Intrinsic Camera Parameters X Y Z C Image plane Focal plane M m u v
Review: Extrinsic Parameters X Y Z C Image plane Focal plane M m u v Z Y X By Rigid Body Transformation:
Alper Yilmaz, CAP5415, Fall Estimating Camera Parameters
Shape From Images
Perspective cues
Ames Room
Video
Recovering 3D from images What cues in the image provide 3D information?
Shading Visual cues Merle Norman Cosmetics, Los Angeles
Visual cues Shading Texture The Visual Cliff, by William Vandivert, 1960
Visual cues From The Art of Photography, Canon Shading Texture Focus
Visual cues Shading Texture Focus Motion
Julesz: had huge impact because it showed that recognition not needed for stereo.
Shape From Multiple Views
Multi-View Geometry Relates 3D World Points Camera Centers Camera Orientations
Multi-View Geometry Relates 3D World Points Camera Centers Camera Orientations Camera Intrinsic Parameters Image Points
Stereo scene point optical center image plane
Stereo Basic Principle: Triangulation Gives reconstruction as intersection of two rays Requires –calibration –point correspondence
Stereo Constraints p p’ ? Given p in left image, where can the corresponding point p’ in right image be?
Stereo Constraints X1X1 Y1Y1 Z1Z1 O1O1 Image plane Focal plane M p p’ Y2Y2 X2X2 Z2Z2 O2O2 Epipolar Line Epipole
Epipolar Constraint
From Geometry to Algebra O O’ P p p’
From Geometry to Algebra O O’ P p p’
Linear Constraint: Should be able to express as matrix multiplication.
The Essential Matrix
Correspondence
Pin Hole Camera Model
Basic Stereo Derivations Derive expression for Z as a function of x 1, x 2, f and B
Basic Stereo Derivations
Disparity:
We can always achieve this geometry with image rectification Image Reprojection reproject image planes onto common plane parallel to line between optical centers (Seitz)
Rectification example
Correspondence: Epipolar constraint.
Correspondence Problem Two classes of algorithms: Correlation-based algorithms Produce a DENSE set of correspondences Feature-based algorithms Produce a SPARSE set of correspondences
Correspondence: Photometric constraint Same world point has same intensity in both images. Lambertian fronto-parallel Issues: Noise Specularity Foreshortening
Using these constraints we can use matching for stereo 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 This will never work, so: Improvement: match windows
Comparing Windows: =?f g Mostpopular For each window, match to closest window on epipolar line in other image.
It is closely related to the SSD: Maximize Cross correlation Minimize Sum of Squared Differences
Matching cost disparity LeftRight 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
LeftRight scanline Correspondence search SSD
LeftRight scanline Correspondence search Norm. corr
Effect of window size W = 3W = 20 Smaller window +More detail – More noise Larger window +Smoother disparity maps – Less detail – Fails near boundaries
Stereo results Ground truthScene Data from University of Tsukuba (Seitz)
Results with window correlation Window-based matching (best window size) Ground truth (Seitz)
Results with better method State of the art method Boykov et al., Fast Approximate Energy Minimization via Graph Cuts,Fast Approximate Energy Minimization via Graph Cuts International Conference on Computer Vision, September Ground truth (Seitz)
Failures of correspondence search Textureless surfaces Occlusions, repetition Non-Lambertian surfaces, specularities
How can we improve window-based matching? So far, matches are independent for each point What constraints or priors can we add?
Stereo constraints/priors Uniqueness For any point in one image, there should be at most one matching point in the other image
Stereo constraints/priors 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 hold
Priors and 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 Smoothness We expect disparity values to change slowly (for the most part)
Stereo matching as energy minimization I1I1 I2I2 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 2001Fast Approximate Energy Minimization via Graph Cuts W1(i )W1(i )W 2 (i+D(i )) D(i )D(i )
Examples breadtoyapple
Szeliski Active stereo with structured light Project “structured” light patterns onto the object simplifies the correspondence problem camera 2 camera 1 projector camera 1 projector Li Zhang’s one-shot stereo
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 2002Rapid Shape Acquisition Using Color Structured Light and Multi-pass Dynamic Programming.
Kinect
The third view can be used for verification Beyond two-view stereo