《机器视觉与机器学习应用》课件-字符缺陷检测应用_第1页
《机器视觉与机器学习应用》课件-字符缺陷检测应用_第2页
《机器视觉与机器学习应用》课件-字符缺陷检测应用_第3页
《机器视觉与机器学习应用》课件-字符缺陷检测应用_第4页
《机器视觉与机器学习应用》课件-字符缺陷检测应用_第5页
已阅读5页,还剩29页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

机器视觉与机器学习应用ApplicationsofMachineVisionandMachineLearning字符缺陷检测CharacterDefectDetection字符缺陷检测CharacterDefectDetection陈雨ChenYu主讲教师Teacher课程导入CourseIntroduction漏印Missingprints模糊Blurring污点Stains课程导入CourseIntroductionHowtodetectthesedefectsefficientlyandaccurately?如何高效准确地检测这些缺陷呢?字符缺陷检测CharacterDefectDetection课程导入CourseIntroduction技术原理Technicalprinciples字符缺陷检测CharacterDefectDetection字符缺陷检测Characterdefectdetection实际操作Practicaloperations案例导入Caseintroduction生产日期Productiondate批次号Batchnumber案例导入Caseintroduction模糊或漏印Blurredormissingprints无法识别产品信息Unabletoidentifyproductinformation案例导入Caseintroduction引发质量问题Causequalityissues发现并剔除有问题的产品Detectandeliminateproblematicproducts字符缺陷检测Characterdefectdetection任务描述TaskDescription确保出厂产品的质量Ensurethequalityofproductsleavingthefactory带有缺陷的字符Characterswithdefects无缺陷的字符Characterswithoutdefects使用视觉套件完成字符缺陷检测的全过程Completetheentireprocessofcharacterdefectdetectionusingthevisionkit字符缺陷检测CharacterDefectDetection将目标图像与标准图像进行验证对比,检测印刷字符,图案是否存在缺失、冗余等非一致性外观缺陷。Toverifyandcomparethetargetimagewiththestandardimagetodetectwhethertheprintedcharactersandpatternshaveinconsistentappearancedefectssuchasmissingorredundantones.字符缺陷检测CharacterDefectDetection字符缺陷检测CharacterDefectDetection工业生产中,字符有机器印刷,由于产品漏放,偏放或机器误操作,都会导致产品字符缺陷。Inindustrialproduction,charactersareprintedbymachines.Omission,misplacementormachinemisoperationoftheproductmaycausecharacterdefectsontheproduct.产品的字符检测尤为重要Productcharacterdetectionisparticularlyimportant.字符缺陷类型CharacterDefectTypes字符缺陷示例Characterdefectexamples污点

Stain污点

Stain污点

Stain字体缺失

Missingfont字体缺失

Missingfont字体缺失

Missingfont字符缺陷:字符模糊、漏印、污点、位置偏移Characterdefects:blurredcharacters,missingcharacters,stains,andpositionshifts.字符缺陷示例Characterdefectexamples字符缺陷类型CharacterDefectTypes污点

Stain污点

Stain污点

Stain字体缺失

Missingfont字体缺失

Missingfont字体缺失

Missingfont字符缺陷检测分为两个过程:Characterdefectdetectionisdividedintotwoprocesses:字符缺陷检测过程CharacterDefectDetectionProcess字符缺陷检测流程Characterdefectdetectionprocess样本数据

Sampledata获取图像

Imageacquisition图像预处理

ImagepreprocessingROI分割

ROIsegmentation缺陷检测

Defectdetection训练结束

Endoftraining训练

Training缺陷检测结束

Defectdetectioncompleted比对样本

Samplescomparison训练Or检测

TrainingorDetection开始

