[go: up one dir, main page]

CN106053479A - System for visually detecting workpiece appearance defects based on image processing - Google Patents

System for visually detecting workpiece appearance defects based on image processing Download PDF

Info

Publication number
CN106053479A
CN106053479A CN201610581120.4A CN201610581120A CN106053479A CN 106053479 A CN106053479 A CN 106053479A CN 201610581120 A CN201610581120 A CN 201610581120A CN 106053479 A CN106053479 A CN 106053479A
Authority
CN
China
Prior art keywords
image
area
workpiece
defect
formula
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
CN201610581120.4A
Other languages
Chinese (zh)
Other versions
CN106053479B (en
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.)
Xiangtan University
Original Assignee
Xiangtan University
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 Xiangtan University filed Critical Xiangtan University
Priority to CN201610581120.4A priority Critical patent/CN106053479B/en
Publication of CN106053479A publication Critical patent/CN106053479A/en
Application granted granted Critical
Publication of CN106053479B publication Critical patent/CN106053479B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B07SEPARATING SOLIDS FROM SOLIDS; SORTING
    • B07CPOSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
    • B07C5/00Sorting according to a characteristic or feature of the articles or material being sorted, e.g. by control effected by devices which detect or measure such characteristic or feature; Sorting by manually actuated devices, e.g. switches
    • B07C5/34Sorting according to other particular properties
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/02Affine transformations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/60Rotation of whole images or parts thereof
    • G06T3/608Rotation of whole images or parts thereof by skew deformation, e.g. two-pass or three-pass rotation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • 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
    • G01N2021/8854Grading and classifying of flaws
    • G01N2021/888Marking defects
    • 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)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (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 Processing (AREA)
  • Image Analysis (AREA)

Abstract

本发明公开了一种基于图像处理的工件外观缺陷的视觉检测系统,包括工控机、同轴光源、CCD工业相机、图像采集卡和剔除机构;同轴光源和剔除机构均与工控机相连;CCD工业相机通过图像采集卡与工控机相连;其中:同轴光源用于为待检测的工件提供漫反射光源;CCD工业相机用于拍摄处于检测工位的工件的图像;剔除机构用于从生产线上剔除通过检测存在缺陷的工件;工控机中具有基于图像处理的缺陷检测模块;该系统检测效率高,易于实施。

The invention discloses a visual detection system for workpiece appearance defects based on image processing, which includes an industrial computer, a coaxial light source, a CCD industrial camera, an image acquisition card and a rejecting mechanism; both the coaxial light source and the rejecting mechanism are connected with the industrial computer; the CCD The industrial camera is connected to the industrial computer through the image acquisition card; among them: the coaxial light source is used to provide the diffuse reflection light source for the workpiece to be detected; the CCD industrial camera is used to capture the image of the workpiece in the detection station; Eliminate defective workpieces through detection; the industrial computer has a defect detection module based on image processing; the system has high detection efficiency and is easy to implement.

Description

一种基于图像处理的工件外观缺陷的视觉检测系统A Visual Inspection System for Workpiece Appearance Defects Based on Image Processing

技术领域technical field

本发明属于自动检测领域,特别涉及一种基于图像处理的工件外观缺陷的视觉检测系统。The invention belongs to the field of automatic detection, in particular to a visual detection system for workpiece appearance defects based on image processing.

背景技术Background technique

金属工件的主要生产工艺流程为机械加工、冲压、精密铸造、粉末冶金、金属注射成型、尺寸检测、外观缺陷检测等。在整个生产过程中受到制造工艺的影响,工件尺寸和外观在一定程度上会存在不合格。其中外观缺陷主要包括:缺口、粘料、开裂、压痕、针眼、划痕和起泡等。存在外观质量缺陷的工件若流入下个生产工序,会导致组装受阻、变形,影响组装件的质量,严重时可能导致组装件报废而停机,极大地影响了自动化生产线的生产效率,给生产企业带来潜在的经济损失和信誉风险。The main production process of metal workpieces is machining, stamping, precision casting, powder metallurgy, metal injection molding, dimensional inspection, appearance defect inspection, etc. Affected by the manufacturing process throughout the production process, the size and appearance of the workpiece will be unqualified to a certain extent. Among them, appearance defects mainly include: gaps, sticky materials, cracks, indentations, pinholes, scratches and blisters, etc. If workpieces with appearance quality defects flow into the next production process, the assembly will be blocked and deformed, which will affect the quality of the assembled parts. potential economic losses and reputational risks.

传统外观缺陷检测方法有人工目测和频闪光检测。自动化生产线速度很快,人眼根本无法快速捕捉到准确的缺陷信息,尤其一些很小的缺陷,人的肉眼完全无法分辨出合格与否,这就造成缺陷检测精度低、误检率高的问题。频闪光检测主要是根据人的视网膜对一定脉冲闪光所产生的静止反应。该方法是将特定的摄像机和频闪光源相结合,通过固定地观察检测器来确定工件表面情况。其缺点在于检测结果的可信度低,自动化检测程度也低。Traditional appearance defect inspection methods include manual visual inspection and stroboscopic light inspection. The speed of the automated production line is very fast, and the human eye cannot quickly capture accurate defect information, especially some small defects, and the human naked eye cannot distinguish whether it is qualified or not, which leads to the problems of low defect detection accuracy and high false detection rate . Stroboscopic light detection is mainly based on the static response of the human retina to a certain pulse of light. The method is to combine a specific camera and a stroboscopic light source to determine the surface condition of the workpiece by fixedly observing the detector. The disadvantage is that the reliability of the detection results is low, and the degree of automatic detection is also low.

自动检测技术有红外、祸流和漏磁检测技术,这三种检测方法也是我国目前应用比较广泛的。涡流检测技术主要是检测工件表面下层阻流缺陷,但其耗电量大,造成生产企业能源的浪费。涡流检测方法对工件本身质量要求比较高,工件表面必须纯净无杂质,温度均匀,输送带速度要求较慢,这就造成生产和检测受限,不能满足高速率、高质量的生产要求。近年来,机器视觉和图像处理技术的不断发展使得生产线上机器视觉检测代替人工检测成为可能。外观缺陷采用视觉方法检测识别是最有效、最有前景的方法。高分辨率工业相机可以提供丰富的工件外观图像信息,能够准确、高效、可靠地完成工件外观缺陷额检测和识别。The automatic detection technology includes infrared, flood current and magnetic flux leakage detection technology. These three detection methods are also widely used in our country at present. The eddy current testing technology is mainly to detect the flow resistance defects of the lower layer of the workpiece surface, but it consumes a lot of power, which causes a waste of energy for the production enterprise. The eddy current testing method has relatively high requirements on the quality of the workpiece itself. The surface of the workpiece must be pure and free of impurities, the temperature must be uniform, and the speed of the conveyor belt is relatively slow. This results in limited production and testing, and cannot meet the high-speed, high-quality production requirements. In recent years, the continuous development of machine vision and image processing technology has made it possible for machine vision inspection to replace manual inspection on the production line. Visual detection and recognition of appearance defects is the most effective and promising method. High-resolution industrial cameras can provide rich workpiece appearance image information, and can accurately, efficiently and reliably complete the detection and identification of workpiece appearance defects.

目前工件外观缺陷视觉检测的主要方法:(1)通过遗传算法和视觉图像处理形态学实现金属工件表面缺陷的自动检测,系统对开裂和针眼等检测效果良好,但细小划痕、压痕和起泡缺陷检测效果较差;(2)通过利用图像灰度特征,通过灰度值的异常变化来判断产品缺陷的存在,但由于金属表面的强反光性特性,使得系统误检较高。At present, the main methods of visual detection of workpiece appearance defects: (1) The automatic detection of metal workpiece surface defects is realized through genetic algorithm and visual image processing morphology. (2) The existence of product defects is judged by using the grayscale feature of the image and the abnormal change of the grayscale value. However, due to the strong reflective properties of the metal surface, the system has a high false detection rate.

因此,有必要设计一种高效的检测精度高的基于图像处理的工件外观缺陷的视觉检测系统。Therefore, it is necessary to design an efficient and high-precision visual inspection system for workpiece appearance defects based on image processing.

发明内容Contents of the invention

本发明所要解决的技术问题是提供一种基于图像处理的工件外观缺陷的视觉检测系统,该基于图像处理的工件外观缺陷的视觉检测系统检测效率高,易于实施。The technical problem to be solved by the present invention is to provide a visual inspection system for workpiece appearance defects based on image processing, which has high detection efficiency and is easy to implement.

发明的技术解决方案如下:The technical solution of the invention is as follows:

一种基于图像处理的工件外观缺陷的视觉检测系统,其特征在于,包括工控机、同轴光源、CCD工业相机、图像采集卡和剔除机构;A visual detection system for workpiece appearance defects based on image processing, characterized in that it includes an industrial computer, a coaxial light source, a CCD industrial camera, an image acquisition card and a rejection mechanism;

同轴光源和剔除机构均与工控机相连;Both the coaxial light source and the rejecting mechanism are connected with the industrial computer;

CCD工业相机通过图像采集卡与工控机相连;The CCD industrial camera is connected to the industrial computer through the image acquisition card;

其中:同轴光源用于为待检测的工件提供漫反射光源;CCD工业相机用于拍摄处于检测工位的工件的图像;剔除机构用于从生产线上剔除通过检测存在缺陷的工件;Among them: the coaxial light source is used to provide diffuse reflection light source for the workpiece to be inspected; the CCD industrial camera is used to capture the image of the workpiece at the inspection station; the reject mechanism is used to remove the defective workpiece from the production line after passing the inspection;

工控机中具有基于图像处理的缺陷检测模块;The industrial computer has a defect detection module based on image processing;

基于图像处理的缺陷检测模块按照以下步骤实施缺陷检测:The defect detection module based on image processing implements defect detection according to the following steps:

步骤1:工件图像获取及预处理;Step 1: Work piece image acquisition and preprocessing;

步骤2:图像分割与工件位姿矫正;Step 2: Image segmentation and workpiece pose correction;

步骤3:检测以下外观缺陷:缺口、粘料、开裂、压痕、针眼、划痕和起泡。Step 3: Inspect for the following cosmetic defects: nicks, sticks, cracks, indentations, pinholes, scratches, and blisters.

步骤1中,通过同轴光源照明,利用CCD工业相机和图像采集卡采集工件图像f(x,y),工件图像为灰度图像,然后把工件图像送入工控机进行预处理,预处理为对采集到的工件图像进行中值滤波处理。In step 1, the workpiece image f(x, y) is collected by using the CCD industrial camera and the image acquisition card through the coaxial light source, and the workpiece image is a grayscale image, and then the workpiece image is sent to the industrial computer for preprocessing, and the preprocessing is Perform median filter processing on the collected workpiece images.

步骤2中:In step 2:

(1)图像分割:(1) Image segmentation:

基于直方图法对预处理后的图像进行图像分割,工件图像的灰度直方图会显示两个波峰:一个是作为前景的工件,一个是背景,取波谷灰度值为分割阈值以有效分割前景和背景:Segment the preprocessed image based on the histogram method. The gray histogram of the workpiece image will show two peaks: one is the workpiece as the foreground, and the other is the background. The gray value of the valley is taken as the segmentation threshold to effectively segment the foreground. and background:

式中,F(x,y)为分割出的工件图像,Thf为分割阈值In the formula, F(x,y) is the segmented workpiece image, and Th f is the segmentation threshold

(2)图像矫正为通过仿射变换实现图像中工件的平移和旋转角度矫正。仿射变换为现有成熟技术。(2) Image correction is to realize the translation and rotation angle correction of the workpiece in the image through affine transformation. Affine transformation is an existing mature technology.

对矫正后的图像进行数学形态学处理;处理过程为,通过结构元素B对图像施加形态学开运算去除工件边缘毛刺,平滑工件边缘,有:Perform mathematical morphological processing on the corrected image; the processing process is to apply a morphological opening operation to the image through the structural element B to remove the burr on the edge of the workpiece and smooth the edge of the workpiece, as follows:

式中,为开运算运算符,为腐蚀运算符,⊕为膨胀运算符,B为结构元素,大小为3,元素全为1,为圆盘结构。In the formula, is the opening operator, is the erosion operator, ⊕ is the expansion operator, B is the structure element, the size is 3, and all elements are 1, which is a disc structure.

步骤3中:In step 3:

标定工件边缘为缺口检测区域,记为RegqkMark the edge of the workpiece as the gap detection area, denoted as Reg qk ;

标定整个工件表面区域为粘料、开裂、压痕、针眼、划痕和起泡缺陷检测区域;其中粘料和针眼检测区域记为Regnl和Regzy;划痕和开裂检测区域记为Reghh和Regkl;压痕检测区域记为Regyh;起泡检测区域记为RegqpCalibrate the entire surface area of the workpiece as the detection area of sticky material, cracking, indentation, pinhole, scratch and blister defect; where the sticky material and pinhole detection area is marked as Reg nl and Reg zy ; the scratch and cracking detection area is marked as Reg hh And Reg kl ; Indentation detection area is recorded as Reg yh ; Bubble detection area is recorded as Reg qp ;

缺陷的面积判断阈值:Defect area judgment threshold:

式中,Th为缺陷的面积判断阈值;φ为缺陷容忍度;W和H为图像中工件的宽和高,以像素为单位;M和N为工件的实际长和宽,以毫米为单位;In the formula, Th is the area judgment threshold of the defect; φ is the defect tolerance; W and H are the width and height of the workpiece in the image, in pixels; M and N are the actual length and width of the workpiece, in millimeters;

局部动态分割阈值确定方法:Local dynamic segmentation threshold determination method:

首先采用(2D+1)×(2D+1)的滤波掩码进行平滑处理,式中D为被提取目标的直径;然后计算平滑后的图像灰度值的均值Mean(x,y)和标准差σ(x,y);当被提取目标显示为亮像素时,选取T=Mean(x,y)+γ·σ(x,y)为分割阈值;当被提取目标显示为暗像素时,选取T=Mean(x,y)-γ·σ(x,y)为分割阈值,式中γ为标准差强度。Firstly, the filter mask of (2D+1)×(2D+1) is used for smoothing, where D is the diameter of the extracted target; then the mean (x, y) and standard value of the smoothed image gray value are calculated. difference σ(x,y); when the extracted target appears as a bright pixel, select T=Mean(x,y)+γ·σ(x,y) as the segmentation threshold; when the extracted target appears as a dark pixel, Select T=Mean(x,y)-γ·σ(x,y) as the segmentation threshold, where γ is the standard deviation intensity.

①缺口检测:① Gap detection:

1)采用图像分割阈值Tqk在区域Regqk中分割缺口的Blob候选块,通过八连通区域标识出Blob连通域,记为Blqk1) Use the image segmentation threshold T qk to segment the Blob candidate block of the gap in the region Reg qk , and identify the Blob connected domain through the eight connected regions, which is denoted as B1 qk ;

分割阈值Tqk的确定:采用(2Dqk+1)×(2Dqk+1)的滤波掩码进行平滑处理,式中Dqk为缺口缺陷的直径;计算平滑后的图像灰度值的均值Meanqk(x,y)和标准差σqk(x,y);由于缺口缺陷显示为暗像素,则选择Tqk=Meanqk(x,y)-γqk·σqk(x,y)为分割阈值,γqk为缺口缺陷的标准差权重。权重的取值范围是[0,1],需根据先验知识确定具体值。Determination of the segmentation threshold T qk : use (2D qk +1) × (2D qk +1) filter mask for smoothing, where D qk is the diameter of the notch defect; calculate the mean value Mean of the smoothed image gray value qk (x, y) and standard deviation σ qk (x, y); since gap defects appear as dark pixels, T qk = Mean qk (x, y)-γ qk σ qk (x, y) is selected as the segmentation Threshold, γ qk is the standard deviation weight of the gap defect. The value range of the weight is [0,1], and the specific value needs to be determined according to prior knowledge.

2)利用像素计数法提取Blqk连通域的像素面积特征Areaqk;根据下式判断Blqk是否为缺口缺陷:2) Utilize the pixel counting method to extract the pixel area feature Area qk of the Bl qk connected domain; judge whether Bl qk is a gap defect according to the following formula:

式中,缺陷面积判断阈值Thqk由公式3确定,其中φ的取值范围是[0.0120,0.0130],YES和NO分别表示存在缺口缺陷和不存在缺口缺陷;In the formula, the defect area judgment threshold Th qk is determined by Equation 3, where the value range of φ is [0.0120,0.0130], YES and NO indicate the presence or absence of notch defects, respectively;

②粘料和针眼检测:② Sticky material and needle hole detection:

1)采用分割阈值Tzz在区域Regnl和Regzy中分割粘料和针眼的Blob候选块,通过八连通区域标识出Blob连通域,记为Blnl和Blzy1) Use the segmentation threshold T zz to segment the Blob candidate blocks of sticky material and needle holes in the regions Reg nl and Reg zy , and identify the Blob connected domains through eight connected regions, which are denoted as Bl nl and Bl zy ;

分割阈值Tzz的确定:Determination of the segmentation threshold T zz :

Tzz=Mean′zz(x,y)-δzz·V′zz(x,y)T zz = Mean' zz (x,y)-δ zz V' zz (x,y)

式中Mean′zz(x,y)和V′zz(x,y)为检测区域像素灰度值的均值和方差,δzz为粘料和针眼缺陷的方差权重;In the formula, Mean' zz (x, y) and V' zz (x, y) are the mean and variance of pixel gray values in the detection area, and δ zz is the variance weight of sticky material and pinhole defects;

图像中低于分割阈值的像素区域为缺陷候选块;The pixel area below the segmentation threshold in the image is a defect candidate block;

2)利用像素计数法提取Blnl连通域的像素面积特征Areanl和圆度特征Blzy连通域的像素面积特征Areazy和圆度特征根据下式5、6分别判断Blnl是否为粘料缺陷以及Blzy是否为针眼缺陷:2) Using the pixel counting method to extract the pixel area feature Area nl and roundness feature of the Bl nl connected domain Pixel Area Feature Area zy and Roundness Feature of Bl zy Connected Domain According to the following formulas 5 and 6, judge whether Bl nl is a sticky material defect and whether Bl zy is a pinhole defect:

式中,缺陷面积判断阈值Thnl1和Thzy1由式3确定,其中φ的取值范围分别是[0.0020,0.0021]和[0.0024,0.0025];缺陷圆度判断阈值Thnl2和Thzy2的取值范围分别是[0.5,1]和[0.85,1];∩表示逻辑“与”运算;YES和NO分别表示是和否;In the formula, the defect area judgment thresholds Th nl1 and Th zy1 are determined by formula 3, where the value ranges of φ are [0.0020,0.0021] and [0.0024,0.0025] respectively; the defect roundness judgment thresholds Th nl2 and Th zy2 are The ranges are [0.5,1] and [0.85,1] respectively; ∩ represents logical "AND"operation; YES and NO represent yes and no respectively;

像素面积特征即区域内的像素个数,圆度特征描述即目标区域的面积与外接圆面积的比值,形状越接近圆,比值越接近1,圆度特征的取值范围是:计算公式为其中r为被提取目标的外接圆半径,此处的被提取目标指粘料和针眼缺陷;The pixel area feature is the number of pixels in the area, and the roundness feature description is the ratio of the area of the target area to the area of the circumscribed circle. The closer the shape is to a circle, the closer the ratio is to 1. The value range of the roundness feature is: The calculation formula is Where r is the radius of the circumscribed circle of the extracted target, where the extracted target refers to sticky material and pinhole defects;

③划痕和开裂检测:③Scratch and crack detection:

1)采用局部图像方差强度算法求取分割阈值Thk,在区域Reghh和Regkl中分割划痕和开裂的Blob块候选,通过八连通区域标识出Blob连通域,记为Blhh和Blkl1) Use the local image variance strength algorithm to obtain the segmentation threshold T hk , segment the scratched and cracked blob block candidates in the regions Reg hh and Reg kl , and identify the Blob connected domain through eight connected regions, which are recorded as Bl hh and Bl kl ;

局部图像方差强度是图像局部阈值概念的拓展延伸,由于被检测工件受生产工艺影响会有背景不均匀情况,因此很难找到固定阈值将目标缺陷与背景完整分割。故提出局部阈值检测方法,即局部灰度特征与整体相结合的方法;结合局部方差与方差的特性,先采用(2Dhk+1)×(2Dhk+1)的滤波掩码进行平滑处理,式中Dhk为划痕和开裂缺陷的长度;再计算平滑后图像灰度值的标准差σhk(x,y)和方差Vhk(x,y);分割阈值按下式的确定:Local image variance intensity is an extension of the concept of image local threshold. Since the detected workpiece will have an uneven background due to the influence of the production process, it is difficult to find a fixed threshold to completely segment the target defect from the background. Therefore, a local threshold detection method is proposed, that is, a method of combining local gray features with the whole; combined with the characteristics of local variance and variance, first use (2D hk +1) × (2D hk +1) filter mask for smoothing, In the formula, D hk is the length of scratches and cracking defects; then calculate the standard deviation σ hk (x, y) and variance V hk (x, y) of the image gray value after smoothing; the segmentation threshold is determined by the following formula:

TT hh kk == &sigma;&sigma; hh kk (( xx ,, ythe y )) ++ VV hh kk (( xx ,, ythe y )) ,, &sigma;&sigma; hh kk (( xx ,, ythe y )) >> &sigma;&sigma; &prime;&prime; hh kk (( xx ,, ythe y )) &sigma;&sigma; hh kk (( xx ,, ythe y )) -- VV hh kk (( xx ,, ythe y )) ,, &sigma;&sigma; hh kk (( xx ,, ythe y )) << &sigma;&sigma; &prime;&prime; hh kk (( xx ,, ythe y )) ;;

其中σ′hk(x,y)和V′hk(x,y)表示平滑前的整幅图像的标准差和方差;Where σ′ hk (x, y) and V′ hk (x, y) represent the standard deviation and variance of the entire image before smoothing;

2)利用像素计数法提取Blhh连通域的像素面积特征Areahh和内部最长直径特征Diameterhh以及Blkl连通域的像素面积特征Areakl和内部最长直径特征Diameterkl;根据式7、8分别判断Blhh是否为划痕缺陷,以及Blkl是否为开裂缺陷:2) Utilize the pixel counting method to extract the pixel area feature Area hh and the inner longest diameter feature Diameter hh of the Bl hh connected domain and the pixel area feature Area kl and the inner longest diameter feature Diameter kl of the Bl kl connected domain; according to formula 7,8 Determine whether Bl hh is a scratch defect, and whether Bl kl is a crack defect:

式中,缺陷面积判断阈值Thhh1和Thkl1由式3确定,其中φ的取值范围分别是[0.0110,0.0120]和[0.0048,0.0049];缺陷最长直径判断阈值Thhh2和Thkl2的取值范围由经验值确定;∩表示逻辑“与”运算;In the formula, the defect area judgment thresholds Th hh1 and Th kl1 are determined by formula 3, where the value ranges of φ are [0.0110,0.0120] and [0.0048,0.0049] respectively; the longest defect diameter judgment thresholds Th hh2 and Th kl2 The value range is determined by the empirical value; ∩ represents the logic "AND"operation;

内部最长直径即区域边界上最远的两个像素点的距离,距离和面积都是以像素为单位,即该距离内或该区域内包含的像素个数;The longest internal diameter is the distance between the two furthest pixels on the boundary of the area. The distance and area are both in pixels, that is, the number of pixels contained within the distance or within the area;

④压痕检测:④ Indentation detection:

1)通过拉普拉斯高斯变换算法和局部动态阈值Tyh分割压痕的Blob候选块;1) Segment the indented Blob candidate blocks through the Laplacian Gaussian transform algorithm and the local dynamic threshold T yh ;

Tyh的确定:采用(2Dyh+1)×(2Dyh+1)的滤波掩码进行平滑处理,式中Dyh为压痕缺陷的直径;计算平滑后图像灰度值的均值Meanyh(x,y)和标准差σyh(x,y);由于压痕缺陷在拉普拉斯高斯变换后的图像中显示为亮像素,故选择Tyh=Meanyh(x,y)+γyh·σyh(x,y)为分割阈值,γyh为压痕缺陷的标准差权重;通过八连通区域标识出Blob连通域,记为BlyhDetermination of T yh : use (2D yh +1) × (2D yh +1) filter mask for smoothing, where D yh is the diameter of the indentation defect; calculate the average Mean yh ( x, y) and standard deviation σ yh (x, y); since indentation defects appear as bright pixels in the image after Laplacian-Gaussian transformation, T yh = Mean yh (x, y)+γ yh σ yh (x, y) is the segmentation threshold, and γ yh is the standard deviation weight of indentation defects; Blob connected domains are identified through eight connected areas, denoted as B yh ;

权重的取值范围是[0,1],需根据先验知识确定具体值;The value range of the weight is [0,1], and the specific value needs to be determined according to prior knowledge;

2)利用像素计数法提取Blyh连通域的像素面积特征Areayh和矩形度特征Rectanyh,矩形度是描述被提取区域对其外接矩形的充满程度,计算公式为其中Sm为被提取区域外接矩形区域的面积;根据式9判断Blyh是否为压痕缺陷:2) Use the pixel counting method to extract the pixel area feature Area yh and the rectangularity feature Rectan yh of the Bl yh connected domain. The rectangularity describes the fullness of the extracted area to its circumscribed rectangle. The calculation formula is Among them, S m is the area of the rectangular area circumscribing the extracted area; judge whether B yh is an indentation defect according to formula 9:

式中,面积判断阈值Thyh1由式3确定,其中φ的取值范围是[0.0160,0.0170];矩形度判断阈值Thyh2的取值范围是[0.7,1];∩表示逻辑“与”运算;In the formula, the area judgment threshold Th yh1 is determined by formula 3, where the value range of φ is [0.0160,0.0170]; the value range of the rectangularity judgment threshold Th yh2 is [0.7,1]; ∩ represents the logic "AND"operation;

拉普拉斯高斯算法:Laplacian of Gauss algorithm:

该方法是将高斯滤波和拉普拉斯算子结合在一起。算法主要步骤如下:The method is a combination of Gaussian filtering and Laplacian operator. The main steps of the algorithm are as follows:

(1)滤波:首先对图像F(x,y)进行平滑滤波,滤波函数为高斯函数,即(1) Filtering: First, smoothing and filtering the image F(x,y) is performed, and the filtering function is a Gaussian function, namely

GG (( xx ,, ythe y )) == 11 22 &pi;&sigma;&pi;&sigma; 22 expexp &lsqb;&lsqb; -- 11 22 &pi;&sigma;&pi;&sigma; 22 (( xx 22 ++ ythe y 22 )) &rsqb;&rsqb;

将图像F(x,y)与G(x,y)进行卷积,可以得到一个平滑的图像,即Convolving the image F(x,y) with G(x,y) can get a smooth image, namely

g(x,y)=F(x,y)*G(x,y)g(x,y)=F(x,y)*G(x,y)

(2)图像增强:对平滑图像g(x,y)进行拉普拉斯运算,即(2) Image enhancement: Laplacian operation is performed on the smooth image g(x,y), namely

hh (( xx ,, ythe y )) == &dtri;&dtri; 22 &lsqb;&lsqb; Ff (( xx ,, ythe y )) ** GG (( xx ,, ythe y )) &rsqb;&rsqb;

由于对平滑图像g(x,y)进行拉普拉斯运算可等效为g(x,y)的拉普拉斯运算与F(x,y)的卷积,故上式变为:Since the Laplacian operation on the smooth image g(x,y) is equivalent to the convolution of the Laplacian operation of g(x,y) and F(x,y), the above formula becomes:

hh (( xx ,, ythe y )) == Ff (( xx ,, ythe y )) ** &dtri;&dtri; 22 GG (( xx ,, ythe y ))

式中成为LOG滤波器,其为:In the formula becomes the LOG filter, which is:

&dtri;&dtri; 22 GG (( xx ,, ythe y )) == &part;&part; 22 GG &part;&part; xx 22 ++ &part;&part; 22 GG &part;&part; ythe y 22 == 11 &pi;&sigma;&pi;&sigma; 44 (( xx 22 ++ ythe y 22 22 &sigma;&sigma; 22 -- 11 )) expexp (( -- xx 22 ++ ythe y 22 22 &sigma;&sigma; 22 ))

作用:拉普拉斯高斯算子把高斯平滑滤波器和拉普拉斯锐化滤波器结合起来,先平化掉噪声,再对图像进行边缘增强,所以能够有效凸显压痕缺陷。Function: The Laplacian Gaussian operator combines the Gaussian smoothing filter and the Laplacian sharpening filter to flatten the noise first, and then enhance the edge of the image, so it can effectively highlight the indentation defect.

⑤起泡检测:⑤ Blister detection:

1)通过快速傅立叶变换将图像函数从空间域转变到频率域,采用低通滤波器平滑图像,再通过傅立叶逆变换将图像从频率域变换到空间域;根据图像灰度直方图,选取波谷灰度值为分割阈值分割目标分割起泡的Blob候选块,通过八连通区域标识出Blob连通域,记为Blqp1) Transform the image function from the spatial domain to the frequency domain through fast Fourier transform, use a low-pass filter to smooth the image, and then transform the image from the frequency domain to the spatial domain through inverse Fourier transform; according to the gray histogram of the image, select the valley gray The degree value is the blob candidate block of the segmentation threshold segmentation target segmentation foam, and the blob connected domain is identified by eight connected areas, which is denoted as Bl qp ;

图像的直方图只有一个波谷,因为经过傅立叶变换和平滑滤波处理后,起泡部位较整体工件背景偏亮,所以直方图显示有两个波峰和一个波谷,而且两个波峰中一个属于工件背景,另一个属于起泡缺陷,所以采用波谷灰度值可将背景和起泡缺陷分割;The histogram of the image has only one trough, because after Fourier transform and smoothing filter processing, the bubbling part is brighter than the overall workpiece background, so the histogram shows two peaks and one trough, and one of the two peaks belongs to the background of the workpiece. The other belongs to the bubble defect, so the background and the bubble defect can be separated by using the trough gray value;

2)利用像素计数法提取Blqp连通域的像素面积特征Areaqp和圆度特征根据式10判断Blqp是否为起泡缺陷:2) Using the pixel counting method to extract the pixel area feature Area qp and roundness feature of the Bl qp connected domain Judging whether Bl qp is a bubble defect according to formula 10:

式中,面积判断阈值Thqp1由式3确定,其中φ的取值范围是[0.0123,0.0124];圆度判断阈值Thqp2的取值范围是[0.5,1];∩表示逻辑“与”运算。定位、引导图像的采集过程中,采用环形漫反射光源照明;检测图像采集过程中,采用同轴光源照明。In the formula, the area judgment threshold Th qp1 is determined by formula 3, where the value range of φ is [0.0123,0.0124]; the value range of the roundness judgment threshold Th qp2 is [0.5,1]; ∩ represents the logic "AND" operation . During the acquisition process of positioning and guiding images, the circular diffuse reflection light source is used for illumination; during the detection image acquisition process, the coaxial light source is used for illumination.

有益效果:Beneficial effect:

本发明的基于图像处理的工件外观缺陷的视觉检测系统,采用同轴光源为工件提供照明,采用相机和图像采集卡获取工件图像,采用工控机基于图像处理实现缺陷检测,检测存在缺陷的工件由剔除机构进行剔除;缺陷检测过程中,首先通过视觉系统引导机器人,根据基于灰度值的模板匹配算法精确定位目标工件位姿,然后进行工件外观缺陷检测,其步骤为:(1)获取工件图像,采用中值滤波进行预处理;(2)利用全局阈值分割目标工件,并进行工件位姿矫正;(3)通过数学形态学开运算去除工件边缘毛刺干扰;(4)检测缺口、粘料、开裂、压痕、针眼、划痕和起泡外观缺陷。The visual inspection system for workpiece appearance defects based on image processing of the present invention adopts a coaxial light source to provide illumination for the workpiece, uses a camera and an image acquisition card to obtain images of the workpiece, and uses an industrial computer to realize defect detection based on image processing, and detects defective workpieces by The elimination mechanism is used for elimination; in the process of defect detection, the robot is first guided by the vision system, and the target workpiece pose is accurately located according to the template matching algorithm based on the gray value, and then the appearance defect detection of the workpiece is carried out. The steps are: (1) Obtain the image of the workpiece , using median filter for preprocessing; (2) using the global threshold to segment the target workpiece, and correcting the workpiece pose; (3) removing the burr interference on the edge of the workpiece through mathematical morphology opening operation; (4) detecting gaps, sticky materials, Cracks, indentations, pinholes, scratches and blistered appearance defects.

本发明的优点在于:The advantages of the present invention are:

1.定位速度快、精度高。基于灰度值的模板匹配,采用归一化互相关算法,并利用图像金字塔实现多级匹配,提高匹配精度和速度;1. Fast positioning speed and high precision. Template matching based on gray value, using normalized cross-correlation algorithm, and using image pyramid to achieve multi-level matching, improving matching accuracy and speed;

2.缺陷检测针对性强,速度快。2. Defect detection is highly targeted and fast.

运用简单、有效的Blob算法,首先对获取的原始图像做预处理,抑制噪声干扰增强图像有用信息的表现张力。本发明针对不同的缺陷采用有针对性的检测方法,易于实施,方法巧妙,具体包括标定检测区域并通过二值化分割ROI,基于ROI区域通过局部灰度阈值提取缺口缺陷特征;局部动态阈值算法提取粘料和针眼缺陷特征;局部图像方差强度算法提取划痕和开裂缺陷特征;拉普拉斯高斯算法提取表面压痕缺陷特征;快速傅里叶变换算法提取表面起泡缺陷特征。最后将提取到的缺陷特征根据判定规则库中的判定规则进行分析判断并输出检测结果;Using a simple and effective Blob algorithm, firstly preprocess the acquired original image, suppress noise interference and enhance the expressive tension of useful information in the image. The present invention adopts a targeted detection method for different defects, which is easy to implement and the method is ingenious. Specifically, it includes calibrating the detection area and segmenting the ROI through binarization, and extracting the defect features of the gap based on the local gray threshold based on the ROI area; the local dynamic threshold algorithm Extract sticky and pinhole defect features; local image variance intensity algorithm extracts scratch and crack defect features; Laplacian-Gaussian algorithm extracts surface indentation defect features; fast Fourier transform algorithm extracts surface blister defect features. Finally, the extracted defect features are analyzed and judged according to the judgment rules in the judgment rule base, and the detection results are output;

3.适应性广、移植性强,可检测缺陷类型较全面。该检测算法能广泛应用于高速生产线上精密工件外观质量的视觉检测,并且可移植到电子元器件、微小零部件等的视觉检测生产线上,具有很强的适应性,是一种具有高度通用型和准确性的视觉检测系统。3. Wide adaptability, strong transplantability, and more comprehensive types of detectable defects. The detection algorithm can be widely used in the visual detection of the appearance quality of precision workpieces on high-speed production lines, and can be transplanted to the visual detection production lines of electronic components, small parts, etc. It has strong adaptability and is a highly versatile and accuracy of the visual inspection system.

本发明的系统能解决人工检测速度慢、效率低、精度差的问题;能克服目前视觉检测缺陷类型单一、成像质量差和误检率高的问题,提高精密工件生产自动化程度和产品质量。The system of the invention can solve the problems of slow manual detection speed, low efficiency and poor precision; can overcome the problems of single defect type, poor imaging quality and high false detection rate in the current visual detection, and improve the automation degree and product quality of precision workpiece production.

附图说明Description of drawings

图1为基于图像处理的工件外观缺陷的视觉检测流程图;Figure 1 is a flow chart of visual detection of workpiece appearance defects based on image processing;

图2为检测到的正常图像和缺陷图像,其中图a-h分别对应正常、粘料、压痕、缺口、开裂、划痕、起泡和针眼图像;Figure 2 is the detected normal image and defect image, where Figures a-h correspond to normal, sticky, indentation, notch, crack, scratch, blister and pinhole images respectively;

图3为基于图像处理的工件外观缺陷的视觉检测系统的总体结构框图。Fig. 3 is a block diagram of the overall structure of the visual inspection system for workpiece appearance defects based on image processing.

具体实施方式detailed description

为了便于理解本发明,下文将结合说明书附图和较佳的实施例对本文发明做更全面、细致地描述,但本发明的保护范围并不限于以下具体实施例。In order to facilitate the understanding of the present invention, the invention will be described more comprehensively and in detail below in conjunction with the accompanying drawings and preferred embodiments, but the protection scope of the present invention is not limited to the following specific embodiments.

除非另有定义,下文中所使用的所有专业术语与本领域技术人员通常理解含义相同。本文中所使用的专业术语只是为了描述具体实施例的目的,并不是旨在限制本发明的保护范围。Unless otherwise defined, all technical terms used hereinafter have the same meanings as commonly understood by those skilled in the art. The terminology used herein is only for the purpose of describing specific embodiments, and is not intended to limit the protection scope of the present invention.

实施例1:Example 1:

如图1-3,一种基于图像处理的工件外观缺陷的视觉检测系统,其特征在于,包括工控机、同轴光源、CCD工业相机、图像采集卡和剔除机构;As shown in Figure 1-3, a visual inspection system for workpiece appearance defects based on image processing is characterized in that it includes an industrial computer, a coaxial light source, a CCD industrial camera, an image acquisition card and a rejection mechanism;

同轴光源和剔除机构均与工控机相连;Both the coaxial light source and the rejecting mechanism are connected with the industrial computer;

CCD工业相机通过图像采集卡与工控机相连;The CCD industrial camera is connected to the industrial computer through the image acquisition card;

其中:同轴光源用于为待检测的工件提供漫反射光源;CCD工业相机用于拍摄处于检测工Among them: the coaxial light source is used to provide diffuse reflection light source for the workpiece to be detected; the CCD industrial camera is used to photograph the

位的工件的图像;剔除机构用于从生产线上剔除通过检测存在缺陷的工件;The image of the workpiece; the removal mechanism is used to remove the defective workpiece from the production line;

工控机中具有基于图像处理的缺陷检测模块;The industrial computer has a defect detection module based on image processing;

基于图像处理的缺陷检测模块按照以下步骤实施缺陷检测:The defect detection module based on image processing implements defect detection according to the following steps:

步骤1:工件图像获取及预处理;Step 1: Work piece image acquisition and preprocessing;

步骤2:图像分割与工件位姿矫正;Step 2: Image segmentation and workpiece pose correction;

步骤3:检测以下外观缺陷:缺口、粘料、开裂、压痕、针眼、划痕和起泡。Step 3: Inspect for the following cosmetic defects: nicks, sticks, cracks, indentations, pinholes, scratches, and blisters.

步骤1中,通过同轴光源照明,利用CCD工业相机和图像采集卡采集工件图像f(x,y),工件图像为灰度图像,然后把工件图像送入工控机进行预处理,预处理为对采集到的工件图像进行中值滤波处理,去除图像拍摄和传输过程中可能引起的噪声,提高图像信噪比。In step 1, the workpiece image f(x, y) is collected by using the CCD industrial camera and the image acquisition card through the coaxial light source, and the workpiece image is a grayscale image, and then the workpiece image is sent to the industrial computer for preprocessing, and the preprocessing is Perform median filter processing on the collected workpiece images to remove the noise that may be caused during image capture and transmission, and improve the image signal-to-noise ratio.

步骤2中:In step 2:

(1)图像分割:(1) Image segmentation:

基于直方图法对预处理后的图像进行图像分割,工件图像的灰度直方图会显示两个波峰:一个是作为前景的工件,一个是背景,取波谷灰度值为分割阈值以有效分割前景和背景:Segment the preprocessed image based on the histogram method. The gray histogram of the workpiece image will show two peaks: one is the workpiece as the foreground, and the other is the background. The gray value of the valley is taken as the segmentation threshold to effectively segment the foreground. and background:

式中,F(x,y)为分割出的工件图像,Thf为分割阈值In the formula, F(x,y) is the segmented workpiece image, and Th f is the segmentation threshold

(2)图像矫正为通过仿射变换实现图像中工件的平移和旋转角度矫正。仿射变换为现有成熟技术。(2) Image correction is to realize the translation and rotation angle correction of the workpiece in the image through affine transformation. Affine transformation is an existing mature technology.

对矫正后的图像进行数学形态学处理;处理过程为,通过结构元素B对图像施加形态学开运算去除工件边缘毛刺,平滑工件边缘,有:Perform mathematical morphological processing on the corrected image; the processing process is to apply a morphological opening operation to the image through the structural element B to remove the burr on the edge of the workpiece and smooth the edge of the workpiece, as follows:

式中,°为开运算运算符,为腐蚀运算符,⊕为膨胀运算符,B为结构元素,大小为3,In the formula, ° is the opening operator, is the erosion operator, ⊕ is the expansion operator, B is the structural element, the size is 3,

元素全为1,为圆盘结构。The elements are all 1, which is a disc structure.

步骤3中:In step 3:

标定工件边缘为缺口检测区域,记为RegqkMark the edge of the workpiece as the gap detection area, denoted as Reg qk ;

标定整个工件表面区域为粘料、开裂、压痕、针眼、划痕和起泡缺陷检测区域;其中粘料和针眼检测区域记为Regnl和Regzy;划痕和开裂检测区域记为Reghh和Regkl;压痕检测区域记为Regyh;起泡检测区域记为RegqpCalibrate the entire surface area of the workpiece as the detection area of sticky material, cracking, indentation, pinhole, scratch and blister defect; where the sticky material and pinhole detection area is marked as Reg nl and Reg zy ; the scratch and cracking detection area is marked as Reg hh And Reg kl ; Indentation detection area is recorded as Reg yh ; Bubble detection area is recorded as Reg qp ;

缺陷的面积判断阈值:Defect area judgment threshold:

式中,Th为缺陷的面积判断阈值;φ为缺陷容忍度;W和H为图像中工件的宽和高,以像素为单位;M和N为工件的实际长和宽,以毫米为单位;局部动态分割阈值确定方法:In the formula, Th is the judgment threshold of the defect area; φ is the defect tolerance; W and H are the width and height of the workpiece in the image, in pixels; M and N are the actual length and width of the workpiece, in millimeters; Local dynamic segmentation threshold determination method:

