《机器视觉与机器学习应用》课件-条形码识别应用_第1页
《机器视觉与机器学习应用》课件-条形码识别应用_第2页
《机器视觉与机器学习应用》课件-条形码识别应用_第3页
《机器视觉与机器学习应用》课件-条形码识别应用_第4页
《机器视觉与机器学习应用》课件-条形码识别应用_第5页
已阅读5页,还剩34页未读 继续免费阅读

下载本文档

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

文档简介

机器视觉与机器学习应用ApplicationsofMachineVisionandMachineLearning条形码识别应用ApplicationsofBarcodeRecognition条形码识别应用ApplicationsofBarcodeRecognition陈雨ChenYu主讲教师Teacher课程导入CourseIntroduction超市结账

Supermarketcheckout药品溯源

Pharmaceuticaltraceability条形码识别应用ApplicationsofBarcodeRecognition陈雨ChenYu主讲教师Teacher课程导入CourseIntroduction???如何实现高效精准的识别?Howtoachieveefficientandaccuraterecognition?课程导入CourseIntroduction陈雨ChenYu主讲教师Teacher条形码识别技术

Barcoderecognitiontechnology条形码识别应用ApplicationsofBarcodeRecognition课程导入CourseIntroduction陈雨ChenYu主讲教师Teacher药盒条形码识别Medicineboxbarcoderecognition数据上传任务Datauploadtask条形码识别应用ApplicationsofBarcodeRecognition案例导入Caseintroduction任务描述TaskDescription手动输入:耗时

易出错。Manualenter:time-consuming,error-prone.条形码识别系统:方便,快速。Barcoderecognitionsystem:convenientandfast.任务描述TaskDescription任务:识别药盒条形码,通过TCP协议将数据发送给上位机。Task:RecognizethebarcodeonthemedicineboxandsendthedatatothehostcomputerthroughtheTCPprotocol.检测对象

Detectionobject条形码Barcode条形码Barcode条形码是以表面上的条和空格的形式可视化表示信息,是由黑白条纹进行组成的,主要由大小不一的宽度的黑条与空白进行组成,黑条与空白位置根据相应的编码规律进行排列,其包含相关的信息在内。Abarcodevisuallyrepresentsinformationintheformofbarsandspacesonitssurface.Itiscomposedofblackandwhitestripes,mainlyblackbarsandspacesofvaryingwidths.Thepositionsoftheblackbarsandspacesarearrangedaccordingtocorrespondingcodingrules,andcontainrelevantinformation.条形码Barcode条形码Barcode世界各国都公认的条形码系统数量已多达160多种。Therearemorethan160barcodesystemsrecognizedbycountriesaroundtheworld.条形码的种类和特点

TypesandCharacteristicsofBarcodesEAN条形码EANbarcodeEAN条形码,即国际物品条形码(InternationalProductCode),EAN条形码可分为两类:一类是EAN-13,字元数量为13。另一类为EAN-8,字元数量为8。较小的商品就可使用EAN-8条形码。EANbarcode,thatis,theInternationalProductCode.EANbarcodescanbedividedintotwocategories:OneisEAN-13,whichhas13characters.TheotherisEAN-8,whichhas8characters.SmalleritemscanuseEAN-8barcodes.EAN-13码EAN-13codeEAN-8码EAN-8code条形码Barcode条形码的种类和特点

TypesandCharacteristicsofBarcodesEAN条形码EANbarcode通用商品条形码EAN-13码是我国主要采取的编码标准,由国家代码、制造商代码、商品代码和校验码组成。TheuniversalproductbarcodeEAN-13codeisthemaincodingstandardadoptedinChina.Itconsistsofacountrycode,amanufacturercode,aproductcodeandacheckcode.国家代码

Countrycode制造商代码

Manufacturercode商品代码

Productcode校验码

CheckcodeEAN-13条形码的结构ThestructureoftheEAN-13barcode条形码Barcode条形码的种类和特点

