An IBC barrel weld defect identification method based on industrial vision

CN122882480APending Publication Date: 2026-10-09SHANGHAI GECHENG AUTOMATION EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610980284.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-02
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0003]本发明的目的在于提供一种基于工业视觉的IBC桶焊缝缺陷识别方法,解决以下技术问题:现有IBC桶焊缝质量检测技术在面对刚完成焊接时伴随热气流扰动下的内部缺陷识别,以及区分真实缺陷与反光、振动等环境干扰因素方面存在实质性不足,亟待提出一种能够将热致图像畸变转化为有效检测信息并结合静态表面形貌进行多维参考比对,从而精确、稳定地识别微小缺陷并有效降低误检率的一种基于工业视觉的IBC桶焊缝缺陷识别方法

Benefits of technology

1.本方法通过对连续多帧结构光图像进行空间对齐、中值融合及相位提取,获取静态表面图像与动态气流扰动图像;该方式将常规检测中易被视为噪声的热气流扰动转化为可量化的热致畸变数据,并与焊缝表面形貌数据联合,有效提高了刚完成焊接状态下微小气孔、未焊透等缺陷的识别可靠性;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122882480A_ABST
    Figure CN122882480A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of weld nondestructive testing and machine vision detection, in particular to an IBC bucket weld defect identification method based on industrial vision, comprising: scanning the IBC bucket in the instant state after welding by a structured light vision sensor, positioning the weld area and collecting continuous multiple structured light images; performing global motion compensation, spatial alignment, time median fusion and phase extraction to obtain static surface images and dynamic airflow disturbance images; obtaining qualified weld reference data under the same condition; identifying the weld boundary, extracting surface topography data and thermal distortion data, and mapping and combining to generate weld feature data; comparing the feature data with the reference feature data to obtain the difference total coefficient, determining the suspected defect area and calculating the defect judgment value, outputting the defect category and position, and realizing online detection and process feedback.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of non-destructive testing and machine vision inspection technology for welds, specifically a method for identifying weld defects in IBC barrels based on industrial vision. Background Technology

[0002] Currently, online inspection of IBC barrel welds typically relies on single-frame visible light or structured light contour images. Weld surface morphology features are acquired through image enhancement, edge extraction, or grayscale thresholding, and anomalies such as weld beads, undercut, and cracks are identified based on surface texture, brightness variations, or geometric abrupt changes. However, when inspecting IBC barrel welds immediately after welding using these methods, high-gradient thermal gas flow disturbances exist in the weld area. Structured light stripes or grid images are prone to local bending, flickering, and blurring. Existing methods usually suppress these disturbances as noise, leading to the neglect of effective information reflecting internal thermal anomalies. This results in low accuracy in identifying defects such as micropores, incomplete penetration, or poor fusion. Furthermore, single-frame images or individual surface features struggle to distinguish between genuine defects and interfering factors such as reflections, vibrations, and local shadows, easily leading to false detections. Moreover, existing inspection methods lack joint comparison with reference data of qualified welds under the same conditions, making it difficult to adapt to different post-weld time windows, different weld locations, and complex intersecting weld boundaries, resulting in poor adaptability for online inspection. Summary of the Invention

[0003] The purpose of this invention is to provide an industrial vision-based method for identifying weld defects in IBC barrels, addressing the following technical problems: Existing IBC barrel weld quality inspection technologies are substantially inadequate in identifying internal defects under the disturbance of hot airflow immediately after welding, and in distinguishing true defects from environmental interference factors such as reflection and vibration. There is an urgent need for an industrial vision-based method for identifying IBC barrel weld defects that can convert thermally induced image distortion into effective detection information and combine it with static surface morphology for multi-dimensional reference comparison, thereby accurately and stably identifying minute defects and effectively reducing the false detection rate. This invention can achieve its objective through the following technical solutions: A method for identifying weld defects in IBC barrels based on industrial vision includes: The structured light vision sensor scans the IBC barrel in the instant after welding is completed, locates the weld area and acquires a series of structured light images of the area, performs global motion compensation and spatial alignment processing, and performs median fusion and phase extraction in the time dimension to obtain static surface images and dynamic airflow disturbance images. A reference static surface image and a reference dynamic airflow disturbance image are obtained by acquiring and processing a pre-defined qualified, defect-free IBC barrel weld under the same conditions as reference data, and corresponding reference feature data are extracted based on the reference data. The weld edge boundary is identified based on the gray-level gradient change of the static surface image, the area to be detected is determined, and local data is extracted to obtain the surface morphology data of the weld within the area to be detected; at the same time, thermal distortion data is extracted based on the dynamic airflow disturbance image. The thermally induced distortion data is transformed into coordinates and spatially mapped to the corresponding pixels of the weld surface morphology data; the weld surface morphology data and the thermally induced distortion data are weighted and combined according to preset weights in a unified two-dimensional pixel coordinate system to obtain weld feature data; Based on the difference comparison between the weld feature data and the reference feature data corresponding to the reference data, the total difference coefficient is calculated. By comparing the total difference coefficient with the preset screening threshold, the suspected defect local area is determined. Local feature extraction is performed in the suspected defect local area to calculate the defect judgment value. The defect judgment value is compared with the preset defect evaluation threshold to output the defect category and location judgment result of the IBC barrel weld.

[0004] Optionally, high-frequency grid structured light with a spatial frequency higher than the main spatial frequency of the inherent texture of the weld surface is projected onto the weld area, and multiple frames of structured light images are continuously acquired; any frame of the multiple frame structured light images is used as a reference frame for spatial alignment, and the aligned images are subjected to median operation in the time dimension to form the static surface image; the instantaneous phase of each frame image is extracted and the time statistical variance is calculated to form the dynamic airflow disturbance image.

