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

下载本文档

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

文档简介

机器视觉与机器学习应用ApplicationsofMachineVisionandMachine

Learning条形码识别应用Applications

of

BarcodeRecognition超市结账

药品溯源SupermarketcheckoutPharmaceuticaltraceability课程导入Course

Introduction主讲教师

Teacher陈雨Chen

Yu课

入CourseIntroduction如何实现高效精准的识别?How

to

achieve

efficient

andaccurate

recognition?条形码识别应用Applicationsof

Barcode

Recognition主讲教师

Teacher陈

雨ChenYu条形码识别应用Applications

of

BarcodeRecognition条形码识别技术Barcoderecognitiontechnology主讲教师

Teacher课程导入陈雨Chen

YuCourse

introduction药盒条形码识别Medicine

box

barcode数据上传任务

Data

uploadtask条形码识别应用Applications

of

Barcode

Recognition课

入Course

Introduction主讲教师

Teacher陈

雨Chen

Yurecognition案例导入Case

inroduction*

:耗时易出错。Manual

enter:time-consuming,error-prone.*条形码识别系统:方便,快速。Barcode

recognition

system:convenient

and

Fast.

ption

scri述De描sk务Ta任*

:识别药盒条形码,通过TCP协议将数据发

。Task:Recognize

the

barcode

on

the

medicine

box

and

send

the

data

to

the

host

computer

through

the

TCPprotocol.

ption

scri述【规

】每粒装0.5克【贮

藏】密封。生产地址:广西玉林市城站路1号邮编:537001电话:(0775)38901013892812传真:(0775)3892823注册地址:广西玉林市城站路1号网址:http://www.chinaE-mail:ylzy@chinayulin.com检测对象Detectionobject条形码Barcode条形码是以表面上的条和空格的形式可视化表示信息,是由黑白条纹进行组成的,主要由大小不一的宽度的黑条与空白进行组成,黑条与空白位

置根据相应的编码规律进行排列,其包含相关的信

。A

barcode

visually

represents

information

in

the

form

ofbars

and

spaces

on

its

surface.It

is

composed

of

black

andwhitestripes,mainly

black

bars

and

spaces

ofvaryingwidths.The

positions

of

the

black

bars

and

spaces

arearranged

according

to

corresponding

coding

rules,andcontainrelevant

information.条形码Barcode条形码

Barcode*

EAN

条形码,即国际物品条形码(InternationalProductCode),EAN条形

码可分为两类:

一类是

EAN-13,

字元数量为13.

另一类为EAN-8,字元数量为8。较小的商

品就可使用EAN-8

条形码。EAN

barcode,that

is,the

International

ProductCode.EAN

barcodescanbedivided

intotwocategories:One

is

EAN-

13,which

has

13characters.Theotheris

EAN-8,which

has

8characters.Smalleritemscanuse

EAN-8

barcodes.*世界各国都公认的条形码系统数量已多达160多种。Therearemorethan160

barcodesystemsrecognized

bycountries

around

theworld.条形码Barcode条形码的种类和特点TypesandCharacteristicsofBarcodesEAN条形码EAN

barcodeEAN-13码

EAN-13codeEAN-8码

EAN-8code通用商品条形码EAN-13

码是我国主要采取的

编码标准,由国家代码、制造商代码、商品代码

和校验码组成。The

universal

product

barcode

EAN-13

code

is

the

maincoding

standard

adopted

in

China.It

consists

of

a

countrycode,a

manufacturer

code,a

product

code

and

a

check

code.条形码Barcode条形码的种类和特点TypesandCharacteristicsofBarcodes国家代码制造商代码

商品代码校验码Country

code

Manufacturer

code

Product

code

Check

codeEAN-13条形码的结构The

structure

of

the

EAN-13barcodeEAN条形码EAN

barcode*

EAN-13

条形码是

一种(7,2)码,包含了13位

数据字符,其中第1~3位为国家代码,中国的代

码为690~695。第4~8位为制造商代码。第9~12

位为商品代码。第13位为校验码,用来保证条形

码识别的正确性。The

EAN-13barcode

is

a(7,2)code

consisting

of

13datacharacters.The

first

three

characters

are

the

country

code(690-695for

China).The

fourth

through

eighth

charactersarethemanufacturercode.Theninththroughtwelfthcharacters

are

the

product

code.The

thirteenth

character

isa

check

code,used

to

ensure

correct

barcode

recognition.条形码Barcode条形码的种类和特点TypesandCharacteristicsofBarcodes国家代码制造商代码

