摘要
为实现图像处理技术在冲压件表面缺陷在线检测中的应用,开发了一套冲压件表面缺陷实时在线快速检测系统。使用基于多模板匹配算法获取图像中冲压件的位置,建立感兴趣区域;提出基于拉普拉斯-高斯(LoG)算子的实时浓淡补正算法实现冲压件表面缺陷的增强;使用大津法和形态学操作实现冲压件表面缺陷位置的提取。系统使用MATLAB实现基于LoG算子的滤波算法;使用LabVIEW实现其余算法,并在其中调用MATLAB脚本节点;使用多线程技术实现高效的检测算法。经实验,系统能够对生产线上每一个冲压件进行快速检测,并检测出有缺陷的冲压件,整个过程耗时在100ms以内,能够满足在线实时检测需求。
In order to apply the image processing technique to the surface defects online-detecting of stamping parts,a real-time fast detection system is designed.Multi-pattern matching algorithm is used to locate the stamping parts in the image,then the region of interest is built.The shading correction algorithm based on the Laplace-Gaussian(LoG)operator is proposed to enhance the defect parts of workpieces.The Otsu algorithm and morphology are used to extract the defect parts.The system adopts MATLAB to realize the filtering algorithm based on LoG operator,the rest of the algorithm are implemented by LabVIEW and the MATLAB script node is called by LabVIEW,the multithreading technology is used to accelerate the computation.According to the experiment results,the proposed system can detect each stamping parts on the production line and detect the defectives.The whole process takes less than 100 ms,which can satisfy the demand of online detection.
引文
[1]Li L J,Xu S L,Qin J.Research on hardware surface defects detection based on image processing techniques[J].Journal of Engineering Design,2011,18(2):134-138.李丽娟,徐尚龙,秦杰.基于图像处理技术的五金件表面缺陷检测研究[J].工程设计学报,2011,18(2):134-138.
[2]Wang Y N,Liu C T,Li H,et al.Research on stamping workpiece enhancement algorithm based on digital image processing[J].Laser Journal,2014,35(10):80-83.王延年,刘成涛,李浩,等.基于数字图像处理的冲压件工件增强算法研究[J].激光杂志,2014,35(10):80-83.
[3]Tsai D M,Lin P C,Lu C J.An independent component analysis-based filter design for defect detection in low-contrast surface images[J].Pattern Recognition,2006,39(9):1679-1694.
[4]Han F F.Key techniques for surface defects online detection based on machine vision[D].Tianjin:Tianjin University,2011.韩芳芳.表面缺陷视觉在线检测关键技术研究[D].天津:天津大学,2011.
[5]Sun X C,Jiang X N,Fu Y,et al.Surface defect detection system for camshaft based on computer vision[J].Infrared and Laser Engineering,2013,42(6):1647-1653.孙雪晨,姜肖楠,傅瑶,等.基于机器视觉的凸轮轴表面缺陷检测系统[J].红外与激光工程,2013,42(6):1647-1653.
[6]Zhang J K.Design and implementation of a novel template matching algorithm invariant to rotation[D].Harbin:Harbin Institute of Technology,2013.张俊凯.一种快速的旋转模板匹配算法的设计与实现[D].哈尔滨:哈尔滨工业大学,2013.
[7]Gonzalez R C,Richard E.Digital image processing[M].Beijing:Publishing House of Electronics Industry,2013:515-523.冈萨雷斯,理查德.数字图像处理[M].北京:电子工业出版社,2013:515-523.
[8]He Z Y,Sun L N,Chen L G.Fast calculation of threshold based on Otsu criterion[J].Acta Electronica Sinica,2013,41(2):267-272.何志勇,孙立宁,陈立国.Otsu准则下分割阈值的快速计算[J].电子学报,2013,41(2):267-272.
[9]Guo M,Hu L L,Zhao J T.Surface defect detection method of ceramic bowl based on Kirsch and Canny operator[J].Acta Optica Sinica,2016,36(9):0904001.郭萌,胡辽林,赵江涛.基于Kirsch和Canny算子的陶瓷碗表面缺陷检测方法[J].光学学报,2016,36(9):0904001.