[0005] Optionally, the reference object corresponding to the reference data is a pre-defined qualified, defect-free weld of the same type of IBC barrel, and the reference object and the IBC barrel to be tested have a consistent correspondence in physical structure and material. The reference data is obtained by collecting data from the reference object under the same post-weld time window and the same high-frequency grid structured light projection detection conditions and by the same basic processing method, and serves as the benchmark condition for subsequent defect comparison.

[0006] Optionally, the weld feature data includes surface grayscale variation parameters, mesh deformation variance parameters, and local brightness-dark contrast parameters; The specific method for calculating the total difference coefficient based on the difference comparison between the weld feature data and the reference feature data corresponding to the reference data is as follows: extract the surface grayscale change parameters and local brightness contrast parameters in the area to be detected from the static surface image, and extract the grid deformation variance parameters from the dynamic airflow disturbance image as the feature data to be detected. Simultaneously, the reference surface grayscale change parameters, reference mesh deformation variance parameters, and reference local brightness-darkness contrast parameters corresponding to the reference data are extracted as the reference feature data. The total difference coefficient is calculated based on the relative or absolute difference between the above-mentioned feature data to be detected and the reference feature data.

[0007] Optionally, the total difference coefficient is calculated as follows: The differences in surface grayscale variation, mesh deformation variance, and local brightness contrast between the feature data to be detected and the reference feature data are extracted respectively, and corresponding characterization coefficients are generated respectively. The characterization coefficients are weighted and summed according to their respective preset weights to calculate the total difference coefficient used to determine the suspected defect local area.

[0008] Optionally, the total difference coefficient is compared with the preset screening threshold; if the total difference coefficient is not greater than the preset screening threshold, it is determined that the weld to be inspected has no significant abnormality and the current inspection process ends; if the total difference coefficient is greater than the preset screening threshold, it is determined that the weld to be inspected has a suspected defect, and the determination result is used as a condition to trigger the subsequent extraction of the suspected defect local area.

[0009] Optionally, when the conditions for triggering subsequent extraction of suspected defect local areas are met, a sliding window of fixed size and a preset moving step size are set starting from the overall area to be detected. According to the preset moving step size, traverse each local position, obtain the difference between the maximum and minimum values ​​in the weld surface morphology data within the sliding window as the local change amplitude, and calculate the maximum value of the thermally induced distortion data on the spatial gradient as the boundary change rate. If the local change amplitude is greater than a preset amplitude threshold and the boundary change rate is greater than a preset change rate threshold, then the area covered by the current sliding window is determined to be a suspected defective local area and is used as the next processing area; otherwise, the area covered by the current sliding window is determined to be a normal area.

[0010] Optionally, after determining the suspected defective local region, local features are calculated based on the data changes and boundary morphology within the local region; specifically including: The gray-level extreme value difference of the static surface image in the suspected defect local area is obtained as the first local change parameter; the central tendency value of the thermal distortion data in the suspected defect local area is extracted as the second local anomaly parameter; the proportion of pixels in the suspected defect local area that exceed the preset distortion threshold is counted to obtain the distortion rate per unit area.

[0011] Optionally, after calculating the local features, defect determination is performed based on the comparison and verification between the suspected defective local area and the adjacent normal area; specifically: Based on the difference in first local change parameters, boundary change rate, second local anomaly parameters, and unit area distortion rate between the suspected defective local area and the adjacent normal area, multiple corresponding judgment coefficients are generated; the judgment coefficients are weighted and fused according to preset weights to calculate the defect judgment value.

[0012] Optionally, if the defect judgment value is greater than the preset defect evaluation threshold, it is determined that there is a defect in the weld to be inspected, and the corresponding defect category and location judgment result is output. If the defect determination value is not greater than the preset defect evaluation threshold, it is judged as no defect or a suspected abnormality below the evaluation threshold; When there are multiple suspected defective local areas within the overall inspection area, if the defect determination value of any suspected defective local area is greater than the preset defect evaluation threshold, the weld to be inspected is judged to have a defect. If the defect determination values ​​of all suspected defective local areas are not greater than the preset defect evaluation threshold, the weld to be inspected is judged to have no defect.

[0013] Compared with the prior art, the present invention has the following beneficial effects: 1. This method obtains static surface images and dynamic airflow disturbance images by spatial alignment, median fusion and phase extraction of multiple consecutive frame structured light images; this method transforms the thermal airflow disturbance, which is easily regarded as noise in conventional detection, into quantifiable thermal distortion data, and combines it with weld surface morphology data, which effectively improves the reliability of identifying defects such as micropores and incomplete penetration in the state of just completed welding. 2. This method introduces qualified welds under the same conditions as reference data, calculates the total difference coefficient through multi-feature joint comparison to determine the suspected defect area; extracts local features using a sliding window and compares them with adjacent normal areas for verification; this mechanism of combining benchmark comparison with local verification effectively eliminates interference factors such as reflection, micro-vibration and complex weld boundaries, reduces the false detection rate and improves the stability of online detection. Attached Figure Description

[0014] To more clearly illustrate the technical solutions in this invention 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 some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0015] Figure 1 This is a flowchart illustrating a method for identifying weld defects in IBC barrels based on industrial vision, provided in an embodiment of this application. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.

