Unsupervised Segmentation And Shape Posterior Estimation Under Bayesian Image Models