A method of automatic shape grading of pearl using machine vision is presented in this paper. Firstly, the preprocessed color image is segmented according to its grey degree histogram. Then the morphological closing operation is adopted to eliminate the noise points. An 8-directional boundary-tracing algorithm is applied to obtain the sequences of the boundary. And then the Euclidean distance between the pearls under checking is compared with ones in the standard template library, which is utilized to distinguish the pearls’ shape. Finally the experimental result demonstrates the validity and practicability of this method.