Weld defect detection method and system resistant to strong light interference of smoke based on arc welding environment and medium

By enhancing and removing smoke from images in the arc welding environment, and combining light source projection information analysis and weld defect detection models, the problem of image quality degradation in arc welding operations is solved, and high-precision weld defect detection is achieved.

CN120912604BActive Publication Date: 2026-03-24HANGZHOU HUICUI INTELLIGENT TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-10
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

The strong arc light interference, smoke obstruction, spatter interference, and drastic changes in time scale at the arc welding site lead to a decline in the imaging quality of the machine vision system. It is impossible to clearly observe the molten pool shape and weld contour, resulting in low image contrast, difficulty in accurately identifying welding defects, and increased error in AI algorithm training samples.

Method used

By acquiring and enhancing images of the arc welding environment, analyzing light source projection information to determine smoke concentration, and employing smoke removal and weld defect detection models, smoke removal is performed under different light source transmittance conditions, or weld defects are directly analyzed. This constructs smoke removal and weld defect detection models to improve the accuracy of weld defect detection.

Benefits of technology

In an arc welding environment, it can quickly respond and output high-resolution images, remove smoke interference, improve the accuracy and precision of weld defect detection, and ensure the identification of minute defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120912604B_ABST
    Figure CN120912604B_ABST
Patent Text Reader

Abstract

The application provides a welding seam defect detection method and system based on an arc welding environment and resistant to smoke and strong light interference, and a medium. The method comprises the following steps: acquiring a shooting image of the arc welding environment, performing enhancement processing on the shooting image to obtain an enhanced image; analyzing light source projection information based on the enhanced image, comparing the light source projection information with set projection information, and obtaining light source transmittance; determining whether the light source transmittance is greater than or equal to a set transmittance threshold; if the light source transmittance is less than the transmittance threshold, performing smoke removal processing on the enhanced image based on a smoke removal model to obtain a smoke-free image; analyzing the smoke-free image based on a welding seam defect detection model and outputting welding seam defect information; if the light source transmittance is greater than or equal to the set transmittance, analyzing the enhanced image based on a welding seam defect model and outputting welding seam defect information; and determining the smoke concentration by analyzing the light source projection information of the arc welding environment, thereby performing smoke removal processing on the image and improving the welding seam defect detection precision.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of weld defects, in particular to a weld defect detection method and system resisting smoke and strong light interference based on an electric arc welding environment and a medium. BACKGROUND

[0002] With the popularization of industrial automation and intelligent manufacturing, electric arc welding, as an efficient and reliable metal connection process, is widely used in the fields of automobile manufacturing, rail transportation, energy and power, and shipbuilding. In order to achieve high-quality and high-consistency welding quality, the industry increasingly relies on machine vision systems to monitor and feedback data in real time during the welding process.

[0003] However, the electric arc welding site environment is extremely complex, and the following key interferences are faced during image acquisition:

[0004] 1) strong arc light interference,

[0005] The strong light radiation (including ultraviolet, visible and infrared) generated by the electric arc has extremely high brightness, far exceeding the dynamic range of the camera image sensor, resulting in serious overexposure and bright spot saturation of the image, which covers the details of the molten pool and the weld;

[0006] 2) high-density smoke shielding,

[0007] Metal vapor condenses into particulate smoke, which is unevenly distributed and randomly flows, causing serious light scattering and image blurring, which sharply reduces the image contrast;

[0008] 3) spatter interference and infrared radiation,

[0009] The spatter and high-temperature molten pool produce strong infrared interference, affecting the clarity of the visible light image, and may cause damage to the sensor;

[0010] 4) time scale changes dramatically,

[0011] The electric arc fluctuation and the arc striking / extinguishing transient behavior in the arc welding process are fast and unstable, which puts high requirements on the response speed and shutter control of the vision system.

[0012] The above interferences seriously affect the imaging quality of the machine vision system, resulting in the following consequences:

[0013] 1) the molten pool shape and weld contour cannot be clearly observed;

[0014] 2) the image contrast is low, and the edge features are not obvious;

[0015] 3) the welding defects are difficult to accurately identify;

[0016] 4) the AI algorithm training sample error increases. SUMMARY

[0017] The purpose of this application is to provide a method, system, and medium for detecting weld defects based on the interference of smoke and strong light in an arc welding environment. By analyzing the source transmittance, the image is enhanced based on the weld defect model, and weld defect information is output. By analyzing the light source projection information of the arc welding environment, the smoke concentration is determined, thereby removing smoke from the image and improving the accuracy of weld defect detection.

[0018] This application also provides a method for detecting weld defects based on the interference of smoke and strong light in an arc welding environment, including:

[0019] Acquire images of the arc welding environment, and perform enhancement processing on the images to obtain enhanced images;

[0020] Based on enhanced image analysis of light source projection information, the light source projection information is compared with the set projection information to obtain the light source transmittance;

[0021] Determine whether the transmittance of the light source is greater than or equal to a set transmittance threshold;

[0022] If the light source transmittance is less than the threshold, the enhanced image is processed to remove smoke based on the smoke removal model to obtain a smoke-free image.

[0023] Based on the weld defect detection model, smoke-free images are analyzed, and weld defect information is output.

[0024] If the light source transmittance is greater than or equal to the set transmittance, the enhanced image is analyzed based on the weld defect model, and the weld defect information is output.

[0025] Optionally, in the weld defect detection method based on arc welding environment and resisting strong light interference described in the embodiments of this application, acquiring an image of the arc welding environment and enhancing the image to obtain an enhanced image specifically includes:

[0026] Based on the arc welding environment, a matching high dynamic range camera is selected to capture images.

[0027] Set segmentation region values, and divide the captured image into blocks based on the segmentation region values ​​to obtain multiple image blocks;

[0028] Obtain the pixel value of each image block, and perform histogram equalization on the pixel value of each image block to obtain the processed histogram;

[0029] Image contrast is analyzed based on the processed histogram, a contrast threshold is set, and the image contrast is compared with the contrast threshold.

[0030] If the image size is less than the contrast threshold, the corresponding image patch will be enhanced to obtain an enhanced image.

[0031] Optionally, in the weld defect detection method based on arc welding environment and resisting strong light interference described in the embodiments of this application, the captured image is enhanced to obtain an enhanced image, and the method further includes:

[0032] The pixel values ​​of the image blocks are analyzed based on the processed histograms, and the exposure value of each pixel in the image block is analyzed based on the pixel values ​​of the image blocks.

[0033] Set an exposure threshold range and compare the exposure value with the exposure threshold range. The exposure threshold range includes the lower limit value and the upper limit value of the exposure threshold range.

[0034] If the exposure value is within the exposure threshold range, the pixel is determined to be a normal pixel, and the average exposure value of the normal pixels is calculated.

[0035] If the exposure value is less than the lower limit of the exposure threshold range, the pixel is determined to be an underexposed pixel; if the exposure value is greater than the upper limit of the exposure threshold range, the pixel is determined to be an overexposed pixel.

[0036] The underexposed and overexposed pixels are filled based on the average exposure value of normal pixels to obtain the processed image. Then, noise is removed from the processed image based on the median filtering algorithm to obtain the enhanced image.

[0037] Optionally, in the weld defect detection method based on arc welding environment and resisting strong light interference described in the embodiments of this application, the light source projection information is analyzed based on enhanced image analysis, and the light source projection information is compared with the set projection information to obtain the light source transmittance, specifically including:

[0038] The enhanced image is analyzed based on threshold segmentation and edge detection algorithms to extract the light source projection area;

[0039] Calculate the average gray value and peak gray value of the light source area to obtain the light source intensity characteristics;

[0040] By analyzing the position, width, curvature, and breakage of the light fringes in the light source region, geometric features are obtained;

[0041] By analyzing the coordinate distribution, symmetry, and dispersion of the light source in the enhanced image, spatial distribution characteristics are obtained.

[0042] In a clean environment free of welding fumes and electric arc interference, images of the light source projection are captured as a reference to set the ideal intensity threshold, ideal geometry, and ideal spatial distribution coordinates of the light source.

[0043] The light source projection information is obtained based on the light source intensity characteristics, geometric characteristics, and spatial distribution characteristics. The set projection information is obtained based on the ideal intensity threshold, ideal geometric shape, and ideal spatial distribution coordinates. The light source projection information is compared with the set projection information to obtain the light source projectivity.

[0044] Optionally, in the weld defect detection method based on arc welding environment and resisting strong light interference described in the embodiments of this application, the method for constructing the smoke removal model is as follows:

[0045] A dataset is constructed by collecting foggy images from the arc welding environment and pairing them with fog-free images as data labels.

[0046] The dataset is divided into a training set and a validation set according to a set ratio;

[0047] Build the model architecture, iteratively train the model architecture based on the training set, and calculate the loss value;

[0048] Compare the loss value with the set loss threshold;

[0049] If the loss value is greater than or equal to the set loss threshold, correction information is generated, and the hyperparameters of the model architecture are dynamically adjusted based on the correction information.

[0050] If the loss value is less than or equal to the set loss value, an initial desmoke model is generated. The initial desmoke model is then validated based on the validation set. Based on the validation results, the hyperparameters of the model architecture are dynamically adjusted to obtain the final desmoke model.

[0051] Optionally, in the weld defect detection method based on arc welding environment and resisting strong light interference described in the embodiments of this application, the weld defect detection model analyzes smoke-free images and outputs weld defect information, specifically including:

[0052] Images of various welds were acquired in a smoke-free environment, including images of normal welds, porosity, cracks, lack of fusion, and undercut.

[0053] Weld types are analyzed based on various weld images, and weld images of different weld types are annotated.

[0054] The training set is obtained by combining weld images of different weld types at different proportions.

[0055] The initial model is iteratively trained based on the training set to obtain the training results;

[0056] Determine whether the training results have converged;

[0057] If convergence is achieved, a weld defect detection model is generated. Based on the analysis of smoke-free images using the weld defect detection model, weld defect information is obtained.

[0058] If convergence is not achieved, the scale of weld images for different weld types is adjusted, and the initial model is trained a second time.

