A method for detecting the quality of a welded steel structure
By acquiring weld images in welded steel structures, dividing the regions, and calculating the contrast and roundness of the pore areas, the problem of insufficient accuracy in pore defect detection is solved, achieving higher recognition stability and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- QINGDAO YAVEDI PRECISION METAL MFG CO LTD
- Filing Date
- 2025-08-25
- Publication Date
- 2026-05-08
AI Technical Summary
The characteristics of porosity defects in welded steel structures are similar to those of other welding problems, leading to insufficient detection accuracy and easy misjudgment.
By acquiring weld seam images, dividing the weld seam area, identifying the gray value differences of adjacent pixels, calculating the annular area contrast and roundness of the pore area, and combining the pore confidence score, the quality inspection results of the welded steel structure are obtained.
It improves the stability and accuracy of identifying welding porosity defects, reduces the false judgment rate, and enhances the accuracy of welding quality inspection.
Smart Images

Figure CN120976188B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, specifically to a method for quality inspection of welded steel structures. Background Technology
[0002] Welding is the main method of steel structure connection. The quality of the weld directly determines the load-bearing capacity and seismic performance of the overall structure. In order to ensure the safety of welded steel structures, detect and repair defects in a timely manner, extend the structural life and reduce the maintenance cost throughout the entire life cycle, it is necessary to conduct real-time inspection of the quality of welded steel structures in building projects and promptly identify quality problems such as porosity, slag inclusion, and lack of fusion.
[0003] Generally, when inspecting the quality of welded steel structures, features of porosity issues in the weld can be extracted from the texture information in the image of the weld location, thus achieving quality inspection. However, some features of porosity defects are similar to other welding problems, making it easy to misidentify other defects as porosity defects, resulting in insufficient accuracy in identifying porosity defects in welding quality inspection. Summary of the Invention
[0004] This application provides a method for inspecting the quality of welded steel structures to address the problem that some characteristics of porosity defects are similar to other welding problems, leading to misjudgment of porosity defects and insufficient accuracy in identifying porosity defects in welding quality inspection. The specific technical solution adopted is as follows:
[0005] One embodiment of this application provides a method for inspecting the quality of welded steel structures, the method comprising the following steps:
[0006] Acquire images of welds in the steel structure to be inspected and delineate the weld area within the weld images;
[0007] Based on the gray values of adjacent pixels in the same data row in the weld area, identify each group of adjacent transition points, and divide the porosity area to be confirmed based on the differences in the gray values of pixels between adjacent transition points in all adjacent groups in the same data row.
[0008] Based on the difference in gray values between the inside and the surrounding area of the pore region to be confirmed, the contrast of the annular area of the pore region to be confirmed is determined. Combined with the roundness of the pore region to be confirmed, the pore confidence of the pore region to be confirmed is calculated.
[0009] The quality inspection results of the welded steel structure under inspection are obtained based on the porosity confidence of all porosity regions to be confirmed in the weld images of all different welds.
[0010] Furthermore, the specific method for dividing the weld region in the weld image includes:
[0011] The weld seam image is processed by grayscale conversion, noise reduction and edge detection to obtain the weld seam edge image;
[0012] The region defined by the two edges containing the most pixels in the weld seam edge image is called the weld seam region. The weld seam region is defined in the weld seam image based on the position of the pixels in the weld seam region.
[0013] Furthermore, the method for identifying adjacent transition points is as follows:
[0014] Calculate the difference in grayscale values between adjacent pixels in the same data row within the weld area, and record adjacent pixels whose grayscale value difference is greater than the preset transition threshold as a group of adjacent transition points.
[0015] Furthermore, the method for dividing the pore region to be confirmed is as follows:
[0016] The average gray value of all pixels in the same data row between two adjacent groups of adjacent transition points is recorded as the average gray value of the region formed by all pixels between two adjacent groups of adjacent transition points.
[0017] Adaptive threshold segmentation is performed on the gray-scale mean of all regions to obtain the segmentation threshold of the gray-scale mean of the region. The region consisting of pixels whose gray-scale mean is less than the segmentation threshold is recorded as the pore region to be confirmed.
[0018] Furthermore, the method for obtaining the contrast of the annular region of the pore area to be confirmed is as follows:
[0019] The smallest circumcircle of the region of pores to be identified is denoted as the first outer circle of the region of pores to be identified.
[0020] Based on the first outer circle of the pore region to be identified, construct the first outer ring of the pore region to be identified;
[0021] The average gray value of all pixels contained within the first outer ring of the pore area to be identified is recorded as the first gray value of the pore area to be identified.
[0022] The average gray value of all pixels contained within the first outer circle of the pore area to be identified is recorded as the second gray value of the pore area to be identified.
[0023] The contrast of the annular region of the pore area to be identified is determined based on the difference between the first gray value and the second gray value of the pore area to be identified.
[0024] Furthermore, the method for constructing the first outer ring is as follows:
[0025] Using the center of the first outer circle of the pore region as the center, and the radius of the first outer circle of the pore region plus the length of a first preset number of pixels as the radius, a circle is constructed and recorded as the second outer circle of the pore region to be confirmed.
[0026] The area where the second outer circle of the pore region to be identified does not coincide with the first outer circle is denoted as the first outer ring of the pore region to be identified.
[0027] Furthermore, the method for calculating the contrast of the annular region is as follows:
[0028] The difference between the first gray value and the second gray value of the pore region to be identified is recorded as the first difference of the pore region to be identified, and the ratio of the first difference to the second gray value of the pore region to be identified is recorded as the annular region contrast of the pore region to be identified.
[0029] Furthermore, the specific method for calculating the porosity confidence level of the porosity region to be confirmed, based on the roundness of the region to be confirmed, includes:
[0030] Calculate the roundness of the pore region to be confirmed;
[0031] The product of the annular region contrast and the roundness of the pore region to be confirmed is denoted as the pore confidence level of the pore region to be confirmed.
[0032] Furthermore, the specific method for calculating the roundness is as follows:
[0033] The product of the number of pixels contained in the area to be confirmed and 4π is denoted as the first product of the area to be confirmed. The ratio of the first product of the area to be confirmed to the number of pixels contained in the edge of the area to be confirmed is denoted as the circularity of the area to be confirmed.
[0034] Furthermore, the specific method for obtaining the quality inspection result of the welded steel structure under inspection based on the porosity confidence of all porosity regions to be confirmed in the weld images of all different welds of the welded steel structure under inspection includes:
[0035] The pore areas to be confirmed with a pore confidence level greater than the preset pore defect judgment threshold are recorded as pore defect areas.
[0036] When the total number of porosity defect areas identified in the weld images of all different welds of the welded steel structure to be inspected is 0, the welded steel structure to be inspected is judged to be of excellent quality.
[0037] When the total number of porosity defect areas identified in the weld images of all different welds of the welded steel structure to be inspected is greater than 0 and less than the preset threshold, the welded steel structure to be inspected is judged to be of good quality.
[0038] When the total number of porosity defect areas identified in the weld images of all different welds of the steel structure to be inspected is greater than or equal to a preset threshold, the steel structure to be inspected is deemed to be of substandard quality.
[0039] The beneficial effects of this application are:
[0040] This application divides the weld seam image of the welded steel structure to be inspected into weld seam regions by dividing the weld seam region in the horizontal direction across the entire weld seam image. Based on the horizontally distributed weld seams, it analyzes the grayscale value differences of adjacent pixels within the same data row in the weld seam region. According to the characteristic of a clear light-dark transition from a dark center to a gradually brightening edge on the surface of the porosity defect, it divides the region that may correspond to the porosity defect. First, it identifies the positions of grayscale value jumps, i.e., each group of adjacent jump points. Second, the area between two adjacent groups of adjacent jump points is highly likely to be a darker, recessed area with weaker reflection. Therefore, based on the differences in grayscale values of pixels between adjacent groups of adjacent jump points within all data rows, the region to be confirmed for porosity is divided. This region to be confirmed for porosity is recorded as the region that may correspond to the identified porosity defect. Further... Considering that porosity defects are approximately circular depressions with slightly raised edges, exhibiting a bright area at the raised edges and a dark area at the center, the porosity confidence of the areas to be identified is obtained based on the brightness contrast between the outer and inner sides of the porosity defect and its circular shape. Finally, based on the porosity confidence of all areas to be identified in the weld images of all different welds of the welded steel structure to be inspected, the quality inspection results of the welded steel structure to be inspected are obtained. The identification results of welding porosity defects are obtained based on the accurately extracted multi-dimensional features, which solves the problem that some features of porosity defects are similar to other welding problems, leading to misjudgment of porosity defects and insufficient accuracy in identifying porosity defects in welding quality inspection, thus improving the stability and accuracy of welding porosity defect identification. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, 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 this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 This is a schematic diagram of a method for quality inspection of welded steel structures provided in one embodiment of this application;
[0043] Figure 2 This is a schematic diagram of the pixels between two adjacent groups of adjacent transition points provided in one embodiment of this application. Detailed Implementation
[0044] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0045] Please see Figure 1 The diagram illustrates a flowchart of a welded steel structure quality inspection method according to an embodiment of this application. The method includes the following steps:
[0046] Step S001: Acquire weld images of the steel structure to be inspected and divide the weld area in the weld images.
[0047] Images of the weld seams of the steel structure to be inspected are acquired using a camera. These images are then converted to grayscale to obtain grayscale images. Noise reduction is performed on these grayscale images to filter out high-frequency noise caused by minor irregularities on the weld surface that are not due to porosity defects. Edge detection is then performed on the denoised grayscale images to obtain weld edge images.
[0048] In this embodiment, Gaussian filtering is used to denoise the grayscale image of the weld seam, and the Canny edge detection algorithm is used for edge detection. Both Gaussian filtering and the Canny edge detection algorithm are well-known techniques and will not be described further. As other implementation methods, while achieving the goal of image denoising, implementers may use other methods in the prior art, such as median filtering, for image denoising; this application does not impose any special limitations.
[0049] It is important to note that when acquiring images of welds in the steel structure to be inspected, the welds should appear horizontally in the image, and the welds should traverse the entire image horizontally.
[0050] Since the weld is usually silvery-white, which is significantly different in color from the oxide substrate, the grayscale values of the pixels corresponding to the weld and the oxide substrate are quite different, and the edge features at the junction of the weld and the oxide substrate are obvious.
[0051] The region defined by the two edges containing the most pixels in the weld edge image is denoted as the weld region. The weld region is then segmented within the weld image based on the pixel positions within that region.
[0052] At this point, the weld area in the weld image has been defined.
[0053] Step S002: Based on the gray values of adjacent pixels in the same data row in the weld area, identify each group of adjacent transition points. Based on the differences in the gray values of pixels between adjacent transition points in all adjacent groups in the same data row, divide the porosity area to be confirmed.
[0054] Since the weld seam of the steel structure to be inspected is horizontally traversed across the entire image when the image is acquired, each row of data in the weld seam area is analyzed separately.
[0055] In welded steel structures, porosity is a common quality issue. Porosity is usually formed by the solidification of molten metal or the precipitation of gas. It is nearly circular in shape with smooth edges. Due to the concave location of the porosity, the light reflection path is altered, resulting in a distinct light-dark transition on the surface, with the center darker and the edges gradually brighter. Other weld quality defects, such as cracks and slag inclusions, are often irregular in shape.
[0056] When the weld seam is free of defects such as porosity, cracks, and slag inclusions, the grayscale values of pixels within the corresponding weld area change smoothly without drastic or sudden changes. However, porosity, a weld seam defect, exhibits a distinct transition between dark and light areas, with a dark center and gradually brightening edges. Within the data row of the weld seam area corresponding to the porosity location, drastic and sudden grayscale value changes occur, and such grayscale value jumps occur twice. Therefore, the grayscale value change characteristics of adjacent pixels within the data row of the weld seam area can be analyzed to evaluate the likelihood of porosity as a weld seam defect in the weld seam area.
[0057] Designate any data row in the weld area as the target data row. Calculate the grayscale difference between adjacent pixels within the target data row. Record adjacent pixels whose grayscale difference exceeds a preset transition threshold as a group of adjacent transition points. Identify all groups of adjacent transition points within the target data row.
[0058] It is understood that the transition threshold is a preset constant, and in this embodiment, the transition threshold is set to 100; a set of adjacent transition points corresponds to a position where a grayscale value transition occurs.
[0059] The same method can be used to identify adjacent transition points of all groups within each data row in the weld area.
[0060] The average grayscale value of all pixels within the same data row, between two adjacent sets of adjacent transition points, is recorded as the region's average grayscale value. Adaptive thresholding is applied to all region average grayscale values to obtain a segmentation threshold. Regions with average grayscale values less than the segmentation threshold are recorded as the pore regions to be identified.
[0061] In this embodiment, the Otsu's method is used for adaptive threshold segmentation. Adaptive threshold segmentation is a well-known technique and will not be described in detail here.
[0062] A schematic diagram of the pixels between two adjacent groups of adjacent transition points is shown below. Figure 2 As shown. In Figure 2 In the image, 1-8 are 8 pixels in the same row. 1 and 2 are a group of adjacent transition points, and 7 and 8 are a group of adjacent transition points. Therefore, all pixels between two adjacent groups of adjacent transition points are 3, 4, 5, and 6.
[0063] It should be noted that when a group of adjacent transition points is the leftmost adjacent transition point in the row containing the adjacent transition point, and there is no adjacent transition point to its left in this group, the average gray value of the region is only calculated for the adjacent transition point to its right. When a group of adjacent transition points is the rightmost adjacent transition point in the row containing the adjacent transition point, and there is no adjacent transition point to its right in this group, the average gray value of the region is only calculated for the adjacent transition point to its left.
[0064] It is understandable that the area between two adjacent transition points is likely to be a darker, recessed area with weaker reflection, which is the area of pores to be confirmed.
[0065] At this point, the area of pores to be confirmed has been obtained.
[0066] Step S003: Based on the difference in gray values between the inside and the surrounding area of the pore region to be confirmed, determine the contrast of the annular area of the pore region to be confirmed, and calculate the pore confidence level of the pore region to be confirmed by combining the roundness of the pore region to be confirmed.
[0067] On the weld surface of welded steel structures, pore defects are approximately circular depressions, and the edges of the pore defects are slightly raised due to the accumulation of molten metal. Because the metal surface at the raised position is smoother, the reflectivity is significantly enhanced, presenting a bright area; while the central area is depressed, causing light scattering, resulting in a lower reflectivity and presenting a dark area.
[0068] Other interference issues such as oxide spots and processing textures do not exhibit the characteristic of bright areas with raised edges and dark areas with sunken centers. Specifically, the overall gray value of oxide spots is low, and there is no obvious difference in brightness between the edges and the center. The processing texture consists of randomly distributed local bumps and depressions with chaotic gray value transitions.
[0069] The contrast of the annular region of the pore area to be identified is determined based on the difference in gray values between the inside and the surrounding area of the pore area to be identified.
[0070] Take the smallest circumcircle of the pore region to be confirmed, and denote it as the first outer circle of the pore region to be confirmed. Obtain the center and radius of the first outer circle of the pore region. Using the center of the first outer circle of the pore region as the center, and the radius of the first outer circle of the pore region plus the length of α pixels as the radius, construct a circle, and denote it as the second outer circle of the pore region to be confirmed. The area where the second outer circle of the pore region to be confirmed does not coincide with the first outer circle is denoteed as the first outer annulus of the pore region to be confirmed.
[0071] Wherein, α represents the first preset quantity, and in this embodiment, the first preset quantity is 10.
[0072] The average grayscale value of all pixels contained within the first outer ring of the area to be identified is recorded as the first grayscale value of the area to be identified; the average grayscale value of all pixels contained within the first outer ring of the area to be identified is recorded as the second grayscale value of the area to be identified; the difference between the first grayscale value and the second grayscale value of the area to be identified is recorded as the first difference of the area to be identified; and the ratio of the first difference to the second grayscale value of the area to be identified is recorded as the annular area contrast of the area to be identified.
[0073] The greater the difference between the first gray value and the second gray value of the pore area to be identified, the more significant the characteristics of the pore area to be identified, such as the edge protrusions appearing as bright areas and the central area being concave as dark areas. The greater the probability that the pore area to be identified corresponds to the location of pore defects, and the less likely it corresponds to other interference problems such as oxide spots and processing textures. At this time, the contrast of the annular area of the pore area to be identified is greater.
[0074] Furthermore, in order to further identify porosity defects and eliminate interference from other defects, it is considered that during the welding process, gases such as hydrogen and nitrogen trapped inside the molten metal cannot completely escape due to rapid cooling. Under the influence of the surface tension of the liquid metal, the bubbles will spontaneously shrink into spheres with the lowest energy. At the same time, the uniform solidification characteristics of the weld pool cause the pores to shrink isotropically in three-dimensional space, ultimately appearing as circles or near circles in the weld image.
[0075] Calculate the roundness of the pore region to be confirmed, and record the product of the annular region contrast and the roundness of the pore region to be confirmed as the pore confidence score of the pore region to be confirmed.
[0076] The calculation of the circularity of the pore area to be confirmed is a well-known technique and will not be elaborated further. Specifically: the product of the number of pixels contained in the pore area to be confirmed and 4π is recorded as the first product of the pore area to be confirmed. The ratio of the first product of the pore area to the number of pixels contained in the edge of the pore area to be confirmed is recorded as the circularity of the pore area to be confirmed.
[0077] The greater the roundness, the closer the area of pores to be identified is to a standard circle. However, defects such as cracks and inclusions are irregular in shape and differ greatly from a circle. The roundness of the areas corresponding to these defects is significantly lower.
[0078] At this point, the stomatal confidence level for each stomatal region to be confirmed is obtained.
[0079] Step S004: Based on the porosity confidence of all porosity regions to be confirmed in the weld images of all different welds of the welded steel structure to be inspected, obtain the quality inspection results of the welded steel structure to be inspected.
[0080] Set thresholds for judging porosity defects and thresholds for the number of defects.
[0081] The pore areas to be confirmed that have a pore confidence level greater than the preset pore defect judgment threshold are recorded as pore defect areas.
[0082] When the total number of porosity defect areas identified in the weld images of all different welds of the steel structure to be inspected is 0, the steel structure to be inspected is judged to be of excellent quality; when the total number of porosity defect areas identified in the weld images of all different welds of the steel structure to be inspected is greater than 0 and less than a preset threshold, the steel structure to be inspected is judged to be of good quality; when the total number of porosity defect areas identified in the weld images of all different welds of the steel structure to be inspected is greater than or equal to a preset threshold, the steel structure to be inspected is judged to be of unqualified quality.
[0083] In this embodiment, the threshold value for judging porosity defects is 1, and the threshold value for the number of defects is 10.
[0084] This completes the quality inspection of welded steel structures in building construction projects.
[0085] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A method for quality inspection of welded steel structures, characterized in that, The method includes the following steps: Acquire images of welds in the steel structure to be inspected and delineate the weld area within the weld images; Based on the gray values of adjacent pixels in the same data row in the weld area, identify each group of adjacent transition points, and divide the porosity area to be confirmed based on the differences in the gray values of pixels between adjacent transition points in all adjacent groups in the same data row. Based on the difference in gray values between the inside and the surrounding area of the pore region to be confirmed, the contrast of the annular area of the pore region to be confirmed is determined. Combined with the roundness of the pore region to be confirmed, the pore confidence of the pore region to be confirmed is calculated. Based on the porosity confidence of all porosity regions to be confirmed in the weld images of all different welds of the welded steel structure to be inspected, the quality inspection results of the welded steel structure to be inspected are obtained. The method for obtaining the contrast of the annular region of the pore area to be confirmed is as follows: The smallest circumcircle of the region of pores to be identified is denoted as the first outer circle of the region of pores to be identified. Based on the first outer circle of the pore region to be identified, construct the first outer ring of the pore region to be identified; The average gray value of all pixels contained within the first outer ring of the pore area to be identified is recorded as the first gray value of the pore area to be identified. The average gray value of all pixels contained within the first outer circle of the pore area to be identified is recorded as the second gray value of the pore area to be identified. The contrast of the annular region of the pore region to be identified is determined based on the difference between the first gray value and the second gray value of the pore region to be identified. The method for constructing the first outer ring is as follows: Using the center of the first outer circle of the pore region as the center, and the radius of the first outer circle of the pore region plus the length of a first preset number of pixels as the radius, a circle is constructed and recorded as the second outer circle of the pore region to be confirmed. The area where the second outer circle of the pore region to be identified does not coincide with the first outer circle is denoted as the first outer ring of the pore region to be identified. The method for calculating the contrast of the annular region is as follows: The difference between the first gray value and the second gray value of the pore region to be identified is recorded as the first difference of the pore region to be identified, and the ratio of the first difference to the second gray value of the pore region to be identified is recorded as the annular region contrast of the pore region to be identified.
2. The method for quality inspection of welded steel structures according to claim 1, characterized in that, The specific method for dividing the weld region in the weld image is as follows: The weld seam image is processed by grayscale conversion, noise reduction and edge detection to obtain the weld seam edge image; The region defined by the two edges containing the most pixels in the weld seam edge image is called the weld seam region. The weld seam region is defined in the weld seam image based on the position of the pixels in the weld seam region.
3. The method for quality inspection of welded steel structures according to claim 1, characterized in that, The method for identifying adjacent transition points is as follows: Calculate the difference in grayscale values between adjacent pixels in the same data row within the weld area, and record adjacent pixels whose grayscale value difference is greater than the preset transition threshold as a group of adjacent transition points.
4. The method for quality inspection of welded steel structures according to claim 1, characterized in that, The method for dividing the pore region to be confirmed is as follows: The average gray value of all pixels in the same data row between two adjacent groups of adjacent transition points is recorded as the average gray value of the region formed by all pixels between two adjacent groups of adjacent transition points. Adaptive threshold segmentation is performed on the gray-scale mean of all regions to obtain the segmentation threshold of the gray-scale mean of the region. The region consisting of pixels whose gray-scale mean is less than the segmentation threshold is recorded as the pore region to be confirmed.
5. The method for quality inspection of welded steel structures according to claim 1, characterized in that, The method for calculating the porosity confidence level of the porosity region by combining the roundness of the porosity region to be confirmed includes the following specific methods: Calculate the roundness of the pore region to be confirmed; The product of the annular region contrast and the roundness of the pore region to be confirmed is denoted as the pore confidence level of the pore region to be confirmed.
6. The method for quality inspection of welded steel structures according to claim 5, characterized in that, The specific method for calculating the roundness is as follows: The number of pixels contained in the area of the pore to be confirmed and The product of the two is denoted as the first product of the pore region to be confirmed. The ratio of the first product of the pore region to be confirmed to the number of pixels contained in the edge of the pore region to be confirmed is denoted as the roundness of the pore region to be confirmed.
7. The method for quality inspection of welded steel structures according to claim 1, characterized in that, The method for obtaining the quality inspection result of the welded steel structure under inspection based on the porosity confidence of all porosity regions to be confirmed in the weld images of all different welds of the welded steel structure under inspection includes the following specific methods: The pore areas to be confirmed with a pore confidence level greater than the preset pore defect judgment threshold are recorded as pore defect areas. When the total number of porosity defect areas identified in the weld images of all different welds of the welded steel structure to be inspected is 0, the welded steel structure to be inspected is judged to be of excellent quality. When the total number of porosity defect areas identified in the weld images of all different welds of the welded steel structure to be inspected is greater than 0 and less than the preset threshold, the welded steel structure to be inspected is judged to be of good quality. When the total number of porosity defect areas identified in the weld images of all different welds of the steel structure to be inspected is greater than or equal to a preset threshold, the steel structure to be inspected is deemed to be of substandard quality.
Citation Information
Patent Citations
Method for detecting defects of air holes in the inner surface of a casting based on endoscopic imaging
CN109493339A
Saliency identification and classification method for defects in silicon steel rolling process
CN115049656A