Weld performance visual inspection method and system based on image processing
By acquiring grayscale image sequences of welds through image processing technology, performing differential and damage index calculations, the problems of not being able to identify early damage and lacking damage evolution trend tracking in existing technologies are solved, enabling the prediction of the remaining life of welds and dynamic performance evaluation.
Patent Information
- Application Number
- CN202511609611.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-05
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-11-05
AI Technical Summary
Existing weld inspection technologies cannot identify early damage before macroscopic cracks form and lack the ability to track damage evolution trends, thus failing to achieve predictive assessment of remaining life.
By using image processing-based methods, grayscale image sequences of welds are obtained, image difference processing is performed, potential damage evolution regions are screened, damage indices are calculated, and a functional relationship between the sampling period and remaining service life of the weld is constructed, thereby enabling early prediction of the fatigue damage state of the weld.
It enables early prediction of weld fatigue damage state, provides reliable quantitative basis, and offers dynamic performance evaluation and predictive maintenance suggestions for safe equipment operation.
Smart Images

Figure CN121095235B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a visual inspection method and system for weld performance based on image processing. Background Technology
[0002] Visual inspection of weld performance is a core technology for ensuring the structural safety of large equipment (such as towers, GIS shells, and pipelines) in ultra-high voltage power grids. Currently, engineering practice mainly relies on periodic shutdowns for maintenance, using non-destructive testing methods such as ultrasonic testing and radiographic testing to statically inspect and assess macroscopic defects in welds. Based on established standards, this effectively identifies existing macroscopic defects such as cracks and porosity, providing a fundamental guarantee for the safe operation of equipment.
[0003] While existing detection technologies can effectively identify macroscopic defects in welds, they are essentially static, post-judgment methods based on fixed thresholds, and cannot perceive the dynamic evolution process from microscopic damage to macroscopic defects. Specifically, existing methods have two key limitations: first, they cannot identify early damage by the similarity of fatigue damage physical processes before macroscopic cracks form; second, they lack the ability to track damage evolution trends and cannot achieve predictive assessment of remaining life.
[0004] Therefore, how to identify damage in its early stages before macroscopic cracks form and assess the damage status has become an urgent problem to be solved. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a visual inspection method and system for weld performance based on image processing, in order to solve the problem of how to identify early damage before macroscopic cracks form and to assess the damage state.
[0006] In a first aspect, embodiments of the present invention provide a visual inspection method for weld performance based on image processing, the method comprising the following steps:
[0007] For any weld, the grayscale image of the weld in each sampling period is obtained according to a preset sampling period to obtain a grayscale image sequence.
[0008] Image difference processing is performed on adjacent grayscale images in the grayscale image sequence to obtain a difference image sequence. Based on the grayscale value change characteristics of each difference image in the difference image sequence, at least two target images with potential damage evolution regions are selected from the difference image sequence.
[0009] For any target image, the severity of damage in each potential damage evolution region is obtained based on the roughness and organization characteristics of each potential damage evolution region in the target image. The damage index of each potential damage evolution region is obtained based on the damage severity and the disorder of pixels in each potential damage evolution region. The maximum damage index is used as the comprehensive damage coefficient of the target image.
[0010] The comprehensive damage coefficient of each target image is obtained and a comprehensive damage coefficient sequence is formed. The data change trend of the comprehensive damage coefficient sequence is used to construct a functional relationship between the sampling period and the remaining service life of any weld. The remaining service life of any weld in the future sampling period is predicted using the functional relationship, thus completing the performance test of any weld.
[0011] Preferably, the step of selecting at least two target images with potential damage evolution regions from the differential image sequence based on the grayscale value change characteristics of each differential image in the differential image sequence includes:
[0012] For any difference image, obtain the mean gray value and standard deviation of the gray value of the pixels in the difference image, obtain the product of the preset sensitivity control coefficient and the standard deviation of the gray value, calculate the sum of the product and the mean gray value to obtain the comparison threshold;
[0013] The contrast threshold is used as an adaptive threshold for binarizing any difference image. The binarized image is obtained by binarizing any difference image. The gray value of the pixels in the binarized image is 0 or 1. The binarized image is divided into at least one connected region using the connected component analysis method.
[0014] For any connected region, if the grayscale value of a pixel in the connected region is 1, then the connected region is identified as a potential damage evolution region. If at least one potential damage evolution region exists in any difference image, then the difference image is identified as a target image.
[0015] Preferably, obtaining the damage severity of each potential damage evolution region based on the roughness and organizational features of each potential damage evolution region in any target image includes:
[0016] For any potential damage evolution region in any target image, the fractal dimension of the potential damage evolution region is obtained, and the fractal dimension is normalized to obtain the first damage severity of the potential damage evolution region.
[0017] The local clustering coefficient of each pixel in any potential damage evolution region is obtained, and the mean value of the local clustering coefficient is obtained. The mean value of the local clustering coefficient is normalized to obtain the second damage severity of any potential damage evolution region.
[0018] The severity of the first damage and the severity of the second damage are weighted and summed to obtain the severity of the damage in any potential damage evolution region.
[0019] Preferably, obtaining the damage index for each potential damage evolution region based on the damage severity and the disorder level of pixels in each potential damage evolution region includes:
[0020] For any potential damage evolution region, the gradient direction of each pixel in the potential damage evolution region is obtained, and a direction histogram of the potential damage evolution region is constructed. The horizontal axis of the direction histogram is the direction interval, and the vertical axis is the frequency corresponding to the direction interval. The direction entropy of the potential damage evolution region is obtained using the direction histogram. The direction entropy is normalized to obtain the normalized direction entropy. The difference between the constant 1 and the normalized direction entropy is obtained to obtain the damage feature value of the potential damage evolution region.
[0021] The damage index of any potential damage evolution region is obtained by weighted summation of the damage severity and the damage characteristic value.
[0022] Preferably, the step of constructing a functional relationship between the sampling period and remaining service life of any weld using the data variation trend of the comprehensive damage coefficient sequence includes:
[0023] A curve is constructed based on the comprehensive damage coefficient sequence. The horizontal axis of the curve represents the sequence number of the target image, and the vertical axis represents the comprehensive damage coefficient corresponding to the target image. The comprehensive damage coefficient sequence is fitted to obtain a fitted curve. A preset comprehensive damage coefficient threshold is substituted into the fitted curve to obtain the sequence number of the target image corresponding to the preset comprehensive damage coefficient threshold, which is used as the number of damageable sampling cycles for any weld.
[0024] Using the number of damageable sampling cycles for any weld, a functional relationship between the sampling cycle and the remaining service life of any weld is constructed.
[0025] Preferably, the step of constructing a functional relationship between the sampling period and the remaining service life of any weld by utilizing the number of damageable sampling periods for any weld includes:
[0026] The number of difference images (excluding the target image) in the difference image sequence is obtained and denoted as the number of undamaged sampling periods. The number of grayscale images in the grayscale image sequence is obtained and denoted as the number of used sampling periods. Then, the functional relationship between the sampling period and the remaining service life of any weld is as follows:
[0027] ;
[0028] Where R is the remaining service life of any weld; d is the number of damageable sampling cycles for any weld; c is the number of undamaged sampling cycles for any weld; t is the number of sampling cycles for any weld; and T is the duration of the sampling cycle.
[0029] Secondly, embodiments of the present invention also provide a weld performance visual inspection system based on image processing, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the weld performance visual inspection method based on image processing as described in the first aspect.
[0030] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows:
[0031] In this invention, a differential image sequence is acquired, which amplifies the mechanism characteristics of weld damage and reduces the interference from undamaged areas, enabling accurate acquisition of target images of areas with potential damage evolution. The comprehensive damage coefficient of each target image is acquired to form a comprehensive damage coefficient sequence, which is used to construct a functional relationship between the sampling period and the remaining service life of any weld by utilizing the data change trend of the comprehensive damage coefficient sequence. This transforms static, isolated image observations into dynamic, predictable performance evolution signals, providing a reliable quantitative basis for subsequent prediction of the remaining service life of the weld, and realizing early prediction of weld fatigue damage state. Attached Figure Description
[0032] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0033] Figure 1 This is a flowchart of a visual inspection method for weld performance based on image processing, provided in Embodiment 1 of the present invention. Detailed Implementation
[0034] Embodiments of this disclosure are described in detail below, with examples of these embodiments illustrated in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting it.
[0035] It should be noted that the terms "first," "second," etc., used in this disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure.
[0036] To illustrate the technical solution of the present invention, specific embodiments are described below.
[0037] See Figure 1 This is a flowchart of a visual inspection method for weld performance based on image processing, provided in Embodiment 1 of the present invention. Figure 1 As shown, the method may include:
[0038] Step S101: For any weld, acquire the grayscale image of the weld in each sampling period according to a preset sampling period to obtain a grayscale image sequence.
[0039] Visual inspection of weld performance is a core technology for ensuring the structural safety of large equipment (such as towers, GIS shells, and pipelines) in ultra-high voltage power grids. Currently, engineering practice mainly relies on periodic shutdowns for maintenance, using non-destructive testing methods such as ultrasonic testing and radiographic testing to statically inspect and assess macroscopic defects in welds, providing a basic guarantee for the safe operation of equipment. However, the essence of existing inspection technologies is a static, fixed-threshold-based "post-judgment" method, which has two key limitations: first, it cannot identify early damage before macroscopic cracks form by using the similarity of fatigue damage physical processes; second, it lacks the ability to track damage evolution trends and cannot achieve predictive assessment of remaining life.
[0040] In this embodiment of the invention, a fixed high-resolution industrial camera and a matching lighting system are deployed at key weld locations in ultra-high voltage (UHV) equipment. Grayscale images of the weld are periodically acquired according to a preset sampling cycle for weld performance testing. In this embodiment, the preset sampling cycle is one month, meaning the grayscale images are sampled once a month. This is not a limitation and can be set according to the specific implementation scenario.
[0041] Due to the complex environment at ultra-high voltage (UHV) equipment sites, the raw weld images acquired typically contain various types of noise, uneven lighting, and non-standardized geometric perspectives. Direct use of these images for analysis would severely interfere with the assessment of actual damage changes. Therefore, this embodiment preprocesses the acquired raw weld images to obtain grayscale images of any weld in each sampling period, forming a grayscale image sequence. This reduces interference introduced by equipment and environmental factors, ensuring that each grayscale image possesses consistent contrast, clear details, and a unified coordinate reference system, providing a reliable data foundation for subsequent image analysis.
[0042] The specific steps of preprocessing are as follows: (1) Initial screening and sorting of image quality: Multiple original weld seam images are collected each time. The collected original weld seam images are automatically evaluated for quality, and invalid images such as those with focus failure, lens obstruction or severe blur are removed. The best quality images are selected for subsequent analysis; (2) Image enhancement: The original images are processed by grayscale and Gaussian filtering to suppress noise. The adaptive histogram equalization (CLAHE) algorithm is used to enhance image visibility to improve the robustness of subsequent processing. The grayscale images after preprocessing and the corresponding acquisition parameters are stored in the image database for subsequent analysis. The automatic quality evaluation method, grayscale processing, Gaussian filtering and adaptive histogram equalization (CLAHE) algorithm are existing technologies and will not be described in detail here.
[0043] Since fatigue damage of welds is a dynamic evolution process with clear physical laws, even if macroscopic cracks have not yet formed, their microscopic precursors (such as microplastic deformation, slip band formation, and micro-damage accumulation) will inevitably leave quantifiable "visual footprints" in the time series images.
[0044] Therefore, in this embodiment of the invention, a fixed high-resolution industrial camera and a matching lighting system are deployed at the key weld locations in ultra-high voltage equipment. Grayscale images of the weld are periodically collected according to a preset sampling period. Taking any weld in the ultra-high voltage equipment as an example, the grayscale image of any weld is analyzed to obtain target images of potential damage evolution areas. Then, the comprehensive damage coefficient of each target image is obtained to construct a functional relationship between the sampling period and the remaining service life of any weld. This transforms static and isolated image observations into dynamic and predictable performance evolution signals, providing a reliable quantitative basis for subsequent prediction of the remaining service life of the weld, and realizing the early prediction of the fatigue damage state of the weld.
[0045] Step S102: Perform image difference processing on adjacent grayscale images in the grayscale image sequence to obtain a difference image sequence. Based on the grayscale value change characteristics of each difference image in the difference image sequence, select at least two target images with potential damage evolution regions in the difference image sequence.
[0046] Although the grayscale image sequence obtained in step S101 has undergone preprocessing, slight geometric shifts and radiometric differences may still exist between grayscale images acquired at different sampling periods. These non-destructive variations, if left unprocessed, will severely interfere with the accuracy of subsequent feature extraction. Therefore, this embodiment employs mature high-precision image registration techniques (such as spatial transformation based on SIFT feature points) to achieve strict spatial alignment of grayscale images in the grayscale image sequence at the pixel level. High-precision image registration techniques are existing technologies and will not be elaborated upon here.
[0047] To better analyze the changing trend of weld damage, this embodiment performs image difference processing on adjacent grayscale images in a grayscale image sequence. This amplifies the mechanism characteristics of weld damage and reduces interference from undamaged areas, resulting in a difference image sequence. Then, based on the grayscale value change characteristics of each difference image in the sequence, at least two target images with potential damage evolution regions are selected. The image difference processing of adjacent grayscale images in the grayscale image sequence is existing technology and will not be elaborated upon here.
[0048] The method for selecting at least two target images with potential damage evolution regions from the differential image sequence based on the gray value change characteristics of each differential image in the differential image sequence is as follows:
[0049] For any difference image, obtain the average grayscale value of the pixels in the difference image, denoted as . Obtain the standard deviation of the grayscale values of pixels in any of the difference images, denoted as . Let the preset sensitivity control coefficient be denoted as k. Then, obtain the product of the preset sensitivity control coefficient and the standard deviation of the grayscale value. Add the product to the mean of the grayscale value to obtain the comparison threshold, denoted as k. ,Right now The smaller k is, the more refined the threshold classification is, and areas with small differences may also be regarded as damaged areas, that is, noise is easily misjudged as damaged areas. The larger k is, the more conservative the threshold classification is, and only significant changes are regarded as damaged areas, which may easily miss weak early signals. Therefore, in this embodiment, k=2.5 is set. There is no limit here, and it can be set according to the specific implementation scenario.
[0050] The contrast threshold is used as an adaptive threshold for binarizing any of the difference images. The difference images are then binarized to obtain a binarized image, where the grayscale value of each pixel is either 0 or 1. ,in, Let f be the gray value of the f-th pixel in the binarized image. Let f be the gray value of the f-th pixel in any difference image. To compare the threshold, the binarized image is then divided into at least one connected region using a connected component analysis method. The binarization process and connected component analysis method are existing technologies and will not be described in detail here.
[0051] For any connected region, if the grayscale value of a pixel in the connected region is 1, it indicates that the pixel in the connected region has undergone significant changes, and the connected region is confirmed as a potential damage evolution region. If the grayscale value of a pixel in the connected region is 0, it indicates that the pixel in the connected region has not undergone significant changes, and the connected region is confirmed as a background region. If at least one potential damage evolution region exists in any difference image, the difference image is confirmed as a target image.
[0052] Following the methods described above for acquiring potential damage evolution regions and target images, at least two target images containing potential damage evolution regions are obtained. Thus, at least two target images containing potential damage evolution regions, and the potential damage evolution regions within each target image, are obtained.
[0053] Step S103: For any target image, based on the roughness and organization characteristics of each potential damage evolution region in the target image, obtain the damage severity of each potential damage evolution region. Based on the damage severity of each potential damage evolution region and the disorder of pixels in each potential damage evolution region, obtain the damage index of each potential damage evolution region. Use the maximum damage index as the comprehensive damage coefficient of the target image.
[0054] Because fatigue damage in welds is a dynamic evolutionary process with clear physical laws, the evolution of fatigue damage (from microplastic deformation and slip band formation to microcrack initiation and connection) exhibits specific, quantifiable patterns on images. The microscopic mechanism of fatigue damage is deeply related to three characteristics: "damage directionality," "damage severity," and "damage organization." Initially, fatigue damage presents as small, discrete, transverse damage with a clear directionality. As damage accumulates, multiple cracks slowly converge and merge to form large cracks, which is the organization aspect. The more cracks there are, the more severe the damage.
[0055] Therefore, in this embodiment, for any target image, firstly, based on the roughness and organizational characteristics of each potential damage evolution region in the target image, the damage severity of each potential damage evolution region is obtained to measure the fatigue damage severity of each potential damage evolution region. Then, based on the damage severity of each potential damage evolution region and the disorder of pixels in each potential damage evolution region, the damage index of each potential damage evolution region is obtained to measure the comprehensive damage degree of each potential damage evolution region in a three-dimensional way. Finally, based on the damage index of each potential damage evolution region in the target image, the comprehensive damage coefficient of the target image is obtained to analyze the overall comprehensive damage degree of the weld in the target image.
[0056] The method for obtaining the severity of damage in each potential damage evolution region based on the roughness and organizational features of each region in any target image is as follows:
[0057] For any potential damage evolution region in any target image, the fractal dimension of any potential damage evolution region is obtained by box counting. The fractal dimension is then normalized to obtain the first damage severity of any potential damage evolution region. Box counting and fractal dimension are existing technologies and will not be described in detail here.
[0058] The local clustering coefficient of each pixel in any potential damage evolution region is obtained, and the mean of the local clustering coefficient is obtained. The mean of the local clustering coefficient is normalized to obtain the second damage severity of any potential damage evolution region. The local clustering coefficient is a prior art and will not be described in detail here.
[0059] The severity of the first damage and the severity of the second damage are weighted and summed to obtain the severity of the damage in any potential damage evolution region.
[0060] In one embodiment, taking the h-th potential damage evolution region in any target image as an example, the formula for calculating the damage severity of the h-th potential damage evolution region is as follows:
[0061]
[0062] in, The severity of damage in the h-th potential damage evolution region; Let h be the fractal dimension of the h-th potential damage evolution region; Let be the local clustering coefficient of the i-th pixel in the h-th potential damage evolution region; N is the number of pixels in the h-th potential damage evolution region; This is the normalization function; First level of injury severity Weighting coefficients; Second level of injury severity The weighting coefficients; since the severity of the first damage and the severity of the second damage measure the severity of fatigue damage in the potential damage evolution region in different dimensions, this embodiment sets... There are no restrictions here; settings can be made according to the specific implementation scenario.
[0063] It should be noted that, The first damage severity in the h-th potential damage evolution region refers to the micro-plastic deformation and roughening of the material surface before the formation of macroscopic cracks in the weld. The fractal dimension can sensitively capture these microscopic changes. As the damage develops and increases, the surface becomes more rough, and the fractal dimension increases accordingly, thus reflecting the severity of the damage. The larger the value, the more complex and coarser the texture structure of the h-th potential damage evolution region, and the greater the degree of damage in the h-th potential damage evolution region. The larger it is; The second damage severity represents the h-th potential damage evolution region. As the damage region develops, it gradually evolves from random, isolated damage points into local clusters. These clusters slowly connect to form a continuous network, eventually developing into macroscopic cracks. The larger the value, the tighter the connection between pixels in the h-th potential damage evolution region, indicating stronger fatigue structure. Therefore, the greater the damage degree in the h-th potential damage evolution region. The larger it is.
[0064] Furthermore, the damage index for each potential damage evolution region is obtained by combining the damage severity of each potential damage evolution region with the disorder of pixels in each potential damage evolution region as follows:
[0065] For any potential damage evolution region, the gradient direction of each pixel in the region is obtained using the Sobel operator, and a direction histogram is constructed. The horizontal axis of the direction histogram represents the direction interval (dividing [-π, π] into 36 equal-width intervals, each interval being 10°), and the vertical axis represents the frequency of the corresponding direction interval. The direction entropy of the region is obtained using the direction histogram, and the direction entropy is normalized to obtain the normalized direction entropy. The difference between the constant 1 and the normalized direction entropy is used to obtain the damage feature value of the region. The Sobel operator is a prior art and will not be described in detail here.
[0066] The damage index of any potential damage evolution region is obtained by weighted summation of the damage severity and the damage characteristic value.
[0067] In one embodiment, taking the h-th potential damage evolution region in any target image as an example, the formula for calculating the damage index of the h-th potential damage evolution region is:
[0068]
[0069] in, The damage index for the h-th potential damage evolution region; The directional entropy of the h-th potential damage evolution region; The severity of damage in the h-th potential damage evolution region; This is the normalization function; Damage characteristic value Weighting coefficients; Severity of injury The weighting coefficients are as follows: Since the directionality of damage is the most significant feature in the overall analysis of damage fatigue, and can effectively diagnose the state of damage fatigue, while the severity of damage is a measure of the severity of damage fatigue, and serves as a reinforcing feature to this important characteristic, this embodiment sets... There are no restrictions here; settings can be made according to the specific implementation scenario.
[0070] It should be noted that, Let be the damage characteristic value of the h-th potential damage evolution region. The most specific feature of the damage state is the deformation formed by the slip zone in the direction of maximum shear stress. Initially, it is very slight. As the damage develops, microcracks initiate along the principal stress direction. In the image, this is manifested as the gradient direction at a specific angle changing from the chaotic distribution of directions in the normal situation to a uniform and concentrated distribution of gradient directions during damage development. Therefore, The smaller the value, the more consistent the gradient direction of the pixels in the h-th potential damage evolution region, and the greater the damage feature of the h-th potential damage evolution region. The larger it is; The larger the value, the greater the damage severity in the h-th potential damage evolution region. The larger it is.
[0071] Finally, following the method for obtaining the damage index of the h-th potential damage evolution region, the damage index of each potential damage evolution region is obtained. The maximum damage index is used as the comprehensive damage coefficient of any target image to measure the comprehensive damage degree of the weld in any target image.
[0072] Step S104: Obtain the comprehensive damage coefficient of each target image, form a comprehensive damage coefficient sequence, and use the data change trend of the comprehensive damage coefficient sequence to construct a functional relationship between the sampling period and the remaining service life of any weld. Using the functional relationship, predict the remaining service life of any weld in the future sampling period, and complete the performance detection of any weld.
[0073] Following the method for obtaining the comprehensive damage coefficient of any target image, the comprehensive damage coefficient of each target image is obtained, forming a comprehensive damage coefficient sequence. This transforms static, isolated image observations into dynamic, predictable performance evolution signals. Furthermore, by analyzing the data change trends of the comprehensive damage coefficient sequence, a functional relationship between the sampling period and remaining service life of any weld is constructed, which is used to predict the remaining service life. This approach overcomes the limitations of traditional static inspection and achieves a leap from assessing the current state of weld performance to predicting its future performance.
[0074] The method for constructing a functional relationship between the sampling period and remaining service life of any weld by comprehensively analyzing the data variation trend of the damage coefficient sequence is as follows:
[0075] (1) Obtain the number of damageable sampling cycles for any of the welds.
[0076] Specifically, a curve of the comprehensive damage coefficient sequence is constructed, where the horizontal axis of the curve represents the sequence number of the target image, and the vertical axis represents the comprehensive damage coefficient corresponding to the target image. The comprehensive damage coefficient sequence is then fitted using the least squares method to obtain the fitted curve, i.e. Where x is the comprehensive damage coefficient, d is the sequence number of the target image, and a and b are the parameters of the fitted curve, calculated using the least squares method, which is an existing technology and will not be elaborated here. The larger the comprehensive damage coefficient, the greater the degree of damage to the weld in the target image. When the comprehensive damage coefficient reaches a certain level, the potential damage evolution area in the weld will form macroscopic cracks. Therefore, when the comprehensive damage coefficient is greater than or equal to the preset comprehensive damage coefficient threshold, it indicates that the weld has reached its service life (i.e., there are macroscopic cracks, and it cannot continue to be used). Therefore, the preset comprehensive damage coefficient threshold is substituted into the fitted curve to obtain the sequence number of the target image corresponding to the preset comprehensive damage coefficient threshold, which is used as the number of damageable sampling periods for any weld (how many sampling periods the weld can go through from the start of damage to reaching its service life). ,in, To preset the comprehensive damage coefficient threshold, in this embodiment, the preset comprehensive damage coefficient threshold is determined by statistically analyzing the average damage index of similar equipment components when functional failure occurs. There is no limitation here, and it can be set according to the specific implementation scenario.
[0077] (2) Using the number of damageable sampling cycles of any weld, construct a functional relationship between the sampling cycle and the remaining service life of any weld.
[0078] Specifically, the number of difference images in the difference image sequence excluding the target image is obtained and denoted as the number of undamaged sampling cycles (how many sampling cycles have elapsed from the start of weld monitoring to the start of damage). The number of grayscale images in the grayscale image sequence is obtained and denoted as the number of used sampling cycles (how many sampling cycles have elapsed from the start of weld monitoring to the current real-time sampling cycle). Then, the functional relationship between the sampling cycle and the remaining service life of any weld is as follows:
[0079]
[0080] Where R is the remaining service life of any weld; d is the number of damageable sampling cycles for any weld; c is the number of undamaged sampling cycles for any weld; t is the number of sampling cycles for any weld; and T is the duration of the sampling cycle, which is set to one month in this embodiment.
[0081] Furthermore, by utilizing the functional relationship between the sampling period and remaining service life of any of the above weld seams, the remaining service life of any weld seam in future sampling periods is predicted, thus completing the performance testing of any weld seam. For example, taking weld seam 1 as an example, assuming the number of undamaged sampling periods for weld seam 1 is 20 (meaning weld seam 1 begins to be damaged from the 20th sampling period), and the number of potentially damaged sampling periods for weld seam 1 is 50 (meaning the weld seam can reach its service life after 50 sampling periods from the start of damage), and if the number of sampling periods for weld seam 1 is 30 (meaning weld seam 1 has undergone 30 sampling periods from the start of monitoring to the current real-time sampling period), then the predicted remaining service life of weld seam 1 is (20 + 50 - 30) × 30 = 1200 days.
[0082] It is worth noting that the prediction of the remaining service life of the weld in this embodiment is performed in real time. That is, the remaining service life of the weld needs to be predicted again after each sampling cycle. Due to factors such as changes in the external environment, the weld damage may worsen. Therefore, the remaining service life of the weld is based on the real-time calculation.
[0083] Finally, based on the comprehensive damage coefficient of the target image acquired in real time and the remaining service life of the weld, the weld performance is tested. Weld performance testing is existing technology and will be briefly described here:
[0084] 1. Performance status determination: A threshold system based on historical data and industry standards is used to determine the damage status of the real-time comprehensive damage index.
[0085] 2. Generate maintenance decisions: The decision engine, based on existing rules, automatically generates maintenance recommendations according to the damage status and remaining service life.
[0086] 3. Test Report Generation: The test report is automatically generated according to the industry standard format. The content generally includes the current comprehensive damage index value and performance status, the predicted value and confidence interval of the remaining service life, the analysis of the main damage characteristics (direction, severity, and organization), specific maintenance recommendations and time windows, etc.
[0087] This completes the performance testing of any weld.
[0088] Based on the same inventive concept as the above method, this embodiment of the invention also provides a weld performance visual inspection system based on image processing, including a memory and a processor, wherein the processor executes a computer program stored in the memory to implement the above-mentioned weld performance visual inspection method based on image processing.
[0089] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for visual inspection of weld performance based on image processing, characterized in that, The image processing-based weld performance visual detection method comprises: For any weld, a gray-scale image sequence of the weld in each sampling period is obtained according to a preset sampling period, and a difference image sequence is obtained by performing image difference processing on adjacent gray-scale images in the gray-scale image sequence; According to the gray-scale value change characteristics of each difference image in the difference image sequence, at least two target images with potential damage evolution regions in the difference image sequence are screened out; For any target image, the damage severity of each potential damage evolution region in the target image is obtained according to the roughness and organization characteristics of each potential damage evolution region in the target image, and the damage index of each potential damage evolution region is obtained according to the damage severity of each potential damage evolution region and the confusion degree of the pixel points in each potential damage evolution region, the maximum damage index is taken as the comprehensive damage coefficient of the target image; The comprehensive damage coefficients of each target image are obtained to form a comprehensive damage coefficient sequence, and a function relationship between the sampling period and the remaining service life of the weld is constructed by using the data change trend of the comprehensive damage coefficient sequence, the remaining service life of the weld in the future sampling period is predicted by using the function relationship, and the performance detection of the weld is completed; The damage severity of each potential damage evolution region is obtained according to the roughness and organization characteristics of each potential damage evolution region in the target image, which comprises: For any potential damage evolution region in the target image, the fractal dimension of the potential damage evolution region is obtained, the fractal dimension is normalized to obtain the first damage severity of the potential damage evolution region; The local clustering coefficient of each pixel point in the potential damage evolution region is obtained, and the local clustering coefficient mean value is obtained, and the local clustering coefficient mean value is normalized to obtain the second damage severity of the potential damage evolution region; The first damage severity and the second damage severity are weighted and summed to obtain the damage severity of the potential damage evolution region.
2. The image processing-based visual inspection method of weld performance according to claim 1, characterized in that, According to the gray-scale value change characteristics of each difference image in the difference image sequence, at least two target images with potential damage evolution regions in the difference image sequence are screened out, which comprises: For any difference image, the gray-scale value mean and the gray-scale value standard deviation of the pixel points in the difference image are obtained, the product of the preset sensitivity control coefficient and the gray-scale value standard deviation is obtained, the addition result of the product and the gray-scale value mean is calculated to obtain a comparison threshold; The comparison threshold is taken as an adaptive threshold for the binarization processing of the difference image, the difference image is binarized to obtain a binary image, the gray-scale value of the pixel points in the binary image is 0 or 1, and the binary image is divided into at least one connected region by using a connected component analysis method. For any connected region, if the gray value of the pixel point in the any connected region is 1, it is confirmed that the any connected region is a potential damage evolution region, if there is at least one potential damage evolution region in the any differential image, it is confirmed that the any differential image is a target image.
3. The image processing based visual inspection method of weld performance according to claim 1, wherein, The damage index of each potential damage evolution region is obtained according to the damage severity of each potential damage evolution region and the confusion degree of the pixel point in each potential damage evolution region, and the damage index of each potential damage evolution region is obtained. For any potential damage evolution region, the gradient direction of each pixel point in the any potential damage evolution region is obtained, the direction histogram of the any potential damage evolution region is constructed, the horizontal coordinate of the direction histogram is the direction interval, the vertical coordinate is the frequency corresponding to the direction interval, the direction entropy of the any potential damage evolution region is obtained by using the direction histogram, the direction entropy is normalized to obtain the normalized direction entropy, and the difference between the constant 1 and the normalized direction entropy is obtained to obtain the damage characteristic value of the any potential damage evolution region. The damage severity and the damage characteristic value are weighted and summed to obtain the damage index of the any potential damage evolution region.
4. The image processing based visual inspection method of weld performance according to claim 1, wherein, The function relationship between the sampling period and the remaining service life of the any weld is constructed by using the data change trend of the comprehensive damage coefficient sequence, and the function relationship between the sampling period and the remaining service life of the any weld is constructed by using the data change trend of the comprehensive damage coefficient sequence. A curve graph of the comprehensive damage coefficient sequence is constructed, the horizontal coordinate of the curve graph is the serial number of the target image, the vertical coordinate is the comprehensive damage coefficient corresponding to the target image, the comprehensive damage coefficient sequence is fitted to obtain a fitting curve, a preset comprehensive damage coefficient threshold is substituted into the fitting curve to obtain the serial number of the target image corresponding to the preset comprehensive damage coefficient threshold, and the serial number of the target image is used as the number of damageable sampling periods of the any weld. The function relationship between the sampling period and the remaining service life of the any weld is constructed by using the number of damageable sampling periods of the any weld.
5. The image processing based visual inspection method of weld performance according to claim 4, characterized in that, The function relationship between the sampling period and the remaining service life of the any weld is constructed by using the number of damageable sampling periods of the any weld. The number of differential images except the target image in the differential image sequence is obtained and is recorded as the number of non-damageable sampling periods, the number of gray images in the gray image sequence is obtained and is recorded as the number of used sampling periods, and the function relationship between the sampling period and the remaining service life of the any weld is: ; Wherein, R is the remaining service life of the any weld; d is the number of damageable sampling periods of the any weld; c is the number of non-damageable sampling periods of the any weld; t is the number of sampling periods of the any weld; and T is the length of the sampling period.
6. A system for visual inspection of weld performance based on image processing, comprising a memory, a processor and a computer program stored in the memory and running on the processor, characterized in that, The processor executes the computer program to realize the steps of the weld performance visual detection method based on image processing in any one of claims 1-5.
Citation Information
Patent Citations
Real-time weld defect detection method based on improved background difference method
CN106770318A
Segmented weld joint detection method and system based on weld joint life prediction
CN120744349A