首先采用(2D+1)×(2D+1)的滤波掩码进行平滑处理,式中D为被提取目标的直径;然后计算平滑后的图像灰度值的均值Mean(x,y)和标准差σ(x,y);当被提取目标显示为亮像素时,选取T=Mean(x,y)+γ·σ(x,y)为分割阈值;当被提取目标显示为暗像素时,选取T=Mean(x,y)-γ·σ(x,y)为分割阈值,式中γ为标准差强度。Firstly, the filter mask of (2D+1)×(2D+1) is used for smoothing, where D is the diameter of the extracted target; then the mean (x, y) and standard value of the smoothed image gray value are calculated. difference σ(x,y); when the extracted target appears as a bright pixel, select T=Mean(x,y)+γ·σ(x,y) as the segmentation threshold; when the extracted target appears as a dark pixel, Select T=Mean(x,y)-γ·σ(x,y) as the segmentation threshold, where γ is the standard deviation intensity.

①缺口检测:① Gap detection:

1)采用图像分割阈值Tqk在区域Regqk中分割缺口的Blob候选块,通过八连通区域标识出Blob连通域,记为Blqk1) Use the image segmentation threshold T qk to segment the Blob candidate block of the gap in the region Reg qk , and identify the Blob connected domain through the eight connected regions, which is denoted as B1 qk ;

分割阈值Tqk的确定:采用(2Dqk+1)×(2Dqk+1)的滤波掩码进行平滑处理,式中Dqk为缺口缺陷的直径;计算平滑后的图像灰度值的均值Meanqk(x,y)和标准差σqk(x,y);由于缺口缺陷显示为暗像素,则选择Tqk=Meanqk(x,y)-γqk·σqk(x,y)为分割阈值,γqk为缺口缺陷的标准差权重。权重的取值范围是[0,1],需根据先验知识确定具体值。Determination of the segmentation threshold T qk : use (2D qk +1) × (2D qk +1) filter mask for smoothing, where D qk is the diameter of the notch defect; calculate the mean value Mean of the smoothed image gray value qk (x, y) and standard deviation σ qk (x, y); since gap defects appear as dark pixels, T qk = Mean qk (x, y)-γ qk σ qk (x, y) is selected as the segmentation Threshold, γ qk is the standard deviation weight of the gap defect. The value range of the weight is [0,1], and the specific value needs to be determined according to prior knowledge.

2)利用像素计数法提取Blqk连通域的像素面积特征Areaqk;根据下式判断Blqk是否为缺口缺陷:2) Utilize the pixel counting method to extract the pixel area feature Area qk of the Bl qk connected domain; judge whether Bl qk is a gap defect according to the following formula:

式中,缺陷面积判断阈值Thqk由公式3确定,其中φ的取值范围是[0.0120,0.0130],YES和NO分别表示存在缺口缺陷和不存在缺口缺陷;In the formula, the defect area judgment threshold Th qk is determined by Equation 3, where the value range of φ is [0.0120,0.0130], YES and NO indicate the presence or absence of notch defects, respectively;

②粘料和针眼检测:② Sticky material and needle hole detection:

1)采用分割阈值Tzz在区域Regnl和Regzy中分割粘料和针眼的Blob候选块,通过八连通区域标识出Blob连通域,记为Blnl和Blzy1) Use the segmentation threshold T zz to segment the Blob candidate blocks of sticky material and needle holes in the regions Reg nl and Reg zy , and identify the Blob connected domains through eight connected regions, which are denoted as Bl nl and Bl zy ;

分割阈值Tzz的确定:Determination of the segmentation threshold T zz :

Tzz=Mean′zz(x,y)-δzz·V′zz(x,y)T zz = Mean' zz (x,y)-δ zz V' zz (x,y)

式中Mean′zz(x,y)和V′zz(x,y)为检测区域像素灰度值的均值和方差,δzz为粘料和针眼缺陷的方差权重;In the formula, Mean' zz (x, y) and V' zz (x, y) are the mean and variance of pixel gray values in the detection area, and δ zz is the variance weight of sticky material and pinhole defects;

图像中低于分割阈值的像素区域为缺陷候选块;The pixel area below the segmentation threshold in the image is a defect candidate block;

2)利用像素计数法提取Blnl连通域的像素面积特征Areanl和圆度特征Blzy连通域的像素面积特征Areazy和圆度特征根据下式5、6分别判断Blnl是否为粘料缺陷以及Blzy是否为针眼缺陷:2) Using the pixel counting method to extract the pixel area feature Area nl and roundness feature of the Bl nl connected domain Pixel Area Feature Area zy and Roundness Feature of Bl zy Connected Domain According to the following formulas 5 and 6, judge whether Bl nl is a sticky material defect and whether Bl zy is a pinhole defect:

式中,缺陷面积判断阈值Thnl1和Thzy1由式3确定,其中φ的取值范围分别是[0.0020,0.0021]和[0.0024,0.0025];缺陷圆度判断阈值Thnl2和Thzy2的取值范围分别是[0.5,1]和[0.85,1];∩表示逻辑“与”运算;YES和NO;In the formula, the defect area judgment thresholds Th nl1 and Th zy1 are determined by formula 3, where the value ranges of φ are [0.0020,0.0021] and [0.0024,0.0025] respectively; the defect roundness judgment thresholds Th nl2 and Th zy2 are The ranges are [0.5,1] and [0.85,1] respectively; ∩ means logic "AND"operation; YES and NO;

像素面积特征即区域内的像素个数,圆度特征描述即目标区域的面积与外接圆面积的比值,形状越接近圆,比值越接近1,圆度特征的取值范围是:计算公式为其中r为被提取目标的外接圆半径,此处的被提取目标指粘料和针眼缺陷;The pixel area feature is the number of pixels in the area, and the roundness feature description is the ratio of the area of the target area to the area of the circumscribed circle. The closer the shape is to a circle, the closer the ratio is to 1. The value range of the roundness feature is: The calculation formula is Where r is the radius of the circumscribed circle of the extracted target, where the extracted target refers to sticky material and pinhole defects;

③划痕和开裂检测:③Scratch and crack detection:

1)采用局部图像方差强度算法求取分割阈值Thk,在区域Reghh和Regkl中分割划痕和开裂的Blob块候选,通过八连通区域标识出Blob连通域,记为Blhh和Blkl1) Use the local image variance strength algorithm to obtain the segmentation threshold T hk , segment the scratched and cracked blob block candidates in the regions Reg hh and Reg kl , and identify the Blob connected domain through eight connected regions, which are recorded as Bl hh and Bl kl ;

局部图像方差强度是图像局部阈值概念的拓展延伸,由于被检测工件受生产工艺影响会有背景不均匀情况,因此很难找到固定阈值将目标缺陷与背景完整分割。故提出局部阈值检测方法,即局部灰度特征与整体相结合的方法;结合局部方差与方差的特性,先采用(2Dhk+1)×(2Dhk+1)的滤波掩码进行平滑处理,式中Dhk为划痕和开裂缺陷的长度;再计算平滑后图像灰度值的标准差σhk(x,y)和方差Vhk(x,y);分割阈值按下式的确定:Local image variance intensity is an extension of the concept of image local threshold. Since the detected workpiece will have an uneven background due to the influence of the production process, it is difficult to find a fixed threshold to completely segment the target defect from the background. Therefore, a local threshold detection method is proposed, that is, a method of combining local gray features with the whole; combined with the characteristics of local variance and variance, first use (2D hk +1) × (2D hk +1) filter mask for smoothing, In the formula, D hk is the length of scratches and cracking defects; then calculate the standard deviation σ hk (x, y) and variance V hk (x, y) of the image gray value after smoothing; the segmentation threshold is determined by the following formula:

TT hh kk == &sigma;&sigma; hh kk (( xx ,, ythe y )) ++ VV hh kk (( xx ,, ythe y )) ,, &sigma;&sigma; hh kk (( xx ,, ythe y )) >> &sigma;&sigma; &prime;&prime; hh kk (( xx ,, ythe y )) &sigma;&sigma; hh kk (( xx ,, ythe y )) -- VV hh kk (( xx ,, ythe y )) ,, &sigma;&sigma; hh kk (( xx ,, ythe y )) << &sigma;&sigma; &prime;&prime; hh kk (( xx ,, ythe y )) ;;

其中σ′hk(x,y)和V′hk(x,y)表示平滑前的整幅图像的标准差和方差;Where σ′ hk (x, y) and V′ hk (x, y) represent the standard deviation and variance of the entire image before smoothing;

2)利用像素计数法提取Blhh连通域的像素面积特征Areahh和内部最长直径特征Diameterhh以及Blkl连通域的像素面积特征Areakl和内部最长直径特征Diameterkl;根据式7、8分别判断Blhh是否为划痕缺陷,以及Blkl是否为开裂缺陷:2) Utilize the pixel counting method to extract the pixel area feature Area hh and the inner longest diameter feature Diameter hh of the Bl hh connected domain and the pixel area feature Area kl and the inner longest diameter feature Diameter kl of the Bl kl connected domain; according to formula 7,8 Determine whether Bl hh is a scratch defect, and whether Bl kl is a crack defect:

式中,缺陷面积判断阈值Thhh1和Thkl1由式3确定,其中φ的取值范围分别是[0.0110,0.0120]和[0.0048,0.0049];缺陷最长直径判断阈值Thhh2和Thkl2的取值范围由经验值确定;∩表示逻辑“与”运算;In the formula, the defect area judgment thresholds Th hh1 and Th kl1 are determined by formula 3, where the value ranges of φ are [0.0110,0.0120] and [0.0048,0.0049] respectively; the longest defect diameter judgment thresholds Th hh2 and Th kl2 The value range is determined by the empirical value; ∩ represents the logic "AND"operation;

内部最长直径即区域边界上最远的两个像素点的距离,距离和面积都是以像素为单位,即该距离内或该区域内包含的像素个数;The longest internal diameter is the distance between the two furthest pixels on the boundary of the area. The distance and area are both in pixels, that is, the number of pixels contained within the distance or within the area;

④压痕检测:④ Indentation detection:

1)通过拉普拉斯高斯变换算法和局部动态阈值Tyh分割压痕的Blob候选块;1) Segment the indented Blob candidate blocks through the Laplacian Gaussian transform algorithm and the local dynamic threshold T yh ;

Tyh的确定:采用(2Dyh+1)×(2Dyh+1)的滤波掩码进行平滑处理,式中Dyh为压痕缺陷的直径;计算平滑后图像灰度值的均值Meanyh(x,y)和标准差σyh(x,y);由于压痕缺陷在拉普拉斯高斯变换后的图像中显示为亮像素,故选择Tyh=Meanyh(x,y)+γyh·σyh(x,y)为分割阈值,γyh为压痕缺陷的标准差权重;通过八连通区域标识出Blob连通域,记为BlyhDetermination of T yh : use (2D yh +1) × (2D yh +1) filter mask for smoothing, where D yh is the diameter of the indentation defect; calculate the average Mean yh ( x, y) and standard deviation σ yh (x, y); since indentation defects appear as bright pixels in the image after Laplacian-Gaussian transformation, T yh = Mean yh (x, y)+γ yh σ yh (x, y) is the segmentation threshold, and γ yh is the standard deviation weight of indentation defects; Blob connected domains are identified through eight connected areas, denoted as B yh ;

权重的取值范围是[0,1],需根据先验知识确定具体值;The value range of the weight is [0,1], and the specific value needs to be determined according to prior knowledge;

2)利用像素计数法提取Blyh连通域的像素面积特征Areayh和矩形度特征Rectanyh,矩形度是描述被提取区域对其外接矩形的充满程度,计算公式为其中Sm为被提取区域外接矩形区域的面积;根据式9判断Blyh是否为压痕缺陷:2) Use the pixel counting method to extract the pixel area feature Area yh and the rectangularity feature Rectan yh of the Bl yh connected domain. The rectangularity describes the fullness of the extracted area to its circumscribed rectangle. The calculation formula is Among them, S m is the area of the rectangular area circumscribing the extracted area; judge whether B yh is an indentation defect according to formula 9:

式中,面积判断阈值Thyh1由式3确定,其中φ的取值范围是[0.0160,0.0170];矩形度判断阈值Thyh2的取值范围是[0.7,1];∩表示逻辑“与”运算;In the formula, the area judgment threshold Th yh1 is determined by formula 3, where the value range of φ is [0.0160,0.0170]; the value range of the rectangularity judgment threshold Th yh2 is [0.7,1]; ∩ represents the logic "AND"operation;

⑤起泡检测:⑤ Blister detection:

1)通过快速傅立叶变换将图像函数从空间域转变到频率域,采用低通滤波器平滑图像,再通过傅立叶逆变换将图像从频率域变换到空间域;根据图像灰度直方图,选取波谷灰度值为分割阈值分割目标分割起泡的Blob候选块,通过八连通区域标识出Blob连通域,记为Blqp1) Transform the image function from the spatial domain to the frequency domain through fast Fourier transform, use a low-pass filter to smooth the image, and then transform the image from the frequency domain to the spatial domain through inverse Fourier transform; according to the gray histogram of the image, select the valley gray The degree value is the blob candidate block of the segmentation threshold segmentation target segmentation foam, and the blob connected domain is identified by eight connected areas, which is denoted as Bl qp ;

图像的直方图只有一个波谷,因为经过傅立叶变换和平滑滤波处理后,起泡部位较整体工件背景偏亮,所以直方图显示有两个波峰和一个波谷,而且两个波峰中一个属于工件背景,另一个属于起泡缺陷,所以采用波谷灰度值可将背景和起泡缺陷分割;The histogram of the image has only one trough, because after Fourier transform and smoothing filter processing, the bubbling part is brighter than the overall workpiece background, so the histogram shows two peaks and one trough, and one of the two peaks belongs to the background of the workpiece. The other belongs to the bubble defect, so the background and the bubble defect can be separated by using the trough gray value;

2)利用像素计数法提取Blqp连通域的像素面积特征Areaqp和圆度特征根据式10判断Blqp是否为起泡缺陷:2) Using the pixel counting method to extract the pixel area feature Area qp and roundness feature of the Bl qp connected domain Judging whether Bl qp is a bubble defect according to formula 10:

式中,面积判断阈值Thqp1由式3确定,其中φ的取值范围是[0.0123,0.0124];圆度判断阈值Thqp2的取值范围是[0.5,1];∩表示逻辑“与”运算。In the formula, the area judgment threshold Th qp1 is determined by formula 3, where the value range of φ is [0.0123,0.0124]; the value range of the roundness judgment threshold Th qp2 is [0.5,1]; ∩ represents the logic "AND" operation .

