针对印刷电路板(Printed Circuit Board,PCB)中贴片元件引脚焊接在线检测问题,提出一种基于机器视觉的引脚焊接缺陷检测的算法.通过对引脚区域进行特征提取,综合采用面积法、连通域法质心法,实现对贴片引脚处附焊球、引脚桥接、缺焊及合格情况进行自动识别.提出了基于统计方法的参数阈值自适应修正的方法,有效解决固定阈值的局限性问题,使算法能够适用于不同光照强度的环境.实验结果表明,该算法对PCB中贴片元件引脚焊接缺陷检测的识别具有较高的准确性.
For the problem of SMT components pin welding online detection in PCB,a pin welding defect detection based on machine vision algorithm is proposed. To achieve automatic identification,this paper extracts the features of pin,applies area method and the connected domain method comprehensively to recognize patch pin attached solder ball,foot bridge,lack of welding and qualified products. Therefore,an approach of adaptive correction of parameter threshold based on statistical method is put forward,which can solve the problem of limitation of the fixed threshold effectively and make the algorithm apply to the environment with different light intensity. The experimental results show that the algorithm of PCB in detecting welding defects in SMT chip pins has higher accuracy.