商品代码校验码Country

code

Manufacturer

code

Product

code

Check

codeEAN-13条形码的结构The

structure

of

the

EAN-13barcodeEAN条形码EAN

barcode*不同宽度的条空组合,对应不同数字。Bar

and

space

combinations

of

different

widthsdifferentnumbers.条形码Barcode条形码的种类和特点TypesandCharacteristicsofBarcodes国家代码制造商代码商品代码

校验码Country

code

Manufacturer

code

Product

code

Check

codeEAN-13条形码的结构Thestructureofthe

EAN-13barcodeEAN条形码EAN

barcodecorrespond

to128条形码是一种长度不一定的条形码,128

个ASCLL

字符,分别代表0~127,在128条形

码的字符集都包括。The

Code

128

is

a

barcode

of

indefinite

length,consistingof

128ASCll

characters

representing

O

to

127,all

of

whichare

included

in

the

Code

128character

set.*

二五条形码有许多种类,例如,插入式二五码、矩阵式二五码、工业式二五码。There

are

many

types

of

Code25,such

as

inserted

Code

25,matrix

Code

25,and

industrial

Code

25.条形码BarcodeCode

128128条形码Code

128条形码的种类和特点TypesandCharacteristicsofBarcodes二五条形码

(code25)Code25128条形码Code

128QETSTART

2ATACHCKUET*

UPC条形码(Uniform

Product

Code),

即通用产品条形码;它是一种不断裂的,长度不

会变化的条形码。UPCistheuniform

productcode;it

is

a

barcode

that

does

notbreak

and

does

not

change

inlength.条形码Barcode条形码的种类和特点TypesandCharacteristicsofBarcodesUPC条形码

UPCUPC条形码

UPC条形码识别Barcoderecognition*

常用的条形码识别算

法有宽度测量法、平均

值法、相似边距离测量

。Commonly

used

barcode

recognition

algorithmsincludewidthmeasurement

method,average

method,similaredge

distancemeasurement

method,etc.图像预处理Imagepreprocessing*

图像预处理一般采

取的操作有:灰度

变换、二值化、旋转

。The

operations

generally

taken

for

imagepreprocessinginclude:grayscale

transformation,binarization,rotationtransformation,Filtering

and

denoising,etc.获取图像Imageacquisition工业相机采集

包含待检测外

观信息的图像。Industrial

camerascapture

imagescontaining

appearanceinformation

to

bedetected.图像分析

Imageanalysis*

图像分析主要是进行ROI分割。Image

analysismainly

involves

ROIsegmentation.条形码Barcode条形码识别流程Barcode

Recognition

Process条形码的应用ApplicationofBarcodes图书馆Library条形码也被广泛用于图书馆中的图书流通环节中,图书和借书证上都贴上了条形码,借书时只要

扫描一下借书证上的条形码,再扫一下借出的图书

上的条形码,相关的信息就被自动记录人数据库中。Barcodes

are

alsowidely

used

in

the

book

circulation

process

in

libraries.Barcodes

are

affixed

to

both

the

books

and

the

library

cards.When

borrowing

a

book,you

only

need

to

scan

thebarcode

on

the

library

card

and

then

scan

the

barcode仓储管理与物流跟踪Warehousemanagement

andlogistics

tracking对于大宗物品流动的场合,应用条形码技术,可以实现快速、准确地记录每一件物品,采集到的各

种数据可实时地由计算机系统进行处理.使得各种

统计数据能够准确、及时地反映物品的状态。For

situations

where

bulk

goods

are

flowing,the

application

of

barcode

technology

can

achieve

rapid

and

accurate

recording

of

each

item.The

collected

data

can

be

processed

by

thecomputer

system

in

real

time,so

that

various

statistical

data

can

accurately

and

timely

reflect

the

status

of

the

items.质量跟踪管理Quality

trackingmanagementISO9000

质量保证体系强调质睦管理的

可追溯性,也就是说,对于出现质量问题的产品,应当可以追溯出它的生产时间、操作者等

。The

ISO9000

quality

assurance

system

emphasizes

the

traceabilityofquality

management,that

is,for

products

with

quality

problems,it

should

be

possible

to

trace

back

information

such

as

production

time

and

operator.on

theborrowedbook,andtherelevantinformation

will

be

automatically

recorded

in

the

database.零售业Retail零售业是条形码应用最为成熟的领域。EAN02

03条形码的应用Application

ofBarcodes形码为零售业应用条形码进行销售奥定了基础。The

retail

industry

is

the

most

mature

field

for

barcode

application.The

EAN

barcode

has

laid

the

foundation

for

the

application

of

barcodes

in

sales

in

the

retail

industry.条形码Barcode01商品条04*TCP

协议是面向连接的通信协议,即传输数据之前,在发送端和接收端建立逻辑连接,然后再传输数据,它提供了设备之间可靠无差错的数据传输。TCP

通信能实现两台设备之间的数

据交互,通信的两端,要严格区分为客户端(Client)与服务端(Server)。TheTCP

protocol

isaconnection-orientedcommunication

protocol,that

is,beforetransmittingdata,a

logical

connectionisestablishedbetweenthesenderand

the

receiver,and

then

the

data

is

transmitted.It

provides

reliable

anderror-freedatatransmissionbetweendevices.TCPcommunication

enables

data

exchange

between

two

devices.Thetwoendsofthecommunicationmustbe

strictly

distinguished

as

the

client

and

the

server.客户端发送的请求交给服

务器端处理,服务器端处

理完毕后反馈给客户端。The

request

sent

by

the

client

ishanded

over

to

the

server

forprocessing,and

the

server

feeds

back

to

the

client

after

processing.条形码Barcode发送请求给服务器端处理。Send

the

request

to

the

server

for

processing.TCP通信TCP

Communicationto

ensure

areliable

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

andwaitsfor

the

serverto

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

Theserversendsaresponsebacktotheclient,notifyingtheclient

that

it

hasreceivedtheconnection

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

again

to

confirm

theconnection.两端通信时的步骤:Stepsforcommunicationbetweenthe1)服务端程序,需要事先启动,

等待客户端的连接。1)Theserverprogramneeds

to

be

startedinadvanceandwaitfortheclientto2)客户端主动连接服务器端,连

接成功才能通信。服务端不可以主

动连接客户端。2)Theclientactivelyconnectsto

theserver,andcommunicationcanonly

beachievedaftertheconnection

isconnect

to

the

client.*TCP

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

the

TCP

protocol,during

the

preparation

phase

for

sending

data,there

are

three

interactions

between

the

client

and

the条形码Barcode客户端Client客户端Client客户端ClientTCP通信TCPCommunicationsuccessful.Theservercannotactivelytwoends:服务端Server服务端Server服务端Serverconnect.server药盒条形码识别Medicine

Box

Barcode

Recognition相机图像Camera

Image流程0本地图像

相机图像

存储图像0相机图像*

在工具箱的“采集”模块选择“相机图像

”,拖拽到流程编辑区。Select

"Camera

Image"in

the

"Acquisition"module

of

thetoolboxand

drag

it

to

theprocess

editing

area.*

打开

DobotVisionStudio1.4.2,

选择通用方案,Open

DobotVisionStudio1.4.2

and

select

the

General

Option.任务实施Task

Implementation步

2Step2步骤1Step1相机图像基本参数设置Camera

imagebasicparametersettings0相机图像常用参数

触发设置相机连接选择相机

U3V