图像预处理还包括:Image preprocessing also includes:

A.工件定位:A. Workpiece positioning:

工件模板图像为Temp(x,y),方向以X轴正方向为0度基准。通过环形漫反射光源照明,利用CCD工业相机和图像采集卡采集输送带上工件图像,然后根据基于灰度值的模板匹配技术搜索与已知模板Temp(x,y)相匹配的目标区域,计算其重心坐标(xc,yc)和偏转角度θ。其中模板匹配采用归一化互相关算法(NCC),并利用图像金字塔实现多级匹配,提高匹配精度和速度。NCC算法公式如下式所示:The workpiece template image is Temp(x,y), and the direction is based on the positive direction of the X axis at 0 degrees. Illuminated by the circular diffuse reflection light source, using the CCD industrial camera and the image acquisition card to collect the image of the workpiece on the conveyor belt, and then searching for the target area matching the known template Temp(x,y) according to the template matching technology based on the gray value, and calculating Its center of gravity coordinates (x c , y c ) and deflection angle θ. The template matching adopts the normalized cross-correlation algorithm (NCC), and uses the image pyramid to achieve multi-level matching, which improves the matching accuracy and speed. The NCC algorithm formula is as follows:

nno cc cc (( aa ,, bb )) == 11 nno &Sigma;&Sigma; xx == 11 WW TT &Sigma;&Sigma; ythe y == 11 Hh TT TT ee mm pp (( xx ,, ythe y )) -- mm TT sthe s TT 22 .. ff (( aa ++ xx ,, bb ++ ythe y )) -- mm ff (( aa ,, bb )) sthe s ff 22 (( aa ,, bb ))

式中,n是模板感兴趣区域中像素点的数量;Temp(x,y)是模板图像,模板大小为WT×HT。模板图像即为分割出的,规定了方向以X轴正方向为0度基准的目标工件图像;感兴趣区域即目标工件区域,因为工件区域与背景区域对比度非常明显,所以采用全局灰度阈值分割法即可提取目标工件,即感兴趣区域。mT是模板的平均灰度值,是模板所有像素灰度值的方差,mf(a,b)和是平移到图像当前位置的模板感兴趣区域中图像所有像素点的平均灰度值和方差,ncc(a,b)表示匹配相似度,取值范围是-1≤ncc(a,b)≤1。x,y表示图像中像素坐标。a,b是图像像素坐标平移量。In the formula, n is the number of pixels in the region of interest of the template; Temp(x, y) is the template image, and the size of the template is W T × H T . The template image is the target workpiece image that is segmented, and the direction is specified based on the positive direction of the X-axis at 0 degrees; the area of interest is the target workpiece area, because the contrast between the workpiece area and the background area is very obvious, so the global grayscale threshold is used for segmentation The target artifact, that is, the region of interest, can be extracted using this method. m T is the average gray value of the template, is the variance of the gray value of all pixels in the template, m f (a,b) and is the average gray value and variance of all pixels in the image in the region of interest of the template translated to the current position of the image, ncc(a,b) represents the matching similarity, and the value range is -1≤ncc(a,b)≤1 . x, y represent pixel coordinates in the image. a, b are the image pixel coordinate translation amount.

匹配是为了找到视野中的目标工件并快速、准确地计算出工件位姿信息。是后续机器人和视觉处理的前提。Matching is to find the target workpiece in the field of view and quickly and accurately calculate the pose information of the workpiece. It is a prerequisite for subsequent robotics and vision processing.

B.机器人视觉引导:B. Robot vision guidance:

视觉引导系统主要是对输送带上目标工件的精确定位。对于同一种工件,机器人只需要一次示教并把此示教位置记为零位,生产中相机拍摄输送带上的目标工件并通过计算图像上工件中心特征点的坐标,即位姿信息(xc,yc)和θ。视觉系统计算出当前目标工件的坐标与零位在X,Y,RZ方向的偏差量,机器人根据偏差量规划抓取路径和动作、完成目标工件抓取任务。其中RZ方向为工件在平面上的旋转方向。The vision guidance system is mainly for the precise positioning of the target workpiece on the conveyor belt. For the same workpiece, the robot only needs to teach once and record the teaching position as the zero position. During production, the camera captures the target workpiece on the conveyor belt and calculates the coordinates of the central feature point of the workpiece on the image, that is, the pose information (x c ,y c ) and θ. The vision system calculates the deviation between the coordinates of the current target workpiece and the zero position in the X, Y, R Z directions, and the robot plans the grasping path and action according to the deviation, and completes the task of grasping the target workpiece. The R Z direction is the rotation direction of the workpiece on the plane.

总体流程说明:待检工件首先进入上表面检测工位,光电传感器触发相机拍照并采集一帧图像,通过外观检测算法进行缺陷检测,并将检测结果通过视觉检测系统传送给下位机。不合格品由剔除装置剔除,合格品将进入机器人检测工位。利用视觉引导机器人准确拾取输送带上目标工件并放置检测位置,由机器人顺序触发多相机拍照进行工件前后面、左右侧面和底面外观缺陷检测。工业控制计算机综合分析多相机处理结果并将其通过视觉检测系统传送给下位机,最终实现工件的智能分拣。Description of the overall process: The workpiece to be inspected first enters the upper surface inspection station, the photoelectric sensor triggers the camera to take a picture and collects a frame of image, detects defects through the appearance inspection algorithm, and transmits the inspection results to the lower computer through the visual inspection system. Unqualified products are removed by the rejecting device, and qualified products will enter the robot inspection station. Using vision to guide the robot to accurately pick up the target workpiece on the conveyor belt and place it in the detection position, the robot sequentially triggers multiple cameras to take pictures to detect the appearance defects of the front and rear, left and right sides and bottom surface of the workpiece. The industrial control computer comprehensively analyzes the multi-camera processing results and transmits them to the lower computer through the visual inspection system, and finally realizes the intelligent sorting of workpieces.

Claims (5)