[0017] like Figure 1 As shown, a method for identifying weld defects in IBC barrels based on industrial vision includes: The structured light vision sensor scans the IBC barrel in the instant after welding is completed, locates the weld area and acquires a series of structured light images of the area, performs global motion compensation and spatial alignment processing, and performs median fusion and phase extraction in the time dimension to obtain static surface images and dynamic airflow disturbance images. The reference static surface image and reference dynamic airflow disturbance image obtained by acquiring and processing a pre-defined qualified, defect-free IBC barrel weld under the same conditions are used as reference data, and the corresponding reference feature data are extracted based on the reference data. Weld edge boundaries are identified based on grayscale gradient changes in static surface images, the area to be inspected is determined, and local data is extracted to obtain weld surface morphology data within the area to be inspected; simultaneously, thermal distortion data is extracted based on dynamic airflow disturbance images. The thermally induced distortion data is transformed into coordinates and spatially mapped to the corresponding pixels of the weld surface morphology data. Under a unified two-dimensional pixel coordinate system, the weld surface morphology data and the thermally induced distortion data are weighted and combined according to preset weights to obtain the weld feature data. The total difference coefficient is calculated by comparing the weld feature data with the reference feature data corresponding to the reference data. The suspected defect local area is determined by comparing the total difference coefficient with the preset screening threshold. Local feature extraction is performed in the suspected defect local area to calculate the defect judgment value. The defect judgment value is compared with the preset defect evaluation threshold to output the defect category and location judgment result of the IBC barrel weld.

[0018] High-frequency grid structured light with a spatial frequency higher than the main spatial frequency of the inherent texture of the weld surface is projected onto the weld area, and multiple frames of structured light images are continuously acquired. Any frame of the multiple frame structured light images is used as a reference frame for spatial alignment, and the median operation is performed on the aligned images in the time dimension to form a static surface image. The instantaneous phase of each frame image is extracted and the time statistical variance is calculated to form a dynamic airflow disturbance image.

[0019] The reference object corresponding to the reference data is a pre-set qualified, defect-free weld of the same type of IBC barrel. The reference object and the IBC barrel to be tested have a consistent correspondence in physical structure and material. The reference data was collected from the reference object under the same post-weld time window and the same high-frequency grid structured light projection detection conditions, and was obtained through the same basic processing method. It serves as the benchmark condition for subsequent defect comparison.

