Methods for histogram thresholding based on the minimization of a threshold-dependent criterion function might not work well for images having multimodal histograms. In this paper we propose an approach to threshold the histogram according to the similarity between gray levels. Such a similarity is assessed through a fuzzy measure. In this way, we overcome the local minima that affect most of the conventional methods. The experimental results demonstrate the effectiveness of the proposed approach for both bimodal and multimodal histograms.