CN115330802B - Method for extracting debonding defect of X-ray image of carbon fiber composite gas cylinder - Google Patents
Method for extracting debonding defect of X-ray image of carbon fiber composite gas cylinder Download PDFInfo
- Publication number
- CN115330802B CN115330802B CN202211263930.7A CN202211263930A CN115330802B CN 115330802 B CN115330802 B CN 115330802B CN 202211263930 A CN202211263930 A CN 202211263930A CN 115330802 B CN115330802 B CN 115330802B
- Authority
- CN
- China
- Prior art keywords
- image
- gradient
- defect
- edge
- gas cylinder
- 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
- 230000007547 defect Effects 0.000 title claims abstract description 89
- 238000000034 method Methods 0.000 title claims abstract description 43
- 229920000049 Carbon (fiber) Polymers 0.000 title claims abstract description 21
- 239000004917 carbon fiber Substances 0.000 title claims abstract description 21
- VNWKTOKETHGBQD-UHFFFAOYSA-N methane Chemical compound C VNWKTOKETHGBQD-UHFFFAOYSA-N 0.000 title claims abstract description 21
- 239000002131 composite material Substances 0.000 title claims abstract description 16
- 238000012545 processing Methods 0.000 claims abstract description 23
- 238000003708 edge detection Methods 0.000 claims abstract description 14
- 238000000605 extraction Methods 0.000 claims abstract description 14
- 238000007781 pre-processing Methods 0.000 claims abstract description 3
- 230000002950 deficient Effects 0.000 claims description 29
- 239000011159 matrix material Substances 0.000 claims description 27
- 238000004364 calculation method Methods 0.000 claims description 15
- 238000012216 screening Methods 0.000 claims description 4
- 230000003628 erosive effect Effects 0.000 claims description 3
- 238000001514 detection method Methods 0.000 abstract description 9
- 239000007789 gas Substances 0.000 description 45
- 230000008569 process Effects 0.000 description 10
- 238000009659 non-destructive testing Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 5
- 230000000877 morphologic effect Effects 0.000 description 5
- 238000013135 deep learning Methods 0.000 description 4
- 238000007689 inspection Methods 0.000 description 4
- 238000012360 testing method Methods 0.000 description 4
- 230000003044 adaptive effect Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 3
- 238000011179 visual inspection Methods 0.000 description 3
- IJGRMHOSHXDMSA-UHFFFAOYSA-N Atomic nitrogen Chemical compound N#N IJGRMHOSHXDMSA-UHFFFAOYSA-N 0.000 description 2
- XAGFODPZIPBFFR-UHFFFAOYSA-N aluminium Chemical compound [Al] XAGFODPZIPBFFR-UHFFFAOYSA-N 0.000 description 2
- 229910052782 aluminium Inorganic materials 0.000 description 2
- 230000001066 destructive effect Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 239000000126 substance Substances 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 238000010521 absorption reaction Methods 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- QVGXLLKOCUKJST-UHFFFAOYSA-N atomic oxygen Chemical compound [O] QVGXLLKOCUKJST-UHFFFAOYSA-N 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000004880 explosion Methods 0.000 description 1
- 238000009661 fatigue test Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 239000001257 hydrogen Substances 0.000 description 1
- 229910052739 hydrogen Inorganic materials 0.000 description 1
- 125000004435 hydrogen atom Chemical class [H]* 0.000 description 1
- 230000005389 magnetism Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 229910052757 nitrogen Inorganic materials 0.000 description 1
- 239000001301 oxygen Substances 0.000 description 1
- 229910052760 oxygen Inorganic materials 0.000 description 1
- 238000012372 quality testing Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000007789 sealing Methods 0.000 description 1
Classifications
-
- 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/28—Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/30—Noise filtering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
-
- 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/10116—X-ray image
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Quality & Reliability (AREA)
- Analysing Materials By The Use Of Radiation (AREA)
Abstract
Description
技术领域Technical field
本发明涉及工程检测技术领域,特别是涉及一种碳纤维复合材料气瓶X射线图像脱粘缺陷提取方法。The invention relates to the technical field of engineering inspection, and in particular to a method for extracting debonding defects in X-ray images of carbon fiber composite gas cylinders.
背景技术Background technique
气瓶是一种存储气体的压力容器,在工业领域常用于氢气、氧气或氮气等气体的储存和运输。它的特点是便于运输,可循环使用。由于充装气体后的气瓶内部会产生巨大压力,一旦发生事故,往往会产生剧烈爆炸,造成不可估量的损失。因此,我们国家对于气瓶的完整性,密封性和质量都有着极高的要求。对于气瓶的质量检测有很多方法,如材料化学成分分析、内胆力学性能检测、疲劳试验等,这些检测项目流程复杂,需要花费大量的时间和金钱。除此之外,这些检测手段都有一定的破坏性,只适用于气瓶的抽样检测,无法保证每个气瓶的质量安全。近年来,随着无损检测技术的进步,无损检测逐渐成为气瓶质量检测的主要方法。A gas cylinder is a pressure vessel that stores gas. It is commonly used in the industrial field to store and transport gases such as hydrogen, oxygen or nitrogen. Its characteristics are that it is easy to transport and can be recycled. Since a huge pressure will be generated inside the filled gas cylinder, once an accident occurs, a violent explosion will often occur, causing immeasurable losses. Therefore, our country has extremely high requirements for the integrity, sealing and quality of gas cylinders. There are many methods for quality testing of gas cylinders, such as material chemical composition analysis, liner mechanical property testing, fatigue testing, etc. These testing projects have complex procedures and require a lot of time and money. In addition, these detection methods are destructive to a certain extent and are only suitable for sampling inspection of gas cylinders, and cannot guarantee the quality and safety of each gas cylinder. In recent years, with the advancement of non-destructive testing technology, non-destructive testing has gradually become the main method for quality inspection of gas cylinders.
无损检测,就是在不影响被检测对象使用性能、不破坏被检测对象内部结构的前提下,利用射线、超声波、红外线、电磁波等技术,通过被检测物体组织结构异常或缺陷存在所引起的光、声、热、电、磁等变化,对被检测对象进行物理、化学参数的检测。与之前所述的检测方式相比,无损检测的优势在于,检测过程中最大程度上避免了对气瓶造成物理性损伤,可以保证气瓶组织结构的完整性,气瓶自身的性能也不会受到影响,检测完的气瓶还能够继续使用。无损检测同时也具备了检测速度快,对检测环境要求低,能够在生产现场实地检测等方面的优点。Non-destructive testing is to use technologies such as rays, ultrasonic waves, infrared rays, electromagnetic waves, etc. to detect light, Changes in sound, heat, electricity, magnetism, etc. can be used to detect physical and chemical parameters of the object to be detected. Compared with the previously mentioned detection methods, the advantage of non-destructive testing is that physical damage to the gas cylinder is avoided to the greatest extent during the detection process, and the integrity of the organizational structure of the gas cylinder can be ensured, and the performance of the gas cylinder itself will not be affected. Affected, the gas cylinders that have been tested can continue to be used. Non-destructive testing also has the advantages of fast detection speed, low requirements on the testing environment, and the ability to conduct on-site testing at the production site.
X射线无损检测是指用强度均匀的X射线透照被检物体并成像来显示物体内部缺陷的技术。由于物体内部存在对射线吸收程度不同的缺陷区域,透过物体的射线强度呈现不均匀分布的态势,物体背面的传感器接收这些射线并产生灰度值不同的图像。一般来说,越薄的区域对射线的吸收程度越低,成像的灰度值越高。X-ray non-destructive testing refers to a technology that uses X-rays of uniform intensity to transilluminate the object being inspected and image it to reveal internal defects in the object. Since there are defective areas inside the object that absorb rays with different degrees, the intensity of the rays passing through the object is unevenly distributed. The sensor on the back of the object receives these rays and generates images with different grayscale values. Generally speaking, the thinner the area, the lower the absorption of rays, and the higher the gray value of the image.
在通过碳纤维气瓶X射线无损检测图像对缺陷进行定位的过程中,常采用人工目测法和基于深度学习的方法进行缺陷定位。人工目测法指工人凭借自身的经验,通过肉眼判别缺陷的种类和位置,并手动在图像上进行标注。基于深度学习的方法则使用大量的标注图像使用Faster-RCNN和YOLO等算法,提取缺陷图像的特征,自动在图像上进行标注。In the process of locating defects through X-ray non-destructive inspection images of carbon fiber cylinders, manual visual inspection and deep learning-based methods are often used to locate defects. The manual visual inspection method means that workers rely on their own experience to identify the type and location of defects with the naked eye, and manually mark them on the image. Methods based on deep learning use a large number of annotated images to use algorithms such as Faster-RCNN and YOLO to extract the features of defective images and automatically annotate the images.
目前,人工目测法的缺点是:Currently, the disadvantages of manual visual inspection are:
1.依赖于工人的经验对气瓶图像中的缺陷区域进行识别,在缺陷识别的精确度和速度上严重不足。1. Relying on the experience of workers to identify defect areas in gas cylinder images, the accuracy and speed of defect identification are seriously insufficient.
2.每个人对缺陷的衡量标准可能会有差异,难以制定统一的判别标准。2. Everyone may have different standards for measuring defects, and it is difficult to formulate unified standards for judgment.
基于深度学习的缺陷定位方法的缺点是:The disadvantages of deep learning-based defect location methods are:
1.在训练模型的过程中,需要的数据量较大,而正常气瓶产生缺陷的概率较低,难以提供足够的数据进行训练。1. In the process of training the model, a large amount of data is required, and the probability of defects in normal gas cylinders is low, making it difficult to provide enough data for training.
2.深度学习方法在训练模型的过程中花费的时间较长,需要专业的软件工程师进行参数调整和反复实验,后期维护成本较高。2. The deep learning method takes a long time to train the model, requires professional software engineers to perform parameter adjustments and repeated experiments, and has higher maintenance costs in the future.
发明内容Contents of the invention
本发明的目的在于提供一种碳纤维复合材料气瓶图像脱粘缺陷定位方法,用于不同碳纤维气瓶图像上,同时对图像进行形态学处理,更好的展示缺陷位置。The purpose of the present invention is to provide a method for locating debonding defects in carbon fiber composite gas cylinder images, which can be used on images of different carbon fiber gas cylinders, and at the same time perform morphological processing on the images to better display the defect locations.
为实现上述目的,本发明提供了如下方案:In order to achieve the above objects, the present invention provides the following solutions:
一种碳纤维复合材料气瓶X射线图像脱粘缺陷提取方法,包括:A method for extracting debonding defects from X-ray images of carbon fiber composite gas cylinders, including:
获取原始气瓶X射线图像,并对所述原始气瓶X射线图像进行预处理,得到第一处理图像;Obtain an original gas cylinder X-ray image, and preprocess the original gas cylinder X-ray image to obtain a first processed image;
基于所述第一处理图像得到气瓶脱粘缺陷图像特征,基于所述气瓶脱粘缺陷图像特征进行脱粘边缘检测,得到第二处理图像;Obtain debonding defect image features of the gas bottle based on the first processed image, perform debonding edge detection based on the debonded defect image features of the gas bottle, and obtain a second processed image;
对所述第二处理图像进行缺陷提取,并对提取到的缺陷特征进行轮廓提取,得到缺陷轮廓特征,将所述缺陷轮廓特征标注到所述原始气瓶X射线图像上,获取最终缺陷标注图像。Defect extraction is performed on the second processed image, and contour extraction is performed on the extracted defect features to obtain defect contour features. The defect contour features are marked on the original gas cylinder X-ray image to obtain the final defect annotation image. .
优选地,对所述原始气瓶X射线图像进行预处理包括:对所述原始气瓶X射线图像进行灰度化处理,得到灰度图像,所述灰度图像即所述第一处理图像。Preferably, preprocessing the original gas bottle X-ray image includes: performing grayscale processing on the original gas bottle X-ray image to obtain a grayscale image, and the grayscale image is the first processed image.
优选地,基于所述第一处理图像得到所述气瓶脱粘缺陷图像特征包括:Preferably, obtaining the image characteristics of the gas bottle debonding defect based on the first processed image includes:
对所述第一处理图像进行去噪处理,得到所述原始气瓶X射线图像的灰度矩阵;对去噪后的图像进行梯度计算处理,得到所述原始气瓶X射线图像的梯度矩阵;Perform denoising processing on the first processed image to obtain the grayscale matrix of the original gas cylinder X-ray image; perform gradient calculation processing on the denoised image to obtain the gradient matrix of the original gas cylinder X-ray image;
将所述灰度矩阵和所述梯度矩阵进行脱粘边缘检测,得到所述气瓶脱粘缺陷图像特征。The grayscale matrix and the gradient matrix are subjected to debonding edge detection to obtain image features of the gas cylinder debonding defect.
优选地,对所述第一处理图像进行去噪处理,包括:Preferably, denoising the first processed image includes:
通过高斯函数初始化高斯卷积模板,将所述第一处理图像转化成灰度值矩阵,并使用零填充方法对所述灰度图像进行扩张;Initialize a Gaussian convolution template through a Gaussian function, convert the first processed image into a grayscale value matrix, and use a zero filling method to expand the grayscale image;
基于所述高斯卷积模板,以滑动窗口的形式对经过零填充处理的灰度值进行加权平均计算,得到去噪图像。Based on the Gaussian convolution template, a weighted average calculation is performed on the zero-filled grayscale values in the form of a sliding window to obtain a denoised image.
优选地,对所述去噪图像进行梯度计算处理包括:Preferably, performing gradient calculation processing on the denoised image includes:
选择梯度算子模板,计算所述梯度算子模板中各像素点的梯度值,通过所述梯度值计算梯度方向,得到所述原始气瓶X射线图像的梯度矩阵;其中所述梯度算子模板为Sobel一阶梯度算子模板。Select a gradient operator template, calculate the gradient value of each pixel in the gradient operator template, calculate the gradient direction through the gradient value, and obtain the gradient matrix of the original gas bottle X-ray image; wherein the gradient operator template It is the Sobel first-order gradient operator template.
优选地,计算所述梯度方向的方法为:Preferably, the method for calculating the gradient direction is:
其中,为梯度方向,为使用Sobel一阶梯度算子计算出的y方向上的梯 度值,为使用Sobel一阶梯度算子计算出的x方向上的梯度值。 in, is the gradient direction, is the gradient value in the y direction calculated using the Sobel first-order gradient operator, is the gradient value in the x direction calculated using the Sobel first-order gradient operator.
优选地,得到所述第二处理图像包括:Preferably, obtaining the second processed image includes:
根据所述灰度矩阵和所述梯度矩阵,并结合所述原始气瓶X射线图像的灰度信息,设定灰度阈值和梯度阈值;Set a grayscale threshold and a gradient threshold according to the grayscale matrix and the gradient matrix, combined with the grayscale information of the original gas cylinder X-ray image;
基于所述梯度阈值和所述灰度阈值对所述原始气瓶X射线图像进行遍历,确定气瓶的内胆层边缘,所述内胆层边缘包括第一边缘和第二边缘;Traverse the original gas cylinder X-ray image based on the gradient threshold and the grayscale threshold to determine the edge of the liner layer of the gas bottle, where the edge of the liner layer includes a first edge and a second edge;
计算所述第一边缘和所述第二边缘中间区域的灰度均值,在水平方向上,若所述灰度均值大于所述第一边缘和所述第二边缘的灰度值,则标记为强边缘,否则标记为弱边缘;Calculate the average gray value of the middle area between the first edge and the second edge. In the horizontal direction, if the average gray value is greater than the gray value of the first edge and the second edge, then mark it as Strong edges, otherwise marked as weak edges;
对所述强边缘进行邻域遍历,设置梯度阈值将所述强边缘与距离为一个像素点的弱边缘进行连通,得到完整的边缘图像,即所述第二处理图像。Neighborhood traversal is performed on the strong edge, and a gradient threshold is set to connect the strong edge with a weak edge whose distance is one pixel, to obtain a complete edge image, which is the second processed image.
优选地,对所述第二处理图像进行缺陷提取,包括:Preferably, performing defect extraction on the second processed image includes:
对所述第二处理图像进行二值化处理,得到二值图像,基于所述二值图像进行腐蚀操作,得到细化的边缘图像;Perform binarization processing on the second processed image to obtain a binary image, and perform an erosion operation based on the binary image to obtain a refined edge image;
基于所述细化的边缘图像进行第一闭运算,得到第一缺陷区域图像,对所述第一缺陷区域图像进行第二闭运算,得到第二缺陷区域图像;Perform a first closing operation based on the thinned edge image to obtain a first defective area image, perform a second closing operation on the first defective area image, and obtain a second defective area image;
将所述第一缺陷区域图像和所述第二缺陷区域图像进行求差操作,得到缺陷区域图像;Perform a difference operation on the first defective area image and the second defective area image to obtain a defective area image;
其中,所述第一闭运算的结构元素小于所述第二闭运算的结构元素。Wherein, the structural elements of the first closed operation are smaller than the structural elements of the second closed operation.
优选地,对所述缺陷区域图像进行轮廓提取包括:Preferably, performing contour extraction on the defective area image includes:
设定所述缺陷区域图像的最小边长、最小周长和最小面积,经过筛选后,去除不符合条件的缺陷区域轮廓,得到确定的缺陷区域轮廓;Set the minimum side length, minimum perimeter and minimum area of the defective area image, and after screening, remove the contours of the defective area that do not meet the conditions to obtain the determined contour of the defective area;
将所述确定的缺陷区域轮廓以矩形框形式绘制在所述原始气瓶X射线图像上并进行显示,获得所述最终缺陷标注图像。The determined defect area outline is drawn on the original gas cylinder X-ray image in the form of a rectangular frame and displayed to obtain the final defect annotation image.
本发明的有益效果为:The beneficial effects of the present invention are:
1、本发明能够提取出复合材料碳纤维气瓶X射线图像中的脱粘缺陷,方便辨别缺陷的数量、形状等特征;同时能够将缺陷的轮廓标注在复合材料碳纤维气瓶X射线图像上,更加直观观察缺陷的位置;1. The present invention can extract the debonding defects in the X-ray image of the composite carbon fiber cylinder, and facilitate the identification of the number, shape and other characteristics of the defects; at the same time, it can mark the outline of the defect on the X-ray image of the composite carbon fiber cylinder, which is more convenient. Visually observe the location of defects;
2、本发明利用自定义的高斯滤波器对灰度图像进行去噪处理,实现了更好的去噪效果,消除了X射线图像采集过程中产生的噪声对图像缺陷的识别和提取的影响,解决了处理图像时存在的受噪声干扰从而导致图像边缘定位和提取不准确的问题;2. The present invention uses a customized Gaussian filter to denoise grayscale images, achieving better denoising effects and eliminating the impact of noise generated during the X-ray image acquisition process on the identification and extraction of image defects. It solves the problem of inaccurate image edge positioning and extraction caused by noise interference when processing images;
3、本发明利用自定义的梯度算子方法对去噪图像进行梯度计算处理,能够准确提取图像的梯度特征,使得边缘区域更易于定位;3. The present invention uses a customized gradient operator method to perform gradient calculation processing on the denoised image, which can accurately extract the gradient features of the image, making the edge area easier to locate;
4、本发明利用基于自适应梯度-灰度阈值的边缘检测方法对得到的去噪图像进行边缘检测和二值化处理,根据梯度-灰度信息,确定脱粘区域的两侧边缘,解决了现有技术中,如利用Canny边缘检测的智能识别和分析图像缺陷方法中,伪边缘区域过多,无法准确定位缺陷区域边缘,容易出现误检测和缺陷区域难以定位的问题;4. The present invention uses an edge detection method based on adaptive gradient-grayscale threshold to perform edge detection and binarization processing on the obtained denoised image, and determines the edges on both sides of the debonding area based on the gradient-grayscale information to solve the problem. In the existing technology, such as the method of intelligently identifying and analyzing image defects using Canny edge detection, there are too many false edge areas and it is impossible to accurately locate the edge of the defective area, which is prone to problems such as false detection and difficulty in locating the defective area;
5、本发明利用基于边长和面积的轮廓筛选方法对提取后的轮廓进行筛选,解决了现有技术中,如OpenCV轮廓查找方法中,无法对轮廓区域的面积和边长进行筛选的问题,减少了误检测情况,实现了更精准的缺陷轮廓提取。5. The present invention uses a contour screening method based on side length and area to screen the extracted contours, which solves the problem in the existing technology, such as the OpenCV contour search method, that the area and side length of the contour area cannot be screened. This reduces false detections and achieves more accurate defect contour extraction.
附图说明Description of the drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the drawings needed to be used in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some of the drawings of the present invention. Embodiments, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without exerting creative efforts.
图1为本发明实施例的一种碳纤维复合材料气瓶图像脱粘缺陷定位方法流程图;Figure 1 is a flow chart of a method for locating image debonding defects in carbon fiber composite gas cylinders according to an embodiment of the present invention;
图2为本发明实施例的去噪后的图像;Figure 2 is a denoised image according to the embodiment of the present invention;
图3为本发明实施例中得到的第一边缘图像;Figure 3 is the first edge image obtained in the embodiment of the present invention;
图4为本发明实施例中得到的第二边缘图像;Figure 4 is a second edge image obtained in the embodiment of the present invention;
图5为本发明实施例中形态学处理后的图像;Figure 5 is an image after morphological processing in an embodiment of the present invention;
图6为本发明实施例中最终得到的缺陷标注图像。Figure 6 is the defect annotation image finally obtained in the embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本发明作进一步详细的说明。In order to make the above objects, features and advantages of the present invention more obvious and understandable, the present invention will be described in further detail below with reference to the accompanying drawings and specific embodiments.
本发明结合了人工先验知识和自适应算法对气瓶缺陷进行识别。The invention combines artificial prior knowledge and adaptive algorithms to identify gas cylinder defects.
1.基于先验知识,确定气瓶脱粘缺陷存在的位置,该缺陷只会存在于铝制内胆层和碳纤维复合材料层之间的区域。针对脱粘区域的特点,提取脱粘缺陷区域的图像灰度特征,如铝制内胆层较厚,X射线难以穿透导致图像灰度值较低。脱粘区域由于结合不紧密,留有X射线可穿透的缝隙导致图像灰度值较高,总体呈现两边灰度值低,中间部分灰度值高的特点。使用先验知识总结出的特征,该算法对脱粘区域的识别精确度得到了大幅提升。1. Based on prior knowledge, determine the location of the cylinder debonding defect. This defect will only exist in the area between the aluminum liner layer and the carbon fiber composite layer. According to the characteristics of the debonding area, the image grayscale features of the debonding defect area are extracted. For example, the aluminum liner layer is thicker and X-rays are difficult to penetrate, resulting in a low image grayscale value. Because the debonding area is not tightly coupled, there is a gap that can be penetrated by X-rays, resulting in a higher gray value in the image. The overall gray value is low on both sides and the middle part is high. Using features summarized from prior knowledge, the algorithm's accuracy in identifying debonding areas has been greatly improved.
2.使用自适应灰度-梯度阈值的边缘检测方法,针对每张图片不同的特征自动设置阈值,在缺陷样本量不足的情况下,依旧能获得很好的检测效果。2. Using the edge detection method of adaptive grayscale-gradient threshold, the threshold is automatically set according to the different characteristics of each picture. Even when the number of defect samples is insufficient, good detection results can still be obtained.
如图1,本实施例提供一种碳纤维复合材料气瓶X射线图像脱粘缺陷提取方法,包括以下过程:As shown in Figure 1, this embodiment provides a method for extracting debonding defects from X-ray images of carbon fiber composite gas cylinders, which includes the following processes:
1.获取待处理的X射线图像;1. Obtain the X-ray image to be processed;
2.对获取的X射线图像进行灰度化处理,得到处理后的灰度图像,即第一处理图像;2. Perform grayscale processing on the acquired X-ray image to obtain the processed grayscale image, which is the first processed image;
3.基于第一处理图像得到气瓶脱粘缺陷图像特征,基于所述气瓶脱粘缺陷图像特征进行脱粘边缘检测,得到第二处理图像;3. Obtain the image features of the gas bottle debonding defect based on the first processed image, perform debonding edge detection based on the image features of the gas bottle debonding defect, and obtain the second processed image;
基于所述第一处理图像得到所述气瓶脱粘缺陷图像特征包括:Obtaining the image characteristics of the gas bottle debonding defect based on the first processed image includes:
对所述第一处理图像进行去噪处理,得到所述原始气瓶X射线图像的灰度矩阵;对去噪后的图像进行梯度计算处理,得到所述原始气瓶X射线图像的梯度矩阵;Perform denoising processing on the first processed image to obtain the grayscale matrix of the original gas cylinder X-ray image; perform gradient calculation processing on the denoised image to obtain the gradient matrix of the original gas cylinder X-ray image;
将所述灰度矩阵和所述梯度矩阵进行脱粘边缘检测,得到所述气瓶脱粘缺陷图像特征。The grayscale matrix and the gradient matrix are subjected to debonding edge detection to obtain image features of the gas cylinder debonding defect.
4.利用形态学方法对边缘检测处理后的图像进行缺陷提取;4. Use morphological methods to extract defects from images processed by edge detection;
5.对提取到的缺陷特征进行轮廓提取,将提取后的缺陷特征标注到原始X射线图像上。5. Perform contour extraction on the extracted defect features, and mark the extracted defect features on the original X-ray image.
对得到的灰度图像进行去噪,包括以下过程:Denoising the resulting grayscale image includes the following processes:
(1)使用高斯函数初始化3*3的高斯卷积模板。(1) Use the Gaussian function to initialize the 3*3 Gaussian convolution template.
(2)将整张图像转化为以灰度值矩阵表示的形式,并使用零填充对图像进行扩张。(2) Convert the entire image into a form represented by a grayscale value matrix, and use zero padding to expand the image.
(3)使用生成的高斯卷积模板,以滑动窗口的形式对经过零填充处理的图像的灰度值进行加权平均计算,得到高斯滤波后的灰度值矩阵。(3) Use the generated Gaussian convolution template to perform a weighted average calculation on the gray value of the zero-filled image in the form of a sliding window to obtain the Gaussian filtered gray value matrix.
高斯模板的权重计算公式为: The weight calculation formula of Gaussian template is:
其中,为计算出的高斯模板相应位置的系数。为标准差,为自然常数。为以中心点为坐标原点,包含X轴和Y轴的坐标系中,相对位置的X轴和Y轴坐标。 in, is the calculated coefficient of the corresponding position of the Gaussian template. is the standard deviation, is a natural constant. It is the X-axis and Y-axis coordinates of the relative position in a coordinate system with the center point as the coordinate origin and including the X-axis and Y-axis.
进一步的,去噪图像梯度计算处理,包括以下过程:Further, denoising image gradient calculation processing includes the following processes:
(1)选择梯度算子模板,计算各像素点梯度值。(1) Select the gradient operator template and calculate the gradient value of each pixel.
(2)确定梯度方向。(2) Determine the gradient direction.
使用Sobel一阶梯度算子计算x方向上的梯度值的计算公式为:The calculation formula for calculating the gradient value in the x direction using the Sobel first-order gradient operator is:
使用Sobel一阶梯度算子计算y方向上的梯度值的计算公式为:The calculation formula for calculating the gradient value in the y direction using the Sobel first-order gradient operator is:
其中,为图像对应点的灰度值。 in, is the grayscale value of the corresponding point in the image.
总梯度计算公式为:The total gradient calculation formula is:
其中,为使用Sobel一阶梯度算子计算出的x方向上的梯度值, 为使用Sobel一阶梯度算子计算出的y方向上的梯度值。 in, is the gradient value in the x direction calculated using the Sobel first-order gradient operator, is the gradient value in the y direction calculated using the Sobel first-order gradient operator.
梯度方向计算公式为:The gradient direction calculation formula is:
得到的去噪后图像如图2;The obtained denoised image is shown in Figure 2;
进一步的,使用图像梯度矩阵和灰度矩阵进行脱粘边缘检测,包括以下过程:Further, the image gradient matrix and grayscale matrix are used for debonding edge detection, including the following process:
(1)根据X射线图像特点,结合图像的灰度信息,设定灰度和梯度阈值对图像进行遍历,确定气瓶内胆层的边缘。(1) According to the characteristics of the X-ray image, combined with the grayscale information of the image, set the grayscale and gradient thresholds to traverse the image to determine the edge of the inner bladder layer of the cylinder.
(2)在第一条边缘附近,寻找梯度值较大且梯度方向和第一条边缘相反的碳纤维层边缘。(2) Near the first edge, look for the edge of the carbon fiber layer with a larger gradient value and a gradient direction opposite to the first edge.
(3)对两条边缘中间区域计算灰度均值,在水平方向上,确保脱粘区域灰度值均值大于两条边缘,否则将边缘标记为弱边缘。(3) Calculate the average gray value of the middle area of the two edges. In the horizontal direction, ensure that the average gray value of the debonded area is greater than the two edges, otherwise the edge will be marked as a weak edge.
(4)对确定的强边缘进行8邻域遍历,设置梯度阈值将其与周围弱边缘进行连通,得到完整的边缘图像,即第二处理图像。(4) Perform an 8-neighborhood traversal on the determined strong edge, set a gradient threshold to connect it with the surrounding weak edges, and obtain a complete edge image, which is the second processed image.
得到的第一条边缘及第二条边缘图像如图3、图4。The obtained first edge and second edge images are shown in Figure 3 and Figure 4.
进一步的,利用形态学方法对边缘检测处理后的图像进行缺陷特征提取,包括以下过程:Further, the morphological method is used to extract defect features from the image processed by edge detection, including the following processes:
(1)对确定边缘的图像进行二值化处理,将边缘灰度值设为255,其他区域灰度值设为0;(1) Binarize the image with determined edges, set the edge gray value to 255, and set the gray value of other areas to 0;
(2)使用3*3大小的结构元素,对二值化图像进行腐蚀操作,消去图像中的孤立点和可能存在的噪点,得到细化的边缘图像。(2) Use 3*3 structural elements to perform erosion operations on the binary image to eliminate isolated points and possible noise in the image to obtain a refined edge image.
(3)使用5*5大小的结构元素,对细化的边缘图像进行闭运算,在保持图像边缘不发生改变的情况下将细小的缺陷部分进行填充,得到初步处理后的缺陷区域图像M;(3) Use 5*5 size structural elements to perform a closing operation on the refined edge image, fill in the small defective parts while keeping the edge of the image unchanged, and obtain the initially processed defective area image M;
(4)使用15*15大小的结构元素,对上一步得到的缺陷区域图像M进行闭运算,在保持图像边缘不发生较大改变的情况下将较大的缺陷部分进行填充,得到进一步处理后的缺陷区域图像N;(4) Use 15*15 size structural elements to perform a closing operation on the defective area image M obtained in the previous step, and fill in the larger defective parts without causing major changes in the edge of the image. After further processing, The defective area image N;
(5)将(4)和(3)中得到的图像M和N进行求差操作,得到准确的缺陷区域图像Q;(5) Perform a difference operation on the images M and N obtained in (4) and (3) to obtain an accurate defect area image Q;
形态学处理后图像如图5。The image after morphological processing is shown in Figure 5.
进一步的,对提取到的缺陷区域图像Q进行轮廓提取,并将提取后的缺陷区域标注到原始X射线图像上,包括以下过程:Further, the extracted defect area image Q is contour extracted, and the extracted defect area is marked on the original X-ray image, including the following processes:
(1)对缺陷区域图像进行轮廓提取,以数组形式将轮廓位置保存。(1) Extract the contour of the defective area image and save the contour position in the form of an array.
(2)设定缺陷区域的最小边长、最小周长、最小面积。(2) Set the minimum side length, minimum perimeter, and minimum area of the defect area.
(3)根据设定的阈值,对缺陷区域进行遍历,筛选掉不符合条件的缺陷区域轮廓。(3) According to the set threshold, traverse the defect area and filter out the contours of the defect area that do not meet the conditions.
设定的阈值包括最小边长、最小周长和最小面积三个限制条件。在圈定缺陷区域时使用矩形框进行拟合,对于缺陷区域拟合成的矩形框,首先使用最小边长作为进行筛选条件,对矩形最小边长大于设定阈值的这些矩形框再进行最小周长筛选,最后再进行最小面积筛选。剩下的矩形框即确定的缺陷区域轮廓。The set thresholds include three constraints: minimum side length, minimum perimeter and minimum area. When delineating the defect area, a rectangular frame is used for fitting. For the rectangular frame fitted to the defect area, the minimum side length is first used as the filtering condition, and the minimum perimeter of these rectangular frames whose minimum side length is greater than the set threshold is then calculated. Filter, and finally perform minimum area screening. The remaining rectangular frame is the determined outline of the defect area.
(4)将确定的缺陷区域轮廓以矩形框形式绘制在原图上并进行显示。(4) Draw the determined outline of the defect area on the original image in the form of a rectangular frame and display it.
最终得到的缺陷标注图像如图6。The final defect annotation image is shown in Figure 6.
本发明方法可以用于不同的碳纤维气瓶图像上,有很好的检测效果,同时对图像进行了形态学处理,可以更好地展示缺陷位置。The method of the present invention can be used on images of different carbon fiber gas cylinders and has good detection effects. At the same time, the image is processed morphologically to better display the defect location.
以上所述的实施例仅是对本发明优选方式进行的描述,并非对本发明的范围进行限定,在不脱离本发明设计精神的前提下,本领域普通技术人员对本发明的技术方案做出的各种变形和改进,均应落入本发明权利要求书确定的保护范围内。The above-described embodiments are only descriptions of preferred modes of the present invention and do not limit the scope of the present invention. Without departing from the design spirit of the present invention, those of ordinary skill in the art can make various modifications to the technical solutions of the present invention. All deformations and improvements shall fall within the protection scope determined by the claims of the present invention.
Claims (3)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211263930.7A CN115330802B (en) | 2022-10-17 | 2022-10-17 | Method for extracting debonding defect of X-ray image of carbon fiber composite gas cylinder |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211263930.7A CN115330802B (en) | 2022-10-17 | 2022-10-17 | Method for extracting debonding defect of X-ray image of carbon fiber composite gas cylinder |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115330802A CN115330802A (en) | 2022-11-11 |
CN115330802B true CN115330802B (en) | 2024-01-19 |
Family
ID=83915258
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211263930.7A Active CN115330802B (en) | 2022-10-17 | 2022-10-17 | Method for extracting debonding defect of X-ray image of carbon fiber composite gas cylinder |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115330802B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116823924B (en) * | 2023-08-24 | 2023-12-12 | 杭州百子尖科技股份有限公司 | Determination method and device for defect area, electronic equipment and storage medium |
CN116958714B (en) * | 2023-09-20 | 2023-12-01 | 信熙缘(江苏)智能科技有限公司 | Automatic identification method for wafer back damage defect |
CN117611799B (en) * | 2023-11-28 | 2024-10-01 | 杭州深度视觉科技有限公司 | Penicillin bottle defect detection method and device based on image recognition |
CN117437224B (en) * | 2023-12-20 | 2024-03-29 | 山东特联信息科技有限公司 | Gas cylinder defect image data processing system and method based on artificial intelligence |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107870181A (en) * | 2017-06-20 | 2018-04-03 | 成都飞机工业(集团)有限责任公司 | A post-recognition method for debonding defects in composite materials |
CN108765436A (en) * | 2018-04-21 | 2018-11-06 | 卞家福 | Method for detecting image edge is piled up based on the irregular beverage bottle for improving Roberts operators |
CN109142396A (en) * | 2018-08-30 | 2019-01-04 | 湖北三江航天江北机械工程有限公司 | A kind of layering of carbon fiber winding shell, debonding defect detecting appraisal method |
CN109978869A (en) * | 2019-03-29 | 2019-07-05 | 清华大学 | A kind of sea horizon detection method and system based on gray level co-occurrence matrixes and Hough transform |
CN112819775A (en) * | 2021-01-28 | 2021-05-18 | 中国空气动力研究与发展中心超高速空气动力研究所 | Segmentation and reinforcement method for damage detection image of aerospace composite material |
CN113592782A (en) * | 2021-07-07 | 2021-11-02 | 山东大学 | Method and system for extracting X-ray image defects of composite carbon fiber core rod |
WO2022148192A1 (en) * | 2021-01-07 | 2022-07-14 | 新东方教育科技集团有限公司 | Image processing method, image processing apparatus, and non-transitory storage medium |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9453500B2 (en) * | 2013-03-15 | 2016-09-27 | Digital Wind Systems, Inc. | Method and apparatus for remote feature measurement in distorted images |
CN106780438B (en) * | 2016-11-11 | 2020-09-25 | 广东电网有限责任公司清远供电局 | Insulator defect detection method and system based on image processing |
CN108444934B (en) * | 2018-01-30 | 2021-12-10 | 四川沐迪圣科技有限公司 | Automatic segmentation and quantification method for debonding defect of composite material |
FR3086434B1 (en) * | 2018-09-26 | 2020-09-04 | Safran | METHOD AND SYSTEM FOR NON-DESTRUCTIVE INSPECTION OF AN AERONAUTICAL PART BY CONTOUR REPLACEMENT |
CN109900742B (en) * | 2019-04-03 | 2019-12-17 | 哈尔滨商业大学 | A device and method for detecting debonding defects of carbon fiber composite materials with linear and nonlinear frequency modulation hybrid excitation refrigeration |
CN114581364A (en) * | 2021-12-15 | 2022-06-03 | 宁波送变电建设有限公司 | GIS defect detection method based on X-ray imaging and Sobel-SCN |
-
2022
- 2022-10-17 CN CN202211263930.7A patent/CN115330802B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107870181A (en) * | 2017-06-20 | 2018-04-03 | 成都飞机工业(集团)有限责任公司 | A post-recognition method for debonding defects in composite materials |
CN108765436A (en) * | 2018-04-21 | 2018-11-06 | 卞家福 | Method for detecting image edge is piled up based on the irregular beverage bottle for improving Roberts operators |
CN109142396A (en) * | 2018-08-30 | 2019-01-04 | 湖北三江航天江北机械工程有限公司 | A kind of layering of carbon fiber winding shell, debonding defect detecting appraisal method |
CN109978869A (en) * | 2019-03-29 | 2019-07-05 | 清华大学 | A kind of sea horizon detection method and system based on gray level co-occurrence matrixes and Hough transform |
WO2022148192A1 (en) * | 2021-01-07 | 2022-07-14 | 新东方教育科技集团有限公司 | Image processing method, image processing apparatus, and non-transitory storage medium |
CN112819775A (en) * | 2021-01-28 | 2021-05-18 | 中国空气动力研究与发展中心超高速空气动力研究所 | Segmentation and reinforcement method for damage detection image of aerospace composite material |
CN113592782A (en) * | 2021-07-07 | 2021-11-02 | 山东大学 | Method and system for extracting X-ray image defects of composite carbon fiber core rod |
Non-Patent Citations (8)
Title |
---|
基于数学形态学的焊接熔池图像边缘提取技术研究;武晓朦;吴凯;王欢;封园;;西安石油大学学报(自然科学版)(03);第115页第3.1-3.2节,图1-3 * |
基于灰度-梯度二维最大熵阈值法的赤足迹轮廓提取;李孟歆;贾燕雯;姜佳楠;;电子技术与软件工程(第16期);全文 * |
基于灰度-梯度共生矩阵的木材表面缺陷分割方法;白雪冰;邹丽晖;;森林工程(第02期);全文 * |
基于灰度-梯度共生矩阵的钢轨表面缺陷检测方法;陈后金;许文达;郝晓莉;;北京交通大学学报(02);第2.1节 * |
梯度图像的阈值选取;韩冰;高俊钗;雷鸣;;科学技术与工程(第16期);全文 * |
直升机旋翼粘弹阻尼器射线DR/CT检测技术研究;张宝双;《万方学位论文》;全文 * |
碳纤维复合材料气瓶的X射线实时成像技术;史建军;李得天;;宇航材料工艺(第06期);全文 * |
自适应Canny算法在钢板缺陷边缘检测中的应用;于海川;穆平安;;软件导刊(第04期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN115330802A (en) | 2022-11-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115330802B (en) | Method for extracting debonding defect of X-ray image of carbon fiber composite gas cylinder | |
CN105067638B (en) | Tire fetal membrane face character defect inspection method based on machine vision | |
US11221107B2 (en) | Method for leakage detection of underground pipeline corridor based on dynamic infrared thermal image processing | |
CN111047568B (en) | Method and system for detecting and identifying steam leakage defect | |
CN108846397B (en) | Automatic detection method for cable semi-conducting layer based on image processing | |
CN105588845A (en) | Weld defect characteristic parameter extraction method | |
WO2021109011A1 (en) | Intelligent capacitor internal defect detection method based on ultrasound image | |
CN102175700A (en) | Method for detecting welding seam segmentation and defects of digital X-ray images | |
CN114719749B (en) | Metal surface crack detection and real size measurement method and system based on machine vision | |
CN111852792B (en) | Fan blade defect self-diagnosis positioning method based on machine vision | |
CN102590247A (en) | Steel wire rope defect detection method based on X-ray image processing technology | |
CN106600593A (en) | Aluminum ceramic ball surface detect detection method | |
CN114549446A (en) | A detection method for cylinder liner defect marks based on deep learning | |
CN105510364A (en) | Nondestructive testing system for industrial part flaws based on X rays and detection method thereof | |
Fu et al. | Research on image-based detection and recognition technologies for cracks on rail surface | |
CN114119505A (en) | A method and device for detecting defects in die attach area | |
CN118914250B (en) | A sheet metal welding defect intelligent detection method and device based on data feedback | |
Li et al. | Detection of small size defects in belt layer of radial tire based on improved faster r-cnn | |
Purnomo et al. | Weld defect detection and classification based on deep learning method: a review | |
CN112991324A (en) | Detection method for visual transmission in magnetic particle detection process | |
Zhang et al. | Advancing Ultrasonic Defect Detection in High-Speed Wheels via UT-YOLO | |
Liu et al. | Online Pipeline Weld Defect Detection for Magnetic Flux Leakage Inspection System via Lightweight Rotated Network | |
CN117495791A (en) | A method for locating surface defects | |
CN117746000A (en) | Classifying and positioning method for multiple types of surface defects of rubber sealing ring | |
CN117058089A (en) | Cigarette appearance detection 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 |