TypesandCharacteristicsofBarcodesEAN条形码EANbarcodeEAN-13条形码是一种(7,2)码,包含了13位数据字符,其中第1~3位为国家代码,中国的代码为690~695。第4~8位为制造商代码。第9~12位为商品代码。第13位为校验码,用来保证条形码识别的正确性。TheEAN-13barcodeisa(7,2)codeconsistingof13datacharacters.Thefirstthreecharactersarethecountrycode(690-695forChina).Thefourththrougheighthcharactersarethemanufacturercode.Theninththroughtwelfthcharactersaretheproductcode.Thethirteenthcharacterisacheckcode,usedtoensurecorrectbarcoderecognition.国家代码

Countrycode制造商代码

Manufacturercode商品代码

Productcode校验码

CheckcodeEAN-13条形码的结构ThestructureoftheEAN-13barcode条形码Barcode条形码的种类和特点

TypesandCharacteristicsofBarcodesEAN条形码EANbarcode国家代码

Countrycode制造商代码

Manufacturercode商品代码

Productcode校验码

CheckcodeEAN-13条形码的结构ThestructureoftheEAN-13barcode不同宽度的条空组合,对应不同数字。Barandspacecombinationsofdifferentwidthscorrespondtodifferentnumbers.条形码Barcode二五条形码(code25)Code25二五条形码有许多种类,例如,插入式二五码、矩阵式二五码、工业式二五码。TherearemanytypesofCode25,suchasinsertedCode25,matrixCode25,andindustrialCode25.128条形码Code128128条形码是一种长度不一定的条形码,128个ASCLL字符,分别代表0~127,在128条形码的字符集都包括。TheCode128isabarcodeofindefinitelength,consistingof128ASCIIcharactersrepresenting0to127,allofwhichareincludedintheCode128characterset.128条形码Code128条形码的种类和特点

TypesandCharacteristicsofBarcodes条形码BarcodeUPC条形码UPCUPC条形码(UniformProductCode),即通用产品条形码;它是一种不断裂的,长度不会变化的条形码。UPCistheuniformproductcode;itisabarcodethatdoesnotbreakanddoesnotchangeinlength.UPC条形码UPC条形码的种类和特点

TypesandCharacteristicsofBarcodes条形码Barcode条形码识别流程

BarcodeRecognitionProcess

获取图像Imageacquisition工业相机采集包含待检测外观信息的图像。Industrialcamerascaptureimagescontainingappearanceinformationtobedetected.图像预处理一般采取的操作有:灰度变换、二值化、旋转变换、滤波去噪等。Theoperationsgenerallytakenforimagepreprocessinginclude:grayscaletransformation,binarization,rotationtransformation,filteringanddenoising,etc.图像分析主要是进行ROI分割。ImageanalysismainlyinvolvesROIsegmentation.常用的条形码识别算法有宽度测量法、平均值法、相似边距离测量法等。Commonlyusedbarcoderecognitionalgorithmsincludewidthmeasurementmethod,averagemethod,similaredgedistancemeasurementmethod,etc.图像预处理Imagepreprocessing图像分析Imageanalysis条形码识别Barcoderecognition条形码Barcode条形码的应用

ApplicationofBarcodes条形码的应用

ApplicationofBarcodes01020304零售业

Retail

零售业是条形码应用最为成熟的领域。EAN商品条形码为零售业应用条形码进行销售奠定了基础。

Theretailindustryisthemostmaturefieldforbarcodeapplication.TheEANbarcodehaslaidthefoundationfortheapplicationofbarcodesinsalesintheretailindustry.图书馆

Library

条形码也被广泛用于图书馆中的图书流通环节中,图书和借书证上都贴上了条形码,借书时只要扫描一下借书证上的条形码,再扫一下借出的图书上的条形码,相关的信息就被自动记录人数据库中。

Barcodesarealsowidelyusedinthebookcirculationprocessinlibraries.Barcodesareaffixedtoboththebooksandthelibrarycards.Whenborrowingabook,youonlyneedtoscanthebarcodeonthelibrarycardandthenscanthebarcodeontheborrowedbook,andtherelevantinformationwillbeautomaticallyrecordedinthedatabase.仓储管理与物流跟踪

