Focal length of lens is an important parameter to determine the relationship between objective and image. It must be measured accurately. The traditional method of using optical bench to measure the focal length of lens has big man-made errors. So we used linear array CCD camera instead of eyes as the receiver to measure the focal length of lens in this paper. Based on the theory of point spread function, it firstly determined the evaluation function of focal plane. With the threshold method, it determined the location coordinate of sharp signal. Then it proved the feasibility of this scheme through experiment. Finally we compared the experimental data obtained with this method with the experimental data obtained with traditional method, which showed that it was more accurate to measure the focal length of lens with this method.