It is very important for laser auto-focusing systems in the applications of precise machining. The reflective laser area which is a semi-circular pattern is usually used to estimate the degree of defocusing. As work piece surface may be different in reflective properties and not always smooth, the reflective pattern is usually not a perfect semi-circle. In this study, a novel image processing algorithm is proposed to overcome this fault. Comparing with the conventional method based on the bias of gravity center, the results indicate that the proposed method can not only reconstruct the desired semi-circle back but also calculate the defocusing distant individually. After we use microscope and obtain images and perform the binary-valued image processing, we can clearly discriminate the border and structure of semicircle images and reduce the complexity of the processing of product images. The purpose of binary-valued processing is to discriminate the objects and background of images, so as to obtain the information of objects. We observe the changes of eccentric distance among images with the increases of the focal distance of microscope to determine the accuracy of microscope. The experiment results have shown the superiority of the sharpness measurement scheme we proposed.