CN114627287A - Artificial intelligence-based air-tightness detection method and system for water turbidity detection - Google Patents

Artificial intelligence-based air-tightness detection method and system for water turbidity detection Download PDF

Info

Publication number
CN114627287A
CN114627287A CN202210150508.4A CN202210150508A CN114627287A CN 114627287 A CN114627287 A CN 114627287A CN 202210150508 A CN202210150508 A CN 202210150508A CN 114627287 A CN114627287 A CN 114627287A
Authority
CN
China
Prior art keywords
bubble
attached
bubbles
characteristic parameters
turbidity
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.)
Pending
Application number
CN202210150508.4A
Other languages
Chinese (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.)
Nanjing Sanweimu Technology Co ltd
Original Assignee
Nanjing Sanweimu Technology Co ltd
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 Nanjing Sanweimu Technology Co ltd filed Critical Nanjing Sanweimu Technology Co ltd
Priority to CN202210150508.4A priority Critical patent/CN114627287A/en
Publication of CN114627287A publication Critical patent/CN114627287A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computing Systems (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Investigating Or Analysing Materials By Optical Means (AREA)

Abstract

The invention relates to the technical field of artificial intelligence, in particular to a method and a system for detecting water turbidity in air tightness detection based on artificial intelligence, wherein the method comprises the following steps: acquiring a cylinder wall image of a detection cylinder, and detecting attached bubbles on the cylinder wall to obtain an attached bubble image; clustering the attached bubbles based on the gray level to obtain bubble areas under each gray level category; selecting a sub-area with the largest attached bubble density in each bubble area; acquiring texture characteristic parameters and light and shade contrast characteristic parameters of each subregion, wherein the texture characteristic parameters comprise energy, contrast, correlation and entropy, and the light and shade contrast characteristic parameters are obtained according to the difference value of the grayscale of the subregions and the grayscale of the cylinder wall; selecting a subregion most capable of reacting the turbidity of the water by using an analytic hierarchy process; and detecting the water turbidity according to the texture characteristic parameters and the light and shade contrast characteristic parameters of the selected sub-regions. The invention can obtain more accurate and effective detection results of the water turbidity.

Description

基于人工智能的气密性检测中水浑浊度检测方法及系统Artificial intelligence-based air-tightness detection method and system for water turbidity detection

技术领域technical field

本发明涉及人工智能领域,具体涉及一种基于人工智能的气密性检测中水浑浊度检测方法及系统。The invention relates to the field of artificial intelligence, in particular to a method and system for detecting turbidity of water in air tightness detection based on artificial intelligence.

背景技术Background technique

泡水法是最常使用的传统气密性检测方法之一,然而无论是直接泡水法还是间接泡水法,随着时间的推移水体的浑浊度都在逐渐增加。一方面由于所检测的器件附带的由油污灰尘等污染物,另一方面则是水体本身携带的污染物越来越多,因此当水体到达一定的浑浊程度时需要及时换水来保证检测结果的可靠性。传统的换水周期基本依靠人的主观判断,因此对具体浑浊度的判断会出现诸多不确定性,不仅会浪费水资源还会导致检测结果的误差增大。常规针对浑浊度的判断一般仅基于亮度值、色调等单一因素,检测结果不准确。The water immersion method is one of the most commonly used traditional air tightness detection methods. However, whether it is the direct immersion method or the indirect water immersion method, the turbidity of the water body gradually increases over time. On the one hand, due to the pollutants such as oil and dust attached to the detected device, on the other hand, the water body itself carries more and more pollutants. Therefore, when the water body reaches a certain degree of turbidity, it is necessary to change the water in time to ensure the detection results. reliability. The traditional water exchange cycle basically relies on human subjective judgment, so there will be many uncertainties in the judgment of specific turbidity, which will not only waste water resources but also lead to increased errors in the detection results. The conventional judgment of turbidity is generally only based on a single factor such as brightness value and hue, and the detection result is inaccurate.

发明内容SUMMARY OF THE INVENTION

为了解决上述技术问题,本发明的目的在于提供一种基于人工智能的气密性检测中水浑浊度检测方法及系统,所采用的技术方案具体如下:In order to solve the above-mentioned technical problems, the object of the present invention is to provide a kind of artificial intelligence-based air tightness detection method and system for water turbidity detection, and the technical scheme adopted is as follows:

第一方面,本发明一个实施例提供了一种基于人工智能的气密性检测中水浑浊度检测方法,该方法包括以下具体步骤:In a first aspect, an embodiment of the present invention provides an artificial intelligence-based air tightness detection method for detecting turbidity in water, the method comprising the following specific steps:

获取检测缸的缸壁图像,进行缸壁上依附气泡的检测,得到依附气泡图;Obtain the image of the cylinder wall of the detection cylinder, detect the attached bubbles on the cylinder wall, and obtain the attached bubble map;

基于灰度,对依附气泡进行聚类,得到各灰度类别下的气泡区域;在每个气泡区域中选择依附气泡密度最大的子区域;Based on the gray level, the dependent bubbles are clustered to obtain the bubble regions under each gray level; the sub-region with the largest density of dependent bubbles is selected in each bubble region;

获取各子区域的纹理特征参数和明暗对比特征参数,其中,纹理特征参数包括能量、对比度、相关度和熵,明暗对比特征参数根据子区域灰度和缸壁灰度的差值得到;Obtain the texture feature parameters and light-dark contrast feature parameters of each sub-region, wherein the texture feature parameters include energy, contrast, correlation and entropy, and the light-dark contrast feature parameters are obtained according to the difference between the sub-region grayscale and the cylinder wall grayscale;

利用层次分析法,选择最能反应水浑浊度的子区域,具体地,层次结构模型中目标层为最能反应水浑浊度的子区域,准则层为纹理特征参数和明暗对比特征参数,方案层为各个子区域;Using AHP, select the sub-region that can best reflect water turbidity. Specifically, in the hierarchical structure model, the target layer is the sub-region that can best reflect water turbidity, the criterion layer is texture feature parameters and light-dark contrast feature parameters, and the scheme layer is the sub-region that can best reflect water turbidity. for each subregion;

根据所选子区域的纹理特征参数和明暗对比特征参数进行水浑浊度的检测。The water turbidity is detected according to the texture feature parameters and light-dark contrast feature parameters of the selected sub-regions.

进一步地,Canopy聚类与均值聚类相结合,对依附气泡进行聚类。Further, Canopy clustering is combined with mean clustering to cluster attachment bubbles.

进一步地,在每个气泡区域中选择依附气泡密度最大的子区域,具体为:Further, in each bubble region, select the subregion with the largest density of attached bubbles, specifically:

基于气泡区域中各依附气泡的像素点坐标进行遍历搜索,获取该气泡区域中内由依附气泡组成的最大凸包;获取凸包的质心,计算凸包质心到气泡区域中各依附气泡质心的距离均值,以该气泡区域中内任意一个依附气泡的质心为初始圆心,以距离均值为半径,得到初始圆;Perform a traversal search based on the pixel coordinates of each attached bubble in the bubble area to obtain the largest convex hull composed of the attached bubbles in the bubble area; obtain the centroid of the convex hull, and calculate the distance from the centroid of the convex hull to the centroid of each attached bubble in the bubble area mean, take the centroid of any attached bubble in the bubble area as the initial circle center, and take the mean distance as the radius to obtain the initial circle;

根据初始圆心指向初始圆内各依附气泡的若干向量获取主成分方向,过初始圆心且与主成分方向所在直线垂直的直线的两侧依附气泡数量较多一侧的依附气泡为待遍历气泡;根据初始圆心指向各待遍历气泡的若干向量在主成分方向的投影长度确定新的圆心,仍以所述距离均值为半径,生成新的圆;The principal component direction is obtained according to several vectors whose initial circle center points to each attached bubble in the initial circle. The attached bubbles on both sides of the line passing through the initial circle center and perpendicular to the line where the principal component direction is located are the side with the larger number of attached bubbles as the bubbles to be traversed; according to The initial circle center points to the projection length of several vectors of the bubbles to be traversed in the direction of the principal component to determine the new circle center, and still takes the average distance as the radius to generate a new circle;

不断生成新的圆,直至收敛至依附气泡密度最大的地方,收敛时圆的位置为所述子区域。A new circle is continuously generated until it converges to the place where the density of the attached bubbles is the largest, and the position of the circle when it converges is the sub-region.

进一步地,利用层次分析法可得到各个特征参数的权重,基于所选子区域的各个特征参数和相应的权重,利用模糊综合评价法,进行水浑浊度的检测。Further, the weight of each feature parameter can be obtained by using AHP, and based on each feature parameter and corresponding weight of the selected sub-region, the fuzzy comprehensive evaluation method is used to detect water turbidity.

进一步地,所述缸壁图像的获取具体为,采集检测缸的正视图像,在所述正视图像中截取缸壁区域,经过透视变换,得到缸壁图像。Further, the acquisition of the cylinder wall image is specifically as follows: collecting a front view image of the detection cylinder, intercepting the cylinder wall region from the front view image, and obtaining the cylinder wall image through perspective transformation.

进一步地,利用语义分割网络,进行缸壁上依附气泡的检测。Further, a semantic segmentation network is used to detect the attached bubbles on the cylinder wall.

第二方面,本发明另一个实施例提供了一种基于人工智能的气密性检测中水浑浊度检测系统,该系统具体包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,所述计算机程序被处理器执行时实现一种基于人工智能的气密性检测中水浑浊度检测方法的步骤。In a second aspect, another embodiment of the present invention provides an artificial intelligence-based air-tightness detection system for water turbidity detection. The system specifically includes a memory, a processor, and a system stored in the memory and running on the processor. A computer program, when the computer program is executed by a processor, realizes the steps of an artificial intelligence-based airtightness detection method for water turbidity detection.

本发明实施例至少具有如下有益效果:本发明可以更为灵敏准确的得到反映水体浑浊程度的观察因素;由灰度共生矩阵得到的各纹理特征参数搭配明暗对比特征参数结合模糊分析相应算法得到水体浑浊度的过程,全面分析了水体变浑浊过程中的主要变化因素,并确定各因素在反应水体变化中的权重值,进而得到更为准确有效的水浑浊度的检测结果,且本发明计算量小。The embodiment of the present invention has at least the following beneficial effects: the present invention can more sensitively and accurately obtain the observation factor reflecting the turbidity of the water body; each texture feature parameter obtained from the grayscale co-occurrence matrix is combined with the light-dark contrast feature parameter combined with the corresponding algorithm of fuzzy analysis to obtain the water body The process of turbidity, comprehensively analyzes the main change factors in the process of water body becoming turbid, and determines the weight value of each factor in the reaction of water body changes, and then obtains more accurate and effective detection results of water turbidity, and the present invention calculates the amount of Small.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案和优点,下面将对实施例或现有技术描述中所需要使用的附图作简单的介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它附图。In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or in the prior art, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description The drawings are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.

图1为本发明实施例中的缸壁区域示意图。FIG. 1 is a schematic diagram of a cylinder wall area in an embodiment of the present invention.

具体实施方式Detailed ways

为了更进一步阐述本发明为达成预定发明目的所采取的技术手段及功效,以下结合较佳实施例,对依据本发明提出的一种基于人工智能的气密性检测中水浑浊度检测方法及系统,其具体实施方式、结构、特征及其功效,详细说明如下。在下述说明中,不同的“一个实施例”或“另一个实施例”指的不一定是同一实施例。此外,一或多个实施例中的特定特征、结构、或特点可由任何合适形式组合。In order to further illustrate the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the following describes a method and system for detecting turbidity in water in air tightness detection based on artificial intelligence according to the present invention in conjunction with the preferred embodiments. , its specific implementation, structure, features and effects are described in detail as follows. In the following description, different "one embodiment" or "another embodiment" are not necessarily referring to the same embodiment. Furthermore, the particular features, structures, or characteristics in one or more embodiments may be combined in any suitable form.

除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

本发明实施例以下面的应用场景为例对本发明进行说明:The embodiments of the present invention take the following application scenarios as examples to illustrate the present invention:

该应用场景为:基于视觉感知的方法来检测气密性检测缸中的水体浑浊度,进而帮助管理人员对水体状态的实时掌控,并对浑浊度高的水体进行及时更换,具体地,可在水体稳定且相机固定视角状态下定时进行图像采集,基于采集的图像获取水浑浊度检测结果,因此,本发明需要设置图像的采集间隔T,如T=3时则代表每3天进行一次图像采集,具体的T值可根据每个气密性装置所处环境的不同而灵活设置;需要注意,本发明中的检测缸需要是透明的检测缸,或其中几个侧面是透明的检测缸,即可透过检测缸侧面看到待检测装置。The application scenario is: based on the visual perception method to detect the turbidity of the water body in the air tightness detection tank, so as to help managers to control the state of the water body in real time, and to replace the water body with high turbidity in time. When the water body is stable and the camera has a fixed angle of view, image acquisition is performed regularly, and the water turbidity detection result is obtained based on the acquired image. Therefore, the present invention needs to set the image acquisition interval T. For example, when T=3, it means that image acquisition is performed every 3 days. , the specific T value can be flexibly set according to the different environments of each air tightness device; it should be noted that the detection cylinder in the present invention needs to be a transparent detection cylinder, or several sides of which are transparent detection cylinders, namely The device to be inspected can be seen through the side of the inspection cylinder.

本发明一个实施例提供了一种基于人工智能的气密性检测中水浑浊度检测方法,该方法包括以下步骤:An embodiment of the present invention provides a method for detecting turbidity of water in air-tightness detection based on artificial intelligence, the method comprising the following steps:

步骤S1,获取检测缸的缸壁图像,进行缸壁上依附气泡的检测,得到依附气泡图。In step S1, the image of the cylinder wall of the detection cylinder is acquired, and the detection of the attached bubbles on the cylinder wall is performed to obtain the attached bubble map.

(a)采集检测缸的正视图像,实施例中正视图像如图1所示,在所述正视图像中截取缸壁区域,经过透视变换,得到缸壁图像。其中,实施例中选择气泡最清晰密集的一侧缸壁,缸壁上位于待检测装置上方、水面以下的区域为缸壁区域,实施例中缸壁区域为图1中右侧黑色矩形框出来的区域。(a) Collect the front view image of the detection cylinder. In the embodiment, the front view image is shown in FIG. 1 . The cylinder wall area is intercepted from the front view image, and the cylinder wall image is obtained through perspective transformation. Among them, in the embodiment, the side of the cylinder wall with the clearest and densest bubbles is selected, and the area on the cylinder wall above the device to be detected and below the water surface is the cylinder wall area, and in the embodiment, the cylinder wall area is the black rectangular frame on the right side in Figure 1. Area.

进行透视变换的目的是减少因视角不同造成的气泡面积误差,具体地,透视变换是将图片从二维(x,y)到三维(X,Y,Z)再到另一个二维(x’,y’)空间的映射,是基于图像的四个固定顶点的变换,即缸壁区域的四个角点;透视变换通过矩阵乘法实现,使用的是一个

Figure 558451DEST_PATH_IMAGE001
的矩阵,具体公式为:The purpose of perspective transformation is to reduce the bubble area error caused by different viewing angles. ,y') space mapping is based on the transformation of the four fixed vertices of the image, that is, the four corners of the cylinder wall area; the perspective transformation is achieved by matrix multiplication, using a
Figure 558451DEST_PATH_IMAGE001
matrix, the specific formula is:

Figure 85248DEST_PATH_IMAGE002
Figure 85248DEST_PATH_IMAGE002

进而:and then:

Figure 222968DEST_PATH_IMAGE003
Figure 222968DEST_PATH_IMAGE003

最后:at last:

Figure 481911DEST_PATH_IMAGE004
Figure 481911DEST_PATH_IMAGE004

Figure 564136DEST_PATH_IMAGE005
Figure 564136DEST_PATH_IMAGE005

其中,矩阵的前两行实现了线性变换和平移,第三行用于实现透视变换。至此,得到的经过透视变换的缸壁图像,缸壁图像为正视图像。Among them, the first two rows of the matrix implement linear transformation and translation, and the third row is used to implement perspective transformation. So far, the obtained cylinder wall image after perspective transformation, the cylinder wall image is a front view image.

(b)优选地,实施例利用语义分割网络,进行缸壁上依附气泡的检测。(b) Preferably, the embodiment utilizes a semantic segmentation network to detect the adhering air bubbles on the cylinder wall.

语义分割网络为Encoder-Decoder的结构,具体训练内容如下:The semantic segmentation network is the structure of Encoder-Decoder, and the specific training content is as follows:

(1) 采集含有依附气泡的正视缸壁图像构建训练数据集,对训练数据集进行标注,依附气泡标注为1,其他则标注为0。其中随机选择数据的80%作为训练集,剩余的20%作为验证集。(1) Collect the images of facing the cylinder wall with attached bubbles to construct a training data set, and mark the training data set. The attached bubbles are marked as 1, and the others are marked as 0. Among them, 80% of the data is randomly selected as the training set, and the remaining 20% is used as the validation set.

(2) 将训练图像和标签数据输入语义分割网络中,Encoder抽取图像特征,并将通道数变换为类别个数,得到特征图;然后通过Decoder将特征图的高和宽变换为输入图像的尺寸,从而输出每个像素的类别。(2) Input the training image and label data into the semantic segmentation network, the Encoder extracts the image features, and converts the number of channels into the number of categories to obtain the feature map; then the height and width of the feature map are transformed into the size of the input image through the Decoder , which outputs the class of each pixel.

(3) Loss函数使用交叉熵损失函数进行训练。(3) The Loss function is trained using the cross-entropy loss function.

将通过语义分割网络得到的依附气泡分割图与缸壁图像做乘法得到只包括依附气泡的依附气泡图。Multiply the attached bubble segmentation map obtained by the semantic segmentation network with the cylinder wall image to obtain the attached bubble map including only the attached bubbles.

步骤S2,基于灰度,对依附气泡进行聚类,得到各灰度类别下的气泡区域;在每个气泡区域中选择依附气泡密度最大的子区域。Step S2, clustering the dependent bubbles based on the gray level to obtain the bubble regions under each gray level category; in each bubble region, select the sub-region with the largest density of the dependent bubbles.

(a)将依附气泡图转换为灰度图,由于光照原因,导致成像中各个气泡的灰度并不一致,因此本发明中使用Canopy与均值聚类相结合的方法来对气泡的灰度进行分类;使用Canopy聚类算法的原因在于该算法不需要事先指定k值(即clustering的个数),因此可首先根据该算法对数据进行粗聚类,得到k值后在使用均值聚类进行细聚类,聚类完成后,得到各灰度类别下的气泡区域。(a) Convert the attached bubble map to a grayscale image. Due to illumination, the grayscale of each bubble in the imaging is inconsistent. Therefore, in the present invention, a method combining Canopy and mean clustering is used to classify the grayscale of the bubbles ; The reason for using the Canopy clustering algorithm is that the algorithm does not need to specify the k value (that is, the number of clustering) in advance, so the data can be roughly clustered according to the algorithm, and then the mean clustering can be used to fine cluster after the k value is obtained. After the clustering is completed, the bubble area under each grayscale category is obtained.

(b)在每个气泡区域中选择依附气泡密度最大的子区域:(b) In each bubble region, select the subregion with the largest density of attached bubbles:

对于每个气泡区域,基于气泡区域中各依附气泡的像素点坐标进行遍历搜索,获取该气泡区域中内由依附气泡组成的最大凸包;获取凸包的质心,计算凸包质心到气泡区域中各依附气泡质心的距离均值,以该气泡区域中内任意一个依附气泡的质心为初始圆心,以距离均值为半径,得到初始圆。For each bubble area, perform a traversal search based on the pixel coordinates of each attached bubble in the bubble area to obtain the largest convex hull composed of the attached bubbles in the bubble area; obtain the centroid of the convex hull, and calculate the centroid of the convex hull into the bubble area The mean value of the distance between the centroids of each attached bubble, taking the centroid of any attached bubble in the bubble area as the initial circle center, and taking the mean distance as the radius, the initial circle is obtained.

根据初始圆心指向初始圆内各依附气泡的若干向量获取主成分方向,过初始圆心且与主成分方向所在直线垂直的直线的两侧依附气泡数量较多一侧的依附气泡为待遍历气泡;根据初始圆心指向各待遍历气泡的若干向量在主成分方向的投影长度确定新的圆心,仍以所述距离均值为半径,生成新的圆,即所有生成的圆的大小相同。其中,做主成分方向所在直线的垂线,位于垂线两侧的待遍历气泡对应的投影长度有正负之分,即投影长度有两个方向;计算初始圆心指向各待遍历气泡的若干向量在主成分方向的投影长度的均值,得到平均投影长度,同时也可得到平均投影长度的方向,进而得到平均投影长度的端点所在位置,与该位置距离最近的依附气泡质心点为新的圆心。The principal component direction is obtained according to several vectors whose initial circle center points to each attached bubble in the initial circle. The attached bubbles on both sides of the line passing through the initial circle center and perpendicular to the line where the principal component direction is located are the side with the larger number of attached bubbles as the bubbles to be traversed; according to The initial circle center points to the projected length of several vectors of the bubbles to be traversed in the direction of the principal component to determine the new circle center, and the average distance is still used as the radius to generate a new circle, that is, all the generated circles have the same size. Among them, as the vertical line of the line where the direction of the principal component is located, the projected lengths corresponding to the bubbles to be traversed on both sides of the vertical line are divided into positive and negative, that is, the projected lengths have two directions; the initial circle center points to several vectors to be traversed. The average projection length of the principal component direction can be obtained to obtain the average projection length, and at the same time, the direction of the average projection length can be obtained, and then the position of the endpoint of the average projection length can be obtained.

不断生成新的圆,直至收敛至依附气泡密度最大的地方,收敛时圆的位置为所述子区域;多次迭代后,新的圆心的位置不发生改变,则基于该圆心得到的圆区域为依附气泡密度最大的子区域。Continue to generate new circles until it converges to the place with the largest density of attached bubbles, and the position of the circle when it converges is the sub-region; after multiple iterations, the position of the new center of the circle does not change, then the circle region obtained based on the center of the circle is The sub-region with the highest density of attached bubbles.

至此,可得到每个气泡区域中依附气泡密度最大的子区域,子区域为圆形。So far, the sub-region with the largest density of attached bubbles in each bubble region can be obtained, and the sub-region is circular.

步骤S3,获取各子区域的纹理特征参数和明暗对比特征参数,其中,纹理特征参数包括能量、对比度、相关度和熵,明暗对比特征参数根据子区域灰度和缸壁灰度的差值得到;利用层次分析法,选择最能反应水浑浊度的子区域,具体地,层次结构模型中目标层为最能反应水浑浊度的子区域,准则层为纹理特征参数和明暗对比特征参数,方案层为各个子区域。Step S3, acquiring the texture feature parameters and light-dark contrast feature parameters of each sub-region, wherein the texture feature parameters include energy, contrast, correlation and entropy, and the light-dark contrast feature parameters are obtained according to the difference between the sub-region grayscale and the cylinder wall grayscale. ;Using the analytic hierarchy process, select the sub-region that can best reflect water turbidity. Specifically, in the hierarchical structure model, the target layer is the sub-region that can best reflect water turbidity, and the criterion layer is texture feature parameters and light-dark contrast feature parameters. Layers are sub-regions.

(a)对于每个子区域,计算其对应的灰度共生矩阵,然后透过计算灰度共生矩阵得到矩阵的部分特征值,来分别代表图像的纹理特征;使用灰度共生矩阵的原因在于其能较为全面的反映图像关于方向、相邻间隔、变化幅度等综合信息,因此在后续的模糊分析法中能更加准确的反映出水体的变化情况。(a) For each sub-region, calculate the corresponding grayscale co-occurrence matrix, and then obtain some eigenvalues of the matrix by calculating the gray-level co-occurrence matrix to represent the texture features of the image respectively; the reason for using the gray-level co-occurrence matrix is that it can It can comprehensively reflect the comprehensive information about the direction, adjacent interval, and change range of the image, so the subsequent fuzzy analysis method can more accurately reflect the change of the water body.

实施例选取灰度共生矩阵四个最常用的特征参数来提取图像的纹理特征,四种特征及其代表的含义分别如下:The embodiment selects the four most commonly used feature parameters of the gray level co-occurrence matrix to extract the texture features of the image. The four features and their representative meanings are as follows:

能量γ;能量是灰度共生矩阵各元素的平方和,又称为角二阶矩,是图像纹理灰度变化均匀的度量,反映了图像灰度分布均匀程度和纹理粗细程度。Energy γ; Energy is the sum of squares of each element of the gray co-occurrence matrix, also known as the second-order moment of angle.

对比度ε;对比度是灰度共生矩阵主对角线附近的惯性矩,体现了矩阵的值如何分布,反映了图像的清晰度和纹理沟纹的深浅。Contrast ε; Contrast is the moment of inertia near the main diagonal of the grayscale co-occurrence matrix, which reflects how the values of the matrix are distributed, and reflects the clarity of the image and the depth of the texture grooves.

相关度ϵ;相关度体现了空间灰度共生矩阵元素在行或列方向上的相似程度,反映了图像局部灰度的相关性。Correlation degree ϵ; the correlation degree reflects the similarity of the elements of the spatial grayscale co-occurrence matrix in the row or column direction, and reflects the correlation of the local grayscale of the image.

熵σ;熵体现了图像纹理的随机性,若灰度共生矩阵中所有值都相等,则其取得最大值;若共生矩阵中的值不均匀,则其值会变得很小。Entropy σ; Entropy reflects the randomness of the image texture. If all the values in the gray-level co-occurrence matrix are equal, it will get the maximum value; if the values in the co-occurrence matrix are not uniform, its value will become very small.

除了上述由灰度共生矩阵所得到的四个特征参数外,本发明中还用明暗对比特征参数μ来表征密度圆区域气泡与缸壁背景在灰度上的明暗对比,原因在于明暗对比越明显,则越易于观察水体混浊所带来的变化,然而在水体逐渐变浑浊的过程中,气泡灰度与背景灰度会逐渐区域一体,到最后难以区分;其中,明暗对比特征参数根据子区域的灰度均值和缸壁的灰度均值的差值绝对值得到。In addition to the above four characteristic parameters obtained from the grayscale co-occurrence matrix, the light-dark contrast characteristic parameter μ is also used in the present invention to represent the light-dark contrast between the bubbles in the density circle area and the cylinder wall background on the grayscale, because the more obvious the light-dark contrast is , it is easier to observe the changes caused by the turbidity of the water body. However, in the process of the water body becoming turbid gradually, the gray level of the bubbles and the background gray level will gradually become one area, and it is difficult to distinguish them in the end. The absolute value of the difference between the gray mean value and the gray mean value of the cylinder wall is obtained.

(b)实施例利用层次分析法,选择最能反应水浑浊度的子区域,以及对五个特征参数进行权重分析,具体地:(b) The embodiment utilizes the Analytic Hierarchy Process, selects the sub-region that can best reflect the water turbidity, and carries out weight analysis to five characteristic parameters, specifically:

建立层次结构模型:目标层为最能反应水浑浊度的子区域,准则层为影响因素,即纹理特征参数和明暗对比特征参数,即能量、对比度、相关度、熵和明暗对比特征参数,方案层为各个子区域。Establish a hierarchical structure model: the target layer is the sub-region that can best reflect the turbidity of water, and the criterion layer is the influencing factor, that is, texture feature parameters and light-dark contrast feature parameters, that is, energy, contrast, correlation, entropy, and light-dark contrast feature parameters. Layers are sub-regions.

构造比较判断矩阵:在确定各层次各因素之间的权重时,通过两两因素之间的比较来进行分析确定。Constructing a comparative judgment matrix: when determining the weights between each factor at each level, it is analyzed and determined through the comparison between two factors.

层次单排序及其一致性检验:确定同一层次因素对于上一层次因素中某因素相对重要性的排序权重是否正确合理。Single-level ranking and its consistency test: determine whether the ranking weight of factors at the same level for the relative importance of a factor in the previous level is correct and reasonable.

层次总排序及其一致性检验:计算某一层所有因素对于最高层相对重要性的权值是否合理。Hierarchical total ranking and its consistency check: Calculate whether the relative importance of all factors of a certain layer to the highest layer is reasonable.

由于在分析各因素反映水体浑浊度变化时所占的权重并不确定,而层次分析法就是为解决该类问题而出现的,因此本发明中通过层次分析法可得到上述过程中所述各区域密度圆在反应水体浑浊度变化时的权重,并由对应的子区域的最大权重确定相应五个因素在反应水体浑浊度变化时的权重系数。Since the weight of each factor in analyzing the changes in water turbidity is uncertain, and the AHP is developed to solve such problems, the AHP can be used in the present invention to obtain the regions described in the above process. The weight of the density circle in response to the change of water turbidity, and the weight coefficient of the corresponding five factors in response to the change of water turbidity is determined by the maximum weight of the corresponding sub-region.

至此,可得到最能反应水浑浊度的子区域,以及各个特征参数对应的权重。So far, the sub-regions that can best reflect the turbidity of water and the corresponding weights of each feature parameter can be obtained.

步骤S4,根据所选子区域的纹理特征参数和明暗对比特征参数进行水浑浊度的检测。Step S4, the water turbidity is detected according to the texture feature parameters and the light-dark contrast feature parameters of the selected sub-region.

利用层次分析法可得到各个特征参数的权重,基于所选子区域的各个特征参数和相应的权重,利用模糊综合评价法,进行水浑浊度的检测;具体地,实施例中设置清澈、轻微浑浊、中度浑浊、重度浑浊四个浑浊度等级,基于模糊综合评价法可得到各个浑浊度等级的隶属度,根据隶属度最大值可得到检测缸中水的浑浊度等级,当检测结果为中度浑浊或重度浑浊时提醒相关人员进行换水,以防止在后续的气密性检测中因水体混浊造成气密性检测结果出现误差。The weight of each characteristic parameter can be obtained by using AHP, and based on each characteristic parameter and corresponding weight of the selected sub-region, the fuzzy comprehensive evaluation method is used to detect the water turbidity; There are four turbidity grades: moderate turbidity and severe turbidity. Based on the fuzzy comprehensive evaluation method, the membership degree of each turbidity grade can be obtained. According to the maximum value of membership degree, the turbidity grade of the water in the detection tank can be obtained. When the detection result is moderate When it is turbid or severely turbid, the relevant personnel are reminded to change the water to prevent errors in the air tightness test results caused by the turbidity of the water body in the subsequent air tightness test.

基于与上述方法实施例相同的发明构思,本发明一个实施例提供了一种基于人工智能的气密性检测中水浑浊度检测系统,该系统包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,所述计算机程序被处理器执行时实现一种基于人工智能的气密性检测中水浑浊度检测方法的步骤。Based on the same inventive concept as the above method embodiments, an embodiment of the present invention provides an artificial intelligence-based airtightness detection system for water turbidity detection. The system includes a memory, a processor, and a system stored on the memory and available at A computer program running on the processor, when the computer program is executed by the processor, realizes the steps of an artificial intelligence-based airtightness detection method for water turbidity detection.

需要说明的是:上述本发明实施例先后顺序仅仅为了描述,不代表实施例的优劣。且上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。It should be noted that: the above-mentioned order of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. And the foregoing describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that in the embodiments and still achieve desirable results. Additionally, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments.

以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection of the present invention. within the range.

Claims (7)

1. A method for detecting water turbidity in air tightness detection based on artificial intelligence is characterized by comprising the following steps:
acquiring a cylinder wall image of a detection cylinder, and detecting attached bubbles on the cylinder wall to obtain an attached bubble image;
clustering the attached bubbles based on the gray level to obtain bubble areas under each gray level category; selecting a sub-area with the largest attached bubble density in each bubble area;
acquiring texture characteristic parameters and light and shade contrast characteristic parameters of each subregion, wherein the texture characteristic parameters comprise energy, contrast, correlation and entropy, and the light and shade contrast characteristic parameters are obtained according to the difference value of the grayscale of the subregions and the grayscale of the cylinder wall;
selecting a subregion most capable of reacting to the turbidity of water by utilizing an analytic hierarchy process, specifically, selecting a target layer in a hierarchical structure model as the subregion most capable of reacting to the turbidity of water, a criterion layer as a texture characteristic parameter and a light and shade contrast characteristic parameter, and a scheme layer as each subregion;
and detecting the water turbidity according to the texture characteristic parameters and the light and shade contrast characteristic parameters of the selected sub-regions.
2. The method of claim 1, wherein Canopy clustering is combined with mean clustering to cluster dependent bubbles.
3. The method according to claim 2, characterized in that the sub-area with the highest attached bubble density is selected in each bubble area, specifically:
traversing search is carried out based on the coordinates of pixel points attached to the bubbles in the bubble area, and a maximum convex hull formed by the attached bubbles in the bubble area is obtained; acquiring the mass center of the convex hull, calculating the average distance from the mass center of the convex hull to the mass center of each attached bubble in the bubble area, taking the mass center of any attached bubble in the bubble area as an initial circle center, and taking the average distance as a radius to obtain an initial circle;
acquiring a principal component direction according to a plurality of vectors of the attached bubbles pointing to the initial circle from the initial circle center, wherein the attached bubbles on one side with a larger number of the attached bubbles are taken as bubbles to be traversed on two sides of a straight line which passes through the initial circle center and is vertical to the straight line of the principal component direction; determining a new circle center according to the projection length of a plurality of vectors of the initial circle center pointing to each bubble to be traversed in the principal component direction, and generating a new circle by still taking the distance mean value as the radius;
and continuously generating new circles until the new circles converge to the place where the density of the attached bubbles is maximum, wherein the positions of the circles during convergence are the sub-areas.
4. The method of claim 3, wherein the weights of the characteristic parameters are obtained by an analytic hierarchy process, and the detection of the turbidity of the water is performed by a fuzzy comprehensive evaluation process based on the characteristic parameters and the corresponding weights of the selected sub-regions.
5. The method as claimed in claim 4, wherein the cylinder wall image is obtained by acquiring an elevation image of the detection cylinder, cutting a cylinder wall area in the elevation image, and obtaining a cylinder wall image through perspective transformation.
6. The method of claim 1, wherein detecting attached bubbles on the cylinder wall is performed using a semantic segmentation network.
7. An artificial intelligence based water turbidity detection system in air tightness detection, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the method according to any one of claims 1-6.
CN202210150508.4A 2022-02-18 2022-02-18 Artificial intelligence-based air-tightness detection method and system for water turbidity detection Pending CN114627287A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210150508.4A CN114627287A (en) 2022-02-18 2022-02-18 Artificial intelligence-based air-tightness detection method and system for water turbidity detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210150508.4A CN114627287A (en) 2022-02-18 2022-02-18 Artificial intelligence-based air-tightness detection method and system for water turbidity detection

Publications (1)

Publication Number Publication Date
CN114627287A true CN114627287A (en) 2022-06-14

Family

ID=81900823

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210150508.4A Pending CN114627287A (en) 2022-02-18 2022-02-18 Artificial intelligence-based air-tightness detection method and system for water turbidity detection

Country Status (1)

Country Link
CN (1) CN114627287A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115082721A (en) * 2022-07-22 2022-09-20 南通仁源节能环保科技有限公司 Pressure control method for air-float decontamination of oil-containing sewage

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5692064A (en) * 1993-11-01 1997-11-25 Hitachi, Ltd. Method and apparatus for counting underwater objects using an ultrasonic wave
CN112184644A (en) * 2020-09-21 2021-01-05 河南颂达信息技术有限公司 Air tightness bubble detection method and device based on multiple illumination intensities
CN112329620A (en) * 2020-11-04 2021-02-05 石倩 Water change amount prediction system of tightness detection device based on visual perception
CN112785560A (en) * 2021-01-06 2021-05-11 李俊 Air tightness detection water body updating method and system based on artificial intelligence
CN113538429A (en) * 2021-09-16 2021-10-22 海门市创睿机械有限公司 Mechanical part surface defect detection method based on image processing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5692064A (en) * 1993-11-01 1997-11-25 Hitachi, Ltd. Method and apparatus for counting underwater objects using an ultrasonic wave
CN112184644A (en) * 2020-09-21 2021-01-05 河南颂达信息技术有限公司 Air tightness bubble detection method and device based on multiple illumination intensities
CN112329620A (en) * 2020-11-04 2021-02-05 石倩 Water change amount prediction system of tightness detection device based on visual perception
CN112785560A (en) * 2021-01-06 2021-05-11 李俊 Air tightness detection water body updating method and system based on artificial intelligence
CN113538429A (en) * 2021-09-16 2021-10-22 海门市创睿机械有限公司 Mechanical part surface defect detection method based on image processing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李庆武;马国翠;霍冠英;周妍;盛惠兴;: "基于NSCT域边缘检测的侧扫声呐图像分割新方法", 仪器仪表学报, no. 08, 15 August 2013 (2013-08-15) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115082721A (en) * 2022-07-22 2022-09-20 南通仁源节能环保科技有限公司 Pressure control method for air-float decontamination of oil-containing sewage

Similar Documents

Publication Publication Date Title
CN111507976B (en) Defect detection method and system based on multi-angle imaging
Haralick et al. Glossary of computer vision terms.
Torras Computer vision: theory and industrial applications
CN113435282B (en) Recognition method of wheat ears in UAV images based on deep learning
CN109844918A (en) For being configured for the diagnostic system and method for the deep learning model of semiconductor application
US20040258314A1 (en) Region segmentation and characterization systems and methods for augmented reality
CN105427296A (en) Ultrasonic image low-rank analysis based thyroid lesion image identification method
CN111209822A (en) Face detection method of thermal infrared image
CN113066064A (en) Cone beam CT image biological structure identification and three-dimensional reconstruction system based on artificial intelligence
CN117115075A (en) Metal surface rust spot detection method integrating multidirectional multi-element universe local segmentation
CN113496480A (en) Method for detecting weld image defects
CN114627287A (en) Artificial intelligence-based air-tightness detection method and system for water turbidity detection
CN116977960A (en) Rice seedling row detection method based on example segmentation
CN105654042B (en) Character Recognition Method for Verification Temperature of Glass Thermometer
CN112287895A (en) Model construction method, recognition method and system for river drain outlet detection
Lian et al. 3D-SIFT Point Cloud Registration Method Integrating Curvature Information
Hao et al. Underwater swimming fish mass estimation based on binocular vision
CN117934691A (en) Anti-camouflage generation method, vehicle and device
CN109636838A (en) A kind of combustion gas Analysis of Potential method and device based on remote sensing image variation detection
Krueger Model based object classification and localisation in multiocular images
CN118537713B (en) Biological identification detection method and system suitable for underwater unmanned equipment
Bulatov et al. Characterization of Out-of-distribution Samples from Uncertainty Maps Using Supervised Machine Learning
CN119762265A (en) A fully automatic high-throughput growth trait measurement and prediction device and method for sea cucumbers
Zhan et al. Objective evaluation of fabric flatness grade based on convolutional neural network
Jansen et al. Computer aided assessment of image quality for mammography using a contrast detail phantom

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
AD01 Patent right deemed abandoned

Effective date of abandoning: 20250221

AD01 Patent right deemed abandoned