CN109029861B - A pressure vessel air tightness detection method based on background modeling and centroid clustering - Google Patents
A pressure vessel air tightness detection method based on background modeling and centroid clustering Download PDFInfo
- Publication number
- CN109029861B CN109029861B CN201810765650.3A CN201810765650A CN109029861B CN 109029861 B CN109029861 B CN 109029861B CN 201810765650 A CN201810765650 A CN 201810765650A CN 109029861 B CN109029861 B CN 109029861B
- Authority
- CN
- China
- Prior art keywords
- clustering
- air tightness
- pressure vessel
- image
- centroid
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000001514 detection method Methods 0.000 title claims description 9
- 238000012360 testing method Methods 0.000 claims abstract description 17
- 238000004422 calculation algorithm Methods 0.000 claims description 12
- 230000003628 erosive effect Effects 0.000 claims description 4
- 230000000877 morphologic effect Effects 0.000 claims description 4
- 230000000717 retained effect Effects 0.000 claims description 3
- 238000000034 method Methods 0.000 abstract description 15
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 8
- 238000007689 inspection Methods 0.000 description 5
- 238000007654 immersion Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 208000003464 asthenopia Diseases 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000004880 explosion Methods 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 239000012535 impurity Substances 0.000 description 1
- 239000007788 liquid Substances 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011897 real-time detection Methods 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01M—TESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
- G01M3/00—Investigating fluid-tightness of structures
- G01M3/02—Investigating fluid-tightness of structures by using fluid or vacuum
- G01M3/04—Investigating fluid-tightness of structures by using fluid or vacuum by detecting the presence of fluid at the leakage point
- G01M3/06—Investigating fluid-tightness of structures by using fluid or vacuum by detecting the presence of fluid at the leakage point by observing bubbles in a liquid pool
- G01M3/10—Investigating fluid-tightness of structures by using fluid or vacuum by detecting the presence of fluid at the leakage point by observing bubbles in a liquid pool for containers, e.g. radiators
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20036—Morphological image processing
Landscapes
- Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Bioinformatics & Cheminformatics (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
Abstract
本发明公开了一种基于背景建模与质心聚类的压力容器气密性检测方法,包括如下步骤:步骤1:设压力容器原气压值为P0,T时间后气压值为P1,当P1‑P0≤Δ时,Δ为压差阈值,则表示未加压;当P1‑P0>Δ时,则表示正在加压,气密性试验开始;步骤2:取气密性试验开始后的视频的n帧图像,n=t*f,其中t为试验时长,f为视频帧率;记n帧图像为I1,I2,...,In,对Ii,i=1,2,…,n进行灰度化,得到对应的灰度图Gi;本发明的有益效果是:本发明基于背景建模与质心聚类,结合气泡大小,数量,动态的特性,可以准确判断压力容器的气密性同时准确的定位出漏气区域。
The invention discloses a method for detecting the air tightness of a pressure vessel based on background modeling and centroid clustering. When P 1 ‑P 0 ≤Δ, Δ is the pressure difference threshold, which means no pressurization; when P 1 ‑P 0 >Δ, it means pressurization, and the air tightness test starts; Step 2: Take the air tightness test The n-frame images of the video after the test starts, n=t*f, where t is the test duration, f is the video frame rate; denoting the n-frame images as I 1 , I 2 ,..., I n , for I i , i =1, 2, . , can accurately judge the air tightness of the pressure vessel and accurately locate the leaking area.
Description
技术领域technical field
本发明属于特种设备安全监检领域,具体是一种基于背景建模与质心聚类算法对浸水法中压力容器气密性进行检测的方法。The invention belongs to the field of safety supervision and inspection of special equipment, in particular to a method for detecting the air tightness of a pressure vessel in a water immersion method based on background modeling and a centroid clustering algorithm.
背景技术Background technique
压力容器是存储气体或液体的一种常见设备,属于特种设备范畴。存在质量隐患的压力容器除了产品本身功能会受到影响外,严重时还会引起火灾、爆炸等危险事件,因此压力容器在生产过程中进行气密性试验是确保质量的重要环节。A pressure vessel is a common device for storing gas or liquid and belongs to the category of special equipment. In addition to affecting the function of the product itself, the pressure vessel with hidden quality risks will also cause dangerous events such as fire and explosion in severe cases. Therefore, the air tightness test of the pressure vessel during the production process is an important link to ensure quality.
国内多数压力容器生产厂家使用浸水法进行气密性检测,传统方法通过人工观察水中气泡的情况来确定压力容器的气密性,但是长时间的不间断检测易造成检测人员的眼睛疲劳影响检测精度,导致出现“漏气未检”的情况,同时压力容器生产厂家通常采用计件制,易出现工人主观少检或放弃检验的情况,存在“少检漏检”的问题。Most domestic pressure vessel manufacturers use the water immersion method for air tightness testing. The traditional method determines the air tightness of the pressure vessel by manually observing the air bubbles in the water. However, long-term uninterrupted testing can easily cause eye fatigue of the inspectors and affect the inspection accuracy. , resulting in the situation of "unchecked air leakage". At the same time, pressure vessel manufacturers usually adopt a piece-rate system, which is prone to the situation that workers subjectively underestimate or give up inspections, and there is a problem of "less inspection and leakage inspection".
所以利用计算机视觉技术来对水中气泡进行检测,同时,结合浸水法来对压力容器的气密性进行检测存在较高的可行性和实际意义。Johnsson F(瑞典,ChalmersUniversity of Technology,2004)等利用计算机视觉技术对二维流化床中气泡的大小、速率、空隙率进行研究分析。Busciglio A(意大利,University of Palermo,2009)等在研究气固两相流体中气泡行为时,结合图像处理技术,对气泡的大小、速率进行了检测。O.Zielinski(德国,University of Oldenburg,2010)等将光流法应用于水中气泡的检测,并通过实验分析了可行性。王红一(天津大学,2010)等对气液两相流场中气泡的上升过程进行了研究,使用高速摄像机拍摄了不同直径的漏气点所产生的气泡在上升过程中连续图像,通过计算机视觉技术,对气泡的参数(包括速度、加速度、半径、面积等)进行了测量。邵建斌(西安理工大学,2011)提出了一种基于形态学理论的分水岭算法,对掺气水流图像进行气泡提取,同时提出了由反色,图像灰度调整和低通滤波构成的气泡图像预处理策略。刘伟(东北电力大学,2013)基于数字图像处理技术针对水中气泡图像进行图像增强研究。通过Matlab仿真实验,比较了几种阈值分割的效果,为获取气泡形状特征提供了有效算法。吴春龙(浙江理工大学,2013)提出了一套基于PLC控制的气密性自动检测系统,并将基于光流理论的Hom-Schunck图像处理算法应用于气液两相流场中气泡的识别与跟踪,实现了对压力容器漏气点气泡的检测与识别。甘建伟(西华大学,2015)提出一种基于FPGA的气泡边缘检测图像处理系统。以FPGA为核心,采用Sobel边缘检测算法获取气泡边缘特征,并通过Matlab实验验证了可行性。Therefore, the use of computer vision technology to detect air bubbles in water, and at the same time, combined with the water immersion method to detect the air tightness of pressure vessels has high feasibility and practical significance. Johnsson F (Sweden, Chalmers University of Technology, 2004) and others used computer vision technology to study and analyze the size, velocity and void ratio of bubbles in a two-dimensional fluidized bed. When Busciglio A (Italy, University of Palermo, 2009) studied the behavior of bubbles in gas-solid two-phase fluids, combined with image processing technology, the size and velocity of bubbles were detected. O. Zielinski (Germany, University of Oldenburg, 2010) etc. applied the optical flow method to the detection of air bubbles in water, and analyzed the feasibility through experiments. Wang Hongyi (Tianjin University, 2010) and others studied the rising process of bubbles in the gas-liquid two-phase flow field, and used a high-speed camera to take continuous images of the bubbles generated by leaking points of different diameters during the rising process. Visual technology, the parameters of the bubble (including velocity, acceleration, radius, area, etc.) were measured. Shao Jianbin (Xi'an University of Technology, 2011) proposed a watershed algorithm based on morphological theory to extract bubbles from aerated water flow images, and proposed a bubble image preprocessing consisting of inversion, image grayscale adjustment and low-pass filtering. Strategy. Liu Wei (Northeast Electric Power University, 2013) based on digital image processing technology for image enhancement research on water bubble images. Through Matlab simulation experiment, the effect of several threshold segmentation is compared, which provides an effective algorithm for obtaining bubble shape features. Wu Chunlong (Zhejiang Sci-tech University, 2013) proposed a set of automatic air tightness detection system based on PLC control, and applied the Hom-Schunck image processing algorithm based on optical flow theory to the identification and tracking of bubbles in gas-liquid two-phase flow field , to realize the detection and identification of air bubbles at the leak point of pressure vessels. Gan Jianwei (Xihua University, 2015) proposed an image processing system for bubble edge detection based on FPGA. Taking FPGA as the core, the Sobel edge detection algorithm is used to obtain the bubble edge features, and the feasibility is verified by Matlab experiments.
上述文献中提到的计算机视觉检测技术,对水中气泡进行了初步研究,但仍然存在许多不足:The computer vision detection technology mentioned in the above literature has carried out preliminary research on water bubbles, but there are still many shortcomings:
1)多数算法的实验条件理想化,没有对环境因素的干扰进行考虑,对于外形类似气泡的杂质不能很好的排除;1) The experimental conditions of most algorithms are idealized, and the interference of environmental factors is not considered, and impurities with shapes similar to bubbles cannot be well excluded;
2)有些算法则在计算量和时间复杂度上较高,如基于光流法的气泡识别算法,在气泡较少和速度上升较慢以及没有其他干扰的情况下,算法确实具有良好的可行性和可靠性。但在检测算法计算时间偏长,气泡较多的情况下,不可能达到实时检测的要求。2) Some algorithms have higher computational complexity and time complexity, such as the bubble recognition algorithm based on the optical flow method. In the case of fewer bubbles, slower speed rise and no other interference, the algorithm does have good feasibility. and reliability. However, when the calculation time of the detection algorithm is too long and there are many bubbles, it is impossible to meet the requirements of real-time detection.
3)这些方法中的摄像头都是透过检测池水槽侧面玻璃对压力容器进行拍摄的,每次只能对单一压力容器进行检测,侧重于理论研究,记录气泡产生的过程,分析气泡产生的条件和发展过程。而现实压力容器生产环境中是一个批次的多只压力容器一起送入检测池,并排放置,同时进行浸水法检测的。所以,从侧面拍摄气泡的检测算法无法应用于实际场景。3) The cameras in these methods take pictures of the pressure vessel through the glass on the side of the water tank of the detection pool. Only a single pressure vessel can be detected each time, focusing on theoretical research, recording the process of bubble generation, and analyzing the conditions of bubble generation. and development process. In the actual pressure vessel production environment, a batch of multiple pressure vessels is sent to the detection pool together, placed side by side, and tested by the water immersion method at the same time. Therefore, the detection algorithm of the bubbles shot from the side cannot be applied to the actual scene.
发明内容SUMMARY OF THE INVENTION
为实现客观高效的压力容器气密性检测,以气泡冒出的动态特性、连续性和数量为依据,为克服现有方法的不足,本发明提出一种基于背景建模与质心聚类的压力容器气密性检测方法。In order to realize objective and efficient air tightness detection of pressure vessels, based on the dynamic characteristics, continuity and quantity of bubbles emerging, in order to overcome the shortcomings of existing methods, the present invention proposes a pressure based on background modeling and centroid clustering. Container air tightness testing method.
一种基于背景建模与质心聚类的压力容器气密性检测方法,其特征在于,包括如下步骤:A pressure vessel air tightness detection method based on background modeling and centroid clustering, characterized in that it includes the following steps:
步骤1:设压力容器原气压值为P0,T时间后气压值为P1,当P1-P0≤Δ时,Δ为压差阈值,则表示未加压;当P1-P0>Δ时,则表示正在加压,气密性试验开始;Step 1: Set the original pressure value of the pressure vessel to P 0 , and the pressure value after T time to P 1 . When P 1 -P 0 ≤Δ, Δ is the pressure difference threshold, which means that it is not pressurized; when P 1 -P 0 When >Δ, it means that it is pressurizing, and the air tightness test starts;
步骤2:取气密性试验开始后的视频的n帧图像,n=t*f,其中t为试验时长,f为视频帧率;记n帧图像为I1,I2,...,In,对Ii,i=1,2,…,n进行灰度化,得到对应的灰度图Gi;Step 2: Take n frame images of the video after the air tightness test starts, n=t*f, where t is the test duration, f is the video frame rate; denote n frame images as I 1 , I 2 ,..., I n , grayscale I i , i=1,2,...,n to obtain a corresponding grayscale image G i ;
步骤2.1:取G1进行初始化,建立背景模型,使用G2...Gn更新背景模型,得到前景图像M2...Mn;Step 2.1: take G1 for initialization, establish a background model, update the background model with G2... Gn , and obtain foreground images M2 ... Mn ;
步骤2.2:对M2...Mn进行二值化,得到二值图B2...Bn;Step 2.2: Binarize M 2 ... Mn to obtain binary graphs B 2 ... B n ;
步骤2.3:对图像B2…Bn进行形态学运算,从而得到连通图像Cj,其中Jj={Lju|u=1,2,...,vj},j=2,3,…,n,Jj表示连通图像Cj中连通域的集合,其中X为结构元素,Lju为Jj中的第u个连通区域,vj为Jj中的连通区域个数,运算符“Θ”为腐蚀操作,运算符为膨胀操作;Step 2.3: Perform morphological operations on images B 2 ... B n , Thus, a connected image C j is obtained, where J j ={L ju |u=1,2,...,v j }, j=2,3,...,n, J j represents the connected domain in the connected image C j set, where X is the structuring element, L ju is the u-th connected region in J j , v j is the number of connected regions in J j , the operator "Θ" is the erosion operation, the operator for the expansion operation;
步骤2.4:Nju为连通区域Lju的像素点个数,将所有满足TL<Nju<TU的连通域Lju保留,不满足的剔除,连通图像Cj经剔除后得到Fj,以及Fj的连通域集合Dj={Ljv|v=1,2,...,wj},其中Ljv为Dj中的第v个连通区域,wj为Dj中的连通区域个数,TL为气泡区域像素点数的下界,TU为气泡区域像素点数的上界;Step 2.4: N ju is the number of pixels in the connected region L ju , all connected regions L ju satisfying TL < N ju <TU are retained, and those that are not satisfied are eliminated, and the connected image C j is eliminated to obtain F j , and F The connected domain set of j ={L jv |v=1,2,...,w j }, where L jv is the vth connected region in D j , and w j is the number of connected regions in D j number, TL is the lower bound of the number of pixels in the bubble area, TU is the upper bound of the number of pixels in the bubble area;
步骤2.5:计算连通域集合Dj的连通区域Ljv的质心坐标 m00表示连通区域Ljv的零阶矩,m01、m10表示连通区域Ljv的一阶矩;Step 2.5: Calculate the centroid coordinates of the connected region L jv of the connected domain set D j m 00 represents the zero-order moment of the connected region L jv , m 01 , m 10 represent the first-order moment of the connected region L jv ;
步骤3:采用DBSCAN聚类算法对点集聚类,点集P包含1到m+1帧连通域集合中的全部连通区域质心点坐标,表示得到初始气泡区域的帧数:DBSCAN聚类半径设置为radius,邻域内最少数据点数设置为minPTs,得到的聚类区域Bk,k=0,1,...,g,Bk即为候选漏气区域;Step 3: Use the DBSCAN clustering algorithm to analyze the point set Clustering, the point set P contains the coordinates of the centroid points of all connected regions in the connected domain set of 1 to m+1 frames, Indicates the number of frames to obtain the initial bubble area: the DBSCAN clustering radius is set to radius, the minimum number of data points in the neighborhood is set to minPTs, and the obtained clustering area B k , k=0,1,...,g, B k is Candidate leak area;
步骤3.1:对搜集到的候选漏气区域进行再判断,点集包含m+2帧到n帧连通域集合的全部连通区域质心点坐标,Nk表示聚类区域Bk中包含点集Q中数据点的数量,若Nk>T,表示对应的Bk为漏气区域,T为设定的阈值。Step 3.1: Re-judgment the collected candidate air leakage areas, point set Contains the coordinates of the centroid points of all connected regions in the connected domain set of frames m+2 to n, N k represents the number of data points in the point set Q included in the clustering region B k , if N k >T, it means that the corresponding B k is Air leakage area, T is the set threshold.
本发明的有益效果是:本发明基于背景建模与质心聚类,结合气泡大小,数量,动态的特性,可以准确判断压力容器的气密性同时准确的定位出漏气区域。The beneficial effects of the present invention are: based on background modeling and centroid clustering, combined with bubble size, quantity, and dynamic characteristics, the present invention can accurately determine the air tightness of the pressure vessel and accurately locate the air leakage area.
附图说明Description of drawings
图1为实施例中加压开始的原视频图像;Fig. 1 is the original video image of the pressurization start in the embodiment;
图2为对I100经灰度处理后得到的图像;Fig. 2 is the image obtained after grayscale processing to I 100 ;
图3为图2经过VIBE算法处理得到的前景图像;Fig. 3 is the foreground image that Fig. 2 obtains through VIBE algorithm processing;
图4为图3经过二值化图像;Fig. 4 is the binarized image of Fig. 3;
图5为开运算模板;Figure 5 is an open operation template;
图6为图4经过形态学运算后的连通图像;Fig. 6 is the connected image after morphological operation of Fig. 4;
图7为图6经过大小筛选后的图像;Fig. 7 is the image after size screening of Fig. 6;
图8为确定的候选漏气区域图像;FIG. 8 is an image of the determined candidate air leakage area;
图9为图8经过判断后确定的漏气区域图像。FIG. 9 is an image of the air leakage area determined after the judgment in FIG. 8 .
具体实施方式Detailed ways
下面结合实施例来详细阐述本发明的基于背景建模与质心聚类的压力容器气密性检测方法的具体实施方式。The specific implementation of the method for detecting the airtightness of a pressure vessel based on background modeling and centroid clustering of the present invention will be described in detail below with reference to the examples.
本发明的基于背景建模与质心聚类的压力容器气密性检测方法,具体包括如下步骤:The method for detecting air tightness of a pressure vessel based on background modeling and centroid clustering of the present invention specifically includes the following steps:
步骤1:设压力容器原气压值为P0,T时间后气压值为P1,当P1-P0≤Δ时,Δ为压差阈值,则表示未加压;当P1-P0>Δ时,则表示正在加压,气密性试验开始;Step 1: Set the original pressure value of the pressure vessel to P 0 , and the pressure value after T time to P 1 . When P 1 -P 0 ≤Δ, Δ is the pressure difference threshold, which means that it is not pressurized; when P 1 -P 0 When >Δ, it means that it is pressurizing, and the air tightness test starts;
步骤2:取气密性试验开始后的视频的n帧图像,n=t*f,其中t为试验时长,f为视频帧率;记n帧图像为I1,I2,...,In,对Ii,i=1,2,…,n进行灰度化,得到对应的灰度图Gi;在本实施例中,原视频图像分辨率为640*480,划定了600*220大小的ROI,视频帧率为30,考虑到压力容器加压后保压时长需在1分钟以上,所以t=60s,n=1800,原视频图像如图1所示,对I100经灰度处理后所得的灰度图G100如图2所示;Step 2: Take n frame images of the video after the air tightness test starts, n=t*f, where t is the test duration, f is the video frame rate; denote n frame images as I 1 , I 2 ,..., I n , grayscale I i , i =1, 2, . *220 size ROI, the video frame rate is 30, considering that the pressure holding time of the pressure vessel needs to be more than 1 minute, so t=60s, n=1800, the original video image is shown in Figure 1, for I 100 after The grayscale image G 100 obtained after grayscale processing is shown in Figure 2;
步骤2.1:步骤2.2:取G1进行初始化,建立背景模型,使用G2...Gn更新背景模型,得到前景图像M2...Mn;在本实施例中;使用VIBE背景建模算法,其四个参数分别为N=20,min=20,R=20,前景图像M100如图3所示;Step 2.1: Step 2.2: take G1 for initialization, establish a background model, update the background model with G2... Gn , and obtain foreground images M2 ... Mn ; in this embodiment; use VIBE background modeling algorithm, its four parameters are N=20, min=20, R=20, The foreground image M 100 is shown in Figure 3;
步骤2.2:对M2...Mn进行二值化,得到二值图B2...Bn;在本实施例中设定127为阈值进行二值化,所得到的二值图B2如图4所示;Step 2.2: Binarize M 2 ... Mn to obtain a binary graph B 2 ... B n ; in this embodiment, set 127 as the threshold to perform binarization, and obtain a binary graph B 2 As shown in Figure 4;
步骤2.3:对图像B2…Bn进行形态学运算,从而得到连通图像Cj,其中Jj={Lju|u=1,2,...,vj},j=2,3,…,n,Jj表示连通图像Cj中连通域的集合,其中X为结构元素,Lju为Jj中的第u个连通区域,vj为Jj中的连通区域个数,运算符“Θ”为腐蚀操作,运算符为膨胀操作;即先通过腐蚀操作去除小块噪点,再通过膨胀操作将气泡区域连接填充。在本实施例中结构元素模板X为如图5所示的3*3正方形,每个连通区域即代表一个疑似气泡,所得的连通图像C100如图6所示;Step 2.3: Perform morphological operations on images B 2 ... B n , Thus, a connected image C j is obtained, where J j ={L ju |u=1,2,...,v j }, j=2,3,...,n, J j represents the connected domain in the connected image C j set, where X is the structuring element, L ju is the u-th connected region in J j , v j is the number of connected regions in J j , the operator "Θ" is the erosion operation, the operator It is the expansion operation; that is, first remove small noises through the erosion operation, and then connect and fill the bubble area through the expansion operation. In this embodiment, the structural element template X is a 3*3 square as shown in FIG. 5 , each connected area represents a suspected bubble, and the obtained connected image C 100 is shown in FIG. 6 ;
步骤2.4:Nju为连通区域Lju的像素点个数,将所有满足TL<Nju<TU的连通域Lju保留,不满足的剔除,连通图像Cj经剔除后得到Fj,以及Fj的连通域集合Dj={Ljv|v=1,2,...,wj},其中Ljv为Dj中的第v个连通区域,wj为Dj中的连通区域个数,TL为气泡区域像素点数的下界,TU为气泡区域像素点数的上界;在本实施例中原图像分辨率为640*480,根据气泡的大小,TL=10,TU=100,使用cvfindcontours函数,获取连通域轮廓,对于01二值图像,轮廓的零阶矩m00即为连通域的面积即Nju。F100为C100经过大小筛选后的图像,F100如图7所示;Step 2.4: N ju is the number of pixels in the connected region L ju , all connected regions L ju satisfying TL < N ju <TU are retained, and those that are not satisfied are eliminated, and the connected image C j is eliminated to obtain F j , and F The connected domain set of j ={L jv |v=1,2,...,w j }, where L jv is the vth connected region in D j , and w j is the number of connected regions in D j number, TL is the lower bound of the number of pixels in the bubble area, TU is the upper bound of the number of pixels in the bubble area; in this embodiment, the original image resolution is 640*480, according to the size of the bubble, TL=10, TU=100, use the cvfindcontours function , to obtain the contour of the connected domain. For the 01 binary image, the zero-order moment m 00 of the contour is the area of the connected domain, namely N ju . F 100 is the size-filtered image of C 100 , and F 100 is shown in Figure 7;
步骤2.5:计算连通域集合Dj的连通区域Ljv的质心坐标 m00表示连通区域Ljv的零阶矩,m01、m10表示连通区域Ljv的一阶矩;Step 2.5: Calculate the centroid coordinates of the connected region L jv of the connected domain set D j m 00 represents the zero-order moment of the connected region L jv , m 01 , m 10 represent the first-order moment of the connected region L jv ;
步骤3:采用DBSCAN聚类算法对点集聚类,点集P包含1到m+1帧连通域集合中的全部连通区域质心点坐标,表示得到初始气泡区域的帧数:DBSCAN聚类半径设置为radius,邻域内最少数据点数设置为minPTs,得到的聚类区域Bk,k=0,1,...,g,Bk即为候选漏气区域;在本实施例中,m=300,结合图像大小和气泡冒出的频率设置参数radius=50,minPTs=300,即在300帧Fj中,若任意半径为50的区域有超过300个质心点,即认定是漏气区域同时标出漏气区域,找到的疑似漏气区域如图8所示;Step 3: Use the DBSCAN clustering algorithm to analyze the point set Clustering, the point set P contains the coordinates of the centroid points of all connected regions in the connected domain set of 1 to m+1 frames, Indicates the number of frames to obtain the initial bubble area: the DBSCAN clustering radius is set to radius, the minimum number of data points in the neighborhood is set to minPTs, and the obtained clustering area B k , k=0,1,...,g,B k is Candidate air leakage area; in this embodiment, m=300, the parameters radius=50, minPTs=300 are set in combination with the image size and the frequency of bubbles emerging, that is, in 300 frames Fj , if any area with a radius of 50 has If there are more than 300 centroid points, it is determined to be an air leakage area and the air leakage area is marked. The found suspected air leakage area is shown in Figure 8;
步骤3.1:对搜集到的候选漏气区域进行再判断,点集包含m+2帧到n帧连通域集合的全部连通区域质心点坐标,Nk表示聚类区域Bk中包含点集Q中数据点的数量,若Nk>T,表示对应的Bk为漏气区域,T为设定的阈值。在本实施例中,结合视频帧率,k=2,T=2*(n-m)=2*(1800-300)=3000,如图9所示为最终确定的漏气区域,该压力容器存在漏气情况;Step 3.1: Re-judgment the collected candidate air leakage areas, point set Contains the coordinates of the centroid points of all connected regions in the connected domain set of frames m+2 to n, N k represents the number of data points in the point set Q included in the clustering region B k , if N k >T, it means that the corresponding B k is Air leakage area, T is the set threshold. In this embodiment, combined with the video frame rate, k=2, T=2*(nm)=2*(1800-300)=3000, as shown in FIG. 9 is the finally determined air leakage area, the pressure vessel exists air leakage;
本说明书实施例所述的内容仅仅是对发明构思的实现形式的列举,本发明的保护范围的不应当被视为仅限于实施例所陈述的具体形式,本发明的保护范围也及于本领域技术人员根据本发明构思所能够想到的等同技术手段。The content described in the embodiments of the present specification is only an enumeration of the realization forms of the inventive concept, and the protection scope of the present invention should not be regarded as limited to the specific forms stated in the embodiments, and the protection scope of the present invention also extends to the field Equivalent technical means that can be conceived by a skilled person according to the inventive concept.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810765650.3A CN109029861B (en) | 2018-07-12 | 2018-07-12 | A pressure vessel air tightness detection method based on background modeling and centroid clustering |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810765650.3A CN109029861B (en) | 2018-07-12 | 2018-07-12 | A pressure vessel air tightness detection method based on background modeling and centroid clustering |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109029861A CN109029861A (en) | 2018-12-18 |
CN109029861B true CN109029861B (en) | 2020-01-07 |
Family
ID=64640893
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810765650.3A Active CN109029861B (en) | 2018-07-12 | 2018-07-12 | A pressure vessel air tightness detection method based on background modeling and centroid clustering |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109029861B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109523549B (en) * | 2018-12-26 | 2021-07-27 | 浙江工业大学 | An air leak area detection method for air tightness test of pressure vessel |
CN109520678B (en) * | 2018-12-26 | 2021-01-19 | 浙江工业大学 | A pressure-holding detection method for air-tightness test of pressure vessel |
CN112232283B (en) * | 2020-11-05 | 2023-09-01 | 深兰科技(上海)有限公司 | Bubble detection method and system based on optical flow and C3D network |
CN114878087B (en) * | 2022-06-07 | 2023-04-25 | 江苏省特种设备安全监督检验研究院 | Pressure container air tightness detection method and device based on artificial intelligence |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS61148338A (en) * | 1984-12-24 | 1986-07-07 | Hitachi Ltd | Inspection equipment |
JP2004361085A (en) * | 2003-05-30 | 2004-12-24 | Toshiba Corp | Visual examination device |
CN103216731B (en) * | 2013-05-08 | 2015-02-04 | 西安理工大学 | Pipeline leakage judgment method and system thereof |
CN105389814B (en) * | 2015-11-03 | 2017-12-08 | 浙江工业大学 | A kind of bubble detecting method for air-tight test |
CN106802215A (en) * | 2015-11-20 | 2017-06-06 | 沈阳新松机器人自动化股份有限公司 | A kind of device for detecting water leakage of water pipe and detection method |
JP6639896B2 (en) * | 2015-12-18 | 2020-02-05 | ダイハツ工業株式会社 | Airtightness inspection device |
CN107084991A (en) * | 2017-04-10 | 2017-08-22 | 武汉理工大学 | Bubble detection and quality classification method of quartz rod based on machine vision |
CN107705288B (en) * | 2017-09-04 | 2021-06-01 | 武汉工程大学 | Infrared video detection method of dangerous gas leakage under strong interference of false target movement |
-
2018
- 2018-07-12 CN CN201810765650.3A patent/CN109029861B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN109029861A (en) | 2018-12-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109029861B (en) | A pressure vessel air tightness detection method based on background modeling and centroid clustering | |
CN109115417B (en) | Pressure container air tightness detection method based on connected domain judgment | |
CN105976352B (en) | One kind being based on the morphologic face of weld defect characteristic extracting method of gray level image | |
CN111047568B (en) | Method and system for detecting and identifying steam leakage defect | |
CN105139386B (en) | A kind of image processing method of fast automatic detecting electric connector solder joint defective work | |
CN105389814B (en) | A kind of bubble detecting method for air-tight test | |
CN103499585B (en) | Based on noncontinuity lithium battery film defect inspection method and the device thereof of machine vision | |
CN107782733A (en) | Image recognition the cannot-harm-detection device and method of cracks of metal surface | |
Gao et al. | A mechanism and method of leak detection for pressure vessel: Whether, when, and how | |
CN108844961A (en) | A kind of temperature controller case vision detection system and method | |
Dussol et al. | Automatic dynamic mask extraction for PIV images containing an unsteady interface, bubbles, and a moving structure | |
CN107677372A (en) | A kind of tunnel detection method based on binocular vision | |
Hernández et al. | Water elevation measurements using binary image analysis for 2D hydrodynamic experiments | |
CN105374035A (en) | Star sensor star point extraction method under stray light interference | |
CN114719749A (en) | Method and system for metal surface crack detection and real size measurement based on machine vision | |
Rani et al. | Detection of edges using mathematical morphological operators | |
CN111178424A (en) | A real-time detection system and method for safety compliance of petrochemical production site | |
CN102621154A (en) | Method and device for automatically detecting cloth defects on line based on improved differential box multi-fractal algorithm | |
CN109115418B (en) | An air-tightness detection method for pressure vessels based on area division | |
CN103258218B (en) | Masking-out detects skeleton generating method, device, defect inspection method and device | |
CN109523549A (en) | A kind of leak area detection method for pressure vessel air tightness test | |
CN110660048B (en) | Leather surface defect detection method based on shape characteristics | |
Chang et al. | Pier scour monitoring system by bed-level image tracking | |
RU2292540C9 (en) | Method (versions), equipment and system of controlling of automated finding of visualized gas leakage point source | |
CN117648889B (en) | Method for measuring velocity of blowout fluid based on interframe difference method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |