In image detection, it is often necessary to detect the sizes of foreign bodies in binary images. A new method to detect particle sizes of objects is proposed in this paper based on binary image analysis. A difference sum template is first used to extract edge of an object, a half-8-connected domain algorithm is then employed to obtain the coordinates set that corresponds to each object, and finally evaluates the particle size of every object through rectangular segmentation. In comparison with the method of geometrical principal axis and the MER method, the algorithm can obtain particle sizes of objects in binary image more rapidly and more accurately.