中国机械工程 ›› 2012, Vol. 23 ›› Issue (22): 2661-2666.

• 机械基础工程 • 上一篇    下一篇

基于机器视觉的PCB裸板缺陷自动检测方法

杨庆华1;陈亮1;荀一1;陈文彪2   

  1. 1.浙江工业大学特种装备制造与先进加工技术教育部/浙江省重点实验室,杭州,310014
    2.东风日产柴汽车有限公司,杭州,310013
  • 出版日期:2012-11-25 发布日期:2012-11-29
  • 基金资助:
    国家高技术研究发展计划(863计划)资助项目(2009AA04Z209);浙江省自然科学基金杰出青年团队项目(R1090674);浙江省特种装备制造与先进加工技术重点实验室开放基金资助项目(2011EM002) 
    National High-tech R&D Program of China (863 Program) (No. 2009AA04Z209);
    Zhejiang Provincial Natural Science Team Program for Distinguished Young Scholars of China(No. R1090674)

Automatic Defect Inspection of PCB Bare Board Based on Machine Vision

Yang Qinghua1;Chen Liang1;Xun Yi1;Chen Wenbiao2   

  1. 1.Key Laboratory of E&M Ministry of Education & Zhejiang Province,Zhejiang University of Technology,Hangzhou,310014
    2.Dongfeng-nissan Diesel Motor Co., Ltd., Hangzhou,310013
  • Online:2012-11-25 Published:2012-11-29
  • Supported by:
     
    National High-tech R&D Program of China (863 Program) (No. 2009AA04Z209);
    Zhejiang Provincial Natural Science Team Program for Distinguished Young Scholars of China(No. R1090674)

摘要:

提出了通过比较标准图像与待测图像差异并分析差异区域边界进行印刷线路板(PCB)缺陷检测与识别的算法。在同一位置采集多幅标准PCB图像并计算其灰度平均值从而得到标准图,将待测PCB图与其进行对比。首先使用限定区域Hough变换快速检测出图像中相互垂直相交的细短标志线,将线段的交点作为特征点并计算其坐标,进而对标准图与待测图进行仿射变换配准,差影计算后,再通过二值化、形态学处理等去除伪缺陷,即可获取缺陷区域位置。在此基础之上,对处理过的差影图进行膨胀处理,通过边界检测获取各个缺陷区域闭合轮廓各点坐标。分析各个轮廓坐标对应阈值分割后的配准待测图中点的像素值,并结合缺陷是缺料缺陷还是多料缺陷识别出缺陷类型。对合格的和有缺陷的PCB图各200幅进行算法测试,检测准确率为98.3%,基本能够稳定检测出常规缺陷。

关键词: 机器视觉, PCB缺陷检测, Hough变换, 边界分段

Abstract:

An algorithm was proposed for defect inspection of PCB bare board.It was based on comparison between the standard PCB image and the target image and analysed the boundaries of  the different regions in the target image.Multiple images were acquired for the qualified PCB at the same position,and an average was applied as the standard image.Then the target image was compared with it.On the PCB image there symmetrically distributed some vertical mark lines.First,these mark lines were detected rapidly by restricted areas Hough transform and the intersection of the lines were chosen as the feature point.Then the affine registration between the target image and the standard image could be completed.After subtraction,false defects were removed by threshold segmentation and morphological processing in the difference images.The locations of defect areas were obtained.The difference image was in the process of dilation,then the coordinate values of each defect area closed contour points could be obtained by boundary detection.The aligned target image was treated with threshold segmentation.In the processed image,the pixel values of the points whose coordinate values had been get above were obtained.According to the analysis of the pixel values and the judgment of whether the defect was lack of material or not,the type of detects could be quickly determined.The experimental results on 400 PCB images  indicate that the correction rate of detection is of 98.3%.The algorithm can accurately detect conventional defect steadily.

Key words: machine vision, printed circuit board(PCB) defect inspection, hough transform, boundary segmentation

中图分类号: