为了检测贴装后的晶体管类元件,提出了一种基于元件边缘与颜色特征的检测算法。首先建立了元件在三色(红、绿、蓝)结构光下的模型,分析其特征;然后提取图像的边缘,在利用线滤波器和矩形滤波器过滤掉干扰边缘后,连接候选电极边缘,并引入HSI空间的颜色特征定位电极区域,再分析电极特征并确定元件贴装类型;最后基于投影的方法对元件主体进行匹配检测。实验结果表明:本文算法可有效地检测缺件、偏移、歪斜、错件等晶体管类元件常见的元件缺陷。
To inspect the quality of the mounted transistor components, an algorithm based on edge and color feature was presented. Firstly, the model of the transistor component under three colors (red, greed, and blue) structure light source was set up and the feature was analyzed. Secondly, the edges of image were extracted and the edges of potential electrodes were connected after filtering disturbing edge lines with the linear and rectangle filtering algorithm, then, the electrodes were precisely located through color segmentation in HSI space and the electrodes were analyzed to classify the type of component correctly. Finally, the component body was inspected through the match algorithm based on the projection. The experiment results showed that the proposed method could effectively identify the defects of the transistor component, such as missing component, shift, skew, wrong components etc.