Warehousemanagementandlogisticstracking

对于大宗物品流动的场合,应用条形码技术,可以实现快速、准确地记录每一件物品,采集到的各种数据可实时地由计算机系统进行处理.使得各种统计数据能够准确、及时地反映物品的状态。Forsituationswherebulkgoodsareflowing,theapplicationofbarcodetechnologycanachieverapidandaccuraterecordingofeachitem.Thecollecteddatacanbeprocessedbythecomputersysteminrealtime,sothatvariousstatisticaldatacanaccuratelyandtimelyreflectthestatusoftheitems.质量跟踪管理

QualitytrackingmanagementISO9000质量保证体系强调质睦管理的可追溯性,也就是说,对于出现质量问题的产品,应当可以追溯出它的生产时间、操作者等信息。TheISO9000qualityassurancesystememphasizesthetraceabilityofqualitymanagement,thatis,forproductswithqualityproblems,itshouldbepossibletotracebackinformationsuchasproductiontimeandoperator.条形码BarcodeTCP通信

TCPCommunicationTCP协议是面向连接的通信协议,即传输数据之前,在发送端和接收端建立逻辑连接,然后再传输数据,它提供了设备之间可靠无差错的数据传输。TCP通信能实现两台设备之间的数据交互,通信的两端,要严格区分为客户端(Client)与服务端(Server)。TheTCPprotocolisaconnection-orientedcommunicationprotocol,thatis,beforetransmittingdata,alogicalconnectionisestablishedbetweenthesenderandthereceiver,andthenthedataistransmitted.Itprovidesreliableanderror-freedatatransmissionbetweendevices.TCPcommunicationenablesdataexchangebetweentwodevices.Thetwoendsofthecommunicationmustbestrictlydistinguishedastheclientandtheserver.客户端

Client发送请求给服务器端处理。

Sendtherequesttotheserverforprocessing.服务端

Server客户端发送的请求交给服务器端处理,服务器端处理完毕后反馈给客户端。

Therequestsentbytheclientishandedovertotheserverforprocessing,andtheserverfeedsbacktotheclientafterprocessing.条形码BarcodeTCP通信

TCPCommunicationTCP协议中,在发送数据的准备阶段,客户端与服务器之间的三次交互,以保证连接的可靠。IntheTCPprotocol,duringthepreparationphaseforsendingdata,therearethreeinteractionsbetweentheclientandtheservertoensureareliableconnection.客户端

Client服务端

Server客户端向服务器端发出连接请求,等待服务器确认。

Theclientsendsaconnectionrequesttotheserverandwaitsfortheservertoconfirm.服务器端向客户端回送一个响应,通知客户端收到了连接请求。

Theserversendsaresponsebacktotheclient,notifyingtheclientthatithasreceivedtheconnectionrequest.客户端再次向服务器端发送确认信息,确认连接。

Theclientsendsaconfirmationmessagetotheserveragaintoconfirmtheconnection.客户端

Client服务端

Server客户端

Client服务端