[0020] This embodiment provides a specific method for online inspection of weld seams in IBC barrels. The method takes the weld seam of the IBC barrel in the immediate state after welding as the inspection object, and uses multiple consecutive frames of structured light images as the original input. By extracting stable weld surface information and time-varying airflow disturbance information from the same set of images, static surface images and dynamic airflow disturbance images are obtained. Then, the data of the weld seam to be inspected is compared with the reference data of the preset qualified weld seam to determine the suspected defect local area, and further output the defect category and location. Through the above processing, this embodiment extracts the thermal anomaly information contained in the image distortion as a basis for defect judgment, thereby improving the reliability of identifying defects such as micropores, cracks, and incomplete penetration in the immediate state after welding is completed. Furthermore, based on the trigger signal when the IBC barrel arrives at the inspection station, the IBC barrel in the immediate state after welding is completed is scanned with structured light to generate a series of multiple frame structured light images. The weld area refers to the image area in the camera's field of view that includes the weld centerline and the preset width on both sides, such as the intersection of a round pipe cross weld, the root of a T-shaped cross weld, and the heat-affected zone on both sides of the weld. In specific implementation, the inspection process can be triggered by the production line position sensor or the vision positioning module. The industrial camera first acquires the positioning image, and the structured light projection range is determined based on the weld centerline, so that the subsequent continuously acquired multiple frame images all cover the same weld area. This implementation projects high-frequency mesh structured light onto the weld area and continuously acquires multiple frames of images within a short post-weld time window. This captures the coordinated changes in weld surface morphology and hot airflow refraction disturbances, transforming thermally induced image distortion, which is easily perceived as noise, into quantifiable detection information. The spatial frequency of the high-frequency mesh structured light is set higher than the main spatial frequency range of the inherent texture of the weld surface, allowing the structured light mesh phase information to be distinguished from the metal surface texture in the frequency domain. The number of sampling frames... It can be set according to the production line cycle time, for example, continuously acquiring 8 frames within 0.2s after welding; the frame rate can be determined according to the camera performance and the weld movement speed, and must meet the condition of recording the changes in hot air flow disturbance within a time when the weld geometry remains approximately unchanged. After acquiring multiple consecutive frames of structured light images, global motion compensation and spatial alignment are performed on the multiple consecutive frames of structured light images based on the reference frame in the time series, generating an aligned image sequence. The reference frame refers to the image used to unify the spatial position, such as the first image or the image with the largest gradient extremum. The global displacement vector refers to the... The overall offset of a frame image relative to a reference frame in the image plane, such as pixel-level displacement caused by conveyor belt micro-vibration, fixture vibration, or slight drift of the weldment; Let the original time series image set be ,in For the first in this set Frame of original structured light image, The number of sampling frames; the number of frames is estimated with reference to the reference frame. Global displacement vector of a frame and for the first Spatially align the frames to obtain the spatially aligned first frame. Frame Image ,in These are two-dimensional pixel coordinates on the image plane; this processing is used to correct the same weld seam position in different frames to the same pixel coordinates, avoiding misjudging workpiece jitter as weld seam boundary discontinuity or abnormal mesh deformation. After obtaining the aligned image sequence, median fusion is performed on the aligned image sequence based on grayscale stability in the time dimension to generate a static surface image. The static surface image mainly retains the stable texture and geometry of the weld surface, such as weld bead protrusions, collapses, undercuts, and surface cracks, whose positions remain basically unchanged within a short time-series sampling window. Specifically, each pixel can be analyzed... The grayscale values ​​in the frame-aligned image are taken as the median, stable components are extracted from multiple frames, and transient brightness jumps or grid distortions caused by thermal airflow refraction in a certain frame or a few frames are suppressed. Furthermore, after acquiring the aligned image sequence, based on the phase change of the structured light grid, bandpass filtering and transformation are performed on each frame of the image to extract the instantaneous phase, and the temporal statistical variance is calculated to generate a dynamic airflow disturbance image. The dynamic airflow disturbance image is used to reflect the degree of fluctuation of the air refractive index above the weld over time, such as grid line oscillation, local distortion, and phase jump caused by thermal convection above the high-temperature weld. The structured light image may contain background light intensity, grid modulation contrast, grid light spatial carrier frequency, static phase caused by the three-dimensional morphology of the weld, and dynamic phase shift caused by transient disturbance of air refractive index. The specific steps of bandpass filtering and transformation are as follows: Each frame of structured light image is transformed from the spatial domain to the frequency domain through two-dimensional fast Fourier transform. In the frequency domain, the fundamental frequency component containing structured light modulation information is bandpass filtered based on the set carrier frequency center, thereby filtering out the low-frequency components and high-frequency noise corresponding to the background light intensity. The filtered frequency domain signal is converted back to the spatial domain using the inverse Fourier transform, resulting in a complex signal containing phase information. The arctangent of the imaginary and real parts of this complex signal is then calculated to extract the initial principal value of the instantaneous phase for each frame. Since the initial principal value of the phase directly extracted by the arctangent transform is limited to a specific truncation interval, such as... to Between them, there is a discontinuous step abrupt change at the boundary of the phase period. If the variance is calculated directly based on this jump value, it will lead to the calculation deviation of the local perturbation extremum. Therefore, before calculating the variance, the instantaneous phase needs to be unwrapped along the time or space dimension to restore the true continuous phase. Specifically, an unwrapping algorithm based on the quality-guided path or the branching method can be used to eliminate the step abrupt change at the phase period boundary. Then, the phase mean and phase offset variance after unwrapping are calculated to obtain the dynamic airflow disturbance image. The numerical value of this image represents the fluctuation amplitude of the local hot air refractive index disturbance. When there are pores, incomplete penetration or poor fusion inside the weld, the local heat conduction path and temperature gradient may be different from those of a normal dense weld, causing the dynamic airflow disturbance value near the corresponding location to show a local increase or abnormal distribution. Furthermore, a pre-defined, qualified, defect-free IBC barrel weld is obtained. Based on the same post-weld time window and the same high-frequency grid structured light projection conditions, the qualified weld is collected and processed to generate a reference static surface image and a reference dynamic airflow disturbance image. A defect-free, defect-free IBC barrel weld refers to a qualified weld that is consistent with the object to be inspected in terms of physical structure and material, such as a weld of the same specification steel pipe, the same surface treatment state, and the same welding position type. The acquisition conditions of the reference object and the object to be inspected are consistent, including the same post-weld time window, the same structured light projection conditions, and the same basic processing method, so as to reduce errors caused by different product specifications or working conditions. During the initial heat dissipation stage immediately after welding, a high-gradient temperature field exists above the weld surface due to heat convection. In a single frame image, the grid lines are prone to local bending or transient blurring. This implementation method uses the processing sequence of spatial alignment, temporal median, phase unpacking variance, and comparison with reference under the same conditions to preserve and use stable surface information and dynamic airflow information for judgment, thereby reducing missed detections and misjudgments. In this embodiment, the weld feature data includes surface grayscale variation parameters, mesh deformation variance parameters, and local brightness-dark contrast parameters. The specific method for calculating the total difference coefficient based on the difference comparison between weld feature data and reference feature data is as follows: extract the surface grayscale change parameters and local brightness contrast parameters in the area to be detected from the static surface image, and extract the grid deformation variance parameters from the dynamic airflow disturbance image as the feature data to be detected. Simultaneously, the reference surface grayscale variation parameters, reference grid deformation variance parameters, and reference local brightness-darkness contrast parameters are extracted from the reference data as reference feature data. The total difference coefficient is calculated based on the relative or absolute difference between the detected feature data and the reference feature data.

[0021] The specific steps for calculating the total difference coefficient include: extracting the difference data between the feature data to be detected and the reference feature data regarding surface grayscale changes, grid deformation variance, and local brightness contrast, and generating corresponding characterization coefficients; and weighting and summing each characterization coefficient according to its corresponding preset weight to calculate the total difference coefficient used to determine the suspected defective local area.

[0022] The total difference coefficient is compared with the preset screening threshold. If the total difference coefficient is not greater than the preset screening threshold, the weld to be inspected is determined to have no significant abnormalities, and the current inspection process ends. If the total difference coefficient is greater than the preset screening threshold, the weld to be inspected is determined to have suspected defects, and this determination result is used as the condition for triggering the subsequent extraction of suspected defect local areas.

