摘要: 高密度电路板在缺陷检测时获取的圆形标志有时会变形,从而影响检测精度。为此,提出一种求取最圆椭圆度的Mark点精确定位算法。该算法将检测的彩色图像转换成灰度图,采用Otus的阈值分割技术使Mark区域与背景相分离,对图像进行二值化,求取边缘点(图像轮廓)。对图像轮廓进行椭圆拟合后求取椭圆的外接矩形,将矩形长与宽之差与矩形宽之比小于0.1作为判据,判断所求的是否为最圆的椭圆,输出Mark点中心。仿真测试结果表明,该算法具有高速、抗干扰能力强和鲁棒性高的特点。
关键词:
PCB检测,
圆Mark,
定位,
椭圆拟合,
Hough 变换
Abstract: The captured circular Marks are deformed sometimes during the inspection of defects on the HDI PCB, which may affect the precision of inspection. A new accurate positioning algorithm of circular Mark is proposed by obtaining the center of the most round ellipse. The colorful image of Mark is converted into gray image. The Mark region and its background are separated by using Otus threshold segment technology. The edge points(the outline of image) are obtained by binary images. The outside rectangle of ellipse are obtained by fitting the outlines of the image. The most round ellipse can be confirmed according to the criterion that the ratio of the difference between the length and width of rectangle and the width of the rectangle is less than 0.1. The center of the most round ellipse is output which is the Mark center. Simulation tests show that this algorithm has good characteristics such as speediness, strong anti-interference ability and robustness.
Key words:
PCB detection,
circular Mark,
positioning,
elliptic fitting,
Hough transform
中图分类号:
熊光洁, 马树元, 刘瑞祯. PCB检测中圆Mark的快速精确定位[J]. 计算机工程, 2012, 38(11): 211-213,216.
XIONG Guang-Ji, MA Shu-Yuan, LIU Rui-Zhen-. Fast Precise Positioning of Circular Mark in PCB Inspection[J]. Computer Engineering, 2012, 38(11): 211-213,216.