[0059] Secondly, embodiments of this application provide a weld defect detection system based on arc welding environment and resistant to smoke and strong light interference. The system includes a memory and a processor. The memory includes a program for a weld defect detection method based on arc welding environment and resistant to smoke and strong light interference. When the program for the weld defect detection method based on arc welding environment and resistant to smoke and strong light interference is executed by the processor, it implements the following steps:

[0060] Acquire images of the arc welding environment, and perform enhancement processing on the images to obtain enhanced images;

[0061] Based on enhanced image analysis of light source projection information, the light source projection information is compared with the set projection information to obtain the light source transmittance;

[0062] Determine whether the transmittance of the light source is greater than or equal to a set transmittance threshold;

[0063] If the light source transmittance is less than the threshold, the enhanced image is processed to remove smoke based on the smoke removal model to obtain a smoke-free image.

[0064] Based on the weld defect detection model, smoke-free images are analyzed, and weld defect information is output.

[0065] If the light source transmittance is greater than or equal to the set transmittance, the enhanced image is analyzed based on the weld defect model, and the weld defect information is output.

[0066] Optionally, in the weld defect detection system based on arc welding environment and resistant to smoke and strong light interference described in the embodiments of this application, acquiring images of the arc welding environment and enhancing the images to obtain enhanced images specifically includes:

[0067] Based on the arc welding environment, a matching high dynamic range camera is selected to capture images.

[0068] Set segmentation region values, and divide the captured image into blocks based on the segmentation region values ​​to obtain multiple image blocks;

[0069] Obtain the pixel value of each image block, and perform histogram equalization on the pixel value of each image block to obtain the processed histogram;

[0070] Image contrast is analyzed based on the processed histogram, a contrast threshold is set, and the image contrast is compared with the contrast threshold.

[0071] If the image size is less than the contrast threshold, the corresponding image patch will be enhanced to obtain an enhanced image.

[0072] Optionally, in the weld defect detection system based on arc welding environment and resistant to strong light interference described in this application embodiment, the captured image is enhanced to obtain an enhanced image, and the system further includes:

[0073] The pixel values ​​of the image blocks are analyzed based on the processed histograms, and the exposure value of each pixel in the image block is analyzed based on the pixel values ​​of the image blocks.

[0074] Set an exposure threshold range and compare the exposure value with the exposure threshold range. The exposure threshold range includes the lower limit value and the upper limit value of the exposure threshold range.

[0075] If the exposure value is within the exposure threshold range, the pixel is determined to be a normal pixel, and the average exposure value of the normal pixels is calculated.

[0076] If the exposure value is less than the lower limit of the exposure threshold range, the pixel is determined to be an underexposed pixel; if the exposure value is greater than the upper limit of the exposure threshold range, the pixel is determined to be an overexposed pixel.

[0077] The underexposed and overexposed pixels are filled based on the average exposure value of normal pixels to obtain the processed image. Then, noise is removed from the processed image based on the median filtering algorithm to obtain the enhanced image.

[0078] Thirdly, embodiments of this application also provide a computer-readable storage medium, which includes a weld defect detection method program based on arc welding environment and resistant to smoke and strong light interference. When the weld defect detection method program based on arc welding environment and resistant to smoke and strong light interference is executed by a processor, it implements the steps of the weld defect detection method based on arc welding environment and resistant to smoke and strong light interference as described in any of the above claims.

[0079] As can be seen from the above, the weld defect detection method, system, and medium based on the arc welding environment and resisting strong light interference provide by this application embodiment acquires an image of the arc welding environment, enhances the image to obtain an enhanced image; analyzes the light source projection information based on the enhanced image, compares the light source projection information with the set projection information to obtain the light source transmittance; determines whether the light source transmittance is greater than or equal to the set transmittance threshold; if it is less than the light source transmittance threshold, the enhanced image is desmoke-free based on the desmoke-free model to obtain a smoke-free image; analyzes the smoke-free image based on the weld defect detection model and outputs weld defect information; if it is greater than or equal to the set light source transmittance, the enhanced image is analyzed based on the weld defect model and outputs weld defect information; by analyzing the light source projection information of the arc welding environment to determine the smoke concentration, the image is desmoke-free, thereby improving the accuracy of weld defect detection. Attached Figure Description

[0080] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0081] Figure 1 A flowchart of a weld defect detection method based on arc welding environment and resisting strong light interference provided in the embodiments of this application;

[0082] Figure 2 A flowchart illustrating the image enhancement processing of the weld defect detection method based on arc welding environment and resisting strong light interference, provided in the embodiments of this application.

[0083] Figure 3 This is a flowchart illustrating the image exposure value filling method for a weld defect detection method based on arc welding environment and resisting strong light interference. Detailed Implementation

[0084] 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 a part of the embodiments of this application, and not all of the embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0085] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0086] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a weld defect detection method based on an arc welding environment and resistant to smoke and strong light interference, according to some embodiments of this application. This weld defect detection method based on an arc welding environment and resistant to smoke and strong light interference is used in a terminal device and includes the following steps:

[0087] S101, acquire images of the arc welding environment, enhance the images to obtain enhanced images;

[0088] S102, Based on enhanced image analysis of light source projection information, the light source projection information is compared with the set projection information to obtain the light source transmittance;

[0089] S103, determine whether the transmittance of the light source is greater than or equal to the set transmittance threshold;

[0090] S104, if it is less than the light source transmittance threshold, the enhanced image is processed to remove smoke based on the smoke removal model to obtain a smoke-free image. The smoke-free image is analyzed based on the weld defect detection model to output weld defect information.

[0091] S105, if the light source transmittance is greater than or equal to the set transmittance, then the enhanced image is analyzed based on the weld defect model, and the weld defect information is output.

[0092] It should be noted that by enhancing the captured images, the system can quickly respond in dynamic welding environments, output high-resolution images, and remove smoke from the images to improve image clarity, ensuring the identification of minute defects in the images and improving defect recognition accuracy.

[0093] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating the image enhancement processing of a weld defect detection method based on an arc welding environment to resist smoke and strong light interference, according to some embodiments of this application. According to embodiments of the present invention, acquiring images of the arc welding environment and enhancing these images to obtain enhanced images specifically includes:

[0094] S201, Select a matching high dynamic range camera based on the arc welding environment to capture images;

[0095] S202, Set the segmentation region value, and divide the captured image into blocks based on the segmentation region value to obtain multiple image blocks;

[0096] S203, obtain the pixel value of each image block, perform histogram equalization on the pixel value of each image block, and obtain the processed histogram;

[0097] S204, Analyze the image contrast based on the processed histogram, set a contrast threshold, and compare the image contrast with the contrast threshold;

[0098] S205, if the image is less than the contrast threshold, the corresponding image block will be enhanced to obtain an enhanced image.

[0099] It should be noted that segmenting the captured image into regions and processing the segmented image blocks separately improves the processing effect.

[0100] Please refer to Figure 3 , Figure 3 This is a flowchart illustrating an image exposure value filling method for a weld defect detection method based on arc welding environment and resisting strong light and smoke interference, according to some embodiments of this application. According to embodiments of the present invention, the captured image is enhanced to obtain an enhanced image, and the method further includes:

[0101] S301, Analyze the pixel values ​​of the image blocks based on the processed histogram, and analyze the exposure value of each pixel in the image block based on the pixel values ​​of the image blocks;

[0102] S302, Set the exposure threshold range, compare the exposure value with the exposure threshold range, the exposure threshold range includes the lower limit value and the upper limit value of the exposure threshold range;

[0103] S303, if the exposure value is within the exposure threshold range, then the pixel is determined to be a normal pixel, and the average exposure value of the normal pixel is calculated.

[0104] S304, if the exposure value is less than the lower limit of the exposure threshold range, the pixel is determined to be an underexposed pixel; if the exposure value is greater than the upper limit of the exposure threshold range, the pixel is determined to be an overexposed pixel.

[0105] S305 fills in underexposed and overexposed pixels based on the average exposure value of normal pixels to obtain the processed image. Then, it removes noise from the processed image using a median filtering algorithm to obtain the enhanced image.

[0106] It should be noted that by analyzing exposure values ​​to suppress arc interference, the intense bright areas of the electric arc are suppressed, the true grayscale of the weld area is restored, the penetration ability is enhanced, and the image blurring caused by smoke is removed.

[0107] According to an embodiment of the present invention, the light source projection information is analyzed based on enhanced image analysis, and the light source projection information is compared with set projection information to obtain the light source transmittance, specifically including:

[0108] The enhanced image is analyzed based on threshold segmentation and edge detection algorithms to extract the light source projection area;

[0109] Calculate the average gray value and peak gray value of the light source area to obtain the light source intensity characteristics;

[0110] By analyzing the position, width, curvature, and breakage of the light fringes in the light source region, geometric features are obtained;

[0111] By analyzing the coordinate distribution, symmetry, and dispersion of the light source in the enhanced image, spatial distribution characteristics are obtained.

[0112] In a clean environment free of welding fumes and electric arc interference, images of the light source projection are captured as a reference to set the ideal intensity threshold, ideal geometry, and ideal spatial distribution coordinates of the light source.

[0113] The light source projection information is obtained based on the light source intensity characteristics, geometric characteristics, and spatial distribution characteristics. The set projection information is obtained based on the ideal intensity threshold, ideal geometric shape, and ideal spatial distribution coordinates. The light source projection information is compared with the set projection information to obtain the light source projectivity.

[0114] It should be noted that by analyzing the light source intensity characteristics, geometric features, and spatial Argin distribution coordinates of the image, the light source projection information is analyzed and compared with the set projection information to accurately analyze the light source transmittance.

[0115] According to an embodiment of the present invention, the method for constructing a smoke removal model is as follows:

[0116] A dataset is constructed by collecting foggy images from the arc welding environment and pairing them with fog-free images as data labels.

[0117] The dataset is divided into a training set and a validation set according to a set ratio;

[0118] Build the model architecture, iteratively train the model architecture based on the training set, and calculate the loss value;

[0119] Compare the loss value with the set loss threshold;

[0120] If the loss value is greater than or equal to the set loss threshold, correction information is generated, and the hyperparameters of the model architecture are dynamically adjusted based on the correction information.

