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

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

Info

Publication number
CN108416790A
CN108416790A CN201810098532.1A CN201810098532A CN108416790A CN 108416790 A CN108416790 A CN 108416790A CN 201810098532 A CN201810098532 A CN 201810098532A CN 108416790 A CN108416790 A CN 108416790A
Authority
CN
China
Prior art keywords
workpiece
pixel
skeleton
image
distance
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.)
Granted
Application number
CN201810098532.1A
Other languages
English (en)
Other versions
CN108416790B (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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Biochemistry (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

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

Description

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

Claims (1)

1.一种用于工件破损率的检测方法,其特征在于,包括:
步骤1、采集模板工件图像Image1和待测工件图像Image2,Image1和Image2是通过灰度相机采集得到,所以两幅图像为单通道灰度图像,设定灰度阈值范围(0,128)对图像进行阈值分割预处理得到阈值后的二值图,其中工件区域像素点灰度值为255,背景区域像素点灰度值为0;模板工件图像Image1与待测工件图像Image2已对齐校正完成;
步骤2、根据下面公式计算图像预处理后的Image1图像工件区域骨架m,设骨架上每个像素点为(xsk,ysk);
其中S(A)表示为集合A上的骨架,Sk(A)为骨架子集;
步骤3、根据公式1计算Image1工件区域内像素点到该点距离最近的背景像素点的距离最小值S,
其中(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,工件破损率Δ
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 true CN108416790A (zh) 2018-08-17
CN108416790B 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)

Cited By (3)

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

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嵌入式平台的玉米破损率检测方法

Cited By (4)

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

Also Published As

Publication number Publication date
CN108416790B (zh) 2021-08-17

Similar Documents

Publication Publication Date Title
CN106934800B (zh) 一种基于yolo9000网络的金属板带表面缺陷检测方法及装置
CN102496161B (zh) 一种印刷电路板图像的轮廓提取方法
CN109767445B (zh) 一种高精度的pcb缺陷智能检测方法
CN113724193B (zh) Pcba零部件尺寸及间隙高精度视觉测量方法
CN107610085A (zh) 一种基于计算机视觉的焊点缺陷检测***
CN108416790A (zh) 一种用于工件破损率的检测方法
CN111354047B (zh) 一种基于计算机视觉的摄像模组定位方法及***
CN114693610A (zh) 一种基于机器视觉的焊缝表面缺陷检测方法、设备及介质
CN108871185B (zh) 零件检测的方法、装置、设备以及计算机可读存储介质
CN109829910B (zh) 一种基于邻域查找的pcb缺陷检测方法
CN109752392A (zh) 一种pcb板缺陷类型检测***和方法
CN113340909B (zh) 一种基于机器视觉的胶线缺陷检测方法
CN105184792B (zh) 一种圆锯片磨损量在线测量方法
WO2017071406A1 (zh) 金针类元件的引脚检测方法和***
CN114279357A (zh) 一种基于机器视觉的压铸件毛刺尺寸测量方法及***
CN108389184A (zh) 一种基于机器视觉的工件制孔数检测方法
CN103839271A (zh) 一种基于最佳匹配的图像纹理合成方法
WO2017050088A1 (zh) 一种电子元件定位方法及装置
Sa et al. Improved Otsu segmentation based on sobel operator
CN113607058B (zh) 一种基于机器视觉的直刃刀尺寸检测方法及***
CN114565848A (zh) 一种复杂场景的药液液位检测方法及***
CN111161264B (zh) 一种对含有缺陷的tft电路图像的分割方法
CN110516725B (zh) 基于机器视觉的木板条纹间距和颜色的检测方法
CN115984360B (zh) 一种基于图像处理的计算干滩长度的方法及***
CN116739986A (zh) Auv在输水隧洞内对典型缺陷检测的光学声学组合方法

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