1.一种基于图像处理的工件外观缺陷的视觉检测系统,其特征在于,包括工控机、同轴光源、CCD工业相机、图像采集卡和剔除机构;1. A visual detection system based on image processing workpiece appearance defect, is characterized in that, comprises industrial computer, coaxial light source, CCD industrial camera, image acquisition card and rejecting mechanism; 同轴光源和剔除机构均与工控机相连;Both the coaxial light source and the rejecting mechanism are connected with the industrial computer; CCD工业相机通过图像采集卡与工控机相连;The CCD industrial camera is connected to the industrial computer through the image acquisition card; 其中:同轴光源用于为待检测的工件提供漫反射光源;CCD工业相机用于拍摄处于检测工位的工件的图像;剔除机构用于从生产线上剔除通过检测存在缺陷的工件;Among them: the coaxial light source is used to provide diffuse reflection light source for the workpiece to be inspected; the CCD industrial camera is used to capture the image of the workpiece at the inspection station; the reject mechanism is used to remove the defective workpiece from the production line after passing the inspection; 工控机中具有基于图像处理的缺陷检测模块;The industrial computer has a defect detection module based on image processing; 基于图像处理的缺陷检测模块按照以下步骤实施缺陷检测:The defect detection module based on image processing implements defect detection according to the following steps: 步骤1:工件图像获取及预处理;Step 1: Work piece image acquisition and preprocessing; 步骤2:图像分割与工件位姿矫正;Step 2: Image segmentation and workpiece pose correction; 步骤3:检测以下外观缺陷:缺口、粘料、开裂、压痕、针眼、划痕和起泡。Step 3: Inspect for the following cosmetic defects: nicks, sticks, cracks, indentations, pinholes, scratches, and blisters. 2.根据权利要求1所述的基于图像处理的工件外观缺陷的视觉检测系统,其特征在于,步骤1中,通过同轴光源照明,利用CCD工业相机和图像采集卡采集工件图像f(x,y),工件图像为灰度图像,然后把工件图像送入工控机进行预处理,预处理为对采集到的工件图像进行中值滤波处理。2. the visual detection system of the workpiece appearance defect based on image processing according to claim 1, is characterized in that, in step 1, by coaxial light source illumination, utilizes CCD industrial camera and image acquisition card to gather workpiece image f(x, y), the workpiece image is a grayscale image, and then the workpiece image is sent to the industrial computer for preprocessing, and the preprocessing is to perform median filtering on the collected workpiece image. 3.根据权利要求2所述的基于图像处理的工件外观缺陷的视觉检测系统,其特征在于,步骤2中:3. the visual detection system of the workpiece appearance defect based on image processing according to claim 2, is characterized in that, in step 2: (1)图像分割:(1) Image segmentation: 基于直方图法对预处理后的图像进行图像分割,工件图像的灰度直方图会显示两个波峰:一个是作为前景的工件,一个是背景,取波谷灰度值为分割阈值以有效分割前景和背景:Segment the preprocessed image based on the histogram method. The gray histogram of the workpiece image will show two peaks: one is the workpiece as the foreground, and the other is the background. The gray value of the valley is taken as the segmentation threshold to effectively segment the foreground. and background: 式中,F(x,y)为分割出的工件图像,Thf为分割阈值In the formula, F(x,y) is the segmented workpiece image, and Th f is the segmentation threshold (2)图像矫正为通过仿射变换实现图像中工件的平移和旋转角度矫正。(2) Image correction is to realize the translation and rotation angle correction of the workpiece in the image through affine transformation. 4.根据权利要求3所述的基于图像处理的工件外观缺陷的视觉检测系统,其特征在于,对矫正后的图像进行数学形态学处理;处理过程为,通过结构元素B对图像施加形态学开运算去除工件边缘毛刺,平滑工件边缘,有:4. the visual detection system of the workpiece appearance defect based on image processing according to claim 3, is characterized in that, carries out mathematical morphology processing to the image after correction; The calculation removes the burr on the edge of the workpiece and smoothes the edge of the workpiece, including: 式中,为开运算运算符,为腐蚀运算符,为膨胀运算符,B为结构元素,大小为3,In the formula, is the opening operator, is the corrosion operator, is the inflation operator, B is the structuring element with a size of 3, 元素全为1,为圆盘结构。The elements are all 1, which is a disc structure. 5.根据权利要求3或4所述的基于图像处理的工件外观缺陷的视觉检测系统,其特征在于,步骤3中:5. The visual detection system of the workpiece appearance defect based on image processing according to claim 3 or 4, characterized in that, in step 3: 标定工件边缘为缺口检测区域,记为RegqkMark the edge of the workpiece as the gap detection area, denoted as Reg qk ; 标定整个工件表面区域为粘料、开裂、压痕、针眼、划痕和起泡缺陷检测区域;其中粘料和针眼检测区域记为Regnl和Regzy;划痕和开裂检测区域记为Reghh和Regkl;压痕检测区域记为Regyh;起泡检测区域记为RegqpCalibrate the entire surface area of the workpiece as the detection area of sticky material, cracking, indentation, pinhole, scratch and blister defect; where the sticky material and pinhole detection area is marked as Reg nl and Reg zy ; the scratch and cracking detection area is marked as Reg hh And Reg kl ; Indentation detection area is recorded as Reg yh ; Bubble detection area is recorded as Reg qp ; 缺陷的面积判断阈值:Defect area judgment threshold: 式中,Th为缺陷的面积判断阈值;φ为缺陷容忍度;W和H为图像中工件的宽和高,In the formula, Th is the judgment threshold of the defect area; φ is the defect tolerance; W and H are the width and height of the workpiece in the image, 以像素为单位;M和N为工件的实际长和宽,以毫米为单位;Take pixels as the unit; M and N are the actual length and width of the workpiece, in millimeters; ①缺口检测:① Gap detection: 1)采用图像分割阈值Tqk在区域Regqk中分割缺口的Blob候选块,通过八连通区域标识出Blob连通域,记为Blqk1) Use the image segmentation threshold T qk to segment the Blob candidate block of the gap in the region Reg qk , and identify the Blob connected domain through the eight connected regions, which is denoted as B1 qk ; 分割阈值Tqk的确定:采用(2Dqk+1)×(2Dqk+1)的滤波掩码进行平滑处理,式中Dqk为缺口缺陷的直径;计算平滑后的图像灰度值的均值Meanqk(x,y)和标准差σqk(x,y);由于缺口缺陷显示为暗像素,则选择Tqk=Meanqk(x,y)-γqk·σqk(x,y)为分割阈值,γqk为缺口缺陷的标准差权重。Determination of the segmentation threshold T qk : use (2D qk +1) × (2D qk +1) filter mask for smoothing, where D qk is the diameter of the notch defect; calculate the mean value Mean of the smoothed image gray value qk (x, y) and standard deviation σ qk (x, y); since gap defects appear as dark pixels, T qk = Mean qk (x, y)-γ qk σ qk (x, y) is selected as the segmentation Threshold, γ qk is the standard deviation weight of the gap defect. 2)利用像素计数法提取Blqk连通域的像素面积特征Areaqk;根据下式判断Blqk是否为缺口缺陷:2) Utilize the pixel counting method to extract the pixel area feature Area qk of the Bl qk connected domain; judge whether Bl qk is a gap defect according to the following formula: 式中,缺陷面积判断阈值Thqk由公式3确定,其中φ的取值范围是[0.0120,0.0130],YES和NO分别表示存在缺口缺陷和不存在缺口缺陷;In the formula, the defect area judgment threshold Th qk is determined by Equation 3, where the value range of φ is [0.0120,0.0130], YES and NO indicate the presence or absence of notch defects, respectively; ②粘料和针眼检测:② Sticky material and needle hole detection: 1)采用分割阈值Tzz在区域Regnl和Regzy中分割粘料和针眼的Blob候选块,通过八连通区域标识出Blob连通域,记为Blnl和Blzy1) Use the segmentation threshold T zz to segment the Blob candidate blocks of sticky material and needle holes in the regions Reg nl and Reg zy , and identify the Blob connected domains through eight connected regions, which are denoted as Bl nl and Bl zy ; 分割阈值Tzz的确定:Determination of the segmentation threshold T zz : Tzz=Mean′zz(x,y)-δzz·V′zz(x,y)T zz = Mean' zz (x,y)-δ zz V' zz (x,y) 式中Mean′zz(x,y)和V′zz(x,y)为检测区域像素灰度值的均值和方差,δzz为粘料和针眼缺陷的方差权重;In the formula, Mean' zz (x, y) and V' zz (x, y) are the mean and variance of pixel gray values in the detection area, and δ zz is the variance weight of sticky material and pinhole defects; 图像中低于分割阈值的像素区域为缺陷候选块;The pixel area below the segmentation threshold in the image is a defect candidate block; 2)利用像素计数法提取Blnl连通域的像素面积特征Areanl和圆度特征Blzy连通域的像素面积特征Areazy和圆度特征根据下式5、6分别判断Blnl是否为粘料缺陷以及Blzy是否为针眼缺陷:2) Using the pixel counting method to extract the pixel area feature Area nl and roundness feature of the Bl nl connected domain Pixel Area Feature Area zy and Roundness Feature of Bl zy Connected Domain According to the following formulas 5 and 6, judge whether Bl nl is a sticky material defect and whether Bl zy is a pinhole defect: 式中,缺陷面积判断阈值Thnl1和Thzy1由式3确定,其中φ的取值范围分别是[0.0020,0.0021]和[0.0024,0.0025];缺陷圆度判断阈值Thnl2和Thzy2的取值范围分别是[0.5,1]和[0.85,1];∩表示逻辑“与”运算;YES和NO分别表示是和否;In the formula, the defect area judgment thresholds Th nl1 and Th zy1 are determined by formula 3, where the value ranges of φ are [0.0020,0.0021] and [0.0024,0.0025] respectively; the defect roundness judgment thresholds Th nl2 and Th zy2 are The ranges are [0.5,1] and [0.85,1] respectively; ∩ represents logical "AND"operation; YES and NO represent yes and no respectively; 像素面积特征即区域内的像素个数,圆度特征描述即目标区域的面积与外接圆面积的比值,形状越接近圆,比值越接近1,圆度特征的取值范围是:计算公式为其中r为被提取目标的外接圆半径,此处的被提取目标指粘料和针眼缺陷;The pixel area feature is the number of pixels in the area, and the roundness feature description is the ratio of the area of the target area to the area of the circumscribed circle. The closer the shape is to a circle, the closer the ratio is to 1. The value range of the roundness feature is: The calculation formula is Where r is the radius of the circumscribed circle of the extracted target, where the extracted target refers to sticky material and pinhole defects; ③划痕和开裂检测:③Scratch and crack detection: 1)采用局部图像方差强度算法求取分割阈值Thk,在区域Reghh和Regkl中分割划痕和开裂的Blob块候选,通过八连通区域标识出Blob连通域,记为Blhh和Blkl1) Use the local image variance strength algorithm to obtain the segmentation threshold T hk , segment the scratched and cracked blob block candidates in the regions Reg hh and Reg kl , and identify the Blob connected domain through eight connected regions, which are recorded as Bl hh and Bl kl ; 局部图像方差强度是图像局部阈值概念的拓展延伸,由于被检测工件受生产工艺影响会有背景不均匀情况,因此很难找到固定阈值将目标缺陷与背景完整分割。故提出局部阈值检测方法,即局部灰度特征与整体相结合的方法;结合局部方差与方差的特性,先采用(2Dhk+1)×(2Dhk+1)的滤波掩码进行平滑处理,式中Dhk为划痕和开裂缺陷的长度;再计算平滑后图像灰度值的标准差σhk(x,y)和方差Vhk(x,y);分割阈值按下式的确定:Local image variance intensity is an extension of the concept of image local threshold. Since the detected workpiece will have an uneven background due to the influence of the production process, it is difficult to find a fixed threshold to completely segment the target defect from the background. Therefore, a local threshold detection method is proposed, that is, a method of combining local gray features with the whole; combined with the characteristics of local variance and variance, first use (2D hk +1) × (2D hk +1) filter mask for smoothing, In the formula, D hk is the length of scratches and cracking defects; then calculate the standard deviation σ hk (x, y) and variance V hk (x, y) of the image gray value after smoothing; the segmentation threshold is determined by the following formula: TT hh kk == &sigma;&sigma; hh kk (( xx ,, ythe y )) ++ VV hh kk (( xx ,, ythe y )) ,, &sigma;&sigma; hh kk (( xx ,, ythe y )) >> &sigma;&sigma; &prime;&prime; hh kk (( xx ,, ythe y )) &sigma;&sigma; hh kk (( xx ,, ythe y )) -- VV hh kk (( xx ,, ythe y )) ,, &sigma;&sigma; hh kk (( xx ,, ythe y )) << &sigma;&sigma; &prime;&prime; hh kk (( xx ,, ythe y )) ;; 其中σ′hk(x,y)和V′hk(x,y)表示平滑前的整幅图像的标准差和方差;Where σ′ hk (x, y) and V′ hk (x, y) represent the standard deviation and variance of the entire image before smoothing; 2)利用像素计数法提取Blhh连通域的像素面积特征Areahh和内部最长直径特征Diameterhh以及Blkl连通域的像素面积特征Areakl和内部最长直径特征Diameterkl;根据式7、8分别判断Blhh是否为划痕缺陷,以及Blkl是否为开裂缺陷:2) Utilize the pixel counting method to extract the pixel area feature Area hh and the inner longest diameter feature Diameter hh of the Bl hh connected domain and the pixel area feature Area kl and the inner longest diameter feature Diameter kl of the Bl kl connected domain; according to formula 7,8 Determine whether Bl hh is a scratch defect, and whether Bl kl is a crack defect: 式中,缺陷面积判断阈值Thhh1和Thkl1由式3确定,其中φ的取值范围分别是[0.0110,0.0120]和[0.0048,0.0049];缺陷最长直径判断阈值Thhh2和Thkl2的取值范围由经验值确定;∩表示逻辑“与”运算;In the formula, the defect area judgment thresholds Th hh1 and Th kl1 are determined by formula 3, where the value ranges of φ are [0.0110,0.0120] and [0.0048,0.0049] respectively; the longest defect diameter judgment thresholds Th hh2 and Th kl2 The value range is determined by the empirical value; ∩ represents the logic "AND"operation; 内部最长直径即区域边界上最远的两个像素点的距离,距离和面积都是以像素为单位,即该距离内或该区域内包含的像素个数;The longest internal diameter is the distance between the two furthest pixels on the boundary of the area. The distance and area are both in pixels, that is, the number of pixels contained within the distance or within the area; ④压痕检测:④ Indentation detection: 1)通过拉普拉斯高斯变换算法和局部动态阈值Tyh分割压痕的Blob候选块;1) Segment the indented Blob candidate blocks through the Laplacian Gaussian transform algorithm and the local dynamic threshold T yh ; Tyh的确定:采用(2Dyh+1)×(2Dyh+1)的滤波掩码进行平滑处理,式中Dyh为压痕缺陷的直径;计算平滑后图像灰度值的均值Meanyh(x,y)和标准差σyh(x,y);由于压痕缺陷在拉普拉斯高斯变换后的图像中显示为亮像素,故选择Tyh=Meanyh(x,y)+γyh·σyh(x,y)为分割阈值,γyh为压痕缺陷的标准差权重;通过八连通区域标识出Blob连通域,记为BlyhDetermination of T yh : use (2D yh +1) × (2D yh +1) filter mask for smoothing, where D yh is the diameter of the indentation defect; calculate the average Mean yh ( x, y) and standard deviation σ yh (x, y); since indentation defects appear as bright pixels in the image after Laplacian-Gaussian transformation, T yh = Mean yh (x, y)+γ yh σ yh (x, y) is the segmentation threshold, and γ yh is the standard deviation weight of indentation defects; Blob connected domains are identified through eight connected areas, denoted as B yh ; 2)利用像素计数法提取Blyh连通域的像素面积特征Areayh和矩形度特征Rectanyh,矩形度是描述被提取区域对其外接矩形的充满程度,计算公式为其中Sm为被提取区域外接矩形区域的面积;根据式9判断Blyh是否为压痕缺陷:2) Use the pixel counting method to extract the pixel area feature Area yh and the rectangularity feature Rectan yh of the Bl yh connected domain. The rectangularity describes the fullness of the extracted area to its circumscribed rectangle. The calculation formula is Among them, S m is the area of the rectangular area circumscribing the extracted area; judge whether B yh is an indentation defect according to formula 9: 式中,面积判断阈值Thyh1由式3确定,其中φ的取值范围是[0.0160,0.0170];矩形度判断阈值Thyh2的取值范围是[0.7,1];∩表示逻辑“与”运算;In the formula, the area judgment threshold Th yh1 is determined by formula 3, where the value range of φ is [0.0160,0.0170]; the value range of the rectangularity judgment threshold Th yh2 is [0.7,1]; ∩ represents the logic "AND"operation; ⑤起泡检测:⑤ Blister detection: 1)通过快速傅立叶变换将图像函数从空间域转变到频率域,采用低通滤波器平滑图像,再通过傅立叶逆变换将图像从频率域变换到空间域;根据图像灰度直方图,选取波谷灰度值为分割阈值分割目标分割起泡的Blob候选块,通过八连通区域标识出Blob连通域,记为Blqp1) Transform the image function from the spatial domain to the frequency domain through fast Fourier transform, use a low-pass filter to smooth the image, and then transform the image from the frequency domain to the spatial domain through inverse Fourier transform; according to the gray histogram of the image, select the valley gray The degree value is the blob candidate block of the segmentation threshold segmentation target segmentation foam, and the blob connected domain is identified by eight connected areas, which is denoted as Bl qp ; 2)利用像素计数法提取Blqp连通域的像素面积特征Areaqp和圆度特征根据式10判断Blqp是否为起泡缺陷:2) Using the pixel counting method to extract the pixel area feature Area qp and roundness feature of the Bl qp connected domain Judging whether Bl qp is a bubble defect according to formula 10: 式中,面积判断阈值Thqp1由式3确定,其中φ的取值范围是[0.0123,0.0124];圆度判断阈值Thqp2的取值范围是[0.5,1];∩表示逻辑“与”运算。In the formula, the area judgment threshold Th qp1 is determined by formula 3, where the value range of φ is [0.0123,0.0124]; the value range of the roundness judgment threshold Th qp2 is [0.5,1]; ∩ represents the logic "AND" operation .
CN201610581120.4A 2016-07-21 2016-07-21 A kind of vision detection system of the workpiece appearance defects based on image procossing Active CN106053479B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610581120.4A CN106053479B (en) 2016-07-21 2016-07-21 A kind of vision detection system of the workpiece appearance defects based on image procossing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610581120.4A CN106053479B (en) 2016-07-21 2016-07-21 A kind of vision detection system of the workpiece appearance defects based on image procossing

Publications (2)

Publication Number Publication Date
CN106053479A true CN106053479A (en) 2016-10-26
CN106053479B CN106053479B (en) 2018-09-11

Family

ID=57418399

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610581120.4A Active CN106053479B (en) 2016-07-21 2016-07-21 A kind of vision detection system of the workpiece appearance defects based on image procossing

Country Status (1)

Country Link
CN (1) CN106053479B (en)

