WO2018209941A1 - 一种基于高斯拟合的高密度电路板圆孔亚像素检测方法 - Google Patents
一种基于高斯拟合的高密度电路板圆孔亚像素检测方法 Download PDFInfo
- Publication number
- WO2018209941A1 WO2018209941A1 PCT/CN2017/116134 CN2017116134W WO2018209941A1 WO 2018209941 A1 WO2018209941 A1 WO 2018209941A1 CN 2017116134 W CN2017116134 W CN 2017116134W WO 2018209941 A1 WO2018209941 A1 WO 2018209941A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- edge
- pixel
- curve
- sub
- circular hole
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
- G06T7/0008—Industrial image inspection checking presence/absence
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/66—Analysis of geometric attributes of image moments or centre of gravity
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20048—Transform domain processing
- G06T2207/20061—Hough transform
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30141—Printed circuit board [PCB]
Definitions
- the present invention relates to the field of image processing technologies, and in particular, to a method for detecting a circular aperture sub-pixel of a high-density circuit board based on Gaussian fitting.
- FPC is widely used in aerospace, military, mobile terminals, digital cameras and other fields due to its small size, light weight and flexibility.
- the size of FPC circuit boards is getting smaller and smaller, and the requirements for the process are getting higher and higher.
- more precise methods are needed to detect the characteristics of the FPC to ensure the performance of the FPC.
- the circular hole (including the identification hole, the assembly hole, the positioning hole, the conduction hole and the alignment hole) is an important feature on the FPC, and the position, size and roundness of the circular hole affect the function and performance of the FPC. .
- the use of optical imaging methods to detect round holes is a common method. For high-density FPC, the detection method using general pixel level often fails to achieve our detection accuracy.
- a sub-pixel approach can be used to reach the measurement accuracy requirements.
- sub-pixel detection technology has been greatly developed. These methods can be roughly divided into three categories: interpolation-based methods, moment-based methods, and fitting-based methods.
- the interpolation-based method has a short calculation time, but the accuracy is low and the noise resistance is poor.
- the moment-based method has strong anti-noise performance, but because of the calculation of the template, the calculation amount is large.
- the present invention provides a high-density circuit board circular aperture sub-pixel detection method based on Gaussian fitting.
- a high-density circuit board circular aperture sub-pixel detection method based on Gaussian fitting includes the following steps:
- the S1 FPC image is processed to obtain a pixel-level edge, and then the edge of the circular hole is detected to obtain the center of gravity of the edge of the circular hole;
- S2 selects the edge pixel point and the pixel point in the vicinity of the pixel point of the round hole edge and the center of gravity of the circle hole to form a curve to be fitted;
- S3 uses Gaussian fitting method to perform Gaussian fitting on the gradient curve of the fitted curve to obtain the sub-pixel edge of the circular hole;
- S4 detects the center of the circle, the radius, the roundness and the round defect according to the sub-pixel edge of the circular hole.
- the S2 selects an edge pixel point and a pixel point in the vicinity of the circle point of the circle hole and the center of gravity of the circle hole to form a curve to be fitted, specifically:
- the S3 adopts a Gaussian fitting method to perform a Gaussian fitting on the gradient curve of the curve to be fitted, and obtain a sub-pixel edge of the circular hole, specifically:
- the curve to be fitted consists of 9 points.
- the gray value of the pixel point of (x i , y i ) is represented by f.
- the parameters a, b and c can be obtained, so that the coordinates and radius of the center of the circle are respectively:
- the roundness of the circle to be detected is obtained according to the coordinates, radius and the sub-pixel edge of the circle:
- the detection of the round defect specifically includes hole deviation, hole size mismatch, shape defect, porous and less hole.
- the S1 FPC image is processed to obtain a pixel-level edge, and then the edge of the circular hole is detected, and the center of gravity of the edge of the circular hole is obtained, specifically:
- S1.1 acquires an image for grayscale processing for Gaussian denoising, and then uses a Canny operator for edge detection to obtain a pixel-level edge of the image;
- S1.2.1 uses the area of the edge connected domain to eliminate some noise edges and possible image frames, and set s ⁇ 1 or s> ⁇ 2 , where s is the connected domain area, and ⁇ 1 and ⁇ 2 are connected domains respectively. Threshold lower bound and upper bound;
- S1.2.2 uses the relationship between the area and the perimeter of the edge connected domain to eliminate some strip-like edges, l/s> ⁇ 3 , where l is the perimeter of the connected domain and ⁇ 3 is the threshold lower bound of the perimeter and area ratio of the connected domain. ;
- S1.2.3 uses the Hough transform method to detect the edges belonging to a circle, and calculates the center of gravity of the circle edge by the following formula:
- N is the number of edge pixel points
- (x i , y i ) is the coordinate of the ith pixel point
- (x c , y c ) is the barycentric coordinates.
- the invention has simple operation and good robustness in obtaining the curve to be fitted on the line connecting the pixel point and the center of gravity at the edge of the circular hole; the Gaussian fitting method using the gradient curve (that is, the edge model is the sigmoid model) is more in line with the step model. In actual conditions, high-density FPC round holes can be detected.
- Figure 1 is a flow chart of the operation of the present invention
- FIG. 2 is a schematic diagram of an acquisition result of a curve to be fitted according to an embodiment of the present invention
- 3 is a first-order map of a curve to be fitted in an embodiment of the present invention.
- FIG. 4 is a schematic view showing the effect of detecting a sub-pixel circular hole in the embodiment of the present invention.
- a Gaussian fitting based high-density circuit board circular aperture sub-pixel detection method includes the following steps:
- S1 uses the conventional image processing method to obtain the pixel-level edge of the FPC image, and then detects the edge of the circular hole to obtain the center of gravity of the edge of the circular hole, specifically:
- S1.1 uses a conventional image processing method to obtain a pixel-level edge of the FPC image
- Gaussian filtering is a commonly used smoothing filter, which is suitable for eliminating Gaussian noise and is widely used in the noise reduction process of image processing.
- the specific operation of Gaussian filtering is to scan each pixel in the image with a template, and replace the value of the center pixel of the template with the weighted average gray value of the pixels in the domain determined by the template.
- the Canny operator is used to perform edge detection on the Gaussian filtered image to obtain the pixel edge of the image.
- the edge obtained by the canny operator consists of many non-circular hole edges. If the edge of the circular hole is directly detected from these edges, the calculation amount will be too large. Therefore, it is necessary to eliminate some of the geometrical characteristics of the edge connected domain. Non-circular edge; then the Hough transform can be used to detect the edge of the hole in the remaining edges.
- n is the number of edge pixel points
- (x i , y i ) is the coordinate of the ith pixel point
- (x c , y c ) is the barycentric coordinates.
- S2 selects an edge pixel point and a pixel point in the vicinity of the circle point of the circle hole and the center of gravity of the circle hole to form a curve to be fitted;
- S3 uses Gaussian fitting method to perform Gaussian fitting on the gradient curve of the fitted curve to obtain the sub-pixel edge of the circular hole, specifically:
- the curve to be fitted consists of 9 points.
- the gray value of the pixel point of (x i , y i ) is represented by f.
- the least squares method is used to obtain the curve parameters a, b, c, and then the vertices of the parabola, that is, the mean of the Gaussian curve, that is, the sub-pixel coordinates, can be simplified:
- the coordinates obtained here are offsets from the coordinates of the edge points, so the sub-pixel edge coordinates of the last circular hole are the values of the offset u along the direction in which the edge point coordinates are connected with the center of gravity point.
- S4 detects the center of the circle, the radius, the roundness and the round defect according to the sub-pixel edge of the circular hole.
- the parameters a, b and c can be obtained, so that the coordinates and radius of the center of the circle are respectively:
- the roundness of the circle to be detected is obtained according to the coordinates, radius and the sub-pixel edge of the circle:
- the coordinates of the center of the left circle are (745.26, 1341.54), the radius is 145.60, the coordinates of the center of the right circle are (1765.84, 1280.65), the radius is 144.92, the roundness of the left circle is 0.95, and the roundness of the right circle is 0.91.
- Hole offset max(
- the aperture size does not match:
- Porous The number of round holes detected was larger than the number of round holes in the standard document, and there was no porosity in this example.
- the number of round holes detected is less than the number of round holes in the standard file. There are no fewer holes in this example.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Geometry (AREA)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
Abstract
一种基于高斯拟合的高密度电路板圆孔亚像素检测方法,包括:S1、对FPC图像进行处理得到像素级边缘,再检测出圆孔边缘,得到圆孔边缘的重心;S2、在圆孔边缘像素点与圆孔重心连线上选取边缘像素点及其附近的像素点,构成待拟合曲线;S3、采用高斯拟合方法对待拟合曲线的梯度曲线进行高斯拟合,得到圆孔亚像素边缘;S4、根据圆孔亚像素边缘,实现圆心、半径、圆度和圆缺陷的检测。通过在圆孔边缘像素点与重心连线上获得待拟合曲线的操作简单,鲁棒性好;采用梯度曲线的高斯拟合方法比采用阶跃模型更加符合实际情况,能够实现高密度FPC圆孔的检测。
Description
本发明涉及图像处理技术领域,具体涉及一种基于高斯拟合的高密度电路板圆孔亚像素检测方法。
FPC由于其体积小、重量轻及具备可挠性等优点被广泛用于航天、军事、移动终端、数码相机等多个领域。目前FPC线路板的尺寸越来越小,对工艺的要求也越来越高。与此同时,需要更高精度的方法来检测FPC的各项特征以确保FPC的性能。其中,圆孔(包括标识孔、组装孔、定位孔、导通孔和对位孔)是FPC上的一项重要特征,圆孔的位置、大小及圆度等特征都会影响FPC的功能及性能。用光学影像的方法来检测圆孔是常用的方法。而对高密度的FPC,用一般像素级的检测方法往往达不到我们的检测精度。针对这种情况,可以采用亚像素的方法来到达测量精度的要求。近年来,亚像素检测技术已得到了很大的发展,这些方法大致可以分为三类:基于插值的方法,基于矩的方法和基于拟合的方法。基于插值的方法计算时间短,但是精度低,抗噪性差;基于矩的方法抗噪性能强,但由于涉及到模板的计算,所以计算量很大。
发明内容
为了克服现有技术存在的缺点与不足,本发明提供一种基于高斯拟合的高密度电路板圆孔亚像素检测方法。
本发明采用如下技术方案:
一种基于高斯拟合的高密度电路板圆孔亚像素检测方法,包括如下步骤:
S1 FPC图像进行处理得到像素级边缘,再检测出圆孔边缘,得到圆孔边缘的重心;
S2在圆孔边缘像素点与圆孔重心连线上选取边缘像素点及其附近的像素点,构成待拟合曲线;
S3采用高斯拟合方法对待拟合曲线的梯度曲线进行高斯拟合,得到圆孔亚像素边缘;
S4根据圆孔亚像素边缘,实现圆心、半径、圆度和圆缺陷的检测。
所述S2在圆孔边缘像素点与圆孔重心连线上选取边缘像素点及其附近的像素点,构成待拟合曲线,具体为:
设边缘像素点个数为N,(x
i,y
i)为第i个像素点的坐标,(x
c,y
c)为重心坐标;
作一条以重心为端点,经过点(x
i,y
i)(x
c,y
c)的射线,然后在线上的(x
i,y
i)两边各取4个点,包括点(x
i,y
i)得到的9个点作为待拟合的曲线,所述9个点都在射线上。
所述S3采用高斯拟合方法对待拟合曲线的梯度曲线进行高斯拟合,得到圆孔亚像素边缘,具体为:
S3.1待拟合曲线由9个点构成,用f表示(x
i,y
i)像素点的灰度值,则待拟合曲线可表示为f(x),x=-4,-3,-2,-1,0,1,2,3,4,依次表示9个点;
则f(x)的梯度曲线:
其中,x=-3,-2,-1,0,1,2,3;
S3.2图像边缘沿某一梯度方向灰度的一阶导数近似为高斯分布,该高斯分布的均值即为边缘位置,故只要求得待拟合曲线即梯度曲线g(x)的高斯均值即可得到亚像素边缘坐标;
高斯曲线的表达式为:
其中,u为均值,σ为标准差,将高斯曲线两边取对数可得:
可以看出,上式是一条二次曲线y=ax
2+bx+c,故可将待拟合曲线即梯度曲线g(x)取对数来拟合抛物线,求出的抛物线顶点坐标即为亚像素的边缘坐标,S3.3拟合抛物线时用最小二乘法来求得曲线参数a,b,c,进而得到抛物线的顶点,即高斯曲线的均值,也即亚像素坐标:
所述S4中根据圆孔亚像素边缘得到圆心及半径,具体为:
采用最小二乘法得到圆孔的圆心及半径
公式:
其中,圆心坐标为(A,B),令a=-2A,b=-2B,c=A
2+B
2-R
2即可得到圆曲线的另一个形式:
公式:
根据得到的亚像素边缘点和最小二乘法可求得参数a,b和c,从而得到圆心的坐标和半径分别为:
根据圆心的坐标、半径及圆孔亚像素边缘得到待检测圆的圆度:
公式:
所述圆缺陷的检测具体包括孔偏位、孔径大小不符、外形残缺、多孔及少孔。
所述S1 FPC图像进行处理得到像素级边缘,再检测出圆孔边缘,得到圆孔边缘的重心,具体为:
S1.1采集图像进行灰度化处理进行高斯去噪,然后采用Canny算子进行边缘检测,得到该图像的像素级边缘;
S1.2根据边缘连通域的几何特性剔除干扰边缘,再检测圆孔边缘:
S1.2.1利用边缘连通域的面积大小来剔除一些噪声边缘和可能存在的图像边框,设s<ε
1或s>ε
2,其中s为连通域面积,ε
1和ε
2分别为连通域面积阈值下界和上界;
S1.2.2利用边缘连通域的面积与周长关系来剔除一些类似条状的边缘,l/s>ε
3,其中l为连通域周长,ε
3为连通域周长与面积比的阈值下界;
S1.2.3采用Hough变换的方法检测属于圆形的边缘,通过如下公式计算圆边缘的重心:
其中,N为边缘像素点的个数,(x
i,y
i)为第i个像素点的坐标,(x
c,y
c)为重心坐标。
本发明的有益效果:
本发明在圆孔边缘像素点与重心连线上获得待拟合曲线的操作简单,鲁棒性好;采用梯度曲线的高斯拟合方法(即边缘模型为sigmoid模型)比采用阶跃模型更加符合实际情况,能够实现高密度FPC圆孔的检测。
图1是本发明的工作流程图;
图2是本发明实施例待拟合曲线获取结果示意图;
图3是本发明实施例待拟合曲线的一阶导图;
图4是本发明实施例中亚像素圆孔检测效果示意图。
下面结合实施例及附图,对本发明作进一步地详细说明,但本发明的实施方式不限于此。
实施例
如图1所示,一种基于高斯拟合的高密度电路板圆孔亚像素检测方法,包括如下步骤:
S1采用常规图像处理方法得到FPC图像的像素级边缘,再检测出圆孔边缘,得到圆孔边缘的重心,具体为:
S1.1采用常规图像处理方法得到FPC图像的像素级边缘;
待处理的图像若还有噪声,将影响边缘检测的结果,所以在采集到图像后,先要灰度化图像并进行高斯去噪。高斯滤波是一种常用的平滑滤波,适用于消除高斯噪声,广泛应用于图像处理的减噪过程。高斯滤波的具体操作是,用一个模板扫描图像中的每一个像素,用模板确定的领域内像素的加权平均灰度值去代替模板中心像素点的值。对高斯滤波后的图像采用Canny算子进行边缘检测,得到图像的像素级边缘。
S1.2根据边缘连通域的几何特性剔除干扰边缘,再检测圆孔边缘:
用canny算子得到的边缘中由很多的非圆孔边缘,若直接从这些边缘中检测圆孔的边缘将会使计算量过大,因此有必要先通过边缘连通域的几何特性来剔除掉一部分非圆孔边缘;然后可以在剩下的边缘中用Hough变换的方法来检测 出圆孔边缘。
a、利用边缘连通域的面积大小来剔除一些噪声边缘和可能存在的图像边框等,s<ε
1或s>ε
2,其中s为连通域面积,ε
1和ε
2分别为连通域面积阈值下界和上界。此步骤将那些面积太小和太大的边缘剔除掉;本实例中,ε
1=10000,ε
2=70000。
b、利用边缘连通域的面积与周长关系来剔除一些类似条状的边缘,l/s>ε
3,其中l为连通域周长,ε
3为连通域周长与面积比的阈值下界。此步骤将明显不是圆形的类似条状的边缘剔除掉;本实例中ε
3=0.02。
c、采用Hough变换的方法检测属于圆形的边缘,通过如下公式计算圆边缘的重心:
其中,n为边缘像素点的个数,(x
i,y
i)为第i个像素点的坐标,(x
c,y
c)为重心坐标。
S2在圆孔边缘像素点与圆孔重心连线上选取一个边缘像素点及其附近的像素点,构成待拟合曲线;
具体为:
设边缘像素点个数为N,(x
i,y
i)为第i个像素点的坐标,(x
c,y
c)为重心坐标;
作一条以重心为端点,经过点(x
i,y
i)(x
c,y
c)的射线,然后在线上的(x
i,y
i)两边各取4个点,包括点(x
i,y
i)得到的9个点作为待拟合的曲线,所述9个点都在射线上。
S3采用高斯拟合方法对待拟合曲线的梯度曲线进行高斯拟合,得到圆孔亚像素边缘,具体为:
S3.1待拟合曲线由9个点构成,用f表示(x
i,y
i)像素点的灰度值,则待拟合曲线可表示为f(x),x=-4,-3,-2,-1,0,1,2,3,4,依次表示9个点;如图2所示,
则f(x)的梯度曲线:
其中,x=-3,-2,-1,0,1,2,3;如图3所示。
S3.2图像边缘沿某一梯度方向灰度的一阶导数近似为高斯分布,该高斯分布的均值即为边缘位置,故只要求得待拟合曲线即梯度曲线g(x)的高斯均值即可得到亚像素边缘坐标;
高斯曲线的表达式为:
其中,u为均值,σ为标准差,将高斯曲线两边取对数可得:
可以看出,上式是一条二次曲线y=ax
2+bx+c,故可将待拟合曲线即梯度曲线g(x)取对数来拟合抛物线,求出的抛物线顶点坐标即为亚像素的边缘坐标,
S3.3拟合抛物线时用最小二乘法来求得曲线参数a,b,c,进而得到抛物线的顶点,即高斯曲线的均值,也即亚像素坐标,可使计算简单化:
注意,这里求得的坐标是相对边缘点坐标的偏移量,故最后圆孔的亚像素边缘坐标为边缘点坐标沿其与重心点连线方向加上偏移量u的值。
3.4、重复操作,得到所有边缘点的坐标位置即可完成圆孔的亚像素检测,如图4所示。
S4根据圆孔亚像素边缘,实现圆心、半径、圆度和圆缺陷的检测。
采用最小二乘法得到圆孔的圆心及半径
其中,圆心坐标为(A,B),令a=-2A,b=-2B,c=A
2+B
2-R
2即可得到圆曲线的另一个形式:
根据得到的亚像素边缘点和最小二乘法可求得参数a,b和c,从而得到圆心的坐标和半径分别为:
根据圆心的坐标、半径及圆孔亚像素边缘得到待检测圆的圆度:
本示例中,左边圆的圆心坐标为(745.26,1341.54),半径为145.60,右边圆的圆心坐标为(1765.84,1289.65),半径为144.92,左边圆的圆度为0.95,右边圆 的圆度为0.91。
通过得到的圆孔参数与标准文件进行比对,可检测出一些主要的圆孔缺陷:
孔偏位:max(|A-A
s|,|B-B
s|)>ε
4,其中(A
s,B
s)是标准文件中圆心的位置,本实例中左边圆为(750,1340),右边圆为(1300,1390),ε
4是位置偏差的阈值上界,本实例中,ε
4=20。因此本实例中的圆不存在孔偏位。
孔径大小不符:|R-R
s|>ε
5,其中R
s是标准文件中圆的半径,本实例中R
s=145,ε
5是圆孔半径的阈值上界,本实例中,ε
5=10。因此本实例中的圆不存在孔径大小不符。
外形残缺:ρ<ε
6,其中ε
6是圆孔圆度的阈值下界,本实例中,ε
6=0.75。因此本实例中的圆不存在外形残缺。
多孔:检测出圆孔的个数比标准文件中圆孔的个数多,本实例不存在多孔。
少孔:检测出圆孔的个数比标准文件中圆孔的个数少,本实例不存在少孔。
上述实施例为本发明较佳的实施方式,但本发明的实施方式并不受所述实施例的限制,其他的任何未背离本发明的精神实质与原理下所作的改变、修饰、替代、组合、简化,均应为等效的置换方式,都包含在本发明的保护范围之内。
Claims (7)
- 一种基于高斯拟合的高密度电路板圆孔亚像素检测方法,其特征在于,包括如下步骤:S1 FPC图像进行处理得到像素级边缘,再检测出圆孔边缘,得到圆孔边缘的重心;S2在圆孔边缘像素点与圆孔重心连线上选取边缘像素点及其附近的像素点,构成待拟合曲线;S3采用高斯拟合方法对待拟合曲线的梯度曲线进行高斯拟合,得到圆孔亚像素边缘;S4根据圆孔亚像素边缘,实现圆心、半径、圆度和圆缺陷的检测。
- 根据权利要求1所述的高密度电路板圆孔亚像素检测方法,其特征在于,所述S2在圆孔边缘像素点与圆孔重心连线上选取边缘像素点及其附近的像素点,构成待拟合曲线,具体为:设边缘像素点个数为N,(x i,y i)为第i个像素点的坐标,(x c,y c)为重心坐标;作一条以重心为端点,经过点(x i,y i)(x c,y c)的射线,然后在线上的(x i,y i)两边各取4个点,包括点(x i,y i)得到的9个点作为待拟合的曲线,所述9个点都在射线上。
- 根据权利要求1所述的高密度电路板圆孔亚像素检测方法,其特征在于,所述S3采用高斯拟合方法对待拟合曲线的梯度曲线进行高斯拟合,得到圆孔亚像素边缘,具体为:S3.1待拟合曲线由9个点构成,用f表示(x i,y i)像素点的灰度值,则待拟合曲线可表示为f(x),x=-4,-3,-2,-1,0,1,2,3,4,依次表示9个点;则f(x)的梯度曲线:其中,x=-3,-2,-1,0,1,2,3;S3.2图像边缘沿某一梯度方向灰度的一阶导数近似为高斯分布,该高斯分布的均值即为边缘位置,故只要求得待拟合曲线即梯度曲线g(x)的高斯均值即可得到亚像素边缘坐标;高斯曲线的表达式为:其中,u为均值,σ为标准差,将高斯曲线两边取对数可得:可以看出,上式是一条二次曲线y=ax 2+bx+c,故可将待拟合曲线即梯度曲线g(x)取对数来拟合抛物线,求出的抛物线顶点坐标即为亚像素的边缘坐标,S3.3拟合抛物线时用最小二乘法来求得曲线参数a,b,c,进而得到抛物线的顶点,即高斯曲线的均值,也即亚像素坐标:
- 根据权利要求5所述的高密度电路板圆孔亚像素检测方法,其特征在于,所述圆缺陷的检测具体包括孔偏位、孔径大小不符、外形残缺、多孔及少孔。
- 根据权利要求1所述的高密度电路板圆孔亚像素检测方法,其特征在于,所述S1FPC图像进行处理得到像素级边缘,再检测出圆孔边缘,得到圆孔边缘的重心,具体为:S1.1采集图像进行灰度化处理进行高斯去噪,然后采用Canny算子进行边缘检测,得到该图像的像素级边缘;S1.2根据边缘连通域的几何特性剔除干扰边缘,再检测圆孔边缘:S1.2.1利用边缘连通域的面积大小来剔除一些噪声边缘和可能存在的图像边框,设s<ε 1或s>ε 2,其中s为连通域面积,ε 1和ε 2分别为连通域面积阈值下界和上界;S1.2.2利用边缘连通域的面积与周长关系来剔除一些类似条状的边缘,l/s>ε 3,其中l为连通域周长,ε 3为连通域周长与面积比的阈值下界;S1.2.3采用Hough变换的方法检测属于圆形的边缘,通过如下公式计算圆边缘的重心:其中,N为边缘像素点的个数,(x i,y i)为第i个像素点的坐标,(x c,y c)为重心坐标。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710346445.9 | 2017-05-17 | ||
| CN201710346445.9A CN107301636A (zh) | 2017-05-17 | 2017-05-17 | 一种基于高斯拟合的高密度电路板圆孔亚像素检测方法 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018209941A1 true WO2018209941A1 (zh) | 2018-11-22 |
Family
ID=60137988
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2017/116134 Ceased WO2018209941A1 (zh) | 2017-05-17 | 2017-12-14 | 一种基于高斯拟合的高密度电路板圆孔亚像素检测方法 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN107301636A (zh) |
| WO (1) | WO2018209941A1 (zh) |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113077467A (zh) * | 2021-06-08 | 2021-07-06 | 深圳市华汉伟业科技有限公司 | 一种目标物体的边缘缺陷检测方法及装置、存储介质 |
| CN113554582A (zh) * | 2020-04-22 | 2021-10-26 | 中国科学院长春光学精密机械与物理研究所 | 电子设备盖板上功能孔的缺陷检测方法、装置以及系统 |
| CN115661063A (zh) * | 2022-10-19 | 2023-01-31 | 天津津航技术物理研究所 | 一种基于深度学习的圆形端面检测及其亚像素定心方法 |
| CN116503462A (zh) * | 2023-05-10 | 2023-07-28 | 武汉惟景三维科技有限公司 | 一种圆形斑点圆心快速提取方法及系统 |
| CN118196032A (zh) * | 2024-03-15 | 2024-06-14 | 常州亚龙电子科技有限公司 | 一种太阳能电池板边缘缺陷检测与切割方法和系统 |
| CN120084822A (zh) * | 2025-02-25 | 2025-06-03 | 赣州市信展精密科技有限公司 | 多层线路板钻孔缺陷自动检测方法及系统 |
| CN120765745A (zh) * | 2025-07-01 | 2025-10-10 | 南宁桂电电子科技研究院有限公司 | 基于霍夫变换结果与图像亚像素边缘点回归的直线高精度重定位方法 |
Families Citing this family (17)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107301636A (zh) * | 2017-05-17 | 2017-10-27 | 华南理工大学 | 一种基于高斯拟合的高密度电路板圆孔亚像素检测方法 |
| CN108198218B (zh) * | 2018-01-16 | 2019-02-26 | 深圳市亿图视觉自动化技术有限公司 | 柔性电路板定位方法、装置及计算机可读存储介质 |
| CN108510543A (zh) * | 2018-03-23 | 2018-09-07 | 湖南科技大学 | 一种棋盘格图像特征中心亚像素定位方法 |
| CN108550142A (zh) * | 2018-03-30 | 2018-09-18 | 深圳大学 | 一种牙孔检测方法及装置 |
| CN108986126A (zh) * | 2018-06-15 | 2018-12-11 | 哈尔滨工业大学 | 基于高斯拟合亚像素边缘检测及改进ransac算法的圆心检测法 |
| CN109934820B (zh) * | 2019-03-22 | 2020-10-09 | 大连大学 | 一种激光拼焊待焊件图像中直线边缘亚像素检测方法 |
| CN111504188B (zh) * | 2020-04-28 | 2021-11-16 | 湖北文理学院 | 基于机器视觉的圆弧零件测量方法及装置 |
| CN112132886A (zh) * | 2020-09-30 | 2020-12-25 | 哈尔滨理工大学 | 一种航空零件圆孔圆心快速定位及圆度检测方法 |
| CN113012098B (zh) * | 2021-01-25 | 2023-04-07 | 郑州轻工业大学 | 一种基于bp神经网络的铁塔角钢冲孔缺陷检测方法 |
| CN114219806B (zh) * | 2022-02-22 | 2022-04-22 | 成都数联云算科技有限公司 | 一种汽车雷达检测方法、装置、设备、介质及产品 |
| CN115018833B (zh) * | 2022-08-05 | 2022-11-04 | 山东鲁芯之光半导体制造有限公司 | 一种半导体器件的加工缺陷检测方法 |
| CN115953376A (zh) * | 2022-12-27 | 2023-04-11 | 深圳市凌云视迅科技有限责任公司 | 一种孔内缺陷检测方法、系统及装置 |
| CN116447977B (zh) * | 2023-06-16 | 2023-08-29 | 北京航天计量测试技术研究所 | 一种基于激光雷达的圆孔特征测量与参数提取方法 |
| CN117237664B (zh) * | 2023-09-07 | 2026-03-20 | 绿萌科技股份有限公司 | 一种基于高斯建模的果蔬图像亚像素边缘检测方法 |
| CN118824881A (zh) * | 2024-06-27 | 2024-10-22 | 苏州天准科技股份有限公司 | 一种套刻误差量测装置和量测方法 |
| CN118858892B (zh) * | 2024-07-17 | 2025-08-22 | 深圳市立可自动化设备有限公司 | 半导体芯片测试方法及系统 |
| CN120374541B (zh) * | 2025-04-10 | 2025-12-12 | 合肥九川智能装备有限公司 | 一种基于gpu图像处理的树脂塞孔特征提取方法和树脂塞孔品质评价方法 |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040109599A1 (en) * | 2002-12-10 | 2004-06-10 | Cho Seong Ik | Method for locating the center of a fiducial mark |
| CN101334263A (zh) * | 2008-07-22 | 2008-12-31 | 东南大学 | 圆形目标的圆心定位方法 |
| CN101839690A (zh) * | 2010-04-13 | 2010-09-22 | 河海大学常州校区 | 一种基于边缘拟合的片式电子元件位置误差视觉检测方法 |
| CN102034101A (zh) * | 2010-10-22 | 2011-04-27 | 广东工业大学 | 一种pcb视觉检测中快速圆形标志定位方法 |
| CN103886597A (zh) * | 2014-03-24 | 2014-06-25 | 武汉力成伟业科技有限公司 | 一种基于边缘检测与拟合曲线聚类的圆检测方法 |
| CN104050660A (zh) * | 2014-05-26 | 2014-09-17 | 华中科技大学 | 一种测量工件圆形边缘的方法 |
| CN107301636A (zh) * | 2017-05-17 | 2017-10-27 | 华南理工大学 | 一种基于高斯拟合的高密度电路板圆孔亚像素检测方法 |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7027637B2 (en) * | 2002-02-21 | 2006-04-11 | Siemens Corporate Research, Inc. | Adaptive threshold determination for ball grid array component modeling |
| JP2006038582A (ja) * | 2004-07-26 | 2006-02-09 | Dainippon Screen Mfg Co Ltd | 画像の領域分割による欠陥の検出 |
| CN101206116B (zh) * | 2007-12-07 | 2010-08-18 | 北京机械工业学院 | 目标点全局自动定位方法 |
| CN103035004B (zh) * | 2012-12-10 | 2015-08-12 | 浙江大学 | 一种大视场下圆形目标中心定位的方法 |
| CN103530889A (zh) * | 2013-11-04 | 2014-01-22 | 天津工业大学 | 一种基于骨架提取的测量棒编码标记点解码方法 |
| CN104732207B (zh) * | 2015-03-12 | 2018-11-02 | 广东工业大学 | 高精度与高抗干扰性定位PCB板Mark点的方法及装置 |
-
2017
- 2017-05-17 CN CN201710346445.9A patent/CN107301636A/zh active Pending
- 2017-12-14 WO PCT/CN2017/116134 patent/WO2018209941A1/zh not_active Ceased
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040109599A1 (en) * | 2002-12-10 | 2004-06-10 | Cho Seong Ik | Method for locating the center of a fiducial mark |
| CN101334263A (zh) * | 2008-07-22 | 2008-12-31 | 东南大学 | 圆形目标的圆心定位方法 |
| CN101839690A (zh) * | 2010-04-13 | 2010-09-22 | 河海大学常州校区 | 一种基于边缘拟合的片式电子元件位置误差视觉检测方法 |
| CN102034101A (zh) * | 2010-10-22 | 2011-04-27 | 广东工业大学 | 一种pcb视觉检测中快速圆形标志定位方法 |
| CN103886597A (zh) * | 2014-03-24 | 2014-06-25 | 武汉力成伟业科技有限公司 | 一种基于边缘检测与拟合曲线聚类的圆检测方法 |
| CN104050660A (zh) * | 2014-05-26 | 2014-09-17 | 华中科技大学 | 一种测量工件圆形边缘的方法 |
| CN107301636A (zh) * | 2017-05-17 | 2017-10-27 | 华南理工大学 | 一种基于高斯拟合的高密度电路板圆孔亚像素检测方法 |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113554582A (zh) * | 2020-04-22 | 2021-10-26 | 中国科学院长春光学精密机械与物理研究所 | 电子设备盖板上功能孔的缺陷检测方法、装置以及系统 |
| CN113077467A (zh) * | 2021-06-08 | 2021-07-06 | 深圳市华汉伟业科技有限公司 | 一种目标物体的边缘缺陷检测方法及装置、存储介质 |
| CN115661063A (zh) * | 2022-10-19 | 2023-01-31 | 天津津航技术物理研究所 | 一种基于深度学习的圆形端面检测及其亚像素定心方法 |
| CN116503462A (zh) * | 2023-05-10 | 2023-07-28 | 武汉惟景三维科技有限公司 | 一种圆形斑点圆心快速提取方法及系统 |
| CN118196032A (zh) * | 2024-03-15 | 2024-06-14 | 常州亚龙电子科技有限公司 | 一种太阳能电池板边缘缺陷检测与切割方法和系统 |
| CN120084822A (zh) * | 2025-02-25 | 2025-06-03 | 赣州市信展精密科技有限公司 | 多层线路板钻孔缺陷自动检测方法及系统 |
| CN120084822B (zh) * | 2025-02-25 | 2026-01-09 | 赣州市信展精密科技有限公司 | 多层线路板钻孔缺陷自动检测方法及系统 |
| CN120765745A (zh) * | 2025-07-01 | 2025-10-10 | 南宁桂电电子科技研究院有限公司 | 基于霍夫变换结果与图像亚像素边缘点回归的直线高精度重定位方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107301636A (zh) | 2017-10-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107301636A (zh) | 一种基于高斯拟合的高密度电路板圆孔亚像素检测方法 | |
| CN111260731B (zh) | 一种棋盘格亚像素级角点自适应检测的方法 | |
| CN111758024B (zh) | 一种缺陷检测方法及装置 | |
| CN110807355B (zh) | 一种基于移动机器人的指针仪表检测与读数识别方法 | |
| CN114373086B (zh) | 集成模板匹配方法、装置、计算机设备及存储介质 | |
| CN113012234B (zh) | 基于平面变换的高精度相机标定方法 | |
| CN104899888B (zh) | 一种基于Legendre矩的图像亚像素边缘检测方法 | |
| CN112233116B (zh) | 基于邻域决策与灰度共生矩阵描述的凹凸痕视觉检测方法 | |
| CN109377450B (zh) | 一种边缘保护的去噪方法 | |
| CN103632137B (zh) | 一种人眼虹膜图像分割方法 | |
| CN111489389A (zh) | 一种光斑中心检测方法 | |
| CN105488791B (zh) | 自然背景中图像边缘的定位方法及装置 | |
| CN111160477B (zh) | 一种基于特征点检测的图像模板匹配方法 | |
| CN108830899B (zh) | 一种基于几何特征的快速自适应角点结合的圆心检测方法 | |
| CN115375629B (zh) | 一种lcd屏幕中线缺陷检测及缺陷信息提取方法 | |
| WO2018072333A1 (zh) | 一种元件错件检测方法和装置 | |
| CN109903254B (zh) | 基于泊松核改进的双边滤波方法 | |
| CN110619647A (zh) | 基于边缘点频域空域特征结合图像模糊区域定位方法 | |
| CN111667429A (zh) | 一种巡检机器人目标定位校正方法 | |
| CN105139391A (zh) | 一种雾霾天气交通图像边缘检测方法 | |
| CN107749071A (zh) | 大畸变棋盘格图像角点检测方法及装置 | |
| CN109448012A (zh) | 一种图像边缘检测方法及装置 | |
| CN120339283B (zh) | 一种自适应多景深的子像素层缺陷检测方法及装置 | |
| CN116503462A (zh) | 一种圆形斑点圆心快速提取方法及系统 | |
| CN112489065B (zh) | 一种棋盘格标定点亚像素提取方法 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17909667 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 13.03.2020) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 17909667 Country of ref document: EP Kind code of ref document: A1 |