A Bayesian Method for Automatic Landmark Detection in Segmented Images