Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2006 by Davi GeigerComputer Vision November 2006 L1.1 Binocular Stereo Left Image Right Image.

Similar presentations


Presentation on theme: "© 2006 by Davi GeigerComputer Vision November 2006 L1.1 Binocular Stereo Left Image Right Image."— Presentation transcript:

1 © 2006 by Davi GeigerComputer Vision November 2006 L1.1 Binocular Stereo Left Image Right Image

2 © 2006 by Davi GeigerComputer Vision November 2006 L1.2 There are various different methods of extracting relative depth from images, some of the “passive ones” are based on (i) relative size of known objects, (ii) occlusion cues, such as presence of T-Junctions, (iii) motion information, (iv) focusing and defocusing, (v) relative brightness Moreover, there are active methods such as (i)Radar, which requires beams of sound waves or (ii)Laser, uses beam of light Stereo vision is unique because it is both passive and accurate. Binocular Stereo

3 © 2006 by Davi GeigerComputer Vision November 2006 L1.3 Julesz’s Random Dot Stereogram. The left image, a black and white image, is generated by a program that assigns black or white values at each pixel according to a random number generator. The right image is constructed from by copying the left image, but an imaginary square inside the left image is displaced a few pixels to the left and the empty space filled with black and white values chosen at random. When the stereo pair is shown, the observers can identify/match the imaginary square on both images and consequently “see” a square in front of the background. It shows that stereo matching can occur without recognition. Human Stereo: Random Dot Stereogram

4 © 2006 by Davi GeigerComputer Vision November 2006 L1.4 Not even the identification/matching of illusory contour is known a priori of the stereo process. These pairs gives evidence that the human visual system does not process illusory contours/surfaces before processing binocular vision. Accordingly, binocular vision will be thereafter described as a process that does not require any recognition or contour detection a priori. Human Stereo: Illusory Contours Here not only illusory figures on left and right images don’t match, but also stereo matching yields illusory figures not seen on either left or right images alone. Stereo matching occurs in the presence of illusory.

5 © 2006 by Davi GeigerComputer Vision November 2006 L1.5 Human Stereo: Half Occlusions Left Right An important aspect of the stereo geometry are half-occlusions. There are regions of a left image that will have no match in the right image, and vice-versa. Unmatched regions, or half-occlusion, contain important information about the reconstruction of the scene. Even though these regions can be small they affect the overall matching scheme, because the rest of the matching must reconstruct a scene that accounts for the half-occlusion. Leonardo DaVinci had noted that the larger is the discontinuity between two surfaces the larger is the half-occlusion. Nakayama and Shimojo in 1991 have first shown stereo pair images where by adding one dot to one image, like above, therefore inducing occlusions, affected the overall matching of the stereo pair.

6 © 2006 by Davi GeigerComputer Vision November 2006 L1.6 Projective Camera Let be a point in the 3D world represented by a “world” coordinate system. Let be the center of projection of a camera where a camera reference frame is placed. The camera coordinate system has the z component perpendicular to the camera frame (where the image is produced) and the distance between the center and the camera frame is the focal length,. In this coordinate system the point is described by the vector and the projection of this point to the image (the intersection of the line with the camera frame) is given by the point, where z x P o =(X o,Y o,Z o ) p o =(x o,y o,f) f y

7 © 2006 by Davi GeigerComputer Vision November 2006 L1.7 y x O We have neglected to account for the radial distortion of the lenses, which would give an additional intrinsic parameter. Equation above can be described by the linear transformation where the intrinsic parameters of the camera,, represent the size of the pixels (say in millimeters) along x and y directions, the coordinate in pixels of the image (also called the principal point) and the focal length of the camera. Projective Camera Coordinate System pixel coordinates

8 © 2006 by Davi GeigerComputer Vision November 2006 L1.8 OlOl xlxl ylyl P=(X,Y,Z) p l =(x o,y o,f) xrxr yryr zrzr OrOr zlzl f p r =(x o,y o,f) f A 3D point P projected on both cameras. The transformation of coordinate system, from left to right is described by a rotation matrix R and a translation vector T. More precisely, a point P described as P l in the left frame will be described in the right frame as Two Projective Cameras

9 © 2006 by Davi GeigerComputer Vision November 2006 L1.9 OlOl xlxl ylyl P=(X,Y,Z) xrxr yryr zrzr elel epipolar lines OrOr zlzl p r =(x o,y o,f) erer Each 3D point P defines a plane. This plane intersects the two camera frames creating two corresponding epipolar lines. The line will intersect the camera planes at and, known as the epipoles. The line is common to every plane PO l O l and thus the two epipoles belong to all pairs of epipolar lines (the epipoles are the “center/intersection” of all epipolar lines.) p l =(x o,y o,f) Two Projective Cameras Epipolar Lines