Start字符训练Charactertraining字符缺陷检测Characterdefectdetection字符训练:主要是完成标准字符的训练Charactertraining:mainlytocompletethetrainingofstandardcharacters字符缺陷检测:就是与标准字符进行对比,分析出字符的缺陷Characterdefectdetection:comparewithstandardcharacterstoanalyzecharacterdefectsDobotVisionStudio字符缺陷检测介绍DobotVisionStudioCharacterDefectDetectionIntroduction字符模板参数Charactertemplateparameters字符模板——字符模板参数Charactertemplates-charactertemplateparameters训练模板参数Trainingtemplateparameters统计训练参数Statisticaltrainingparameters运行参数OperatingparametersDobotVisionStudio字符缺陷检测介绍DobotVisionStudioCharacterDefectDetectionIntroduction字符分割阈值:字符分割的临界值,太小了容易提取到多余的特征图形,太大了容易丢失目标图形,建议一般设置成128左右。Charactersegmentationthreshold:Thecriticalvalueforcharactersegmentation.Ifitistoosmall,itiseasytoextractredundantfeaturegraphics,andifitistoolarge,itiseasytolosethetargetgraphics.Itisgenerallyrecommendedtosetittoaround128.字符模板——字符模板参数Charactertemplates-charactertemplateparameters字符分割Charactersegmentation显示二值图:开启以后会进行图像二值化,背景图像和字符灰度差更明显。Displaybinaryimage:Afterturningiton,theimagewillbebinarized,andthegrayscaledifferencebetweenthebackgroundimageandthecharacterswillbemoreobvious.字符极性:有黑底白字,白底黑字两种。Characterpolarity:Therearetwotypes:whitecharactersonablackbackgroundandblackcharactersonawhitebackground.字符高度/宽度范围:可以设置目标字符的高度和宽度值范围。Characterheight/widthrange:Youcansettheheightandwidthvaluerangeofthetargetcharacters.高度/宽度增加值:目标字符区域高度和宽度的单次增加值。Height/widthincreasevalue:Thesingleincreasevalueoftheheightandwidthofthetargetcharacterarea.DobotVisionStudio字符缺陷检测介绍DobotVisionStudioCharacterDefectDetectionIntroduction缩放模式:可选取手动和自动两种模式,推荐使用自动模式Scalingmode:Manualandautomaticmodesareavailable,automaticmodeisrecommended字符模板——字符模板参数Charactertemplates-charactertemplateparameters精细颗粒度:精细颗粒度参数,表示提取特征颗粒的精细程度,当精细尺度取值为1时精细程度最大,取边缘点数量最多,精度最高。Finegranularity:Thefinegranularityparameterindicatesthedegreeoffinenessoftheextractedfeatureparticles.Whenthefinescalevalueis1,thedegreeoffinenessisthelargest,thenumberofedgepointsisthelargest,andtheaccuracyisthehighest.粗糙颗粒度:粗糙颗粒度参数,数值越大抽取边缘点就越稀疏,但会加快匹配速度,默认范围是1~20。Coarsegranularity:Coarsegranularityparameter.Thelargerthevalue,thesparsertheedgepointswillbe,butitwillspeedupthematchingprocess.Thedefaultrangeis1~20.阈值模式:可选自动以及手动两种模式Thresholdmode:Automaticandmanualmodesareavailable自动,根据目标字符自动决定阈值参数,自动适应。Automatic:Automaticallydeterminesthethresholdparametersbasedonthetargetcharacterandautomaticallyadapts.训练参数Trainingparameters手动,以用户设定的阈值作为查找的阈值参数。Manual:Usingtheuser-definedthresholdasthesearchthresholdparameter.模型低阈值:阈值模式选取手动时生效,查找的最低阈值参数。Modellowthreshold:Effectivewhenmanualthresholdmodeisselected,thelowestthresholdparametertobesearched.DobotVisionStudio字符缺陷检测介绍DobotVisionStudioCharacterDefectDetectionIntroduction字符模板——统计训练参数Charactertemplates-statisticaltrainingparameters字符统计Characterstatistics均值标准差法:通过多张图片得到均值图像与标准差图像,再与高低比例偏移系数计算得到正常高低阈值图像,检测输入图像通过与高低阈值图像进行像素灰度比对来判断图像中是否存在缺陷。Meanstandarddeviationmethod:Themeanimageandstandarddeviationimageareobtainedfrommultipleimages,andthenthehighandlowproportionaloffsetcoefficientsarecalculatedtoobtainnormalhighandlowthresholdimages.Theinputimageisdetectedbycomparingthepixelgrayscalewiththehighandlowthresholdimagestodeterminewhethertherearedefectsintheimage.相关法:通过计算均值图像与输入检测图像的灰度相关性来进行缺陷判断。Correlationmethod:Defectjudgmentisperformedbycalculatingthegrayscalecorrelationbetweenthemeanimageandtheinputdetectionimage.DobotVisionStudio字符缺陷检测介绍DobotVisionStudioCharacterDefectDetectionIntroduction归一化类型:有不处理、直方图均衡化、直方图归一化、均值标准差归一化4种归一化模式。Normalizationmodes:Noprocessing,histogramequalization,histogramnormalization,andmeanstandarddeviationnormalization.运行参数Operatingparameters相关分数阈值:低于评分阈值的目标认定为含缺陷。Correlationscorethreshold:Targetsbelowthescorethresholdareconsideredtocontaindefects.宽度/高度方向分块:对字符进行分块相关评分,都设为1为不分块。Width/heightdirectionblocking:Thecharactersarescoredforblocking,andallaresetto1fornoblocking.运行参数Operatingparameters任务实施TaskImplementation任务实施TaskImplementation打开DobotVisionStudio1.4.2,选择通用方案。OpenDobotVisionStudio1.4.2andselecttheGeneralOption.步骤1Step1相机图像Cameraimage在工具箱的“采集”模块选择“相机图像”,拖拽到流程编辑区。Select"CameraImage"inthe"Acquisition"moduleofthetoolboxanddragittotheprocesseditingarea.步骤2Step2任务实施TaskImplementation双击“相机图像”模块,进行参数设置。Double-clickthe"CameraImage"moduletosettheparameters.相机图像基本参数设置Cameraimagebasicparametersettings相机图像触发参数设置Cameraimagetriggerparametersettings相机采集到的图形Graphicscapturedbythecamera任务实施TaskImplementation在工具箱的定位模块,将“快速特征匹配”拖拽到流程编辑区,并与“0相机图像”相连。Inthepositioningmoduleofthetoolbox,drag"QuickFeatureMatching"totheprocesseditingarea,andconnectitwith"0CameraImage".步骤3Step3方案流程Programprocess任务实施TaskImplementation双击“1快速特征匹配”进行参数设置。Double-click"1FastFeatureMatching"tosetparameters.创建特征模板Creatingafeaturetemplate特征模板Featuretemplate任务实施TaskImplementation将“字符缺陷检测”拖拽到流程编辑区,与“1快速特征匹配”连接。Drag"CharacterDefectDetection"totheprocesseditingarea,andconnectitwith"1FastFeatureMatching".步骤4Step4方案流程界面Solutionprocessinterface任务实施TaskImplementation双击“字符缺陷检测”,进行参数设置。Double-click"CharacterDefectDetection",andperformparametersettings.基本参数界面Basicparameterinterface任务实施TaskImplementation创建字符模板。Createcharactertemplates.空白字符模板Blankcharactertemplate字符模板Charactertemplate过程1:标准字符的训练Process1:Standardcharactertraining任务实施TaskImplementation创建字符模板。Createcharactertemplates.过程1:标准字符的训练Process1:Standardcharactertraining字符模板结果Charactertemplateresults字符模板Charactertemplate任务实施TaskImplementation将字符块换成带有缺陷的字符块。点击“执行”,图像区会显示检测结果。Replacethecharacterblockwithacharacterblockwithdefects.Click"Execute",theimageareawilldisplaythedetectionresults.过程2:字符缺陷检测Process2:Characterdefectdetection步骤5Step5有缺陷的字符块实物Defectivecharacterblock有缺陷的字符块实物Defectivecharacterblock任务实施TaskImplementation在图像显示区域,选择“3字符缺陷检测.显示缺陷二值图”,就能显示缺陷的二值图像。Intheimagedisplayarea,

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论