Bayesian image restoration, using configurations