Animal biometrics is a challenging task. In the literature, many algorithms have been used, e.g. penguin chest recognition, elephant ears recognition and leopard stripes pattern recognition, but to use technology to a large extent in this area of research, still a lot of work has to be done. One important target in animal biometrics is to automate the segmentation process, so in this paper we propose a segmentation algorithm for extracting the spots of Diploglossus millepunctatus, an endangered lizard species. The automatic segmentation is achieved with a combination of preprocessing, active contours and morphology. The parameters of each stage of the segmentation algorithm are found using an optimization procedure, which is guided by the ground truth. The results show that automatic segmentation of spots is possible. A 78.37 % of correct segmentation in average is reached.