CN103914838A - 一种工业x射线焊缝图像缺陷识别方法 - Google Patents

一种工业x射线焊缝图像缺陷识别方法 Download PDF

Info

Publication number
CN103914838A
CN103914838A CN201410114857.6A CN201410114857A CN103914838A CN 103914838 A CN103914838 A CN 103914838A CN 201410114857 A CN201410114857 A CN 201410114857A CN 103914838 A CN103914838 A CN 103914838A
Authority
CN
China
Prior art keywords
image
picture
detected
gray
pixel
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
CN201410114857.6A
Other languages
English (en)
Other versions
CN103914838B (zh
Inventor
高炜欣
汤楠
武晓朦
穆向阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Shiyou University
Original Assignee
Xian Shiyou 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 Xian Shiyou University filed Critical Xian Shiyou University
Priority to CN201410114857.6A priority Critical patent/CN103914838B/zh
Publication of CN103914838A publication Critical patent/CN103914838A/zh
Application granted granted Critical
Publication of CN103914838B publication Critical patent/CN103914838B/zh
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)

Abstract

一种工业x射线焊缝图像缺陷识别方法,先设定样本图像,并统一进行尺寸的归一化处理,将图像的模式识别问题,转换为一个方程组求解问题,由于事先确定样本图像的个数和尺寸,在求解时,方程组个数不会因待检测图像尺寸的变化而发生变化,所以图像识别时间不受图像尺寸大小的限制,而且,本发明用一个向量来判断待检测图像的类型,不依赖于某一个系数,使得检测具有较好的鲁棒性,也无需对待检测图像进行滤波、增强等前期处理。

Description

一种工业x射线焊缝图像缺陷识别方法
技术领域
本发明涉及图像处理技术领域,特别涉及一种工业x射线焊缝图像缺陷识别方法。 
技术背景
焊接技术广泛地应用于石油化工钢管和压力容器的制造中,高质量的焊接是保证钢管和压力容器等国民经济重要设施安全运行的基础和根本保障。但遗留在焊缝中的缺陷会导致管道和压力容器的破裂与爆炸。因此焊缝中缺陷检测识别是机械、冶金、石油化工等行业设备制造中必不可少且尤为重要的环节。 
对焊缝缺陷的检测是通过无损检测(Non Destructive Testing,NDT)的方法来实现的。在各种无损检测方法中,基于x射线焊缝图像的缺陷检测是最为重要,并已得到广泛应用的方法。但目前基于x射线焊缝图像的自动检测算法计算时间与x射线焊缝图像的尺寸相关,图像大则计算时间长。而且目前的x射线焊缝图像缺陷检测都是基于单张图像的计算,需要进行滤波、分割、判断等图像处理,计算时间也较长。特别是,现有算法在分割时对一个或多个阈值敏感,造成x射线焊缝图像处理算法的鲁棒性不足。当前还缺乏一种适应性强、与阈值选取无关且计算时间与x射线图像尺寸无关的x射线焊缝图像识别技术。 
发明内容
为了克服上述现有技术的不足,本发明的目的在于提供了一种工业x射线焊缝图像缺陷识别方法,具有处理图像时间不受图像尺寸大小,计算时无需选取分割阈值的特点。 
为了达到上述目的,本发明的技术方案是这样实现的: 
一种工业x射线焊缝图像缺陷识别方法,包括以下步骤: 
(1)选取缺陷图片20张以上,选取噪声图片20张以上,一起作为样本图片; 
(2)将样本图片的尺寸统一归一化为m×m大小,要求m≥8,以后对样本图片的操作均针对归一化后的图片; 
(3)提取样本图片各个像素点的灰度值,按照行优先或者列优先的原则将各个像素点的灰度值排列为一个列向量,用fi表示,标i表示图片的编号,fi为第i号图片所有像素点灰度值排列的向量, 
(4)构建一个矩阵A,
(5)将待检测图片尺寸归一化为m×m,提取其各个像素点的灰度值,同样按照行优先或列优先的原则将各个像素点的灰度值排列为一个列向量,用y表示; 
(6)令其中Δ为小于等于0.01的正实数,并构造函数1: 
x ^ = min ( g ( x ) + κ · | | y - Ax | | 2 2 ) - - - ( 1 )
κ为惩罚项系数,取值为0.1×m至10×m之间的任意数 
(7)构造函数2: 
x ^ = min ( | | x | | 1 + κ · | | y - Ax | | 2 2 ) - - - ( 2 )
κ为惩罚项系数,取值为0.1×m至10×m之间的任意数 
(8)构造函数3: 
x ^ = min | | y - A · x | | 2 - - - ( 3 )
(9)分别用最速下降法求解式(1)、式(2),用OMP算法求解式(3),记录求解结果为
(10) Σ i = 1 k | x 0 ^ [ i ] | > Σ i = i + 1 n | x 0 ^ [ i ] | 时,取P0为1,否则为0; Σ i = 1 k | x 1 ^ [ i ] | > Σ i = i + 1 n | x 1 ^ [ i ] | 时,取P1为1,否则为0;时,取P2为1,否则为0。 
(11)若(P0)or(P1)or(P2)=1,待检测图像为缺陷,否则为噪声。 
本发明通过事先设定样本图像,并统一进行尺寸的归一化处理,将图像的模式识别问题,转换为一个方程组求解问题。由于事先确定样本图像的个数和尺寸,在求解时,方程组个数不会因待检测图像尺寸的变化而发生变化,所以图像识别时间不受图像尺寸大小的限制。而且,本发明用一个向量来判断待检测图像的类型,不依赖于某一个系数,使得检测具有较好的鲁棒性,也无需对待检测图像进行滤波、增强等处理。 
附图说明
图1为实施例一的200张缺陷样本图。 
图2为实施例一的200张噪声样本图片。 
图3为实施例二的200张缺陷样本图。 
图4为实施例二的200张噪声样本图片。 
图5为实施例三的200张缺陷样本图。 
图6为实施例三的200张噪声样本图片。 
图7为实施例四的200张缺陷样本图。 
图8为实施例四的200张噪声样本图片。 
具体实施方式
下面结合具体实例对本发明做详细叙述。 
实施例一 
(1)选取200张缺陷样本图片如图1: 
(2)选取200张噪声样本图片如图2: 
(3)将样本图片及待检测图片归一化为13×13尺寸,样本图片像素点灰度值按列优先原则排列,生成矩阵A。 
(4)将待检测图片归一化为13×13大小,然后将像素点灰度值按列优先排列,生成向量y 
(5)令 g ( x ) = 1 - cos ( e x Δ - e - x Δ e x Δ + e - x Δ · π 2 ) , Δ=0.005,并构造函数1: 
x ^ = min ( g ( x ) + κ · | | y - Ax | | 2 2 ) - - - ( 4 )
取κ=15 
(6)构造函数2: 
x ^ = min ( | | x | | 1 + κ · | | y - Ax | | 2 2 ) - - - ( 5 )
κ=15 
(7)构造函数3: 
x ^ = min | | y - A · x | | 2 - - - ( 6 )
(8)分别用最速下降法求解(4)、(5),用OMP算法求解(6)。 
解得 Σ i = 1 k | x ^ 0 [ i ] | = 0.499166 , Σ i = k + 1 n | x ^ 0 [ i ] | = 0.663604 ; Σ i = 1 k | x ^ 1 [ i ] | = 0.499245 , Σ i = k + 1 n | x ^ 1 [ i ] | = 0.663657 ; Σ i = 1 k | x ^ 2 [ i ] | = 0 , Σ i = k + 1 n | x ^ 2 [ i ] | = 1694.601 . 其中k=200,n=400。 
(9)解得P0=0;P1=0;P2=0;(P0)or(P1)or(P2)=0;待检测图像为噪声。 
实施例二 
(1)选取200张缺陷样本图片如图3; 
(2)选取200张噪声样本图片如图4; 
(3)将样本图片及待检测图片归一化为13×13尺寸,将样本图片像素点灰度值按列优先原则排列,生成矩阵A; 
(4)将待检测图片归一化为13×13大小,然后将像素点灰度值按列优先排列,生成向量y; 
(5)令 g ( x ) = 1 - cos ( e x Δ - e - x Δ e x Δ + e - x Δ · π 2 ) , Δ=0.005,并构造函数1: 
x ^ = min ( g ( x ) + κ · | | y - Ax | | 2 2 ) - - - ( 7 )
取κ=15; 
(6)构造函数2: 
x ^ = min ( | | x | | 1 + κ · | | y - Ax | | 2 2 ) - - - ( 8 )
κ=15; 
(7)构造函数3: 
x ^ = min | | y - A · x | | 2 - - - ( 9 )
(8)分别用最速下降法求解式(7)、式(8),用OMP算法求解式(9);解得 Σ i = 1 k | x ^ 0 [ i ] | = 0.461861 , Σ i = k + 1 n | x ^ 0 [ i ] | = 0.658911 ; Σ i = 1 k | x ^ 1 [ i ] | = 0 . 462372 , Σ i = k + 1 n | x ^ 1 [ i ] | = 0.659067 ; Σ i = 1 k | x ^ 2 [ i ] | = 177.1714 , Σ i = k + 1 n | x ^ 2 [ i ] | = 1634 . 278 , 其中k=200,n=400; 
(9)解得P0=0;P1=0;P2=0;(P0)or(P1)or(P2)=0;待检测图像为噪声。 
实施例三 
(1)选取200张缺陷样本图片如图5; 
(2)选取200张噪声样本图片如图6; 
(3)将样本图片及待检测图片归一化为13×13尺寸,将样本图片像素点灰度值按列优先原则排列,生成矩阵A; 
(4)将待检测图片归一化为13×13大小,然后将像素点灰度值按列优先排列,生成向量y; 
(5)令 g ( x ) = 1 - cos ( e x Δ - e - x Δ e x Δ + e - x Δ · π 2 ) , Δ=0.005,并构造函数1: 
x ^ = min ( g ( x ) + κ · | | y - Ax | | 2 2 ) - - - ( 10 )
取κ=15; 
(6)构造函数2: 
x ^ = min ( | | x | | 1 + κ · | | y - Ax | | 2 2 ) - - - ( 11 )
κ=15; 
(7)构造函数3: 
x ^ = min | | y - A · x | | 2 - - - ( 12 )
(8)分别用最速下降法求解式(10)、式(11),用OMP算法求解式(12),解得 Σ i = 1 k | x ^ 0 [ i ] | = 0 . 613836 , Σ i = k + 1 n | x ^ 0 [ i ] | = 0 . 32915 ; Σ i = 1 k | x ^ 1 [ i ] | = 0 . 643516 , Σ i = k + 1 n | x ^ 1 [ i ] | = 0 . 311145 ; Σ i = 1 k | x ^ 2 [ i ] | = 1053.453 , Σ i = k + 1 n | x ^ 2 [ i ] | = . 0 . 其中k=200,n=400; 
(9)解得P0=1;P1=1;P2=1;(P0)or(P1)or(P2)=1;待检测图像为缺陷。 
实施例四 
(1)选取200张缺陷样本图片如图7; 
(2)选取200张噪声样本图片如图8; 
(3)将样本图片及待检测图片归一化为13×13尺寸,样本图片像素点灰度值按列优先原则排列,生成矩阵A; 
(4)将待检测图片归一化为13×13大小,然后将像素点灰度值按列优先排列,生成向量y; 
(5)令 g ( x ) = 1 - cos ( e x Δ - e - x Δ e x Δ + e - x Δ · π 2 ) , Δ=0.005。并构造函数1: 
x ^ = min ( g ( x ) + κ · | | y - Ax | | 2 2 ) - - - ( 13 )
取κ=15; 
(6)构造函数2: 
x ^ = min ( | | x | | 1 + κ · | | y - Ax | | 2 2 ) - - - ( 14 )
取κ=15; 
(7)构造函数3: 
x ^ = min | | y - A · x | | 2 - - - ( 15 )
(8)分别用最速下降法求解(13)、(14),用OMP算法求解(15),解得 Σ i = 1 k | x ^ 0 [ i ] | = 0 . 51768 , Σ i = k + 1 n | x ^ 0 [ i ] | = 0 . 459939 ; Σ i = 1 k | x ^ 1 [ i ] | = 0 . 516703 , Σ i = k + 1 n | x ^ 1 [ i ] | = 0 . 464706 ; Σ i = 1 k | x ^ 2 [ i ] | = 2030.792 , Σ i = k + 1 n | x ^ 2 [ i ] | = . 0 . 其中k=200,n=400; 
(9)解得P0=1;P1=1;P2=1;(P0)or(P1)or(P2)=1;待检测图像为缺陷。 