10 © 2006 by Davi GeigerComputer Vision November 2006 L1.10 Estimating Epipolar Lines and Epipoles The two vectors,, span a 2 dimensional space and their cross product,, is perpendicular to this 2 dimensional space. Therefore where F is known as the fundamental matrix and needs to be estimated

11 © 2006 by Davi GeigerComputer Vision November 2006 L1.11 “Eight point algorithm”: (i)Given two images, we need to identify eight points or more on both images, i.e., we provide n  8 points with their correspondence. The points have to be non-degenerate. (ii)Then we have n linear and homogeneous equations with 9 unknowns, the components of F. We need to estimate F only up to some scale factors, so there are only 8 unknowns to be computed from the n  8 linear and homogeneous equations. (i) If n=8 there is a unique solution (with non-degenerate points), and if n > 8 the solution is overdetermined and we can use the SVD decomposition to find the best fit solution. Computing F (fundamental matrix)

12 © 2006 by Davi GeigerComputer Vision November 2006 L1.12 Each potential match is represented by a square. The black ones represent the most likely scene to “explain” the images, but other combinations could have given rise to the same images (e.g., red) Stereo Correspondence: Ambiguities What makes the set of black squares preferred/unique is that they have similar disparity values, the ordering constraint is satisfied and there is a unique match for each point. Any other set that could have given rise to the two images would have disparity values varying more, and either the ordering constraint violated or the uniqueness violated. The disparity values are inversely proportional to the depth values

13 © 2006 by Davi GeigerComputer Vision November 2006 L1.13 AB C D E F A B A C D D C F F E Stereo Correspondence: Matching Space Right boundary no match Boundary no match Left depth discontinuity Surface orientation discontinuity F D C B A AC DEFAC DEF Note 2: Due to pixel discretization, points A and C in the right frame are neighbors. Note 1: Depth discontinuities and very tilted surfaces can/will yield the same images ( with half occluded pixels) In the matching space, a point (or a node) represents a match of a pixel in the left image with a pixel in the right image

14 © 2006 by Davi GeigerComputer Vision November 2006 L1.14 Cyclopean Eye The cyclopean eye “sees” the world in 3D where x represents the coordinate system of this eye and w is the disparity axis For manipulating with integer coordinate values, one can also use the following representation Restricted to integer values. Thus, for l,r=0,…,N-1 we have x=0,…2N-2 and w=-N+1,.., 0, …, N-1 Note: Not every pair (x,w) have a correspondence to (l,r), when only integer coordinates are considered. For x+w even we have integer values for pixels r and l and for x+w odd we have supixel locations. w w=2 Right Epipolar Line l-1 l=3 l+1 r+1 r=5 r-1 x

15 © 2006 by Davi GeigerComputer Vision November 2006 L1.15 Left Epipolar Line w w=2 Right Epipolar Line x Smoothness Surface Constraints I Smoothness : In nature most surfaces are smooth in depth compared to their distance to the observer, but depth discontinuities also occur. Usually smoothness implies an ordering constraint, where points to the right of must match points to the right of r+1 r=5 r-1 l-1 l=3 l+1 x=8 YES NO: Ordering Violation YES

16 © 2006 by Davi GeigerComputer Vision November 2006 L1.16 Surface Constraints II Uniqueness: There should be only one disparity value associated to each cyclopean coordinate x. Note: multiple matches for left eye points or right eye points are allowed. Uniqueness Left Epipolar Line w w=2 Right Epipolar Line x r+1 r=5 r-1 l-1 l=3 l+1 NO: Uniqueness x=8 YES, but note that it is a multiple match for the right eye YES, but note that it is a multiple match for the left eye NO: Uniqueness

17 © 2006 by Davi GeigerComputer Vision November 2006 L1.17 Bayesian Formulation The probability of a surface w(x,e) to account for the left and right image can be described by the Bayes formula as where e index the epipolar lines. Let us develop formulas for both probability terms on the numerator. The denominator can be computed as the normalization constant to make the probability sum to 1.

18 © 2006 by Davi GeigerComputer Vision November 2006 L1.18 C(e,x,w) Є [0,1], for x+w even, represents how similar the images are between pixels (e,l) in the left image and (e,r) in the right image, given that they match. The epipolar lines are indexed by e. We use “left” and “right” windows to account for occlusions. We also “spread” the difference in intensities that are below 128 values as much as possible, assuming differences above 128 to be all “unacceptable”, i.e., C(e,x,w)=1. The Image Formation left right