[0023] Based on the above embodiments, this implementation method acquires static surface images and dynamic airflow disturbance images. According to the area to be detected determined by the weld edge boundary, local data is extracted from the area to be detected to generate weld feature data. The weld edge boundary refers to the position in the static surface image where the gray-level gradient change between the weld and the base material exceeds a preset gradient threshold, such as the weld toe line, the edge of the weld pile-up, and the boundary at the corner of the intersecting weld. The weld feature data includes surface gray-level change parameters, grid deformation variance parameters, and local brightness and darkness contrast parameters. When weighting and combining weld surface morphology data and thermal distortion data according to preset weights to obtain weld feature data, the specific configuration is as follows: the surface morphology data containing surface grayscale change and brightness-dark contrast features and the thermal distortion data containing grid deformation features are constructed into a multi-dimensional joint data structure in the same spatially aligned pixel area according to their respective preset dimension weights. This constitutes a multi-dimensional feature set in this embodiment that includes surface grayscale change parameters, grid deformation variance parameters and local brightness-dark contrast parameters. The multidimensional joint data structure unifies feature data under the same pixel coordinates and preserves the physical properties of morphology and thermal anomalies; the surface grayscale variation parameter is obtained from the grayscale gradient variation in the area to be detected, and is used to reflect the degree of abrupt changes in weld surface texture, such as grayscale changes caused by crack dark lines, undercut edges, and weld bead boundaries; the mesh deformation variance parameter is extracted from the dynamic airflow disturbance image and is used to reflect the degree of phase fluctuation of the structured light mesh caused by the refraction of hot airflow; the local brightness contrast parameter is extracted from the static surface image and is used to reflect whether the brightness difference in local areas is abnormally reduced or enhanced under structured light illumination, such as surface collapse causing local shadows to be intensified, or reflection changes caused by poor fusion. This embodiment uses surface texture changes, grid deformation fluctuations, and local brightness-dark contrast as the feature data to be detected, capturing the synergistic changes of weld defects in visible surface morphology and thermal flow disturbance, so that defects with inconspicuous single features can still be identified and extracted through the accumulation of multiple differences. Furthermore, the target feature data and reference feature data are acquired, and the total difference coefficient used for preliminary judgment is calculated based on the relative difference between the two. The reference feature data refers to the parameters extracted from the reference static surface image and the reference dynamic airflow disturbance image in the same way, including the reference surface grayscale change parameter, the reference grid deformation variance parameter, and the reference local brightness contrast parameter. The target feature data and the reference feature data maintain a correspondence between pixel regions or local weld positions to avoid misjudging normal morphological differences at different locations as defect differences. Calculate the relative difference ratio between each feature data to be detected and the corresponding reference feature data; when calculating the first coefficient, obtain the absolute difference between the surface grayscale change parameter and the reference surface grayscale change parameter, and divide the absolute difference by the sum of the reference surface grayscale change parameter and the preset anti-overflow minimum constant bias. The first coefficient is used to characterize the degree of surface texture abnormality. The larger the value, the greater the difference between the surface texture of the weld to be detected and the qualified benchmark. Similarly, the second coefficient is calculated to obtain the absolute difference between the mesh deformation variance parameter and the reference mesh deformation variance parameter. This difference is then divided by the sum of the reference mesh deformation variance parameter and the minimum constant bias to obtain the second coefficient characterizing the degree of thermal distortion. The larger the value, the more obvious the difference between the thermal airflow disturbance in this area and the qualified weld. Similarly, the third coefficient is calculated to obtain the absolute difference between the local brightness contrast parameter and the reference local brightness contrast parameter. This difference is then divided by the sum of the reference local brightness contrast parameter and the minimum constant bias to obtain the third coefficient characterizing the degree of decrease or abnormal change in structured light contrast. The larger the value, the more likely there are abnormal surface reflections, occlusions, collapses, or local morphological anomalies in this area. Minimal constant bias is used to prevent division by zero or numerical overflow when calculations are performed in areas with surface roughness below a set threshold or in areas without reflection. The anti-overflow minimal constant bias and the preset minimal positive constant are preset positive real numbers close to zero. Their specific values ​​are determined according to the magnitude of the reference parameters, so as not to affect the relative differences of the characteristic parameters. After obtaining the above three coefficients, the first coefficient, the second coefficient, and the third coefficient are multiplied by their respective preset weights and then summed to obtain the total difference coefficient used for preliminary judgment, forming the comprehensive difference quantity required for preliminary screening; these preset weights correspond to the first coefficient, the second coefficient, and the third coefficient, respectively, and are used to balance the contributions of the three types of evidence—surface texture, thermal distortion, and structured light contrast—to the preliminary judgment under different welding conditions. For example, when the focus of the inspection is on porosity or incomplete penetration, the weight of the second coefficient can be increased; when the focus of the inspection is on surface cracks or undercut, the weight of the first coefficient can be increased. As an optional setting, the sum of the weights of the three can satisfy the condition of 1. For example, the preset weights corresponding to the first, second, and third coefficients can be set to 0.4, 0.4, and 0.2 respectively. The specific values ​​can be preset according to the product specifications and on-site inspection requirements. Further, after obtaining the total difference coefficient, the difference coefficient is compared with a preset screening threshold to generate a preliminary judgment result. The initial screening threshold is a preset value used to distinguish between no obvious abnormalities and suspected defects. It can be preset based on the detection results of similar qualified and defective samples. For example, it can be set to 0.15, 0.20 or 0.30. The specific value is adjusted according to the detection sensitivity requirements. If the total difference coefficient is not greater than the initial screening threshold, it means that the surface texture, thermal disturbance and contrast differences between the weld to be detected and the qualified reference weld are all within the preset normal range. The current detection process ends and the weld is preliminarily judged to have no obvious abnormalities. If the total difference coefficient is greater than the initial screening threshold, it means that the weld has obvious signs of deviating from the qualified reference, triggering the subsequent determination of local defect areas. This implementation method uses three relative differences—surface grayscale change, grid deformation variance, and local brightness contrast—to form a total difference coefficient. Threshold judgment is then performed through multi-dimensional data fusion to improve the system's judgment stability under reflective, thermal disturbance, and vibration conditions. In this embodiment, when the conditions for triggering the extraction of subsequent suspected defect local areas are met, a sliding window of fixed size and a preset moving step size are set starting from the overall area to be detected. According to the moving step size, the difference between the maximum and minimum values ​​in the weld surface morphology data is obtained within the sliding window as the local change amplitude, and the maximum value of the thermally induced distortion data on the spatial gradient is calculated as the boundary change rate. If the local change amplitude is greater than the preset amplitude threshold and the boundary change rate is greater than the preset change rate threshold, then the area covered by the current sliding window is determined to be a suspected defective local area and is used as the next processing area; otherwise, the area covered by the current sliding window is determined to be a normal area.

