A Bayesian framework is proposed for stereo vision where solutions to both the model parameters and the disparity map are posed in terms of predictions of latent variables, given the observed stereo images. A mixed sampling and deterministic strategy is adopted to balance between effectiveness and efficiency: the parameters are estimated via Markov Chain Monte Carlo sampling techniques and the Maximum A Posteriori (MAP) disparity map is inferred by a deterministic approximation algorithm. Additionally, a new method is provided to evaluate the partition function of the associated Markov random field model. Encouraging results are obtained on a standard set of stereo images as well as on synthetic forest images. Ó 2006 Elsevier Inc. All rights reserved.