Cited By (79)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106442556A (en) * 2016-11-16 2017-02-22 哈尔滨理工大学 Device and method for detecting surface defects of perforated plate workpiece
CN106770330A (en) * 2017-01-23 2017-05-31 无锡职业技术学院 A kind of body surface scratch detection device and its detection method
CN106934803A (en) * 2017-03-13 2017-07-07 珠海格力智能装备有限公司 Method and device for detecting surface defects of electronic device
CN107153069A (en) * 2017-06-30 2017-09-12 苏州优纳科技有限公司 A kind of device checked for FPC open defects
CN107248158A (en) * 2017-07-20 2017-10-13 广东工业大学 A kind of method and system of image procossing
CN107490583A (en) * 2017-09-12 2017-12-19 桂林电子科技大学 A kind of intermediate plate defect inspection method based on machine vision
CN107590837A (en) * 2017-09-06 2018-01-16 西安华航唯实机器人科技有限公司 A kind of vision positioning intelligent precise puts together machines people and its camera vision scaling method
CN107610104A (en) * 2017-08-31 2018-01-19 南通兴华达高实业有限公司 Crack detecting method at a kind of elevator compensation chain R based on machine vision
CN107633509A (en) * 2017-09-07 2018-01-26 南京航空航天大学 A kind of auto parts machinery trick detecting system and method
CN107886495A (en) * 2017-09-30 2018-04-06 北京得华机器人技术研究院有限公司 A kind of auto-parts defect identification method based on similarity mode
CN107945155A (en) * 2017-11-13 2018-04-20 佛山缔乐视觉科技有限公司 A kind of dentifrice tube shoulder defect inspection method based on Gabor filter
CN107993235A (en) * 2017-11-27 2018-05-04 中国计量大学 A kind of ripple back-fire relief disk wave height measuring method based on image processing techniques
CN108144873A (en) * 2017-12-29 2018-06-12 深圳市智能机器人研究院 A kind of vision detection system and method
CN108230303A (en) * 2017-12-21 2018-06-29 河北工业大学 A kind of method of polysilicon solar battery slice appearance scratch defects detection
CN108211419A (en) * 2016-12-22 2018-06-29 中国科学院沈阳自动化研究所 Automatic liquid-liquid-liquid extraction method of view-based access control model
CN108364285A (en) * 2018-01-24 2018-08-03 首都师范大学 A kind of crack extract methods and applications based on iterative phase consistency
CN108416766A (en) * 2018-01-31 2018-08-17 浙江理工大学 Visual inspection method for defects of double-side incident light guide plate
CN108445009A (en) * 2018-03-06 2018-08-24 大连海事大学 A kind of solar panel crack detecting method
CN108489986A (en) * 2018-03-19 2018-09-04 长沙理工大学 A kind of increasing material manufacturing on-line checking and restorative procedure
CN108508844A (en) * 2018-04-17 2018-09-07 四川大学 Transferred product system and transfer method based on plane secondary light source and machine vision
CN108838099A (en) * 2018-03-28 2018-11-20 广州大学 Safety pin badge Defect Detection system and method based on machine vision
CN108898576A (en) * 2018-05-21 2018-11-27 安徽集弘物联科技有限公司 A kind of intelligence machine vision Screening Platform
CN108956612A (en) * 2018-05-03 2018-12-07 浙江银采天实业有限公司 A kind of aluminium foil film paper web defect inspection method
CN108985325A (en) * 2018-06-05 2018-12-11 广州视源电子科技股份有限公司 Classification method, device, equipment and system
CN109001248A (en) * 2018-06-26 2018-12-14 哈尔滨工业大学 A kind of asphalt freezing-thawing damage evaluation method based on image information entropy
CN109030499A (en) * 2018-07-27 2018-12-18 江苏理工学院 A kind of device and method preventing defect counts repeat count suitable for target defect continuous on-line detection
CN109187567A (en) * 2018-08-07 2019-01-11 华侨大学 A kind of composite polycrystal-diamond surface white-spot defects detection system
WO2019014937A1 (en) * 2017-07-21 2019-01-24 易思维 (天津) 科技有限公司 Method and apparatus for detecting defect of laser welding protection lens on automobile production line
CN109406527A (en) * 2018-09-06 2019-03-01 华南理工大学 A kind of miniature video camera module group lens subtle appearance defect detecting system and method
CN109447989A (en) * 2019-01-08 2019-03-08 哈尔滨理工大学 Defect detecting device and method based on motor copper bar burr growth district
CN109447955A (en) * 2018-10-11 2019-03-08 安徽皓视光电科技有限公司 Cell phone back optical mode group lighting detects ROI dividing method
CN109754378A (en) * 2018-12-29 2019-05-14 重庆邮电大学 A method for removing burrs from crack images
CN109772733A (en) * 2019-01-15 2019-05-21 西安交通大学 A vision-based defective bamboo block detection and sorting device and method
CN109816658A (en) * 2019-04-01 2019-05-28 河北农业大学 Cotton seed detection system based on machine vision and detection method thereof
CN109872310A (en) * 2019-02-01 2019-06-11 东莞中科蓝海智能视觉科技有限公司 Workpiece thread cast-off and face character angle detecting recognition methods
CN109886950A (en) * 2019-02-22 2019-06-14 北京百度网讯科技有限公司 The defect inspection method and device of circuit board
CN109900716A (en) * 2019-04-12 2019-06-18 中民筑友科技投资有限公司 A kind of system and method detecting PC component presentation quality
CN109978875A (en) * 2019-04-03 2019-07-05 无锡立赫智能科技有限公司 A kind of capacitor open defect recognition methods and identification device
CN109967389A (en) * 2019-04-23 2019-07-05 南京斯杩克机器人技术有限公司 A kind of detonation tool defect automatic checkout system and its detection method
CN110031471A (en) * 2019-05-17 2019-07-19 中国科学院自动化研究所 Optical elements of large caliber surface defect Analysis in Growth method, system, device
CN110044910A (en) * 2019-05-09 2019-07-23 河南大学 A kind of automobile sets glass box components detection system and a detection method
CN110111321A (en) * 2019-05-10 2019-08-09 四川大学 A kind of contactless multiple dimensioned method for crack
CN110108711A (en) * 2019-04-20 2019-08-09 东莞中科蓝海智能视觉科技有限公司 Visual inspection system for defects of side wall of circular ring
CN110187140A (en) * 2019-05-10 2019-08-30 北京理工大学 A kind of image acquiring device and image acquiring method
CN110223296A (en) * 2019-07-08 2019-09-10 山东建筑大学 A kind of screw-thread steel detection method of surface flaw and system based on machine vision
CN110235173A (en) * 2017-02-10 2019-09-13 Abb瑞士股份有限公司 The coiled material image processing method and system of real-time full for coiled material manufacturing supervision
CN110288584A (en) * 2019-06-27 2019-09-27 常州固高智能装备技术研究院有限公司 Ceramic hot-dip aluminizing detection method of surface flaw and device based on machine vision
CN110296997A (en) * 2019-07-03 2019-10-01 三峡大学 The defect inspection method and device of ceramic tile based on machine vision
CN110298840A (en) * 2019-07-10 2019-10-01 哈尔滨理工大学 A kind of yarn faults detection method based on image
CN110346379A (en) * 2019-08-22 2019-10-18 合肥工业大学 A kind of bearing defect failure detector and bearing defect method of detection
CN110443791A (en) * 2019-08-02 2019-11-12 西安工程大学 A kind of workpiece inspection method and its detection device based on deep learning network
CN110487801A (en) * 2019-07-30 2019-11-22 厦门三安光电有限公司 Identify method, apparatus, equipment and the storage medium of graphite plate high-temperature baking result
CN110721930A (en) * 2019-11-14 2020-01-24 无锡慧动利信息科技有限公司 Needle cylinder detection method and device
CN111487192A (en) * 2020-04-26 2020-08-04 天津海融科技有限公司 Machine vision surface defect detection device and method based on artificial intelligence
CN111650205A (en) * 2020-05-11 2020-09-11 东风汽车集团有限公司 Surface defect detection method and system of parts based on structured light image matching
CN111815632A (en) * 2020-09-02 2020-10-23 深圳新视智科技术有限公司 Visual inspection method and device for sewing stitches
CN111812106A (en) * 2020-09-15 2020-10-23 沈阳风驰软件股份有限公司 Method and system for detecting glue overflow of appearance surface of wireless earphone
CN111896550A (en) * 2020-03-31 2020-11-06 广西师范大学 A surface defect detection device and method
CN111915581A (en) * 2020-07-27 2020-11-10 青岛大学 Method for detecting defects of smooth metal cambered surface
CN111951237A (en) * 2020-08-04 2020-11-17 上海微亿智造科技有限公司 Visual appearance detection method
CN112200805A (en) * 2020-11-11 2021-01-08 北京平恒智能科技有限公司 Industrial product image target extraction and defect judgment method
CN112258497A (en) * 2020-10-28 2021-01-22 中国计量大学 A method for detecting surface defects of cables based on the extraction of connected regions
CN112561903A (en) * 2020-12-24 2021-03-26 中铁建设集团基础设施建设有限公司 Temperature shrinkage crack resistance method suitable for asphalt pavement in cold region
CN112630222A (en) * 2020-11-24 2021-04-09 河海大学常州校区 Mobile phone cover plate glass defect detection method based on machine vision
CN112726360A (en) * 2020-12-24 2021-04-30 中铁建设集团基础设施建设有限公司 Airport concrete pavement crack repairing method
CN112767397A (en) * 2021-04-07 2021-05-07 深圳中科飞测科技股份有限公司 Workpiece detection method, workpiece detection device, and storage medium
CN112950602A (en) * 2021-03-11 2021-06-11 南京林业大学 Candy defect detection device and classification method based on depth camera and machine learning
CN113649422A (en) * 2021-06-30 2021-11-16 云南昆钢电子信息科技有限公司 Hot image-based rough rolling billet quality detection system and method
CN113686869A (en) * 2021-07-19 2021-11-23 浙江中新电力工程建设有限公司配电分公司 A device for identifying micro-defects in insulating blankets
CN113724240A (en) * 2021-09-09 2021-11-30 中国海洋大学 Refrigerator caster detection method, system and device based on visual identification
CN113838043A (en) * 2021-09-30 2021-12-24 杭州百子尖科技股份有限公司 Machine vision-based quality analysis method in metal foil manufacturing
CN114092402A (en) * 2021-10-25 2022-02-25 许继电气股份有限公司 Transformer substation disconnecting link state detection method and device
CN114311572A (en) * 2021-12-31 2022-04-12 深圳市新科聚合网络技术有限公司 SMD LED injection molding support online detection device and detection method thereof
CN114581433A (en) * 2022-03-22 2022-06-03 中国工程物理研究院流体物理研究所 Method and system for obtaining metal ball cavity inner surface appearance detection image
CN114742789A (en) * 2022-04-01 2022-07-12 中国科学院国家空间科学中心 General part picking method and system based on surface structured light and electronic equipment
CN115201212A (en) * 2022-09-19 2022-10-18 江苏华彬新材料有限公司 Plastic product defect detection device based on machine vision
CN116008294A (en) * 2022-12-13 2023-04-25 无锡微准科技有限公司 Key cap surface particle defect detection method based on machine vision
CN116152234A (en) * 2023-04-18 2023-05-23 山东阁林板建材科技有限公司 Image Processing Based Defect Recognition Method of Stencil End Face
CN117237360A (en) * 2023-11-15 2023-12-15 宁德思客琦智能装备有限公司 Casting burr detection method and system based on 3D vision

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109978866B (en) * 2019-03-28 2021-06-04 中国核电工程有限公司 Online detection device and method for peripheral surface defects of fuel pellets
CN110935644B (en) * 2019-12-27 2020-12-29 江南大学 A machine vision-based bearing needle roller size detection system and method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101105459A (en) * 2007-05-15 2008-01-16 广州市万世德包装机械有限公司 Empty bottle mouth defect inspection method and device
CN101561948A (en) * 2008-04-17 2009-10-21 中国印钞造币总公司 Automatic coin quality detection device
CN101706447A (en) * 2009-11-05 2010-05-12 浙江大学 Method for detecting CCD marking defects at spherical opening of high-pressure natural gas bottle
CN102253050A (en) * 2011-03-14 2011-11-23 广州市盛通建设工程质量检测有限公司 Automatic detection method and device for magnetic tile surface defect based on machine vision
CN102305793A (en) * 2011-05-11 2012-01-04 苏州天准精密技术有限公司 Method and equipment for detecting appearance quality of product
CN105424714A (en) * 2015-12-21 2016-03-23 南京河豚自动化科技有限公司 Multi-pin-based defect detection device and detection method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101105459A (en) * 2007-05-15 2008-01-16 广州市万世德包装机械有限公司 Empty bottle mouth defect inspection method and device
CN101561948A (en) * 2008-04-17 2009-10-21 中国印钞造币总公司 Automatic coin quality detection device
CN101706447A (en) * 2009-11-05 2010-05-12 浙江大学 Method for detecting CCD marking defects at spherical opening of high-pressure natural gas bottle
CN102253050A (en) * 2011-03-14 2011-11-23 广州市盛通建设工程质量检测有限公司 Automatic detection method and device for magnetic tile surface defect based on machine vision
CN102305793A (en) * 2011-05-11 2012-01-04 苏州天准精密技术有限公司 Method and equipment for detecting appearance quality of product
CN105424714A (en) * 2015-12-21 2016-03-23 南京河豚自动化科技有限公司 Multi-pin-based defect detection device and detection method thereof

