Breast cancer is one of the most common diseases and the second cause of death in women around the world. The presence of a cancerous tumor increase temperature in the region near to it, such heating is then transferred to the skin surface. In this sense, screening seeks to help in cancer diagnostic process before symptoms became evident in a person, different imaging techniques are employed for this purpose (Mammography, Ultrasonography, X-ray, Magnetic Resonance, etc). In the past decade, thermography has shown its major potential to early diagnosis of breast diseases. Thermographic images provide information related to vascular or physiological changes and have some advantages regarding other diagnostic methods; they are non-ionizing, non-invasive, passive, painless and real-time screening. On the other hand, thresholding has been widely used to solve several problems. It is regularly the first step in the process of image analysis that uses histograms to classify the pixels in the image. Segmentation of medical digital images has been stated as an important task for several medical applications. This paper proposes a segmentation technique for thermographic images that consider the spatial information of the pixel contained in the image. This approach employs a novel optimization technique called the Dragonfly Algorithm to compute the best thresholds that segment the image. The experimental results exhibit a well-performance of the proposal in comparison to the other methods over a set of randomly selected thermograms retrieved from the Database for Research Mastology with Infrared Image. The presented proposed approach could provide a highly reliable clinical decision support, which aims to help clinicians in performing a diagnosis using thermography images.