A description is given of a gray-level threshold selection method for image segmentation that is based on the maximum entropy principle. The optimal threshold value is determined by maximizing the a posteriori entropy subject to certain inequality constraints which are derived by means of spectral measures characterizing uniformity and the shape of the regions in the image. For this purpose, the authors use both the gray-level distribution and the spatial information of an image. The effectiveness of the method is demonstrated by its performance on some real-world images. An extension of this method to chromatic images is provided.