Claims (1)

1.一种工业x射线焊缝图像缺陷识别方法,其特征在于,包括以下步骤: 
(1)选取缺陷图片20张以上,选取噪声图片20张以上,一起作为样本图片; 
(2)将样本图片的尺寸统一归一化为m×m大小,要求m≥8,以后对样本图片的操作均针对归一化后的图片; 
(3)提取样本图片各个像素点的灰度值,按照行优先或者列优先的原则将各个像素点的灰度值排列为一个列向量,用fi表示,标i表示图片的编号,fi为第i号图片所有像素点灰度值排列的向量, 
(4)构建一个矩阵A,
(5)将待检测图片尺寸归一化为m×m,提取其各个像素点的灰度值,同样按照行优先或列优先的原则将各个像素点的灰度值排列为一个列向量,用y表示; 
(6)令其中Δ为小于等于0.01的正实数。并构造函数1: 
κ为惩罚项系数,取值为0.1×m至10×m之间的任意数; 
(7)构造函数2: 
κ为惩罚项系数,取值为0.1×m至10×m之间的任意数; 
(8)构造函数3: 
(9)分别用最速下降法求解式(1)、式(2),用OMP算法求解式(3),记录求解结果为
(10)时,取P0为1,否则为0;时,取P1为1,否则为0;时,取P2为1,否则为0; 
(11)若(P0)or(P1)or(P2)=1,待检测图像为缺陷,否则为噪声。 
CN201410114857.6A 2014-03-25 2014-03-25 一种工业x射线焊缝图像缺陷识别方法 Expired - Fee Related CN103914838B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410114857.6A CN103914838B (zh) 2014-03-25 2014-03-25 一种工业x射线焊缝图像缺陷识别方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410114857.6A CN103914838B (zh) 2014-03-25 2014-03-25 一种工业x射线焊缝图像缺陷识别方法

