The method is a sub-pixel circular hole detection algorithm based on random Hough transform and Isocurvature pixel classification. Canny operator is used for edge detection, then the curvature of each pixel is calculated, and the curvature of each pixel is classified according to the same curvature and stored in their respective subsets, so that the detection curvature is beyond the detection curvature. The edge points are discarded, and then the initial circular parameters are calculated by random Hough transform in each subset, and the pixels that meet the circular parameters are searched. Finally, the initial circular parameters are fitted by linear error compensation, and the precise central positioning parameters and radius parameters of the circle are obtained. This method not only retains the advantage that the detection accuracy of random Hough transform reaches sub-pixel level, but also reduces the search space, effectively reduces the number of iterations, has strong anti-noise ability, and has the characteristics of accuracy, rapidity and robustness because each sampling process is carried out in each subset with the same curvature radius.
【技术实现步骤摘要】
一种基于视觉的PCB板圆形定位孔快速准确识别方法
本专利技术涉及PCB板视觉检测领域,尤其涉及一种基于视觉的PCB板圆形定位孔快速准确识别方法。
技术介绍
印刷电路板(PrintedCircuitBoard,简称PCB)是集成各种电子元器件的信息载体,随着3C电子行业的发展,PCB板发挥着越来越重要的作用,其质量的好坏在一定程度上决定了电子产品的性能。PCB板生产过程中,常常以定位孔的孔心坐标为基准钻元件孔或对电子元器件进行贴装,而电子元器件的体积越来越小,引脚越来越细,引脚间距越来越窄,定位孔的位置精度将间接地影响PCB板的贴装质量,因此提高对PCB板圆形定位孔的精度十分重要。传统的圆检测方法有模板匹配、形状分析法、环路积分微分法、霍夫圆检测(HoughCircleDetection)、随机霍夫变换等,霍夫圆检测以其可靠性高,在噪声、变形、甚至部分区域丢失的状态下仍能取得理想结果的特点在圆检测方面被广泛应用。但该方法是将二维坐标为(x,y)的点投射到三维空间内,该方法的累加器需要很大的内存空间,计算复杂,实时性差。为了减少计算复杂度,一些学者采用假设圆半径已知, ...
【技术保护点】
1.一种基于视觉的PCB板圆形定位孔快速准确识别方法,该方法的步骤是:步骤一:对PCB图像利用Canny算子进行边缘检测,把边缘点根据以下公式进行曲率κ的计算;
【技术特征摘要】
1.一种基于视觉的PCB板圆形定位孔快速准确识别方法,该方法的步骤是:步骤一:对PCB图像利用Canny算子进行边缘检测,把边缘点根据以下公式进行曲率κ的计算;其中,Lx、Ly为边缘函数L(x,y)在某像素点的一阶偏导,Lxx、Lxy、Lyy为边缘函数L(x,y)在某像素点的二阶偏导;步骤二:将曲率相同的边缘像素点分别存放入各自的子集Vi中,i的取值为不同曲率κ的数量;步骤三:假设所需检测的圆的半径范围为rmin≤r≤rmax,即将和对应的子集内的边缘像素点丢弃;步骤四:在子集Vi中随机选择三个点A(x1,y1)、B(x2,y2)、C(x3,y3),若弦AB和弦BC平行,重新采样;若弦AB和弦BC不平行,则弦AB和BC的中垂线OE、OF必交于圆心O点;根据以下公式进行圆心O(a,b)和半径r的计算;b=kOE(a-Ex)+Ey式中,Ex为E点的横坐标,Ey为E点的纵坐标,Fx为F点的横坐标,Fy为F点的纵坐标,kOE、...
【专利技术属性】
技术研发人员:张明路,赵爱迪,吕晓玲,张建华,
申请(专利权)人:河北工业大学,
类型:发明
国别省市:天津,12
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。