CN108416790B - 一种用于工件破损率的检测方法 - Google Patents

一种用于工件破损率的检测方法 Download PDF

Info

Publication number
CN108416790B
CN108416790B CN201810098532.1A CN201810098532A CN108416790B CN 108416790 B CN108416790 B CN 108416790B CN 201810098532 A CN201810098532 A CN 201810098532A CN 108416790 B CN108416790 B CN 108416790B
Authority
CN
China
Prior art keywords
workpiece
distance
point
area
pixel point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810098532.1A
Other languages
English (en)
Other versions
CN108416790A (zh
Inventor
舒军
涂杏
沈开斌
李鑫武
蒋明威
吴柯
杨露
舒心怡
潘健
王淑青
陈张言
徐成鸿
李志愧
刘伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hubei University of Technology
Original Assignee
Hubei University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hubei University of Technology filed Critical Hubei University of Technology
Priority to CN201810098532.1A priority Critical patent/CN108416790B/zh
Publication of CN108416790A publication Critical patent/CN108416790A/zh
Application granted granted Critical
Publication of CN108416790B publication Critical patent/CN108416790B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30164Workpiece; Machine component

Abstract

本发明涉及一种检测方法,尤其是涉及一种用于工件破损率的检测方法。本发明通过区域距离变换计算破损区域每个像素点到区域边缘的距离,有效的避开了铜渣、毛刺等缺陷的影响。提高了计算精度;本发明根据采集到的图片,在考虑线路毛刺、铜渣等基础上,自动进行区域分割,自动逐像素计算距离,自动计算破损率;在线检测时,根据骨架上点到边缘的距离与标准线宽比较计算破损率。该检测过程具备计算简单、计算时间短,精度高等特点。

Description

一种用于工件破损率的检测方法
技术领域
本发明涉及一种检测方法,尤其是涉及一种用于工件破损率的检测方法。
背景技术
在工件板制作过程中,因腐蚀不均匀等原因导致工件破损,破损程度决定了该工件板是否属于合格品。计算破损率主要有区域面积法,区域个数法等算法,当工件板上存在毛刺、铜渣等因素时,采用上述算法计算工件破损率比实际破损率相差较大,无法满足检测要求。
工件板在加工过程中,由于多种原因导致工件不同程度的破损。
目前多数厂家使用AOI光学检测方式,该方法一般只能检测工件的一些比较明显的缺陷,无法对工件边缘毛刺等细微的缺陷进行检测,检测速度相对较慢。
发明内容
本发明的上述技术问题主要是通过下述技术方案得以解决的:
一种用于工件破损率的检测方法,其特征在于,包括:
步骤1、采集模板工件图像Image1和待测工件图像Image2,Image1和Image2是通过灰度相机采集得到,所以两幅图像为单通道灰度图像,设定灰度阈值范围(0,128)对图像进行阈值分割预处理得到阈值后的二值图,其中工件区域像素点灰度值为255,背景区域像素点灰度值为0。模板工件图像Image1与待测工件图像Image2已对齐校正完成。
步骤2、根据下面公式计算图像预处理后的Image1图像工件区域骨架m,设骨架上每个像素点为(xsk,ysk)。
Figure BDA0001565706550000021
其中S(A)表示为集合A上的骨架,Sk(A)为骨架子集
步骤3、根据公式1计算Image1工件区域内像素点到该点距离最近的背景像素点的距离最小值S,
Figure BDA0001565706550000022
其中(x1,y1)为工件区域像素点,(x2,y2)为背景区域像素点
步骤4、令Image1中像素点(x1,y1)的灰度值为S,
步骤5、重复步骤3到步骤4,直到工件区域内所有像素点计算完成,得到新的灰度图像Image3;
步骤6,对于待测工件上A区域处一缺陷,将区域A边缘所有像素点坐标代入Image3中,得到缺陷边界上每个像素点到工件边缘的距离序列(每个像素点对应各自到工件边缘距离),找到最大值b,最小值c,设定最大值Max=(b-c)小于等于50%的线宽。
步骤7、根据步骤6中得到的边缘距离序列找出距离为最大值b的坐标P,计算P点到骨架到骨架的最小距离直线l,设l与骨架的交点R,则骨架上点R的灰度值为该点到区域边界的距离a,工件破损率Δ。
Figure BDA0001565706550000023
因此,本发明具有如下优点:1.本发明通过区域距离变换计算破损区域每个像素点到区域边缘的距离,有效的避开了铜渣、毛刺等缺陷的影响。提高了计算精度;2.本发明根据采集到的图片,在考虑工件毛刺、铜渣等基础上,自动进行区域分割,自动逐像素计算距离,自动计算破损率;3。在线检测时,根据骨架上点到边缘的距离与标准线宽比较计算破损率。该检测过程具备计算简单、计算时间短,精度高等特点。
附图说明
附图1是本发明的计算示意图。
附图2是本发明的一种方法流程图。
具体实施方式
下面通过实施例,并结合附图,对本发明的技术方案作进一步具体的说明。
实施例:
本发明包括:
步骤1、采集模板工件图像Image1和待测工件图像Image2,Image1和Image2是通过灰度相机采集得到,所以两幅图像为单通道灰度图像,设定灰度阈值范围(0,128)对图像进行阈值分割预处理得到阈值后的二值图,其中工件区域像素点灰度值为255,背景区域像素点灰度值为0;模板工件图像Image1与待测工件图像Image2已对齐校正完成;
步骤2、根据下面公式计算图像预处理后的Image1图像工件区域骨架m,设骨架上每个像素点为(xsk,ysk);
Figure BDA0001565706550000031
其中S(A)表示为集合A上的骨架,Sk(A)为骨架子集
步骤3、根据公式1计算Image1工件区域内像素点到该点距离最近的背景像素点的距离最小值S,
Figure BDA0001565706550000032
其中(x1,y1)为工件区域像素点,(x2,y2)为背景区域像素点;
步骤4、令Image1中像素点(x1,y1)的灰度值为S;
步骤5、重复步骤3到步骤4,直到工件区域内所有像素点计算完成,得到新的灰度图像Image3;
步骤6,对于待测工件上A区域处一缺陷,将区域A边缘所有像素点坐标代入Image3中,得到缺陷边界上每个像素点到工件边缘的距离序列(每个像素点对应各自到工件边缘距离),找到最大值b,最小值c,设定最大值Max=(b-c)小于等于50%的线宽;
步骤7、根据步骤6中得到的边缘距离序列找出距离为最大值b的坐标P,计算P点到骨架到骨架的最小距离直线l,设l与骨架的交点R,则骨架上点R的灰度值为该点到区域边界的距离a,工件破损率Δ
Figure BDA0001565706550000041
本文中所描述的具体实施例仅仅是对本发明精神作举例说明。本发明所属技术领域的技术人员可以对所描述的具体实施例做各种各样的修改或补充或采用类似的方式替代,但并不会偏离本发明的精神或者超越所附权利要求书所定义的范围。

Claims (1)

1.一种用于工件破损率的检测方法,其特征在于,包括:
步骤1、采集模板工件图像Image1和待测工件图像Image2,Image1和Image2是通过灰度相机采集得到,所以两幅图像为单通道灰度图像,设定灰度阈值范围(0,128)对图像进行阈值分割预处理得到阈值后的二值图,其中工件区域像素点灰度值为255,背景区域像素点灰度值为0;模板工件图像Image1与待测工件图像Image2已对齐校正完成;
步骤2、根据下面公式计算图像预处理后的Image1图像工件区域骨架m,设骨架上每个像素点为(xsk,ysk);
Figure FDA0003127379300000012
其中S(A)表示为集合A上的骨架,Sk(A)为骨架子集;
步骤3、根据公式1计算Image1工件区域内像素点到该点距离最近的背景像素点的距离最小值S,
Figure FDA0003127379300000011
其中(x1,y1)为工件区域像素点,(x2,y2)为背景区域像素点;
步骤4、令Image1中像素点(x1,y1)的灰度值为S;
步骤5、重复步骤3到步骤4,直到工件区域内所有像素点计算完成,得到新的灰度图像Image3;
步骤6,对于待测工件上A区域处一缺陷,将区域A边缘所有像素点坐标代入Image3中,得到缺陷边界上每个像素点到工件边缘的距离序列,找到最大值b,最小值c,设定最大值Max=(b-c)小于等于50%的线宽,距离序列是每个像素点对应各自到工件边缘距离;
步骤7、根据步骤6中得到的边缘距离序列找出距离为最大值b的坐标P,计算P点到骨架的最小距离直线l,设l与骨架的交点R,则骨架上点R的灰度值为该点到区域边界的距离a,工件破损率Δ
Figure FDA0003127379300000021
CN201810098532.1A 2018-01-31 2018-01-31 一种用于工件破损率的检测方法 Active CN108416790B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810098532.1A CN108416790B (zh) 2018-01-31 2018-01-31 一种用于工件破损率的检测方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810098532.1A CN108416790B (zh) 2018-01-31 2018-01-31 一种用于工件破损率的检测方法

Publications (2)

Publication Number Publication Date
CN108416790A CN108416790A (zh) 2018-08-17
CN108416790B true CN108416790B (zh) 2021-08-17

Family

ID=63127443

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810098532.1A Active CN108416790B (zh) 2018-01-31 2018-01-31 一种用于工件破损率的检测方法

Country Status (1)

Country Link
CN (1) CN108416790B (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111915581B (zh) * 2020-07-27 2021-07-13 青岛大学 一种金属光滑弧面缺陷检测方法
CN113706422B (zh) * 2021-10-28 2022-03-18 深圳市亚略特科技股份有限公司 一种基于获取关键点的图像校正方法、装置、设备及介质
CN117392133B (zh) * 2023-12-12 2024-02-20 江苏中科云控智能工业装备有限公司 一种基于机器视觉的压铸件毛刺检测系统及方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0473759A (ja) * 1990-07-16 1992-03-09 Matsushita Electric Ind Co Ltd 配線パターン検査装置
US6141463A (en) * 1997-10-10 2000-10-31 Electric Planet Interactive Method and system for estimating jointed-figure configurations
JP2001174227A (ja) * 1999-12-17 2001-06-29 Kawasaki Heavy Ind Ltd 繊維の径分布測定方法および装置
CN102692188A (zh) * 2012-05-08 2012-09-26 浙江工业大学 机械视觉疲劳裂纹扩展试验裂纹长度动态测量方法
CN106666767A (zh) * 2016-11-18 2017-05-17 辽宁工业大学 一种基于视觉技术的高效葵花籽脱壳方法
CN107516311A (zh) * 2017-08-08 2017-12-26 中国科学技术大学 一种基于gpu嵌入式平台的玉米破损率检测方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0473759A (ja) * 1990-07-16 1992-03-09 Matsushita Electric Ind Co Ltd 配線パターン検査装置
US6141463A (en) * 1997-10-10 2000-10-31 Electric Planet Interactive Method and system for estimating jointed-figure configurations
JP2001174227A (ja) * 1999-12-17 2001-06-29 Kawasaki Heavy Ind Ltd 繊維の径分布測定方法および装置
CN102692188A (zh) * 2012-05-08 2012-09-26 浙江工业大学 机械视觉疲劳裂纹扩展试验裂纹长度动态测量方法
CN106666767A (zh) * 2016-11-18 2017-05-17 辽宁工业大学 一种基于视觉技术的高效葵花籽脱壳方法
CN107516311A (zh) * 2017-08-08 2017-12-26 中国科学技术大学 一种基于gpu嵌入式平台的玉米破损率检测方法

Also Published As

Publication number Publication date
CN108416790A (zh) 2018-08-17

Similar Documents

Publication Publication Date Title
CN109060836B (zh) 基于机器视觉的高压油管接头外螺纹检测方法
CN108416790B (zh) 一种用于工件破损率的检测方法
CN110906875B (zh) 一种孔径测量的视觉处理方法
CN109671078B (zh) 一种产品表面图像异常检测方法及装置
CN112037203A (zh) 基于复杂工件外轮廓配准的侧表面缺陷检测方法及系统
CN112819845A (zh) 柔性封装基板轮廓、线宽线距缺陷检测方法及介质和设备
CN107388991B (zh) 一种端面多圆角轴类零件圆角半径测量方法
JP2014228357A (ja) ひび割れ検出方法
US20220076404A1 (en) Defect management apparatus, method and non-transitory computer readable medium
CN108802051B (zh) 一种柔性ic基板直线线路气泡及折痕缺陷检测系统及方法
CN114881965A (zh) 一种基于人工智能和图像处理的木板节子检测方法
CN113112496A (zh) 一种基于自适应阈值的亚像素轴类零件尺寸测量方法
CN105184792B (zh) 一种圆锯片磨损量在线测量方法
CN104614386A (zh) 一种镜片疵病类型的识别方法
CN115937175A (zh) 一种电路板表面缺陷检测方法、系统、设备及存储介质
Sa et al. Improved Otsu segmentation based on sobel operator
CN115439523A (zh) 一种半导体器件引脚尺寸检测方法、设备及存储介质
CN116630304A (zh) 一种基于人工智能的锂电池模具加工检测方法及系统
CN113298775B (zh) 自吸泵双面金属叶轮外观缺陷检测方法、系统和介质
CN102663750A (zh) 数字图像边缘检测方法
US9916663B2 (en) Image processing method and process simulation apparatus
CN109064420B (zh) 一种多层pcb截面图像工艺参数提取方法
CN116342585A (zh) 一种产品缺陷检测方法、装置、设备及存储介质
CN116739986A (zh) Auv在输水隧洞内对典型缺陷检测的光学声学组合方法
CN114359276B (zh) 基于麻点缺陷的钢模下料优选方案获取方法

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20180817

Assignee: Wuhan Huizhikai Technology Co.,Ltd.

Assignor: HUBEI University OF TECHNOLOGY

Contract record no.: X2023980053483

Denomination of invention: A detection method for workpiece damage rate

Granted publication date: 20210817

License type: Exclusive License

Record date: 20231222

EE01 Entry into force of recordation of patent licensing contract