ServerStepsforcommunicationbetweenthetwoends:两端通信时的步骤:1)Theserverprogramneedstobestartedinadvanceandwaitfortheclienttoconnect.1)服务端程序,需要事先启动,等待客户端的连接。2)Theclientactivelyconnectstotheserver,andcommunicationcanonlybeachievedaftertheconnectionissuccessful.Theservercannotactivelyconnecttotheclient.2)客户端主动连接服务器端,连接成功才能通信。服务端不可以主动连接客户端。药盒条形码识别MedicineBoxBarcodeRecognition打开DobotVisionStudio1.4.2,选择通用方案。OpenDobotVisionStudio1.4.2andselecttheGeneralOption.任务实施TaskImplementation步骤1Step1在工具箱的“采集”模块选择“相机图像”,拖拽到流程编辑区。Select"CameraImage"inthe"Acquisition"moduleofthetoolboxanddragittotheprocesseditingarea.步骤2Step2相机图像CameraImage双击“相机图像”模块,进行参数设置。Double-clickthe"CameraImage"moduletosettheparameters.任务实施TaskImplementation步骤2Step2相机图像基本参数设置Cameraimagebasicparametersettings相机图像触发参数设置Cameraimagetriggerparametersettings相机采集到的图形Graphicscapturedbythecamera将“条形码识别”拖拽到流程编辑区,并与“0相机图像”相连。Drag"BarcodeRecognition"totheprocesseditingareaandconnectitto"0CameraImage".任务实施TaskImplementation步骤3Step3方案流程Programprocess任务实施TaskImplementation步骤3Step3双击“1条形码识别”进行参数设置。Double-click"1BarcodeRecognition"tosetparameters.运行参数设置Operatingparametersettings任务实施TaskImplementation步骤3Step3双击“1条形码识别”进行参数设置。Double-click"1BarcodeRecognition"tosetparameters.点击“单次执行”查看结果。Click"SingleExecution"toviewtheresults.条形码识别结果Barcoderecognitionresults将逻辑工具栏的“格式化”拖拽到流程编辑区,并与“1条码识别”相连。Drag"Format"fromthelogictoolbartotheprocesseditingarea,andconnectitwith"1BarcodeRecognition".任务实施TaskImplementation步骤4Step4方案流程Programprocess双击“2格式化”进行参数设置。Double-click"2Format"tosetparameters.任务实施TaskImplementation步骤4Step4基本参数设置BasicparametersettingsTheformattingtoolcanbeusedtoconsolidateandformatdataintoastringforoutput,withamaximumlengthof256bytes.Click“”ontherighttoselectthedatatobeformatted.Youcanselectmultipledataitemsandsetappropriateseparatorsbetweendifferentdataitemsinthedataframe.Youcanalsoselecttheappropriateoutputendsymbolasneededbelow.通过格式化工具可以把数据整合并格式化成字符串输出,格式最大长度256字节。在右侧处单击“”选择需要格式化的数据,可以选择多个需要的数据,在数据框中不同数据间设置合适的间隔符即可,在下方可以按照需要选择合适的输出结束符号。格式化Format点击“单次执行”查看结果。Click"SingleExecution"toviewtheresults.任务实施TaskImplementation步骤4Step4图像显示区结果Resultsoftheimagedisplayarea结果显示区结果Resultsoftheresultdisplayarea将通信管理栏的“发送数据”拖拽到流程编辑区,并与“2格式化”相连。Drag"SendData"fromthecommunicationmanagementcolumntotheprocesseditingareaandconnectitto"2Format".任务实施TaskImplementationSendData:Youcansenddatafromtheprocesstoadataqueue,communicationdevice,orglobalvariable.Whenconfiguringoutputtoadataqueueorglobalvariable,youcanconfigureupto16outputs.Whenconfiguringoutputtoacommunicationdevice,youcanonlyconfigureoneoutput.发送数据:可将流程中的数据发送到数据队列、通信设备或全局变量中。当配置输出至数据队列或全局变量时,最多可配置16个输出。当配置输出至通信设备时,仅能配置1个输出。步骤5Step5方案流程Programprocess任务实施TaskImplementation步骤6Step6单击“”创建TCP服务端。ClicktocreateaTCPserver.TCP服务端TCPServer任务实施TaskImplementation步骤6Step6双击“3发送数据”进行参数设置。Double-click"3SendData"tosetparameters.发送数据参数设置Senddataparametersettings点击“单次执行”查看结果。Click"SingleExecution"toviewtheresults.任务实施TaskImplementation步骤6Step6图像显示区结果Resultsoftheimagedisplayarea结果显示区结果Resultsoftheresultdisplayarea课程小结CourseSummary原理认知Principlerecognition实战应用Practic

温馨提示

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

评论

0/150

提交评论