19 © 2006 by Davi GeigerComputer Vision November 2006 L1.19 C(e,x,w) Є [0,1], for x+w odd, represents how similar intensity edges are at (e,l - > e,l+1) in the left image and at (e,r ->e,r+1) in the right image. Note that when and than C(e,x,w) ~ 0.3. An intensity edge should not be encouraged to match a non-intensity edge, i.e, when or   as long as. Note that at occlusions this may occur and thus, /3 becomes the occlusion cost. If we set  ~ 2 we obtain an oclusion cost of about C(e,x,w)~0.7. The Image Formation II

20 © 2006 by Davi GeigerComputer Vision November 2006 L1.20 The Prior Model of Surfaces I left right Tilted x w w=2 l-1 l=3 l+1 r+1 r=5 r-1 x=8 w w=2 Right Epipolar Line l-1 l=3 l+1 r+1 r=5 r-1 x x=8 w w=2 Right Epipolar Line l-1 l=3 l+1 r+1 r=5 r-1 x x=8

21 © 2006 by Davi GeigerComputer Vision November 2006 L1.21 w w=2 Right Epipolar Line l-1 l=3 l+1 r+1 r=5 r-1 x x=8 The Prior Model of Surfaces I, cont... w w=2 l-1 l=3 l+1 r+1 r=5 r-1 x=8 left right Occluded No pixel Matches w w=2 Right Epipolar Line l-1 l=3 l+1 r+1 r=5 r-1 x x=8

22 © 2006 by Davi GeigerComputer Vision November 2006 L1.22 Epipolar interaction: the larger the intensity edges the less the cost (the higher the probability) to have disparity changes across epipolar lines The Prior Model of Surfaces II x w w=2 l-1 l=3 l+1 r+1 r=5 r-1 x=8

23 © 2006 by Davi GeigerComputer Vision November 2006 L1.23 Limit Disparity The search is within a range of disparity : 2D+1, i.e., The rational is: (i)Less computations (ii)Larger disparity matches imply larger errors in 3D estimation. (iii)Humans only fuse stereo images within a limit. It is called the Panum’s limit. We may start the computations at x=D to avoid limiting the range of w values. In this case, we also limit the computations to up to x=2N-2-D

24 © 2006 by Davi GeigerComputer Vision November 2006 L1.24 Stereo-Matching DP( ImageLeft, ImageRight, D, e ) (to be solved line by line) Initialize Create the Graph  (V(x,w), E(x,w,x-1,w’) (length is 2N-1 and width is 2D+1) /* precomputation of the match and transition costs are stored in arrays C and F */ loop for v=(x,w) in V (i.e., loop for x and loop for w) Set-Array C(x,2w+1,e) (see previous slides for the formula) loop for u=(x’,w’) such that (x’=x-1, |w’-w| ≤1) Set-Array F(x, 2w+1, 2w’+1, e) (see previous slides for the formula) end loop Main loop loop for x=D,  2N-2-D loop for w=-D,…,0,…,D Cost   loop for w’=w-1, w, w+1  Temp=  x-1*(2w’+1)+ F(x, 2w+1, 2w’+1,e);  if  Temp < Cost); Cost= Temp; back x (2w+1) =2w’+1; end loop  x   w+1  Cost+ C(x,2w+1,e); end loop Dynamic Programming

25 © 2006 by Davi GeigerComputer Vision November 2006 L1.25 Stereo Correspondence: Belief Propagation (BP) We want to obtain/compute the marginal We have now the posterior distribution for disparity values (surface {w(x,e)}) These are exponential computations on the size (length) of the grid N

26 © 2006 by Davi GeigerComputer Vision November 2006 L1.26 “Horizontal” Belief Tree “Vertical” Belief Tree Kai Ju’s approximation to BP We use Kai Ju’s Ph.D. thesis work to approximate the (x,e) graph/lattice by horizontal and vertical graphs, which are singly connected. Thus, exact computation of the marginal in these graphs can be obtained in linear time. We combine the probabilities obtained for the horizontal and vertical graphs, for each lattice site, by “picking” the “best” one (the ones with lower entropy, where.)

27 © 2006 by Davi GeigerComputer Vision November 2006 L1.27 Result

28 © 2006 by Davi GeigerComputer Vision November 2006 L1.28 Regi on A Regi on B Region A Left Region A Right Region B Left Region B Right Junctions and its properties (false matches that reveal information from vertical disparities (see Malik 94, ECCV) Some Issues in Stereo:


Download ppt "© 2006 by Davi GeigerComputer Vision November 2006 L1.1 Binocular Stereo Left Image Right Image."

Similar presentations


Ads by Google