Stereo Vision
INEL 6088 - Computer Vision
1
Stereo Vision INEL 6088 - Computer Vision 1 Some References - - PowerPoint PPT Presentation
Stereo Vision INEL 6088 - Computer Vision 1 Some References Secs.11.1 and 11.2 on Jain et. al. Davies, 4 th ed.: secs. 15.1-15.3 & 18.6-18.17 Davies, 3 rd ed.: secs.16.1-16.3 & 21.6-21.17 Chapter 11 on Szeliski's book
1
2
3
4
Epipolar plane: plane passing through the
Epipolar line: intersection between epipolar
Conjugate pair: two points in different images
Disparity: difference in the conjugate pair’s
5
Consideration of similar triangles gives
6
Correspondence problem: main problem in stereo
vision; to match a point in one image with the corresponding point in the other image.
Features that can be matched must be located.
Sometimes they are created by lightening a pattern.
Depth is computed only for this features. Others are
estimated by interpolation.
Epipolar constrain limits the search space Obstruction means that points might be missing
from one of the images – this makes solving the problem more difficult
7
8
lc2=im2(411:962,449:1000); crop_im1 = im1(529:579,976:1026); 9
xc12 = normxcorr2(double(crop_im1),double(lc2)); plot(max(xc12)); figure; plot(max(xc12')); figure; imshow(lc2) figure; imshow(crop_im1)
10
11
12
Common metrics to compare image patches:
IlIr
√ I2
l
I2
r
13
14
Edge Matching
Filter each image with a Gaussian at four different
scales
Compute edge positions within row Match non-horizontal edges by comparing
Refine disparity estimates by using finer scales However, strong edges tend to be silhouette
edges and correspond to different parts of the
15
Match areas of the image with high variance
Calculate variance along different directions using all
pixels in a window centered about a point.
Select minimum value as the interest value of the central
pixel
Chose pixels whose interest measure is a local maxima
and is above a threshold as the feature points
Compute correlation coefficient between a small window
Consider only features that satisfy the epipolar constrain Features with highest correlation coefficient are
considered a match
16
Correlation coefficient: match if r>th - look along epipolar lines Directional variances: look for points with large min(I1, I2, I3, I4)
edge points lines (length, orientation, midpoint, average
corners
points where edge lines meet formed by intensity patterns
select method based on
kind of object of interest and illumination image contrast, etc.
17
18
Epipolar lines generalized
pl = fl Zl Pl pr = fr Zr Pr
19
horizontal axis
20
zontal image axis
the equation Pr = R(Pl − T) and a rotation matrix Q such that the epipolar lines become parallel.
Q = ⇥ qT
1
qT
2
qT
3
⇤T where q1 = T
⇥ −T2, T1, ⇤T p T 2
1 + T 2 2
and q3 = q1 × q2
21
[x, y, z] = Qpl and the coordinates of the corresponding rectified point p
l,
p
l = f
z [x, y, z]
22
23
bring the left camera’s coordinate system into the right’s. Pr = R(Pl − T)
(Pl − T) · (T × Pl) = 0
T × Pl =
T2 T3 Pl1 Pl2 Pl3 i j k
i(T2Pl3 − T3Pl2) − j(T1Pl3 − T3Pl1) + k(T1Pl2 − T2Pl1) = 2 4 −T3Pl2 + T2Pl3 T3Pl1 − T1Pl3 −T2Pl1 + T1Pl2 3 5 2 4 i j k 3 5 = 2 4 −T3 T2 T3 −T1 −T2 T1 3 5 2 4 Pl1 i Pl2 j Pl3 k 3 5 = APl
24
(R−1Pr)T APl = 0
(AB)T = BT AT
PT
r RAPl = PT r EPl = 0
pT
r Epl = 0
25
c pk = Mint,kpk where Mint,k is a matrix that represent the intrinsic parameters.
pT
r Epl = 0
(M−1
int,rc
pr)T EM−1
int,l b
pl = 0 c pr
T M−T int,rEM−1 int,l b
pl = 0 c pr
T F b
pl = 0
int,rEM−1 int,l describes the epipolar geom-
etry in terms of pixel coordinates.
26
F pl describes the epipolar line on which the corresponding point pr
27
28
29
pr
mately, the two rays will not intersect
both rays.
– apl be the ray l going from Ol through pl – T+bRT pr be the ray, r, through Or through pr expressed in the left reference frame. – w be a vector orthogonal to both l and r
w that joins l and r
30
w = pl × RT pr
to w that joins l (a0pl) and r ( T + b0RT pr) from apl − (T + bRT pr) + cw = 0 by solving apl − bRT pr + c(pl × RT pr) = T for a0, b0 and c0
31
32
Zero disparity means that the point is on the surface; positive disparity indicates points farther than the surface, etc. ACTIVE VISION SYSTEM- camera is controlled dynamically by the analysis algorithm to facilitate depth (or other) computation.