[0121] If the loss value is less than or equal to the set loss value, an initial desmoke model is generated. The initial desmoke model is then validated based on the validation set. Based on the validation results, the hyperparameters of the model architecture are dynamically adjusted to obtain the final desmoke model.

[0122] It should be noted that the method for constructing the smoke removal model (based on dark channel prior) is as follows:

[0123] Assume the image model is:

[0124] ,

[0125] Solve the target image :

[0126] ,

[0127] in:

[0128] A: Atmospheric light estimation;

[0129] Projected image, estimated using a minimum channel local window;

[0130] Lower limit of transmission, avoid division by zero.

[0131] High dynamic range multi-exposure fusion is as follows:

[0132] Acquire multiple frames of images Images with different exposures are weighted and fused:

[0133] ,

[0134] in: This typically represents the pixel value at pixel position (x, y) in the i-th image acquired under different exposure conditions. These images are taken from multiple shots using different exposure parameters to capture more dynamic range information of the scene.

[0135] This represents the value at pixel position (x,y) of the high dynamic range image (HDR image) after weighted fusion, i.e., the fused result image;

[0136] The weights are dynamically adjusted based on the local gradient, brightness, and saturation.

[0137] It employs Laplacian enhancement and the Retinex model to sharpen images and restore edges, improving detail and contrast.

[0138] According to an embodiment of the present invention, based on the analysis of smoke-free images using a weld defect detection model, weld defect information is output, specifically including:

[0139] Images of various welds were acquired in a smoke-free environment, including images of normal welds, porosity, cracks, lack of fusion, and undercut.

[0140] Weld types are analyzed based on various weld images, and weld images of different weld types are annotated.

[0141] The training set is obtained by combining weld images of different weld types at different proportions.

[0142] The initial model is iteratively trained based on the training set to obtain the training results;

[0143] Determine whether the training results have converged;

[0144] If convergence is achieved, a weld defect detection model is generated. Based on the analysis of smoke-free images using the weld defect detection model, weld defect information is obtained.

[0145] If convergence is not achieved, the scale of weld images for different weld types is adjusted, and the initial model is trained a second time.

[0146] It should be noted that a training set is constructed by combining weld images of different weld types in proportion to obtain a weld defect detection model, thereby accurately identifying the type and location of weld defects in the images.

[0147] Secondly, embodiments of this application provide a weld defect detection system based on arc welding environment and resistant to smoke and strong light interference. The system includes a memory and a processor. The memory includes a program for a weld defect detection method based on arc welding environment and resistant to smoke and strong light interference. When the program is executed by the processor, it performs the following steps:

[0148] Acquire images of the arc welding environment, and perform enhancement processing on the images to obtain enhanced images;

[0149] Based on enhanced image analysis of light source projection information, the light source projection information is compared with the set projection information to obtain the light source transmittance;

[0150] Determine whether the transmittance of the light source is greater than or equal to the set transmittance threshold;

[0151] If the light source transmittance is less than the threshold, the enhanced image is processed to remove smoke based on the smoke removal model to obtain a smoke-free image.

[0152] Based on the weld defect detection model, smoke-free images are analyzed, and weld defect information is output.

[0153] If the light source transmittance is greater than or equal to the set transmittance, the enhanced image is analyzed based on the weld defect model, and the weld defect information is output.

[0154] It should be noted that by enhancing the captured images, the system can quickly respond in dynamic welding environments, output high-resolution images, and remove smoke from the images to improve image clarity, ensuring the identification of minute defects in the images and improving defect recognition accuracy.

[0155] According to an embodiment of the present invention, an image of the arc welding environment is acquired, and the acquired image is enhanced to obtain an enhanced image, specifically including:

[0156] Based on the arc welding environment, a matching high dynamic range camera is selected to capture images.

[0157] Set segmentation region values, and divide the captured image into blocks based on the segmentation region values ​​to obtain multiple image blocks;

[0158] Obtain the pixel value of each image block, and perform histogram equalization on the pixel value of each image block to obtain the processed histogram;

[0159] Image contrast is analyzed based on the processed histogram, a contrast threshold is set, and the image contrast is compared with the contrast threshold.

[0160] If the image size is less than the contrast threshold, the corresponding image patch will be enhanced to obtain an enhanced image.

[0161] It should be noted that segmenting the captured image into regions and processing the segmented image blocks separately improves the processing effect.

[0162] According to an embodiment of the present invention, enhancing the captured image to obtain an enhanced image further includes:

[0163] The pixel values ​​of the image blocks are analyzed based on the processed histograms, and the exposure value of each pixel in the image block is analyzed based on the pixel values ​​of the image blocks.

[0164] Set an exposure threshold range and compare the exposure value with the exposure threshold range. The exposure threshold range includes the lower limit and the upper limit of the exposure threshold range.

[0165] If the exposure value is within the exposure threshold range, the pixel is determined to be a normal pixel, and the average exposure value of the normal pixels is calculated.

[0166] If the exposure value is less than the lower limit of the exposure threshold range, the pixel is determined to be an underexposed pixel; if the exposure value is greater than the upper limit of the exposure threshold range, the pixel is determined to be an overexposed pixel.

