A sharpness evaluation method based on image edge detection is proposed for the problems of poor real-time, weak antiinterference ability and low sensitivity of the traditional gradient evaluation algorithm in the auto-focusing process of digital image processing. The edge pixel points are extracted from the image using an improved adaptive double-threshold Canny operator based on the idea of variance minimization within the OSTU class, and then the extracted image edge pixel points are evaluated. The evaluation function is based on the characteristics of human visual system, and the adaptability and sensitivity of the evaluation function to multiple direction edges are enhanced by improving the evaluation weights of the SMD function for horizontal and vertical direction edges and combining the advantages of the Roberts function for the evaluation of ±45° direction edges. The experimental results show that the improved edge gradient image sharpness evaluation algorithm proposed in this paper has the advantages of good real-time performance, strong anti-noise capability and high sensitivity.