[0024] After identifying a suspected defective local area, local features are calculated based on data changes and boundary morphology within that local area; specifically including: The gray-level extreme value difference in the suspected defect local area of ​​the static surface image is obtained as the first local change parameter; the central tendency value of thermal distortion data in the suspected defect local area is extracted as the second local anomaly parameter; the proportion of pixels exceeding the preset distortion threshold in the suspected defect local area is counted to obtain the distortion rate per unit area.

[0025] After calculating the local features, defect determination is performed based on the comparison and verification between the suspected defective local area and the adjacent normal area; specifically: Based on the difference in first local change parameters, boundary change rate, second local anomaly parameters, and unit area distortion rate between the suspected defective local area and the adjacent normal area, multiple corresponding judgment coefficients are generated. The judgment coefficients are then weighted and fused according to preset weights to calculate the defect judgment value.

[0026] If the defect judgment value is greater than the preset defect evaluation threshold, it is clearly determined that there is a defect in the weld to be inspected, and the corresponding defect category and location judgment result is output. If the defect judgment value is not greater than the preset defect evaluation threshold, it is judged as no defect or a suspected abnormality below the evaluation threshold. When there are multiple suspected defective local areas within the overall inspection area, if the defect judgment value of any suspected defective local area is greater than the preset defect evaluation threshold, the weld to be inspected is judged to have a defect. If the defect judgment values ​​of all suspected defective local areas are not greater than the preset defect evaluation threshold, the weld to be inspected is judged to have no defect.

[0027] Based on the above embodiments, this implementation method obtains the overall area to be detected that triggers further identification. According to a fixed-size sliding window and a preset movement step size, the overall area to be detected is traversed to determine the suspected defect local area. The sliding window refers to a local calculation area that moves block by block within the area to be detected, such as a rectangular window that covers the width direction of the weld and moves along the extension direction of the weld. The preset movement step size refers to the movement distance between two adjacent windows, such as half or a quarter of the window width, or it can be set to a number of pixels. The window size and movement step size can be preset according to the weld width, camera resolution, and the minimum detectable size of the defect. For example, the window size can cover the weld width and its two side boundaries, and the movement step size can be less than the window length to avoid missing small-sized defects. In practice, the maximum and minimum values ​​of the weld surface morphology data are acquired within each sliding window, and the difference between them is used as the local variation amplitude. This local variation amplitude represents the degree of fluctuation in the surface morphology or grayscale change within the window, corresponding to local abrupt changes caused by weld bead protrusion, collapse, undercut, or crack edges. Simultaneously, edge detection operators such as the Sobel operator or the Previtt operator are used to calculate the maximum value of the thermally induced distortion data in the spatial gradient as the boundary change rate. The boundary change rate represents the maximum value of the gradient of the thermally induced distortion data in the local space, corresponding to the boundary change formed when the thermal airflow disturbance transitions from the normal region to the abnormal region. If the local variation amplitude is greater than a preset amplitude threshold and the boundary change rate is greater than a preset change rate threshold, the area covered by the current sliding window is determined to be a suspected defective local area; otherwise, the area covered by the current sliding window is determined to be a normal region. Furthermore, after obtaining the suspected defect local area, based on the data changes and boundary morphology within the local area, local features are extracted from the suspected defect local area to generate the first local change parameter, the second local anomaly parameter, and the distortion rate per unit area. Local features refer to local quantitative parameters that characterize the morphology and thermal disturbance state of the suspected area, including local gray-level abrupt changes, local thermal disturbance average intensity, and thermal disturbance anomalous pixel proportion. The maximum and minimum gray values ​​of the static surface image within the suspected defect local area are obtained, and the difference between the two is used as the first local variation parameter to characterize the degree of surface brightness variation in the suspected defect local area. The larger the value of the first local variation parameter, the more obvious the surface undulation, edge abruptness, or crack dark line in the local area. The average value of the thermal distortion data in the suspected defect local area is calculated as the second local anomaly parameter to characterize the overall thermal distortion level of the suspected area. Pixels whose thermal distortion data exceeds a preset distortion threshold are identified as distorted pixels. The number of distorted pixels in the suspected defective local area and the total number of pixels are counted. The number of distorted pixels is divided by the total number of pixels to obtain the distortion rate per unit area. This distortion rate per unit area represents the proportion of the thermal anomaly to the area of ​​the local area. The preset distortion threshold can be preset according to the normal fluctuation range of the reference dynamic airflow disturbance image, for example, it can be taken near the normal upper limit of the thermal distortion data in the reference data. Furthermore, after acquiring local features, the defect judgment value is calculated based on the comparison and verification between the suspected defect local area and the adjacent normal area. The adjacent normal area refers to the area that is close to the suspected defect local area along the weld extension direction and is judged as normal in the sliding window judgment, such as a section of stable weld area adjacent to the suspected area. Using the adjacent normal area as a benchmark can reduce the influence of different weld positions caused by different lighting angles, weld curvatures or surface reflections. In practice, a reference region is first established within adjacent areas deemed normal along the weld extension direction. The difference between the maximum and minimum grayscale values ​​of the static surface image within this reference region is used as the reference local variation parameter. After calculating the local features, defect determination is performed based on the comparison and verification between the suspected defective local region and the adjacent normal region. The specific formula for calculating the determination coefficient is as follows: First Judgment Coefficient Second determination coefficient and the third determination coefficient The calculation formulas are as follows:

