A bayesian approach to automatic change detection