Abstract:Aiming at the bottleneck that deep learning algorithms are not compatible with device detection and new sample collection,as well as poor detection timeliness and generalization ability,a traditional template matching detection algorithm based on SURF features was proposed. Firstly,SURF algorithm was used to extract features from the image,and the product quantization theory was used to construct search trees. The matching points were quickly screened based on spatial position information of feature points. Secondly,the homography matrix and affine transformation matrix were obtained from the matching points,and the two matrices were combined to screen the "interior points" for offset calculation and image registration. Finally,combined with the idea of local defect density measurement,the defect density was calculated by integrating the regional foreground and background weighting method,and the qualification of the label was determined by the defect density. At the same time,for the scene of small characters with few features and local offset,an improved method was proposed to avoid misjudgment. The results show that the algorithm improves the stability and detection accuracy of feature point matching. The accuracy,recall and F1 on the self-built data set are 9867%,9769% and 9818%,respectively,which are better than the mainstream methods. The practical application on the device meets the real-time requirements. The algorithm can effectively improve the stability of feature points and the detection accuracy,meet the detection timeliness of equipment,and provide technical reference for its practicability.