Cited By (111)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106442556A (en) * 2016-11-16 2017-02-22 哈尔滨理工大学 Device and method for detecting surface defects of perforated plate workpiece
CN108211419B (en) * 2016-12-22 2019-06-04 中国科学院沈阳自动化研究所 Vision-based automated liquid-liquid extraction method
CN108211419A (en) * 2016-12-22 2018-06-29 中国科学院沈阳自动化研究所 Automatic liquid-liquid-liquid extraction method of view-based access control model
CN106770330A (en) * 2017-01-23 2017-05-31 无锡职业技术学院 A kind of body surface scratch detection device and its detection method
CN110235173A (en) * 2017-02-10 2019-09-13 Abb瑞士股份有限公司 The coiled material image processing method and system of real-time full for coiled material manufacturing supervision
CN110235173B (en) * 2017-02-10 2023-04-18 Abb瑞士股份有限公司 Real-time complete web image processing method and system for web manufacturing supervision
CN106934803A (en) * 2017-03-13 2017-07-07 珠海格力智能装备有限公司 Method and device for detecting surface defects of electronic device
CN106934803B (en) * 2017-03-13 2019-12-06 珠海格力电器股份有限公司 method and device for detecting surface defects of electronic device
CN107153069A (en) * 2017-06-30 2017-09-12 苏州优纳科技有限公司 A kind of device checked for FPC open defects
CN107248158A (en) * 2017-07-20 2017-10-13 广东工业大学 A kind of method and system of image procossing
WO2019014937A1 (en) * 2017-07-21 2019-01-24 易思维 (天津) 科技有限公司 Method and apparatus for detecting defect of laser welding protection lens on automobile production line
US10794838B2 (en) 2017-07-21 2020-10-06 Isvision (Tianjin) Technology Co., Ltd Method and device for detecting defect of cover lens in laser welding system on automobile production line
CN107610104A (en) * 2017-08-31 2018-01-19 南通兴华达高实业有限公司 Crack detecting method at a kind of elevator compensation chain R based on machine vision
CN107590837A (en) * 2017-09-06 2018-01-16 西安华航唯实机器人科技有限公司 A kind of vision positioning intelligent precise puts together machines people and its camera vision scaling method
CN107633509A (en) * 2017-09-07 2018-01-26 南京航空航天大学 A kind of auto parts machinery trick detecting system and method
CN107633509B (en) * 2017-09-07 2021-03-02 南京航空航天大学 A system and method for hand-eye detection of auto parts
CN107490583A (en) * 2017-09-12 2017-12-19 桂林电子科技大学 A kind of intermediate plate defect inspection method based on machine vision
CN107886495A (en) * 2017-09-30 2018-04-06 北京得华机器人技术研究院有限公司 A kind of auto-parts defect identification method based on similarity mode
CN107886495B (en) * 2017-09-30 2020-04-14 北京得华机器人技术研究院有限公司 Automobile part defect identification method based on similarity matching
CN107945155B (en) * 2017-11-13 2021-05-25 佛山缔乐视觉科技有限公司 Toothpaste tube shoulder defect detection method based on Gabor filter
CN107945155A (en) * 2017-11-13 2018-04-20 佛山缔乐视觉科技有限公司 A kind of dentifrice tube shoulder defect inspection method based on Gabor filter
CN107993235A (en) * 2017-11-27 2018-05-04 中国计量大学 A kind of ripple back-fire relief disk wave height measuring method based on image processing techniques
CN107993235B (en) * 2017-11-27 2020-04-03 中国计量大学 A method for measuring wave height of corrugated flame arrester based on image processing technology
CN108230303A (en) * 2017-12-21 2018-06-29 河北工业大学 A kind of method of polysilicon solar battery slice appearance scratch defects detection
CN108144873B (en) * 2017-12-29 2020-06-16 深圳市智能机器人研究院 Visual detection system and method
CN108144873A (en) * 2017-12-29 2018-06-12 深圳市智能机器人研究院 A kind of vision detection system and method
CN108364285A (en) * 2018-01-24 2018-08-03 首都师范大学 A kind of crack extract methods and applications based on iterative phase consistency
CN108364285B (en) * 2018-01-24 2021-06-18 首都师范大学 A crack extraction method and application based on iterative phase consistency
CN108416766B (en) * 2018-01-31 2021-10-22 杭州衡眺科技有限公司 Double-side light-entering type light guide plate defect visual detection method
CN108416766A (en) * 2018-01-31 2018-08-17 浙江理工大学 Visual inspection method for defects of double-side incident light guide plate
CN108445009A (en) * 2018-03-06 2018-08-24 大连海事大学 A kind of solar panel crack detecting method
CN108489986A (en) * 2018-03-19 2018-09-04 长沙理工大学 A kind of increasing material manufacturing on-line checking and restorative procedure
CN108489986B (en) * 2018-03-19 2021-03-26 长沙理工大学 A method for online detection and repair of additive manufacturing
CN108838099A (en) * 2018-03-28 2018-11-20 广州大学 Safety pin badge Defect Detection system and method based on machine vision
CN108508844A (en) * 2018-04-17 2018-09-07 四川大学 Transferred product system and transfer method based on plane secondary light source and machine vision
CN108956612A (en) * 2018-05-03 2018-12-07 浙江银采天实业有限公司 A kind of aluminium foil film paper web defect inspection method
CN108898576A (en) * 2018-05-21 2018-11-27 安徽集弘物联科技有限公司 A kind of intelligence machine vision Screening Platform
CN108985325A (en) * 2018-06-05 2018-12-11 广州视源电子科技股份有限公司 Classification method, device, equipment and system
CN109001248A (en) * 2018-06-26 2018-12-14 哈尔滨工业大学 A kind of asphalt freezing-thawing damage evaluation method based on image information entropy
CN109001248B (en) * 2018-06-26 2020-10-02 哈尔滨工业大学 A Freeze-thaw Damage Evaluation Method for Asphalt Mixtures Based on Image Information Entropy
CN109030499B (en) * 2018-07-27 2021-08-24 江苏理工学院 A device and method suitable for continuous online detection of target defects to prevent repeated counting of the number of defects
CN109030499A (en) * 2018-07-27 2018-12-18 江苏理工学院 A kind of device and method preventing defect counts repeat count suitable for target defect continuous on-line detection
CN109187567A (en) * 2018-08-07 2019-01-11 华侨大学 A kind of composite polycrystal-diamond surface white-spot defects detection system
CN109406527B (en) * 2018-09-06 2021-03-30 华南理工大学 System and method for detecting fine appearance defects of micro camera module lens
CN109406527A (en) * 2018-09-06 2019-03-01 华南理工大学 A kind of miniature video camera module group lens subtle appearance defect detecting system and method
CN109447955A (en) * 2018-10-11 2019-03-08 安徽皓视光电科技有限公司 Cell phone back optical mode group lighting detects ROI dividing method
CN109447955B (en) * 2018-10-11 2022-04-22 安徽皓视光电科技有限公司 ROI segmentation method for lighting detection of mobile phone backlight module
CN109754378A (en) * 2018-12-29 2019-05-14 重庆邮电大学 A method for removing burrs from crack images
CN109447989A (en) * 2019-01-08 2019-03-08 哈尔滨理工大学 Defect detecting device and method based on motor copper bar burr growth district
CN109772733A (en) * 2019-01-15 2019-05-21 西安交通大学 A vision-based defective bamboo block detection and sorting device and method
CN109872310A (en) * 2019-02-01 2019-06-11 东莞中科蓝海智能视觉科技有限公司 Workpiece thread cast-off and face character angle detecting recognition methods
CN109886950A (en) * 2019-02-22 2019-06-14 北京百度网讯科技有限公司 The defect inspection method and device of circuit board
CN109816658A (en) * 2019-04-01 2019-05-28 河北农业大学 Cotton seed detection system based on machine vision and detection method thereof
CN109978875A (en) * 2019-04-03 2019-07-05 无锡立赫智能科技有限公司 A kind of capacitor open defect recognition methods and identification device
CN109900716A (en) * 2019-04-12 2019-06-18 中民筑友科技投资有限公司 A kind of system and method detecting PC component presentation quality
CN110108711A (en) * 2019-04-20 2019-08-09 东莞中科蓝海智能视觉科技有限公司 Visual inspection system for defects of side wall of circular ring
CN109967389A (en) * 2019-04-23 2019-07-05 南京斯杩克机器人技术有限公司 A kind of detonation tool defect automatic checkout system and its detection method
CN109967389B (en) * 2019-04-23 2020-04-21 南京斯杩克机器人技术有限公司 Automatic detection system and detection method for defects of detonating tool
CN110044910A (en) * 2019-05-09 2019-07-23 河南大学 A kind of automobile sets glass box components detection system and a detection method
CN110044910B (en) * 2019-05-09 2024-02-13 河南大学 Automobile cup box part detection system and detection method
CN110187140A (en) * 2019-05-10 2019-08-30 北京理工大学 A kind of image acquiring device and image acquiring method
CN110187140B (en) * 2019-05-10 2021-06-25 北京理工大学 Image acquisition device and image acquisition method
CN110111321A (en) * 2019-05-10 2019-08-09 四川大学 A kind of contactless multiple dimensioned method for crack
CN110031471A (en) * 2019-05-17 2019-07-19 中国科学院自动化研究所 Optical elements of large caliber surface defect Analysis in Growth method, system, device
CN110288584B (en) * 2019-06-27 2023-06-23 常州固高智能装备技术研究院有限公司 Ceramic hot dip aluminizing surface defect detection method and device based on machine vision
CN110288584A (en) * 2019-06-27 2019-09-27 常州固高智能装备技术研究院有限公司 Ceramic hot-dip aluminizing detection method of surface flaw and device based on machine vision
CN110296997A (en) * 2019-07-03 2019-10-01 三峡大学 The defect inspection method and device of ceramic tile based on machine vision
CN110223296B (en) * 2019-07-08 2021-06-11 山东建筑大学 Deformed steel bar surface defect detection method and system based on machine vision
CN110223296A (en) * 2019-07-08 2019-09-10 山东建筑大学 A kind of screw-thread steel detection method of surface flaw and system based on machine vision
CN110298840A (en) * 2019-07-10 2019-10-01 哈尔滨理工大学 A kind of yarn faults detection method based on image
CN110487801A (en) * 2019-07-30 2019-11-22 厦门三安光电有限公司 Identify method, apparatus, equipment and the storage medium of graphite plate high-temperature baking result
CN110443791B (en) * 2019-08-02 2023-04-07 西安工程大学 Workpiece detection method and device based on deep learning network
CN110443791A (en) * 2019-08-02 2019-11-12 西安工程大学 A kind of workpiece inspection method and its detection device based on deep learning network
CN110346379A (en) * 2019-08-22 2019-10-18 合肥工业大学 A kind of bearing defect failure detector and bearing defect method of detection
CN110721930B (en) * 2019-11-14 2021-06-29 无锡慧动利信息科技有限公司 Needle cylinder detection method and device
CN110721930A (en) * 2019-11-14 2020-01-24 无锡慧动利信息科技有限公司 Needle cylinder detection method and device
CN111896550A (en) * 2020-03-31 2020-11-06 广西师范大学 A surface defect detection device and method
CN111487192A (en) * 2020-04-26 2020-08-04 天津海融科技有限公司 Machine vision surface defect detection device and method based on artificial intelligence
CN111650205A (en) * 2020-05-11 2020-09-11 东风汽车集团有限公司 Surface defect detection method and system of parts based on structured light image matching
CN111915581A (en) * 2020-07-27 2020-11-10 青岛大学 Method for detecting defects of smooth metal cambered surface
CN111951237B (en) * 2020-08-04 2021-06-08 上海微亿智造科技有限公司 Visual appearance detection method
CN111951237A (en) * 2020-08-04 2020-11-17 上海微亿智造科技有限公司 Visual appearance detection method
CN111815632A (en) * 2020-09-02 2020-10-23 深圳新视智科技术有限公司 Visual inspection method and device for sewing stitches
CN111812106A (en) * 2020-09-15 2020-10-23 沈阳风驰软件股份有限公司 Method and system for detecting glue overflow of appearance surface of wireless earphone
CN112258497A (en) * 2020-10-28 2021-01-22 中国计量大学 A method for detecting surface defects of cables based on the extraction of connected regions
CN112258497B (en) * 2020-10-28 2024-06-04 中国计量大学 Inhaul cable surface defect detection method based on connected region extraction
CN112200805A (en) * 2020-11-11 2021-01-08 北京平恒智能科技有限公司 Industrial product image target extraction and defect judgment method
CN112630222A (en) * 2020-11-24 2021-04-09 河海大学常州校区 Mobile phone cover plate glass defect detection method based on machine vision
CN112561903A (en) * 2020-12-24 2021-03-26 中铁建设集团基础设施建设有限公司 Temperature shrinkage crack resistance method suitable for asphalt pavement in cold region
CN112726360A (en) * 2020-12-24 2021-04-30 中铁建设集团基础设施建设有限公司 Airport concrete pavement crack repairing method
CN112950602B (en) * 2021-03-11 2022-01-18 南京林业大学 Candy defect detection device and classification method based on depth camera and machine learning
CN112950602A (en) * 2021-03-11 2021-06-11 南京林业大学 Candy defect detection device and classification method based on depth camera and machine learning
CN112767397B (en) * 2021-04-07 2021-07-20 深圳中科飞测科技股份有限公司 Workpiece detection method, workpiece detection device, and storage medium
CN112767397A (en) * 2021-04-07 2021-05-07 深圳中科飞测科技股份有限公司 Workpiece detection method, workpiece detection device, and storage medium
CN113649422A (en) * 2021-06-30 2021-11-16 云南昆钢电子信息科技有限公司 Hot image-based rough rolling billet quality detection system and method
CN113686869A (en) * 2021-07-19 2021-11-23 浙江中新电力工程建设有限公司配电分公司 A device for identifying micro-defects in insulating blankets
CN113724240A (en) * 2021-09-09 2021-11-30 中国海洋大学 Refrigerator caster detection method, system and device based on visual identification
CN113724240B (en) * 2021-09-09 2023-10-17 中国海洋大学 Refrigerator caster detection method, system and device based on visual identification
CN113838043A (en) * 2021-09-30 2021-12-24 杭州百子尖科技股份有限公司 Machine vision-based quality analysis method in metal foil manufacturing
CN114092402A (en) * 2021-10-25 2022-02-25 许继电气股份有限公司 Transformer substation disconnecting link state detection method and device
CN114311572A (en) * 2021-12-31 2022-04-12 深圳市新科聚合网络技术有限公司 SMD LED injection molding support online detection device and detection method thereof
CN114581433A (en) * 2022-03-22 2022-06-03 中国工程物理研究院流体物理研究所 Method and system for obtaining metal ball cavity inner surface appearance detection image
CN114581433B (en) * 2022-03-22 2023-09-19 中国工程物理研究院流体物理研究所 Method and system for acquiring surface morphology detection image in metal ball cavity
CN114742789B (en) * 2022-04-01 2023-04-07 桂林电子科技大学 General part picking method and system based on surface structured light and electronic equipment
CN114742789A (en) * 2022-04-01 2022-07-12 中国科学院国家空间科学中心 General part picking method and system based on surface structured light and electronic equipment
CN115201212A (en) * 2022-09-19 2022-10-18 江苏华彬新材料有限公司 Plastic product defect detection device based on machine vision
CN116008294A (en) * 2022-12-13 2023-04-25 无锡微准科技有限公司 Key cap surface particle defect detection method based on machine vision
CN116008294B (en) * 2022-12-13 2024-03-08 无锡微准科技有限公司 Key cap surface particle defect detection method based on machine vision
CN116152234A (en) * 2023-04-18 2023-05-23 山东阁林板建材科技有限公司 Image Processing Based Defect Recognition Method of Stencil End Face
CN117237360A (en) * 2023-11-15 2023-12-15 宁德思客琦智能装备有限公司 Casting burr detection method and system based on 3D vision
CN117237360B (en) * 2023-11-15 2024-03-01 宁德思客琦智能装备有限公司 Casting burr detection method and system based on 3D vision

Also Published As

Publication number Publication date
CN106053479B (en) 2018-09-11

Similar Documents

Publication Publication Date Title
CN106053479B (en) A kind of vision detection system of the workpiece appearance defects based on image procossing
CN106204614A (en) A kind of workpiece appearance defects detection method based on machine vision
CN112630222B (en) Mobile phone cover plate glass defect detection method based on machine vision
CN109141232B (en) An online detection method for disc castings based on machine vision
CN102854191B (en) Real-time visual detection and identification method for high speed rail surface defect
CN105069790B (en) A kind of gear open defect fast image detection method
CN110223296A (en) A kind of screw-thread steel detection method of surface flaw and system based on machine vision
CN114279357A (en) A method and system for measuring burr size of die castings based on machine vision
CN113781486B (en) IC card image defect detection method
CN104964980B (en) A kind of spark plug plate defectses detection method based on machine vision
CN111523540A (en) Deep learning-based metal surface defect detection method
CN108510476A (en) A kind of Mobile phone screen wireline inspection method based on machine vision
CN108257171A (en) Car radar assembling aperture detection method based on light vision
CN107490583A (en) A kind of intermediate plate defect inspection method based on machine vision
CN113252568A (en) Lens surface defect detection method, system, product and terminal based on machine vision
CN106780526A (en) A kind of ferrite wafer alligatoring recognition methods
CN106934801A (en) A kind of fluorescentmagnetic particle(powder) defect inspection method based on Laws texture filterings
CN102175692A (en) System and method for detecting defects of fabric gray cloth quickly
CN101995412B (en) Robust glass scratch defect detection method and device thereof
CN110766664A (en) A detection method for defective appearance of electronic components based on deep learning
Fu et al. Medicine glass bottle defect detection based on machine vision
CN116539620A (en) A method for on-machine detection of tool surface defects
CN109900719A (en) A kind of visual detection method of blade surface knife pattern
CN107145896A (en) Intelligent defect recognition system based on fluorescent magnetic powder
Liu et al. Automatic detection technology of surface defects on plastic products based on machine vision

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant