In this paper we describe a method for detection and measurement of elliptical particles in atomic force microscopy (AFM) images. AFM imaging is used in physics to scan surfaces; the measured heights are represented by pixel values. Each sample in our project consisted of elliptical particles of principally the same size; the size could be characterized by the average length and width of a number of salient particles. The method we proposed is based on segmentation of undamaged particles and their approximation by ellipses; the major and minor axes provide robust estimates of the lengths and widths of the particles, respectively. The method is robust to distortions typical of AFM images. Its performance was demonstrated on images of pyrroles and compared with manual detection. Results show that the automatic method could be used in place of the time-consuming manual detection.