Digital image segmentation through Bayesian hidden Markov models