[0167] The underexposed and overexposed pixels are filled based on the average exposure value of normal pixels to obtain the processed image. Then, noise is removed from the processed image based on the median filtering algorithm to obtain the enhanced image.

[0168] It should be noted that by analyzing exposure values ​​to suppress arc interference, the intense bright areas of the electric arc are suppressed, the true grayscale of the weld area is restored, the penetration ability is enhanced, and the image blurring caused by smoke is removed.

[0169] According to an embodiment of the present invention, the light source projection information is analyzed based on enhanced image analysis, and the light source projection information is compared with set projection information to obtain the light source transmittance, specifically including:

[0170] The enhanced image is analyzed based on threshold segmentation and edge detection algorithms to extract the light source projection area;

[0171] Calculate the average gray value and peak gray value of the light source area to obtain the light source intensity characteristics;

[0172] By analyzing the position, width, curvature, and breakage of the light fringes in the light source region, geometric features are obtained;

[0173] By analyzing the coordinate distribution, symmetry, and dispersion of the light source in the enhanced image, spatial distribution characteristics are obtained.

[0174] In a clean environment free of welding fumes and electric arc interference, images of the light source projection are captured as a reference to set the ideal intensity threshold, ideal geometry, and ideal spatial distribution coordinates of the light source.

[0175] The light source projection information is obtained based on the light source intensity characteristics, geometric characteristics, and spatial distribution characteristics. The set projection information is obtained based on the ideal intensity threshold, ideal geometric shape, and ideal spatial distribution coordinates. The light source projection information is compared with the set projection information to obtain the light source projectivity.

[0176] It should be noted that by analyzing the light source intensity characteristics, geometric features, and spatial Argin distribution coordinates of the image, the light source projection information is analyzed and compared with the set projection information to accurately analyze the light source transmittance.

[0177] According to an embodiment of the present invention, the method for constructing a smoke removal model is as follows:

[0178] A dataset is constructed by collecting foggy images from the arc welding environment and pairing them with fog-free images as data labels.

[0179] The dataset is divided into a training set and a validation set according to a set ratio;

[0180] Build the model architecture, iteratively train the model architecture based on the training set, and calculate the loss value;

[0181] Compare the loss value with the set loss threshold;

[0182] If the loss value is greater than or equal to the set loss threshold, correction information is generated, and the hyperparameters of the model architecture are dynamically adjusted based on the correction information.

[0183] If the loss value is less than or equal to the set loss value, an initial desmoke model is generated. The initial desmoke model is then validated based on the validation set. Based on the validation results, the hyperparameters of the model architecture are dynamically adjusted to obtain the final desmoke model.

[0184] It should be noted that the method for constructing the smoke removal model (based on dark channel prior) is as follows:

[0185] Assume the image model is:

[0186] ,

[0187] Solve the target image :

[0188] ,

[0189] in:

[0190] A: Atmospheric light estimation;

[0191] Projected image, estimated using a minimum channel local window;

[0192] Lower limit of transmission, avoid division by zero.

[0193] High dynamic range multi-exposure fusion is as follows:

[0194] Acquire multiple frames of images Images with different exposures are weighted and fused:

[0195] ,

[0196] in: The weights are dynamically adjusted based on the local gradient, brightness, and saturation.

[0197] It employs Laplacian enhancement and the Retinex model to sharpen images and restore edges, improving detail and contrast.

[0198] According to an embodiment of the present invention, based on the analysis of smoke-free images using a weld defect detection model, weld defect information is output, specifically including:

[0199] Images of various welds were acquired in a smoke-free environment, including images of normal welds, porosity, cracks, lack of fusion, and undercut.

[0200] Weld types are analyzed based on various weld images, and weld images of different weld types are annotated.

[0201] The training set is obtained by combining weld images of different weld types at different proportions.

[0202] The initial model is iteratively trained based on the training set to obtain the training results;

[0203] Determine whether the training results have converged;

[0204] If convergence is achieved, a weld defect detection model is generated. Based on the analysis of smoke-free images using the weld defect detection model, weld defect information is obtained.

[0205] If convergence is not achieved, the scale of weld images for different weld types is adjusted, and the initial model is trained a second time.

[0206] It should be noted that a training set is constructed by combining weld images of different weld types in proportion to obtain a weld defect detection model, thereby accurately identifying the type and location of weld defects in the images.

[0207] A third aspect of the present invention provides a computer-readable storage medium including a weld defect detection method program based on arc welding environment and resistant to smoke and strong light interference. When the weld defect detection method program based on arc welding environment and resistant to smoke and strong light interference is executed by a processor, it implements the steps of the weld defect detection method based on arc welding environment and resistant to smoke and strong light interference as described in any of the above claims.

