Segmentation is considered the central part of an image processing system due to its high influence on the posterior image analysis. In recent years, the segmentation of magnetic resonance (MR) images has attracted the attention of the scientific community with the objective of assisting the diagnosis in different brain diseases. From several techniques, thresholding represents one of the most popular methods for image segmentation. Currently, an extensive amount of contributions has been proposed in the literature, where thresholding values are obtained by optimizing relevant criteria such as the cross entropy. However, most of such approaches are computationally expensive, since they conduct an exhaustive search strategy for obtaining the optimal thresholding values. This paper presents a general method for image segmentation. To estimate the thresholding values, the proposed approach uses the recently published evolutionary method called the Crow Search Algorithm (CSA) which is based on the behavior in flocks of crows. Different to other optimization techniques used for segmentation proposes, CSA presents a better performance, avoiding critical flaws such as the premature convergence to sub-optimal solutions and the limited exploration-exploitation balance in the search strategy. Although the proposed method can be used as a generic segmentation algorithm, its characteristics allow obtaining excellent results in the automatic segmentation of complex MR images. Under such circumstances, our approach has been evaluated using two sets of benchmark images; the first set is composed of general images commonly used in the image processing literature, while the second set corresponds to MR brain images. Experimental results, statistically validated, demonstrate that the proposed technique obtains better results in terms of quality and consistency. (c) 2017 Elsevier Ltd. All rights reserved.