Professional Documents
Culture Documents
Farag
Electrical and Computer Engineering Spring 2008
A) Matching (Correspondence)
In correlation based methods the elements to be matched are image windows of fixed size, and
a similarity criterion is used to measure the correlation between corresponding windows in the stereo
pair. The corresponding element is chosen when the similarity criterion is maximized within a search
region. For input stereo pair of images Il and Ir , select a WH window and for each point pl in the left
image find its corresponding point pr in the right image by computing the disparity d=[dx, dy]T that
maximizes one of the following similarity measures (where m= (W-1)/2, n = (H-1)/2 ):
n m
(I
i= n j = m
l ( x + i , y + j ) I r ( x + i + d x , y + j + d y )) 2
C1 ( x , y , d ) =
n m m m
I l ( x + i, y + j ) 2
i= n j = m
I
i= m j = m
r (x + i + d x , y + j + d y )2
I ( x + i, y + j ) I
l r ( x + i + d , y + j)
C 2 ( x, y , d ) = i = n i = m
n m m m
I l ( x + i, y + j ) 2
i = n j = m
I
i= m j = m
r (x + i + d x , y + j + d y )2
([I ( x + i, y + j ) I ( x, y)] [I ]
n m
l l r (x + i + d x , y + j + d y ) Il (x + d x , y + d y ) )2
i= n j = m
C 3 ( x, y , d ) =
[I ( x + i, y + j ) I ( x, y)] [I ]
n m m m
2 2
l l r (x + i + d x , y + j + d y ) Il (x + d x , y + d y )
i = n j = m i = m j = m
1
University of Louisville Dr. Aly A. Farag
Electrical and Computer Engineering Spring 2008
[I ( x + i, y + j ) I ( x, y)][I ]
n m
l l r (x + i + d x , y + j + d y ) Il (x + d x , y + d y )
i = n j = m
C 4 ( x, y , d ) =
[I ( x + i, y + j ) I ( x, y)] [I ]
n m m m
2 2
l l r (x + i + d x , y + j + d y ) Il (x + d x , y + d y )
i = n j = m i = m j = m
where I l ( x, y ) and I r ( x, y ) are the left and right mean of intensity values within a correlation window
centered at (x,y), respectively. For the following stereo pair of images and its corresponding depth map
(http://cat.middlebury.edu/stereo/data.html)
Set #1
Set #2
Set #3
2
University of Louisville Dr. Aly A. Farag
Electrical and Computer Engineering Spring 2008
Set #4
1. Use the preceding similarity measures to find the depth map images. Compare with the given
ground truth depth maps. You may use the root mean square error as a quality measure.
2. For all the above, include in your report the run time taken by the algorithm.
Given corresponded pair of point (xl,yl) and (xr,yr) and assuming calibrated image (M1 and M2 are
known), the following set of equations can be written to solve for the unknown 3-D point (X, Y, Z):
m11
X ( x r m31 m12
) + Y ( x r m32 ) + Z (m33
x r m13
) = m14
x r m34
X ( y r m31 m22
m21 ) + Y ( y r m32 ) + Z (m33
y r m23
) = m24 y r m34
l = (C T C ) C T b
1
1- Find the calibration matrices of the left and right cameras using the images Calib_left, and
Calib_right.
3
University of Louisville Dr. Aly A. Farag
Electrical and Computer Engineering Spring 2008
3- Using the CardEye system at the CVIP lab (or any stereo system that can capture a stereo
pair), generate an image the birdhouse object by the three cameras. From these images that
could be named I_cam1 I_cam2, and I_cam3, reconstruct the shape of the birdhouse.
References:
1. E. Trucco and A. Verri, Introductory Techniques for 3-D Computer Vision, Prentice Hall Inc.,
1998.
2. http://cat.middlebury.edu/stereo/data.html