[0028] in, The first local variation parameter, As a reference local variation parameter, To prevent extremely small positive constants with a denominator of zero; The boundary change rate obtained from the aforementioned calculation, The length of the aforementioned sliding window in the weld extension direction; This is the second local anomaly parameter. The distortion rate per unit area; Final defect determination value The calculation formula is:

[0029] in, They are respectively The corresponding preset normalized dimensionless weight coefficients are used to form the comprehensive values ​​required for the final defect evaluation. These preset weights correspond to the aforementioned first, second, and third judgment coefficients, respectively, and are used to balance the contributions of three types of evidence—adjacent area comparison, boundary discontinuity, and thermal anomaly coverage—in the final judgment. For example, for crack-type defects, the weight corresponding to the second judgment coefficient can be increased; for porosity or incomplete penetration defects, the weight corresponding to the third judgment coefficient can be increased. As an optional setting, the sum of the three preset weights is 1. For example, the preset weight corresponding to the first judgment coefficient is set to 0.3, the preset weight corresponding to the second judgment coefficient is set to 0.3, and the preset weight corresponding to the third judgment coefficient is set to 0.4. Furthermore, after obtaining the defect judgment value, a final judgment is made on the suspected defect local area according to the preset defect evaluation threshold, and the defect category and location judgment results are output. The defect evaluation threshold is a preset value used to distinguish between real defects and no defects or slight suspected anomalies, which can be set according to the distribution of judgment values ​​of historical qualified samples and defect samples. If the defect judgment value is greater than the defect evaluation threshold, it is clearly determined that there is a defect in the weld to be inspected, and the corresponding defect category and location judgment results are output. If the defect judgment value is not greater than the defect evaluation threshold, it is judged as no defect or suspected anomaly below the evaluation threshold. When multiple suspected defective local areas exist within the overall inspection area, a defect judgment value is calculated for each suspected defective local area. If the defect judgment value of any suspected defective local area is greater than the defect evaluation threshold, the weld to be inspected is judged to have a defect. If the defect judgment values ​​of all suspected defective local areas are not greater than the defect evaluation threshold, the weld to be inspected is judged to be without a defect. The defect location can be determined by the coordinates of the suspected defective local areas exceeding the defect evaluation threshold within the weld inspection area. The defect category can be output by combining the manifestations of surface changes, boundary discontinuities, and thermal anomalies, such as porosity, cracks, or incomplete penetration. This implementation first determines the local area through a sliding window, then compares it with adjacent normal areas, and incorporates thermal distortion intensity and coverage ratio into the judgment. This can reduce false alarms under conditions of complex cross weld boundaries and strong local hot air flow changes, while retaining the ability to detect micro-cracks, porosity and incomplete penetration. In the welding production line, an industrial camera and a high-frequency grid structured light projector can be used together to form a structured light vision sensor in this embodiment, which is installed at the IBC barrel weld inspection station. When the IBC barrel weld enters the inspection station, the acquisition is triggered by the position sensor or the vision positioning module. The industrial camera first acquires the positioning image and determines the weld area. The high-frequency grid structured light projector projects high-frequency grid structured light into the area. The industrial camera continuously acquires multiple frames of structured light images within a set post-weld time window. The system has a built-in image quality evaluation system: Image saturation ratio refers to the proportion of pixels whose gray values ​​reach or approach the maximum range of the sensor to the total number of pixels; grid modulation refers to the average level of the difference between the maximum and minimum gray values ​​in the local area of ​​the structured light grid; Phase unpacking ratio refers to the proportion of effective pixels that successfully recover continuous phase to the total number of pixels. After acquisition, the system calculates the image saturation ratio, grid modulation, inter-frame global displacement, and phase unpacking ratio. If the image is saturated, the grid contrast is insufficient, the inter-frame displacement exceeds the preset threshold, or phase extraction fails, the exposure, gain, or structured light brightness is adjusted, and the acquisition is re-acquired within the allowed time of the current workstation. If the acquisition quality meets the requirements, global motion compensation, spatial alignment, temporal median fusion, and phase variance calculation are performed to obtain static surface images and dynamic airflow disturbance images. After new data to be inspected enters the system, the system first calculates the total difference coefficient based on the reference qualified weld data, and determines whether further local analysis is needed through an initial screening threshold. For welds that enter local analysis, the system uses a sliding window to determine the suspected defective local area, calculates the local features and defect judgment value, and compares it with the defect evaluation threshold. Finally, the system outputs the defect category, defect location, and alarm signal of the IBC barrel weld. For areas that do not exceed the defect evaluation threshold, the system outputs no defect or slightly suspected abnormal results. This result can be provided to the production line control system for current product sorting, subsequent re-inspection marking, and welding process parameter adjustment reference.

[0030] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for identifying weld defects in IBC barrels based on industrial vision, characterized in that, include: The structured light vision sensor scans the IBC barrel in the instant after welding is completed, locates the weld area and acquires a series of structured light images of the area, performs global motion compensation and spatial alignment processing, and performs median fusion and phase extraction in the time dimension to obtain static surface images and dynamic airflow disturbance images. A reference static surface image and a reference dynamic airflow disturbance image are obtained by acquiring and processing a pre-defined qualified, defect-free IBC barrel weld under the same conditions as reference data, and corresponding reference feature data are extracted based on the reference data. The weld edge boundary is identified based on the gray-level gradient change of the static surface image, the area to be detected is determined, and local data is extracted to obtain the surface morphology data of the weld within the area to be detected; at the same time, thermal distortion data is extracted based on the dynamic airflow disturbance image. The thermally induced distortion data is transformed into coordinates and spatially mapped to the corresponding pixels of the weld surface morphology data; the weld surface morphology data and the thermally induced distortion data are weighted and combined according to preset weights in a unified two-dimensional pixel coordinate system to obtain weld feature data; Based on the difference comparison between the weld feature data and the reference feature data corresponding to the reference data, the total difference coefficient is calculated. By comparing the total difference coefficient with the preset screening threshold, the suspected defect local area is determined. Local feature extraction is performed in the suspected defect local area to calculate the defect judgment value. The defect judgment value is compared with the preset defect evaluation threshold to output the defect category and location judgment result of the IBC barrel weld.

