280 likes | 335 Views
Multiview geometry. ECE 847: Digital Image Processing. Stan Birchfield Clemson University. Stereo geometry for pinhole cameras with flat retinas. world point. epipolar plane. epipolar line for x. center of projection. baseline. Left camera. Right camera. epipole.
E N D
Multiview geometry ECE 847:Digital Image Processing Stan Birchfield Clemson University
Stereo geometry for pinhole cameras with flat retinas world point epipolar plane epipolar line for x center of projection baseline Left camera Right camera epipole C,C’,x,x’ and X are coplanar M. Pollefeys, http://www.cs.unc.edu/Research/vision/comp256fall03/
Epipolar geometry epipoles e,e’ = intersection of baseline with image plane = projection of projection center in other image = vanishing point of camera motion direction an epipolar plane = plane containing baseline (1-D family) an epipolar line = intersection of epipolar plane with image (always come in corresponding pairs) M. Pollefeys, http://www.cs.unc.edu/Research/vision/comp256fall03/
Epipolar geometry center of projection baseline epipole What if only C,C’,x are known? All points on p project on l and l’ M. Pollefeys, http://www.cs.unc.edu/Research/vision/comp256fall03/
Epipolar geometry Family of planes p and lines l and l’ Intersection in e and e’ M. Pollefeys, http://www.cs.unc.edu/Research/vision/comp256fall03/
Example: Converging cameras M. Pollefeys, http://www.cs.unc.edu/Research/vision/comp256fall03/
Example: Forward motion e’ e M. Pollefeys, http://www.cs.unc.edu/Research/vision/comp256fall03/
Epipolar geometry andFundamental matrix (computed with 20 points, non-normalized algorithm) epipolar line (epipole: intersection of all epipolar lines)
Epipolar geometry andFundamental matrix (computed with 50 points, non-normalized algorithm) epipolar line (epipole: intersection of all epipolar lines)
Epipolar geometry andFundamental matrix using OpenCV implementation best
Fundamental matrix point in image 1 point in image 2 fundamental matrix
Epipolar lines (1) epipolar line in image 2 associated with (x,y) in image 1
Epipolar lines (2) epipolar line in image 1 associated with (x’,y’) in image 2
Computing the fundamental matrix (Eight-point algorithm) known unknown
Computing the fundamental matrix (Eight-point algorithm) known unknown
Computing the fundamental matrix (Eight-point algorithm) • Construct A (nx9) from correspondences • Compute SVD of A: A = USVT • Unit-norm solution of Af=0 is given by vn (the right-most singular vector of A) • Reshape f into F1 • Compute SVD of F1: F1=UFSFVFT • Set SF(3,3)=0 to get SF’(The enforces rank(F)=2) • Reconstruct F=UFSF’VFT • Now xTF is epipolar line in image 2,and Fx’ is epipolar line in image 1 Note: Need to normalize coordinates to get good results
Normalizing coordinates Be careful: order of x and x’ has switched!
Normalizing coordinates Step 1: Compute normalizing transformation matrices: Step 2: Normalize coordinates: Step 3: Use 8-point algorithm to compute : Step 4: Transform back to original coordinate system:
Example: Motion parallel to image plane (simple for stereo rectification) M. Pollefeys, http://www.cs.unc.edu/Research/vision/comp256fall03/
Example: Motion parallel to image scanlines Epipoles are at infinity Scanlines are the epipolar lines In this case, the images are said to be “rectified” Tsukuba stereo images courtesy of Y. Ohta and Y. Nakamura at the University of Tsukuba
Standard (rectified) stereo geometry pure translation along X-axis M. Pollefeys, http://www.cs.unc.edu/Research/vision/comp256fall03/
Perspective projection X X x x M. Pollefeys, http://www.cs.unc.edu/Research/vision/comp256fall03/
Rectified geometry XL -XR xL xR b
Standard stereo geometry • disparity is inversely proportional to depth • stereo vision is less useful for distant objects M. Pollefeys, http://www.cs.unc.edu/Research/vision/comp256fall03/
Stereo camera configurations (Slide from Pascal Fua)
More cameras Multi-baseline stereo [Okutomi & Kanade]
Applications • www.bigstage.com • Take 3 pictures, reconstruct 3D geometry
3D coordinates of cardboard cutouts (u,v) (x,y,z) (u,v0) (x,y,0) (u1,v0) (x1,y1,0) Assuming vertical object, vertical image plane, and unity aspect ratio: z =√ (x1-x)2+(y1-y)2