The Improved K-nearest Neighbor Solder Joints Defect Detection

Aiming at the problems such as defect misstatements, omissions are prone to happen when automatic optical inspection (AOI) system detects Printed Circuit Board (PCB) solder joints. The article puts forward a kind of method based on improved K-nearest neighbor to test and classify the quality of solder joints. Firstly, the original images collected by industrial camera should be pretreated, and solder joints should be positioned by using the method of template matching. Secondly, the features of solder joints should be extracted and selected usefully through the experiments. Finally, the improved K-nearest neighbor algorithm based on effective feature is used to test and classify solder joints. Experiments show that the improved K-nearest neighbor algorithm has higher accuracy and stronger adaptability than neural network algorithm used for classification. What's more, the cost of testing is also reduced effectively. So we can conclude that the improved K-nearest neighbor algorithm is useful for solder joints testing.