2. The method for identifying weld defects in IBC barrels based on industrial vision according to claim 1, characterized in that, High-frequency grid structured light with a spatial frequency higher than the main spatial frequency of the inherent texture of the weld surface is projected onto the weld area, and multiple frames of structured light images are continuously acquired; any frame of the multiple frame structured light images is used as a reference frame for spatial alignment, and the aligned images are subjected to median operation in the time dimension to form the static surface image; the instantaneous phase of each frame image is extracted and the time statistical variance is calculated to form the dynamic airflow disturbance image.

3. The method for identifying weld defects in IBC barrels based on industrial vision according to claim 1, characterized in that, The reference object corresponding to the reference data is a pre-set qualified, defect-free weld of the same type of IBC barrel. The reference object and the IBC barrel to be tested have a consistent correspondence in physical structure and material. The reference data is obtained by collecting data from the reference object under the same post-weld time window and the same high-frequency grid structured light projection detection conditions and by the same basic processing method, and serves as the benchmark condition for subsequent defect comparison.

4. The method for identifying weld defects in IBC barrels based on industrial vision according to claim 3, characterized in that, The weld feature data includes surface grayscale variation parameters, grid deformation variance parameters, and local brightness-dark contrast parameters. The specific method for calculating the total difference coefficient based on the difference comparison between the weld feature data and the reference feature data corresponding to the reference data is as follows: extract the surface grayscale change parameters and local brightness contrast parameters in the area to be detected from the static surface image, and extract the grid deformation variance parameters from the dynamic airflow disturbance image as the feature data to be detected. Simultaneously, the reference surface grayscale change parameters, reference mesh deformation variance parameters, and reference local brightness-darkness contrast parameters corresponding to the reference data are extracted as the reference feature data. The total difference coefficient is calculated based on the relative or absolute difference between the above-mentioned feature data to be detected and the reference feature data.

5. The method for identifying weld defects in IBC barrels based on industrial vision according to claim 4, characterized in that, The specific method for calculating the total difference coefficient is as follows: The differences in surface grayscale variation, mesh deformation variance, and local brightness contrast between the feature data to be detected and the reference feature data are extracted respectively, and corresponding characterization coefficients are generated respectively. The characterization coefficients are weighted and summed according to their respective preset weights to calculate the total difference coefficient used to determine the suspected defect local area.

6. The method for identifying weld defects in IBC barrels based on industrial vision according to claim 5, characterized in that, Compare the total difference coefficient with the preset screening threshold; If the total difference coefficient is not greater than the preset screening threshold, it is determined that the weld to be inspected has no significant abnormalities, and the current inspection process ends. If the total difference coefficient is greater than the preset screening threshold, it is determined that the weld to be detected has a suspected defect, and this determination result is used as a condition to trigger the subsequent extraction of the local area of ​​the suspected defect.

7. The method for identifying weld defects in IBC barrels based on industrial vision according to claim 6, characterized in that, When the conditions for triggering subsequent extraction of suspected local defect areas are met, a sliding window of fixed size and a preset moving step size are set starting from the overall area to be detected. According to the preset moving step size, traverse each local position, obtain the difference between the maximum and minimum values ​​in the weld surface morphology data within the sliding window as the local change amplitude, and calculate the maximum value of the thermally induced distortion data on the spatial gradient as the boundary change rate. If the local change amplitude is greater than a preset amplitude threshold and the boundary change rate is greater than a preset change rate threshold, then the area covered by the current sliding window is determined to be a suspected defective local area and is used as the next processing area; otherwise, the area covered by the current sliding window is determined to be a normal area.

8. The method for identifying weld defects in IBC barrels based on industrial vision according to claim 7, characterized in that, After identifying the suspected defective local region, local features are calculated based on the data changes and boundary morphology within that local region; specifically including: The gray-level extreme value difference of the static surface image in the suspected defect local area is obtained as the first local change parameter; the central tendency value of the thermal distortion data in the suspected defect local area is extracted as the second local anomaly parameter; the proportion of pixels in the suspected defect local area that exceed the preset distortion threshold is counted to obtain the distortion rate per unit area.

9. A method for identifying weld defects in IBC barrels based on industrial vision according to claim 8, characterized in that, After calculating the local features, defect determination is performed based on the comparison and verification between the suspected defective local area and the adjacent normal area; specifically: Based on the difference in first local change parameters, boundary change rate, second local anomaly parameters, and unit area distortion rate between the suspected defective local area and the adjacent normal area, multiple corresponding judgment coefficients are generated; the judgment coefficients are weighted and fused according to preset weights to calculate the defect judgment value.

10. A method for identifying weld defects in IBC barrels based on industrial vision according to claim 9, characterized in that, If the defect judgment value is greater than the preset defect evaluation threshold, it is clearly determined that there is a defect in the weld to be inspected, and the corresponding defect category and location judgment result is output. If the defect determination value is not greater than the preset defect evaluation threshold, it is judged as no defect or a suspected abnormality below the evaluation threshold; When there are multiple suspected defective local areas within the overall inspection area, if the defect determination value of any suspected defective local area is greater than the preset defect evaluation threshold, the weld to be inspected is judged to have a defect. If the defect determination values ​​of all suspected defective local areas are not greater than the preset defect evaluation threshold, the weld to be inspected is judged to have no defect.