4.2.stereo-geo
4.2.stereo-geo
4.2.stereo-geo
- Geometry
Lu Yang
Email: yanglu@uestc.edu.cn
School of Automation Engineering, UESTC
What is Stereo Vision
Ll Lr
◇ Cost aggregation:
◇ Disparity refinement
Finding Correspondences
Sparse and dense correspondences
How to solve the correspondence
problem
2D search domain?
d x1 xr
S (d ) ( I ( x, y), I ( x d , y))
x , yW
l r
Matching Functions
SSD (Sum of Squared Difference): The SSD tends to
magnify pixel errors because of the quadratic function
of the difference. This can caused problems in noisy
images.
( I l ( x, y ), I r ( x d , y )) I l ( x, y ) I r ( x d , y ) 2
Disparity
Image
for x=1:xsize
for y=1:ysize
for d=dmin:dmax Note that
• The loops in x,y and d can be inverted
Sbest = max; •computation.
This looks like an enormous amount of
It turns out that this can be
S(d) = 0; done efficiently by re-using partial results.
for u = x-w:x+w
Each pixel
Disparity
for v = y-w:y+w
Level S(d) = S(d) + y(d) Cost
Aggregation
if(S(d) < Sbest)
Sbest = S(d)
dbest(x,y) = d
The value of the matching function
Recover the 3-D coordinates of the scene points
Similar triangles: PCrCl and Pprpl
Z Z f
B B xl xr
W W
Origin B ( xl xr )
2 2
pl pr
Bf
Z
Cl Cr d
Z Bf Z 2
Z' 2
d d Bf
The fundamental relation between baseline, focal length and
accuracy of stereo reconstruction:
Z2
Z d
Bf
Depth: The resolution of the stereo reconstruction decreases
quadratically with depth. This implies severe limitation on the
applicability of stereo. (Sub-pixel disparity interpolation)
Baseline: The resolution improves as the baseline increases.
However, the matching becomes increasingly difficult as the
baseline increases.
Focal length: For a given image size, the density of pixels in
the image plane increases as f increases. Therefore, the
disparity resolution is higher.
The point P is reconstructed as the
point that is the closest to both lines.
• Assumes that the viewing rays from the left and right
cameras intersect exactly.
• The two viewing rays pass close to each other but do not
exactly intersect due to small errors in calibration.
Sub-Pixel Disparity
◎ The disparity is computed by moving a window
one pixel at a time. As a result, the disparity is
known only up to one pixel.
S (1) S (1)
d opt
2( S (1) S (1) 2 S (d 0 ))
How to find this approximating parabola
S (1) S (1)
d opt
2( S (1) S (1) 2 S (0))
(d ) ( I 1( x, y ) I r ( x d , y )) 2 ((a 1) I o l bx c) 2