MV-CE050-30UC(C断线重连时间0*

双击“相机图像任务实施Task

Implementation相机图像触发参数设置Camera

imagetriggerparametersettings0相机图像常用参数触发设置相机采集到的图形Graphicscapturedbythe

camera触发字符串字符触发过滤IO

控制IO选择项IO

模式图像参数图像宽度图像高度像素格式帧

率实际帧率步骤2Step

225921944MONO831.00012.156触发设置触发源触发延迟SOFTWARE0.000LINEOInputS12e

mentation步骤3Step

3*

将“条形码识别”拖拽到流程编辑区,并

与“O相机图像”相连。Drag

"BarcodeRecognition"tothe

processeditingareaandconnectitto

"O

CameraImage".ple施Im实sk务Ta任方案流程Program

process0相机图像1条码识别基本参数

运行参数

结果显示运行参数CODE39

码CODE128

码库得巴码EAN

码交替25码CODE93

码条码个数下采样系数执行确定*

双击“1条形码识别”进行参数设置。Double-click"1

Barcode

Recognition"to

set

parameters.任务实施Task

Implementation运行参数设置Operatingparametersettings步骤3Step

3*

点击“单次执行”查看结果。Click

"Single

Execution"to

view

the

results.*

双击“1条形码识别”进行参数设置。Double-click"1

Barcode

Recognition"to

set

parameters.任务实施Task

Implementation条形码识别结果Barcoderecognition

results步骤3Step

3

mentation步

4Step

4*

将逻辑工具栏的“格式化”拖拽到流程编辑区,并与“1条码识别”相连。Drag"Format"Fromthelogictoolbartotheprocesseditingarea,andconnectit

with

"1BarcodeRecognition".ple施方案流程Program

process0相机图像1条码识别2格式化S

CRFormat通过格式化工具可以把数据整合并格式化成字符串输出,格式最大长度256字节。在右侧处单击“

”选择需要格

式化的数据,可以选择多个需要的数据,在数据框中不

同数据间设置合适的间隔符即可,在下方可以按照需要选择合适的输出结束符号。Theformattingtoolcanbeusedto

consolidateand

format

datainto

a

stringforoutput,with

amaximum

length

of256

bytes.Click“”on

the

right

to

select

the

data

to

be

formatted.Youcanselectmultipledataitemsand

set

appropriate

separatorsbetweendifferentdataitemsinthe

dataframe.You

can

alsoselecttheappropriateoutput

endsymbol

asneededbelow.*

双击“2格式化”进行参数

设置。Double-click

"2Format"toset

parameters.

mentation

ple施Im实sk务Ta任福

基本参数结果显示码类型:<1条码识别.码类型(%0d)>[0]编码信息:<1条码识别.编码信息(%s)>[0]回

换行\r\n回车+换行基本参数设置Basicparametersettings步骤4Step4保存格式化格式校验输入结束符格式化合并*

点击“单次执行”查看结

果。Click"Single

Execution"to

viewthe

results.任务实施Task

Implementation序时间模块数据21-09-2210:19:57模块状态:1格式化结果:码类型:13编码信息:6901370001281结果显示区结果Resultsoftheresultdisplay

area图像显示区结果Resultsofthe

imagedisplayarea步骤4

Step4wnfupenouguunydu6

1

作鲁1健染路下单M军言显

z₁8Z68E101068(LOICZ12osz

1发送数据:可将流程中的数据发送到数据队列、通信设备

或全局变量中。当配置输出至数据队列或全局变量时,最

多可配置16个输出。当配置输出至通信设备时,仅能配置

1个输出。Send

Data:Youcansenddatafromtheprocesstoa

data

queue,communicationdevice,orglobalvariable.Whenconfiguringoutputtoadataqueueorglobalvariable,youcan

configure

upto16outputs.Whenconfiguringoutputtoacommunicationdevice,youcanonlyconfigure

one

output.0相机图像1条码识别2格式化3发送数据*

将通信管理栏的“发送数据”拖拽到流程编辑区

,并与“2格式化”相连。Drag"Send

Data"Fromthecommunicationmanagementcolumntothe

processeditingareaandconnectitto

"2Format".任务实施Task

Implementation步骤5Step

5方案流程Program

process3

据TCP

服务端TCPServer通信参数本地端口

8000本机IP触发方案发送数据TestData□16进制发送

发送

清空接收数据清空*

单击“口”创建TCP

服务端。Click

i

to

create

aTCP

server.

mentationple施Im实sk务Ta任步骤6Step

6设备列表TCP服务端0发送数据参数设置Senddataparametersettings3发送数据基本参数

结果显示输出配置*

双击“3发送数据”进行参数设置。Double-click"3

Send

Data"to

set

parameters.任务实施Task

ImplementationO

数据队列

输出至○全局变量通信设备

TCP

服务端0输出数据发送数据

2格式化.格式化结果]步骤6Step6通信设备确定*

点击“单次执行”查看结果。Click

"SingleExecution"toviewtheresults.任务实施Task

Implementation时间模块数据2021-09-2210:22:18模块状态:1,发送数据:0-码类型:13编码信息:6901370001281结果显示区结果Resultsoftheresult

displayarea图像显示区结果Resultsofthe

imagedisplayarea步骤6

Step

6ICZ1202家1x原理认知Principle

recognition实战应用Practical

application条形码识别应用Applications

of

Barcode

Recognition种类区分Type

differentiation课

CourseSummary条形码识别应用Applications

of

Barcode

Recognition课程小结Course

Summary药盒条码识别Medicineboxbarcode

recognitionTCP

数据传输TCPdatatransmission药品信息的高效精准管理EFFicientandaccuratemanagementofdruginformation条形码识别应用Applications

of

Barcode

Recognition课程

温馨提示

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

最新文档

评论

0/150

提交评论