The principle of Zernike moments and the method of sub-pixel edge detection based on Zernike moments were introduced in this paper. With the consideration of the limitation of the sub-pixel edge detection algorithm by Ghosal, such as the lower location precision of the edge and the extracted wider edge than that of the original image, an improved algorithm was proposed. On the one hand, a mask of size nine multiply nine was calculated and could be applied for the edge detection. On the other hand, a new criterion for edge detection was put forward. Additionally, a series of experiments were designed and implemented. The experiment results show that accuracy of the improved algorithm is higher than that obtained from using other size templates and Ghosal algorithm.