[0208] This invention discloses a method, system, and medium for detecting weld defects in an arc welding environment, resistant to smoke and strong light interference. The method involves acquiring images of the arc welding environment, enhancing these images to obtain enhanced images, analyzing light source projection information based on the enhanced images, comparing this information with preset projection information to obtain light source transmittance, determining if the transmittance is greater than or equal to a preset transmittance threshold, and if it is less than the threshold, performing smoke removal processing on the enhanced images based on a smoke removal model to obtain smoke-free images. The smoke-free images are then analyzed using a weld defect detection model to output weld defect information. If the transmittance is greater than or equal to the preset threshold, the enhanced images are analyzed using a weld defect model to output weld defect information. By analyzing the light source projection information of the arc welding environment to determine the smoke concentration, smoke removal processing is performed on the images, improving the accuracy of weld defect detection.

[0209] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0210] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.

[0211] In addition, in the various embodiments of the present invention, each functional unit can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0212] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0213] Alternatively, if the integrated units of the present invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.

Claims

1. A method for detecting weld defects in an arc welding environment, resistant to smoke and strong light interference, characterized in that, include: Acquire images of the arc welding environment, and perform enhancement processing on the images to obtain enhanced images; Based on enhanced image analysis of light source projection information, the light source projection information is compared with the set projection information to obtain the light source transmittance; Determine whether the transmittance of the light source is greater than or equal to a set transmittance threshold; If the light source transmittance is less than the light source transmittance threshold, the enhanced image is processed to remove smoke based on the smoke removal model to obtain a smoke-free image. The smoke-free image is then analyzed based on the weld defect detection model to output weld defect information. If the light source transmittance is greater than or equal to the set transmittance, the enhanced image is analyzed based on the weld defect model, and the weld defect information is output. Acquire images of the arc welding environment, perform image enhancement processing on the acquired images to obtain enhanced images, specifically including: Based on the arc welding environment, a matching high dynamic range camera is selected to capture images. Set segmentation region values, and divide the captured image into blocks based on the segmentation region values ​​to obtain multiple image blocks; Obtain the pixel value of each image block, and perform histogram equalization on the pixel value of each image block to obtain the processed histogram; Image contrast is analyzed based on the processed histogram, a contrast threshold is set, and the image contrast is compared with the contrast threshold. If the image is less than the contrast threshold, the corresponding image patch will be enhanced to obtain an enhanced image. Enhancing the captured image to obtain an enhanced image also includes: The pixel values ​​of the image blocks are analyzed based on the processed histograms, and the exposure value of each pixel in the image block is analyzed based on the pixel values ​​of the image blocks. Set an exposure threshold range and compare the exposure value with the exposure threshold range. The exposure threshold range includes the lower limit value and the upper limit value of the exposure threshold range. If the exposure value is within the exposure threshold range, the pixel is determined to be a normal pixel, and the average exposure value of the normal pixels is calculated. If the exposure value is less than the lower limit of the exposure threshold range, the pixel is determined to be an underexposed pixel; if the exposure value is greater than the upper limit of the exposure threshold range, the pixel is determined to be an overexposed pixel. The underexposed and overexposed pixels are filled based on the average exposure value of normal pixels to obtain the processed image. The noise of the processed image is removed based on the median filtering algorithm to obtain the enhanced image. Based on enhanced image analysis of light source projection information, the light source projection information is compared with the set projection information to obtain the light source transmittance, specifically including: The enhanced image is analyzed based on threshold segmentation and edge detection algorithms to extract the light source projection area; Calculate the average gray value and peak gray value of the light source area to obtain the light source intensity characteristics; By analyzing the position, width, curvature, and breakage of the light fringes in the light source region, geometric features are obtained; By analyzing the coordinate distribution, symmetry, and dispersion of the light source in the enhanced image, spatial distribution characteristics are obtained. In a clean environment free of welding fumes and electric arc interference, images of the light source projection are captured as a reference to set the ideal intensity threshold, ideal geometry, and ideal spatial distribution coordinates of the light source. The light source projection information is obtained based on the light source intensity characteristics, geometric characteristics, and spatial distribution characteristics. The set projection information is obtained based on the ideal intensity threshold, ideal geometric shape, and ideal spatial distribution coordinates. The light source projection information is compared with the set projection information to obtain the light source transmittance. The method for constructing the smoke removal model is as follows: A dataset is constructed by collecting foggy images from the arc welding environment and pairing them with fog-free images as data labels. The dataset is divided into a training set and a validation set according to a set ratio; Build the model architecture, iteratively train the model architecture based on the training set, and calculate the loss value; Compare the loss value with the set loss threshold; If the loss value is greater than or equal to the set loss threshold, correction information is generated, and the hyperparameters of the model architecture are dynamically adjusted based on the correction information. If the loss value is less than or equal to the set loss value, an initial desmoke model is generated. The initial desmoke model is then validated based on the validation set. Based on the validation results, the hyperparameters of the model architecture are dynamically adjusted to obtain the final desmoke model.

2. The weld defect detection method based on arc welding environment and resistant to strong light and smoke interference according to claim 1, characterized in that, Based on the weld defect detection model, smoke-free images are analyzed, and weld defect information is output, specifically including: Images of various welds were acquired in a smoke-free environment, including images of normal welds, porosity, cracks, lack of fusion, and undercut. Weld types are analyzed based on various weld images, and weld images of different weld types are annotated. The training set is obtained by combining weld images of different weld types at different proportions. The initial model is iteratively trained based on the training set to obtain the training results; Determine whether the training results have converged; If convergence is achieved, a weld defect detection model is generated. Based on the analysis of smoke-free images using the weld defect detection model, weld defect information is obtained. If convergence is not achieved, the scale of weld images for different weld types is adjusted, and the initial model is trained a second time.

