为了较好地提取印刷电路板缺陷图像边缘信息,提出了基于二阶曲线拟合、模式聚类与阈值比较法相结合的印刷电路板缺陷图像边缘信息提取方法。首先分析了最小二乘法拟合的基本原理;然后在此基础上提出了采用二阶曲线拟合法来设定阈值进行拟合得到大致的图像边缘,并分析了其基本原理;最后在模式聚类基础上利用阈值比较法选择适当阈值截取拟合曲线得到图像边缘点、去除噪声边缘点,连接各个图像边缘点可得到缺陷图像的边缘信息。用由显微镜及CCD获取的4幅印刷电路板缺陷图像进行了实验;从实验主观效果看,用该方法提取出图像边缘信息的效果较好,图像边缘比较连续,噪声点极少;从实验客观效果评价看,用该方法所得到的图像边缘信息熵较大。实验结果表明,该方法结合了二阶曲线拟合、模式聚类与阈值比较法优点,可较好地提取出印刷电路板缺陷图像的边缘信息。
In order to extract the defect image edge information of printed circuit board better, an edge information extrac-tion method for the printed circuit board defect image based on the combination of the second order curve fitting, pattern clustering and threshold comparison method is proposed in this paper. Firstly, the basic principle of least squares method is analyzed. Secondly, the fitting method by adopting second order curve fitting to intercalate threshold to obtain the rough image edges is proposed, and its basic principle is analyzed in detail. Finally, by using the threshold comparison method based on the pattern clustering, the image edge points are obtained and the noisy edge points are eliminated by selecting proper threshold to intercept the fitting curve, and the defect image edges information can be obtained by joining each image edge point. The edge information extraction experiment by using the four defect images of printed circuit board acquired by microscope and CCD is actualized. It can see from the subjective results that the images edge is more continuous by adopting this method, and it has lesser noise points. From the objective effect evaluation results, the image information entropy is bigger than that of other methods mentioned in this paper. The experimental results show that it can extract better the defect image edge information of printed circuit board because of the advantages of the two order curve fitting, the pattern clustering and the threshold comparison method are merged.