Binocular stereo is the process of obtaining depth information from a
pair of cameras. In the past, stereo algorithms have had problems at o
cclusions and have tended to fail there (though sometimes post-process
ing has been added to mitigate the worst effects). We show that, on th
e contrary, occlusions can help stereo computation by providing cues f
or depth discontinuities. We describe a theory for stereo based on the
Bayesian approach, using adaptive windows and a prior weak smoothness
constraint, which incorporates occlusion. Our model assumes that a di
sparity discontinuity, along the epipolar line, in one eye always corr
esponds to an occluded region in the other eye thus, leading to an occ
lusion constraint. This constraint restricts the space of possible dis
parity values, thereby simplifying the computations. An estimation of
the disparity at occluded features is also discussed in light of psych
ophysical experiments. Using dynamic programming we can find the optim
al solution to our system and the experimental results are good and su
pport the assumptions made by the model.