3. A weld defect detection system resistant to smoke and strong light interference in an arc welding environment, characterized in that, The system includes a memory and a processor. The memory contains a program for a weld defect detection method based on arc welding environment with resistance to smoke and strong light interference. When the program for the weld defect detection method based on arc welding environment with resistance to smoke and strong light interference is executed by the processor, it performs the following steps: Acquire images of the arc welding environment, and perform enhancement processing on the images to obtain enhanced images; Based on enhanced image analysis of light source projection information, the light source projection information is compared with the set projection information to obtain the light source transmittance; Determine whether the transmittance of the light source is greater than or equal to a set transmittance threshold; If the light source transmittance is less than the light source transmittance threshold, the enhanced image is processed to remove smoke based on the smoke removal model to obtain a smoke-free image. The smoke-free image is then analyzed based on the weld defect detection model to output weld defect information. If the light source transmittance is greater than or equal to the set transmittance, the enhanced image is analyzed based on the weld defect model, and the weld defect information is output. Acquire images of the arc welding environment, perform image enhancement processing on the acquired images to obtain enhanced images, specifically including: Based on the arc welding environment, a matching high dynamic range camera is selected to capture images. Set segmentation region values, and divide the captured image into blocks based on the segmentation region values ​​to obtain multiple image blocks; Obtain the pixel value of each image block, and perform histogram equalization on the pixel value of each image block to obtain the processed histogram; Image contrast is analyzed based on the processed histogram, a contrast threshold is set, and the image contrast is compared with the contrast threshold. If the image is less than the contrast threshold, the corresponding image patch will be enhanced to obtain an enhanced image. Enhancing the captured image to obtain an enhanced image also includes: The pixel values ​​of the image blocks are analyzed based on the processed histograms, and the exposure value of each pixel in the image block is analyzed based on the pixel values ​​of the image blocks. Set an exposure threshold range and compare the exposure value with the exposure threshold range. The exposure threshold range includes the lower limit value and the upper limit value of the exposure threshold range. If the exposure value is within the exposure threshold range, the pixel is determined to be a normal pixel, and the average exposure value of the normal pixels is calculated. If the exposure value is less than the lower limit of the exposure threshold range, the pixel is determined to be an underexposed pixel; if the exposure value is greater than the upper limit of the exposure threshold range, the pixel is determined to be an overexposed pixel. The underexposed and overexposed pixels are filled based on the average exposure value of normal pixels to obtain the processed image. The noise of the processed image is removed based on the median filtering algorithm to obtain the enhanced image. Based on enhanced image analysis of light source projection information, the light source projection information is compared with the set projection information to obtain the light source transmittance, specifically including: The enhanced image is analyzed based on threshold segmentation and edge detection algorithms to extract the light source projection area; Calculate the average gray value and peak gray value of the light source area to obtain the light source intensity characteristics; By analyzing the position, width, curvature, and breakage of the light fringes in the light source region, geometric features are obtained; By analyzing the coordinate distribution, symmetry, and dispersion of the light source in the enhanced image, spatial distribution characteristics are obtained. In a clean environment free of welding fumes and electric arc interference, images of the light source projection are captured as a reference to set the ideal intensity threshold, ideal geometry, and ideal spatial distribution coordinates of the light source. The light source projection information is obtained based on the light source intensity characteristics, geometric characteristics, and spatial distribution characteristics. The set projection information is obtained based on the ideal intensity threshold, ideal geometric shape, and ideal spatial distribution coordinates. The light source projection information is compared with the set projection information to obtain the light source transmittance. The method for constructing the smoke removal model is as follows: A dataset is constructed by collecting foggy images from the arc welding environment and pairing them with fog-free images as data labels. The dataset is divided into a training set and a validation set according to a set ratio; Build the model architecture, iteratively train the model architecture based on the training set, and calculate the loss value; Compare the loss value with the set loss threshold; If the loss value is greater than or equal to the set loss threshold, correction information is generated, and the hyperparameters of the model architecture are dynamically adjusted based on the correction information. If the loss value is less than or equal to the set loss value, an initial desmoke model is generated. The initial desmoke model is then validated based on the validation set. Based on the validation results, the hyperparameters of the model architecture are dynamically adjusted to obtain the final desmoke model.

4. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a weld defect detection method program based on arc welding environment and resistant to smoke and strong light interference. When the weld defect detection method program based on arc welding environment and resistant to smoke and strong light interference is executed by a processor, it implements the steps of the weld defect detection method based on arc welding environment and resistant to smoke and strong light interference as described in any one of claims 1 to 2.

Citation Information

Patent Citations

  • High-robustness thundersight fusion fog-penetrating target identification method

    CN114415173A

  • Robot test welding defect automatic detection method

    CN119941634A

  • Exposure correction method and system based on illumination perception mechanism

    CN120451484A

  • Anti-collision beam weld defect detection method and system based on image processing

    CN120598960A