Background: Image segmentation is an important problem in both image processing
and computer vision. Given an image, the goal of image segmentation is to label each pixel in the
image such that the pixels with the same label collectively represent an object.
Materials and Methods: Due to the inherent complexity and noise that may exist in images, developing
an algorithm that can generate excellent segmentation results for an arbitrary image is
still a challenging problem. In this paper, a new adaptive Hidden Markov Model is developed to
describe the spatial and semantic relationships among pixels in an image. Based on this statistical
model, image segmentation can be efficiently performed with an adaptive Viterbi algorithm in linear
Results: The algorithm is unsupervised and does not require being used along with any other approach
in image segmentation. Testing results on synthetic and real images show that this algorithm
is able to achieve excellent segmentation results in both ordinary images and medical images.
Conclusion: An implementation of this algorithm in MATLAB is freely available upon request.