390 likes | 507 Views
Gratuitous Picture. US Naval Artillery Rangefinder from World War I (1918)!! . Gratuitous Picture. US Naval Artillery Rangefinder from World War I (1918)!! . Lecture 10: Depth. x. y. x. y. All three vectors in the same plane: . Normalized camera system, epipolar equation.
E N D
Gratuitous Picture US Naval Artillery Rangefinder from World War I (1918)!!
Gratuitous Picture US Naval Artillery Rangefinder from World War I (1918)!!
x y x y • All three vectors in the same plane: Computer Vision, Robert Pless
Normalized camera system, epipolar equation. “Uncalibrated” Case, epipolar equation: F is the “fundamental matrix”. Computer Vision, Robert Pless
Stereo image rectification • Reproject image planes onto a common plane parallel to the line between camera centers • Pixel motion is horizontal after this transformation • Two homographies (3x3 transform), one for each input image reprojection • C. Loop and Z. Zhang. Computing Rectifying Homographies for Stereo Vision. IEEE Conf. Computer Vision and Pattern Recognition, 1999.
Planar rectification Bring twoviews tostandardstereosetup (movesepipole (on image) to)
Basic stereo matching algorithm • If necessary, rectify the two stereo images to transform epipolar lines into scanlines • For each pixel x in the first image • Find corresponding epipolarscanline in the right image • Examine all pixels on the scanline and pick the best match x’ • Compute disparity x-x’ and set depth(x) = fB/(x-x’)
Correspondence search Left Right • 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 scanline Matching cost disparity
Correspondence search Left Right scanline SSD
Correspondence search Left Right scanline Norm. corr
Effect of window size W = 3 W = 20 • Smaller window + More detail • More noise • Larger window + Smoother disparity maps • Less detail
Failures of correspondence search Occlusions, repetition Textureless surfaces 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
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, thecomputerscienceapproach. Similarity measure (SSD or NCC) Optimal path (dynamic programming ) • 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
Energy minimization (Slide from Pascal Fua)
Graph Cut (general formulation requires multi-way cut!) (Slide from Pascal Fua)
Simplified graph cut (Roy and Cox ICCV‘98)
Pop quiz. • What are features of a scene that make it hard to get good stereo depth?
To every vision problem, • … there is an engineering solution.
Stereo Triangulation I J Correspondence is hard!
Structured Light Triangulation I J Correspondence becomes easier!
Example: Laser scanner • Digital Michelangelo Project • http://graphics.stanford.edu/projects/mich/
Binary Coding Faster: stripes in images. Projected over time Example: 3 binary-encoded patterns which allows the measuring surface to be divided in 8 sub-regions Pattern 3 Pattern 2 Pattern 1
Binary Coding • Assign each stripe a unique illumination codeover time [Posdamer 82] Time Space
Binary Coding Example: 7 binary patterns proposed by Posdamer & Altschuler Projected over time … Pattern 3 Pattern 2 Pattern 1 Codeword of this píxel: 1010010 identifies the corresponding pattern stripe
More complex patterns Works despite complex appearances Works in real-time and on dynamic scenes • Need very few images (one or two). • But needs a more complex correspondence algorithm Zhang et al
Kinect • Another structure light method • Use dots rather than strips http://www.laserfocusworld.com/articles/2011/01/lasers-bring-gesture-recognition-to-the-home.html 3D computer vision techniques v.4b
Kinect Hardware 3D computer vision techniques v.4b
See the IR-dots emitted by KINECT http://www.youtube.com/watch?v=dTKlNGSH9Po&feature=related 3D computer vision techniques v.4b