Publications (2)

Publication Number Publication Date
CN103914838A true CN103914838A (zh) 2014-07-09
CN103914838B CN103914838B (zh) 2017-02-22

Family

ID=51040494

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410114857.6A Expired - Fee Related CN103914838B (zh) 2014-03-25 2014-03-25 一种工业x射线焊缝图像缺陷识别方法

Country Status (1)

Country Link
CN (1) CN103914838B (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107843602A (zh) * 2017-10-31 2018-03-27 宁波蓝鼎电子科技有限公司 一种基于图像的焊缝质量检测方法
CN108262583A (zh) * 2018-01-23 2018-07-10 广东工业大学 焊缝的类型判断和定位方法及系统
CN108665452A (zh) * 2018-05-09 2018-10-16 广东大鹏液化天然气有限公司 一种基于大数据的管道焊缝底片扫描入库及焊缝缺陷识别方法及其系统
CN112102255A (zh) * 2020-08-21 2020-12-18 杭州培慕科技有限公司 基于工业场景下的x射线成像图像的缺陷智能评级方法

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103323526A (zh) * 2013-05-30 2013-09-25 哈尔滨工业大学 一种基于超声相控阵和支持向量机的焊缝缺陷检测识别方法

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103323526A (zh) * 2013-05-30 2013-09-25 哈尔滨工业大学 一种基于超声相控阵和支持向量机的焊缝缺陷检测识别方法

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
GAO WEIXIN ET AL: "A Novel Algorithm for Detecting Air Holes in Steel Pipe Welding Based on Hopfield Neural Network", 《EIGHTH ACIS INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, ARTIFICIAL INTELLIGENCE, NETWORKING, AND PARALLEL/DISTRIBUTED COMPUTING》 *
崔亚楠 等: "基于压缩传感的焊管焊缝X射线图像处理", 《焊接技术》 *
李勇 等: "基于压缩感知的X射线螺旋焊管焊缝缺陷检测", 《焊接技术》 *
李坤 等: "基于自适应SVM决策树的焊缝缺陷类型识别", 《科研成果与学术交流》 *
蔡晓龙 等: "基于PSO—SVM的焊缝缺陷X射线检测", 《焊接技术》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107843602A (zh) * 2017-10-31 2018-03-27 宁波蓝鼎电子科技有限公司 一种基于图像的焊缝质量检测方法
CN108262583A (zh) * 2018-01-23 2018-07-10 广东工业大学 焊缝的类型判断和定位方法及系统
CN108262583B (zh) * 2018-01-23 2020-10-20 广东工业大学 焊缝的类型判断和定位方法及系统
CN108665452A (zh) * 2018-05-09 2018-10-16 广东大鹏液化天然气有限公司 一种基于大数据的管道焊缝底片扫描入库及焊缝缺陷识别方法及其系统
CN108665452B (zh) * 2018-05-09 2019-06-07 广东大鹏液化天然气有限公司 管道焊缝底片扫描入库及焊缝缺陷识别方法及其系统
CN112102255A (zh) * 2020-08-21 2020-12-18 杭州培慕科技有限公司 基于工业场景下的x射线成像图像的缺陷智能评级方法
CN112102255B (zh) * 2020-08-21 2024-01-23 杭州培慕科技有限公司 基于工业场景下的x射线成像图像的缺陷智能评级方法

Also Published As

Publication number Publication date
CN103914838B (zh) 2017-02-22

Similar Documents

Publication Publication Date Title
Shafeek et al. Automatic inspection of gas pipeline welding defects using an expert vision system
US10682729B2 (en) System for automated in-process inspection of welds
CN103914838A (zh) 一种工业x射线焊缝图像缺陷识别方法
US11010890B2 (en) Method for the non-destructive testing of the volume of a test object and testing device configured for carrying out such a method
US20190145933A1 (en) Methods of using nondestructive material inspection systems
CN105931227A (zh) 一种基于图像灰度b扫曲线的焊缝表面缺陷特征提取方法
CN110333238A (zh) 一种smt芯片缺陷检测系统与方法
JP4180619B2 (ja) 交流電磁場測定法による探傷検査装置
JP4180578B2 (ja) 交流電磁場測定法による探傷検査装置及び方法
CN105021704B (zh) 一种提高超声波无损探伤钎着率准确度的测量方法
CO2021015066A2 (es) Método para determinar la geometría de un defecto y un límite de carga
JP2010287442A (ja) 電池の検査方法及び電池の検査装置
JP2004037216A (ja) 漏洩磁束探傷方法
Virkkunen et al. Feasibility study of using eflaws on qualification of nuclear spent fuel disposal canister inspection
CN105678789B (zh) 一种机箱标准件装配质量智能分析方法
Feng et al. Evolution of triax magnetic flux leakage inspection for mitigation of spiral weld anomalies
Aoki et al. Intelligent image processing for abstraction and discrimination of defect image in radiographic film
Kim et al. Analysis and depth estimation of complex defects on the underground gas pipelines
Yang et al. The method of the pipeline magnetic flux leakage detection image formation based on the artificial intelligence
Zhao et al. Blowhole detection based on bidirectional enhancement and omnidirectional analysis for X-ray inspection of castings
TWM604396U (zh) 基於射線照相的焊道檢查系統
KR101904241B1 (ko) 스폿 용접기의 전극팁 검사 방법 및 장치
Seo et al. A Study on the Development of Deep Learning Algorithm for Determining External Quality of Welded Parts Using Transfer Learning
US8788219B2 (en) Method of determining an edge of an anomaly, method of determining interaction, method of aligning, computer program product, and data carrier
CN103593839A (zh) 大灰度梯度背景下的微小缺陷分割方法

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170222

Termination date: 20180325