Bayesian image segmentations by Potts prior and loopy belief propagation