基于支持向量机的金属表面缺陷检测
2021-05-11缪徐超张旭徐洋余前溪程凯强
缪徐超 张旭 徐洋 余前溪 程凯强



摘要:针对人工检测金属表面缺陷效率低、主观意识强、无法长时间工作等缺点,提出一种基于支持向量机监督检测、分类以及测量的金属表面缺陷的方法,并使用Matlab软件设计一个图形用户界面(GUI),便于检测人员使用。研究中先对工厂采集的图像进行Gabor滤波和对比度增强的前处理。然后使用方向梯度直方图(HOG)和灰度共生矩阵(GLCM)进行特征提取,为后续提高检测准确率打下基础。最后对于每种缺陷类型都采用270张图片进行模型训练,利用训练好的模型对测试图片进行测试。实验结果表明,最终3种缺陷类型的总正确率为88.9%,该检测方法能够有效地检测出金属表面缺陷。
关键词:表面缺陷检测;支持向量机;图片前处理;特征提取
【Abstract】Aimingattheshortcomingsofmanualdetectionofmetalsurfacedefects,suchaslowefficiency,strongsubjectiveawareness,andinabilitytoworkforalongtime,amethodbasedonSupportVectorMachinesuperviseddetection,classificationandmeasurementofmetalsurfacedefectsisproposed,andMatlabsoftwareisusedforGUIpackagingforeasydetectionofthepersonnel.TheresearchfirstperformsGaborfilteringandcontrastenhancementpre-processingontheimagescollectedbythefactory,thenusesdirectionalgradienthistogram(HOG)andgraylevelco-occurrencematrix(GLCM)forfeatureextractiontolaythefoundationforsubsequentimprovementofdetectionaccuracy.Finally,foreachdefecttype,270picturesareusedformodeltraining,andthetrainedmodelisusedtotestthetestpictures.Experimentalresultsshowthatthefinaltotalaccuracyofthethreetypesofdefectsis88.9%,andthisdetectionmethodcaneffectivelydetectmetalsurfacedefects.
【Keywords】surfacedefectdetection;SupportVectorMachines;picturepre-processing;featureextraction
作者簡介:缪徐超(1996-),男,硕士研究生,主要研究方向:切削原理与应用;张旭(1978-),女,博士,教授,主要研究方向:图像处理和切削原理与应用;徐洋(1995-),男,硕士研究生,主要研究方向:图像处理;余前溪(1994-),男,硕士研究生,主要研究方向:切削原理与应用;程凯强(1996-),男,硕士研究生,主要研究方向:图像处理。
0引言
金属表面缺陷检测在许多工业领域(如飞机机身、核电站蒸汽发生管道和钢桥等)中非常重要。目前,有关金属表面缺陷的机器学习检测技术发展迅速。机器学习检测是采用图像处理的方法对金属表面进行分析处理,检测金属表面是否有缺陷。对表面有缺陷的产品和正在使用中的零件,予以去除和更换,避免在后续的使用过程中造成安全事故。……
