This paper presents an optimisation technique to automatically select a set of control parameters for a Markov Random Field. The method is based on the Reactive Tabu Search strategy, and requires to define a suitable fitness function that measures the performance of the MRF algorithm with a given parameters set. The technique is applied to stereo matching thanks to the availability of ground-truth disparity maps. Experiments with synthetic and real images illustrate the approach. Key words: parameter estimation, markov random fields, reactive tabu search.