Machine vision-based welding defect on-line detection system and method
By synchronously acquiring front-view molten pool and rear-view structured light images during the welding process using machine vision, a unified coordinate system is established to quantify welding defects. This solves the problem of the correlation between abnormal pressure release and geometric degradation during the welding of galvanized high-strength steel, and enables online inspection and adaptation to automated production lines.
Patent Information
- Application Number
- CN202610354434.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-23
- Publication Date
- 2026-06-23
AI Technical Summary
Existing welding defect detection technologies cannot effectively correlate abnormal pressure release during the welding process with geometric defects formed during the subsequent solidification process, and cannot achieve early warning and online detection in the zero-gap lap welding process of galvanized high-strength steel.
An online welding defect detection system based on machine vision is adopted. By simultaneously acquiring front-view molten pool images and rear-view structured light images, a unified world coordinate system for welds is established. The features of the pressure relief port are extracted and the three-dimensional contour of the weld cross section is reconstructed. The thermal hysteresis curvature migration coefficient and hysteresis instability energy are calculated to achieve quantitative fusion and detection of defects.
It enables online defect detection during zero-gap lap welding of galvanized high-strength steel, captures hysteretic geometric degradation signals, provides quantitative data support for welding production, and adapts to the operational needs of automated production lines.
Smart Images

Figure CN122265782A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual inspection technology, and more specifically, to a machine vision-based online detection system and method for welding defects. Background Technology
[0002] Galvanized high-strength steel, with its excellent corrosion resistance and mechanical strength, is widely used in industrial fields such as automobile body manufacturing, home appliance casing production, and steel structure processing. Zero-gap lap welding is the most common process in processing this type of sheet metal, and the quality stability of the welding process directly determines the service performance and production yield of the workpiece. Due to the inherent material properties of the sheet metal, this welding process has inherent technical difficulties and is highly susceptible to forming defects during welding, posing a significant challenge to product quality control.
[0003] In galvanized high-strength steel, the vaporization temperature of the zinc layer is much lower than the melting temperature of the steel substrate. During welding, the zinc layer vaporizes before the steel substrate, forming high-pressure zinc vapor. This vapor needs to escape through an opening at the leading edge of the molten pool, and the flow pattern in this area directly determines the effectiveness of internal pressure release. When the pressure relief channel contracts or closes, the zinc vapor cannot escape smoothly, interfering with the flow pattern and solidification process of the molten pool. These abnormalities do not immediately manifest as surface defects but rather as geometric degradation problems such as collapse and undercut in the weld toe area on the upper edge of the plate after the molten metal has solidified. The formation of these defects exhibits a significant spatiotemporal lag.
[0004] Existing welding defect detection technologies are mainly divided into two categories. One is forward-looking vision-based molten pool state recognition, which can only capture the instantaneous appearance features of the molten pool during welding and cannot correlate with geometric defects formed during subsequent solidification. The other is post-weld offline visual inspection and 3D measurement, which can only identify defects that have already formed and cannot provide early warnings during the welding process. Neither of these technologies can establish a causal relationship between abnormal front-end pressure relief and subsequent weld toe degradation, making them unsuitable for the application requirements of continuous welding production for online defect detection and real-time process control. Summary of the Invention
[0005] This invention provides a machine vision-based online detection system and method for welding defects, which solves the technical problems mentioned in the background.
[0006] This invention provides an online welding defect detection system based on machine vision, comprising: The first module simultaneously acquires the front-view molten pool image and the rear-view structured light image, and converts the front-view molten pool image and the rear-view structured light image to a unified weld world coordinate system. The second module extracts the pressure relief port from the front-view molten pool image and calculates the position and equivalent radius of the pressure relief port in the welding direction. The third module reconstructs the three-dimensional contour of the weld section based on the rear-view structured light image and uses the curvature inflection point to determine the local analysis range of the weld toe on the edge of the upper plate. The fourth module constructs a smooth reference weld toe based on the boundary constraints of the local analysis interval, compares the actual weld toe with the smooth reference weld toe to calculate the curvature loss integral and the maximum degradation depth, and calculates the degradation center position along the welding direction. The fifth module calculates the positive migration length between the degradation center and the pressure relief port. It then integrates the positive migration length, the curvature loss integral, and the equivalent radius of the pressure relief port to calculate the thermal hysteresis curvature migration coefficient. The sixth module calculates the hysteresis instability energy within the detection window using multiple thermal hysteresis curvature migration coefficients, the corresponding maximum degradation depth, and the equivalent radius of the pressure relief port. The seventh module performs exponential mapping and numerical discretization of the hysteresis instability energy to output the welding defect detection results.
[0007] This invention provides a machine vision-based online detection method for welding defects, comprising the following steps: Step S1: Simultaneously acquire the front-view molten pool image and the rear-view structured light image, and convert the front-view molten pool image and the rear-view structured light image to a unified weld world coordinate system; Step S2: Extract the pressure relief port from the front-view molten pool image, and calculate the position and equivalent radius of the pressure relief port in the welding direction; Step S3: Reconstruct the three-dimensional contour of the weld section based on the rear-view structured light image, and determine the local analysis interval of the weld toe on the edge side of the upper plate using the curvature inflection point; Step S4: Construct a smooth reference weld toe based on the boundary constraints of the local analysis interval, compare the actual weld toe with the smooth reference weld toe to calculate the curvature loss integral and the maximum degradation depth, and calculate the degradation center position along the welding direction. Step S5: Calculate the positive migration length between the degradation center location and the pressure relief port location. Combine the positive migration length, the curvature loss integral, and the equivalent radius of the pressure relief port to calculate the thermal hysteresis curvature migration coefficient. Step S6: Within the detection window, the hysteresis instability energy is calculated using multiple thermal hysteresis curvature migration coefficients, the corresponding maximum degradation depth, and the equivalent radius of the pressure relief port. Step S7: Perform exponential mapping and numerical discretization on the hysteresis instability energy to output the welding defect detection results.
[0008] The beneficial effects of this invention are as follows: Based on the defect formation mechanism of zero-gap lap welding of galvanized high-strength steel, this invention adopts a front-to-back dual-vision synchronous acquisition architecture to establish a unified weld world coordinate system and spatiotemporal correspondence, achieving a corresponding match between the front-end pressure relief port features and the rear-end weld toe geometric degradation features. This invention quantifies and fuses the abnormal pressure relief and the delayed geometric degradation during welding by constructing a thermal hysteresis curvature migration coefficient and hysteresis instability energy, ultimately outputting a single-valued defect detection result. It can adapt to the online detection requirements of continuous welding production, simultaneously extracting and quantifying defect features during the welding operation. It can capture the unique hysteresis-type geometric degradation signal of galvanized steel lap welding, providing directly applicable quantitative data support for quality control in welding production. The output of detection results does not rely on professional process and vision knowledge, adapting to the operational needs of automated production lines. Attached Figure Description
[0009] Figure 1 This is a flowchart of the online welding defect detection method based on machine vision of the present invention; Figure 2 This is a calculation diagram of the online welding defect detection system based on machine vision according to the present invention. Detailed Implementation
[0010] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, features described in some examples may be combined in other examples.
[0011] It should be noted that, unless otherwise defined, the technical or scientific terms used in one or more embodiments of the present invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in one or more embodiments of the present invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" indicate that the element or object preceding the term encompasses the elements or objects listed following the term and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0012] like Figures 1-2 As shown, the machine vision-based online welding defect detection system includes: The first module simultaneously acquires the front-view molten pool image and the rear-view structured light image, and converts the front-view molten pool image and the rear-view structured light image to a unified weld world coordinate system. The second module extracts the pressure relief port from the front-view molten pool image and calculates the position and equivalent radius of the pressure relief port in the welding direction. The third module reconstructs the three-dimensional contour of the weld section based on the rear-view structured light image and uses the curvature inflection point to determine the local analysis range of the weld toe on the edge of the upper plate. The fourth module constructs a smooth reference weld toe based on the boundary constraints of the local analysis interval, compares the actual weld toe with the smooth reference weld toe to calculate the curvature loss integral and the maximum degradation depth, and calculates the degradation center position along the welding direction. The fifth module calculates the positive migration length between the degradation center and the pressure relief port. It then integrates the positive migration length, the curvature loss integral, and the equivalent radius of the pressure relief port to calculate the thermal hysteresis curvature migration coefficient. The sixth module calculates the hysteresis instability energy within the detection window using multiple thermal hysteresis curvature migration coefficients, the corresponding maximum degradation depth, and the equivalent radius of the pressure relief port. The seventh module performs exponential mapping and numerical discretization of the hysteresis instability energy to output the welding defect detection results.
[0013] In one embodiment of the present invention, simultaneously acquiring a front-view molten pool image and a rear-view structured light image, and converting the front-view molten pool image and the rear-view structured light image to a unified weld world coordinate system, includes: Synchronous acquisition of forward-looking molten pool image sequence With rear-view structured light image sequence Establish a world coordinate system for welds ; The homogeneous coordinates of pixels in the forward-looking molten pool image and the homogeneous coordinates of pixels in the backward-looking structured light image are defined to satisfy the following: ; ; in, These are the homogeneous coordinates of the pixels in the front-look molten pool image. These are the homogeneous coordinates of the pixels in the rear-view structured light image. and These are the pixel coordinates in the front-look molten pool image. and These are the pixel coordinates in the rear-view structured light image. This is a transpose operation; Transform the homogeneous coordinates of pixels in the front-view molten pool image and the rear-view structured light image to the weld world coordinate system, satisfying the following: ; ; in, These are the spatial coordinates of the pixels in the weld seam world coordinate system after the transformation of the front-view molten pool image. These are the spatial coordinates of the pixels in the weld seam world coordinate system after the rear-view structured light image has been transformed. This is the coordinate transformation matrix from the coordinate domain of the forward-looking molten pool image to the world coordinate system of the weld. The coordinate transformation matrix from the rear-view structured light image coordinate domain to the weld world coordinate system; The spatiotemporal correspondence is established to satisfy: ; ; in, This is the sampling time offset. The spatial distance between the forward and backward observation positions along the welding direction. To synchronize the sampling frequency, For welding travel speed, The sampling time for the forward-looking molten pool image. The sampling time for the rear-view structured light image. This is for rounding operations.
[0014] It should be noted that, It is the two-dimensional brightness distribution corresponding to sampling time k in the forward-looking molten pool image sequence. This parameter is used to characterize the light intensity state of the molten pool and pressure relief port in the field of view of the forward-looking camera. It can be acquired by a high-speed industrial camera arranged in front of the welding torch under synchronous exposure conditions. It is the two-dimensional brightness distribution corresponding to sampling time n in the rear-view structured light image sequence. This parameter is used to characterize the deformation state of the structured light stripes in the field of view of the rear-view camera. It can be obtained by the collaborative acquisition of a line structured light emitter and an industrial camera arranged behind the welding torch. It is the weld world coordinate system, and this parameter is used to unify the front-view molten pool image and the rear-view structured light image into the same physical coordinate frame. This is the welding direction coordinate, which is used to indicate the position of the weld along the welding travel direction. This is the coordinate along the weld width direction, which is used to indicate the position across the weld width direction. This is the weld height direction coordinate, which is used to represent the height of the weld section relative to the reference plane.
[0015] It should be noted that, These are the homogeneous coordinates of the pixels in the front-view molten pool image. This parameter is used to express the two-dimensional pixels in the front-view image in a homogeneous form that facilitates matrix transformation. These are the homogeneous coordinates of the pixels in the rear-view structured light image. This parameter is used to express the two-dimensional pixels in the rear-view image in a homogeneous form that facilitates matrix transformation. It is the spatial coordinate of the front-view molten pool image pixel in the weld world coordinate system after transformation. This parameter is used to represent the position of the front-view pixel in the unified physical space. It is the spatial coordinate of the rear-view structured light image pixel in the weld seam world coordinate system after conversion. This parameter is used to represent the position of the rear-view pixel in the unified physical space. It is the coordinate transformation matrix from the coordinate domain of the front-view molten pool image to the world coordinate system of the weld. This parameter is used to map the homogeneous coordinates of the pixels in the front-view molten pool image to the spatial coordinates of the weld world coordinate system. It is the coordinate transformation matrix from the rear-view structured light image coordinate domain to the weld world coordinate system. This parameter is used to map the homogeneous coordinates of the pixels in the rear-view structured light image to the spatial coordinates of the weld world coordinate system. It is the sampling time offset, which is used to convert the sampling time of the front-looking molten pool image into the corresponding sampling time of the rear-looking structured light image. It is the spatial distance between the forward and rearward observation positions along the welding direction. This parameter is used to characterize the fixed installation distance between the front and rear visual reference points in the welding direction. The preferred value is 20 mm to 120 mm. If the distance is too small, the rearward structured light will still be in the interference zone of strong arc light and high temperature splash. If the distance is too large, the spatiotemporal correlation between the pressure relief anomaly and the rear degradation will be weakened. This is the synchronous sampling frequency. This parameter is used to characterize the number of times the forward-looking molten pool image and the backward-looking structured light image are synchronously sampled per unit time. The preferred value is 50 Hz to 500 Hz. If the sampling frequency is too low, it will reduce the pairing accuracy of the preceding and following events. If the sampling frequency is too high, it will significantly increase the amount of data and amplify the sensitivity to random noise. This is the welding travel speed, which characterizes the movement speed of the welding torch or workpiece relative to the weld direction. It can be obtained through speed feedback from the welding robot controller, displacement signals from the servo encoder, or the real-time speed interface of the welding actuator. It is the sampling time of the forward-looking molten pool image. This parameter is used to identify the discrete sampling sequence number in the forward-looking molten pool image sequence. It is the sampling time of the rear-view structured light image. This parameter is used to identify the rear-view sampling sequence number after establishing a spatiotemporal correspondence with the sampling time k of the front-view molten pool image.
[0016] It should be noted that the forward-looking molten pool image sequence reflects the instantaneous state of the front part of the molten pool under the action of the electric arc, while the backward-looking structured light image sequence reflects the solidification cross-sectional morphology of the weld at the rear position. The two correspond to different observation positions and times. Therefore, it is necessary to first establish a unified weld world coordinate system composed of welding direction coordinates, weld width direction coordinates, and weld height direction coordinates, and then utilize... and Only by mapping the pixels of both types of images to the same physical space can we ensure that forward decompression events and backward geometric degradation events are comparable. The calibration method involves first establishing a solid reference in the weld world coordinate system, defining the welding direction coordinates, weld width direction coordinates, and weld height direction coordinates. Then, a foreground molten pool image containing this solid reference is acquired. The one-to-one correspondence between the homogeneous coordinates of the pixels in the foreground molten pool image and the spatial coordinates in the weld world coordinate system is used to solve the problem. The calibration completion condition is that the reprojection deviation of all corresponding points in the forward-looking molten pool image is no more than one pixel. The calibration method involves first establishing a physical reference in the weld world coordinate system that corresponds to the fixed structured light measurement area, then acquiring a rear-view structured light image containing this physical reference, and finally solving the problem using the one-to-one correspondence between the homogeneous coordinates of the pixels in the rear-view structured light image and the spatial coordinates in the weld world coordinate system. The height coordinates were repeatedly calibrated using multiple sets of fringe reference points at different lateral positions. The reconstruction error converges to the preset range. The method for determining the effective observation center in the welding direction at the foresight and backsight observation positions after equipment installation is as follows: The physical distance between the two effective observation centers is directly measured along the welding direction, and the average value is taken after at least three repeated measurements. .also, A unified clock configuration value is adopted for the front-looking molten pool image sampling module and the rear-looking structured light image sampling module. The real-time travel speed feedback value output by the welding robot controller or welding actuator is used, and after applying a unified timestamp to both, it is sent to the spatiotemporal correspondence calculation.
[0017] In one embodiment of the present invention, extracting the pressure relief port from the front-view molten pool image and calculating the position and equivalent radius of the pressure relief port in the welding direction includes: Forward view of the molten pool image Internally define a local region of the molten pool and calculate the sampling time. Average brightness of local areas of the molten pool Construct sampling time The front view molten pool image in pixel coordinates Increased pressure relief at the location satisfy: in, Sampling time The average brightness of the local area of the molten pool, For the front-looking molten pool image in pixel coordinates The brightness value at that location, It is a very small positive number; Extract sampling time pressure relief area satisfy: ; in, These are the pixel coordinates in the forward-looking molten pool image; Calculate sampling time Geometric center of the pressure relief port satisfy: ; in, For pressure relief area The area; According to the pressure relief port area Area calculation sampling time equivalent radius of the pressure relief port satisfy: ; in, Pi; Calculate sampling time The position of the pressure relief port in the welding direction satisfy: ; in, Operators for extracting welding direction coordinates, From the coordinate domain of the forward-looking molten pool image to the world coordinate system of the weld. The coordinate transformation matrix, Sampling time The geometric center of the pressure relief port.
[0018] It should be noted that the local area of the molten pool is a defined region within the forward-looking molten pool image used to calculate the average brightness of the local area of the molten pool. This parameter is used to stably characterize the local brightness benchmark of the current molten pool. The preferred value is to cover the visible molten pool body and its leading edge region. If the region is too small, the average brightness will be too affected by local flicker, and if the region is too large, it will introduce arc light background and spatter background. Sampling time The average brightness of the local area of the molten pool is used as a brightness reference when calculating the enhancement amount of the pressure relief port. This is the pressure relief port enhancement amount, a parameter used to measure pixel coordinates. and The degree of relative dimming of the brightness at a point relative to the average brightness of the local area of the molten pool. It is a very small positive number. This parameter is used to prevent the denominator from being zero and to suppress numerical divergence in the brightness normalization calculation. The preferred value is 0.0001 to 0.01. If the value is too small, it will reduce the numerical stability. If the value is too large, it will weaken the sensitivity of the pressure relief port enhancement to the local dark area. This is the pressure relief port region, and this parameter is used to represent the set of pixels where the pressure relief port enhancement is positive. It is the area of the pressure relief port region. This parameter is used to characterize the number of pixels or the discrete area size contained in the pressure relief port region. It is the geometric center of the pressure relief port. This parameter is used to indicate the position of the geometric centroid of the pressure relief port region in the forward-looking molten pool image. It is the equivalent radius of the pressure relief port. This parameter is used to convert irregular pressure relief port regions into a single-valued scale in the form of an equal-area circle radius. This is the welding direction coordinate extraction operator. This parameter is used to extract the welding direction coordinate components from the weld world coordinate system spatial coordinates. Sampling time The position of the pressure relief port in the welding direction is a parameter used to characterize the physical location of the pressure relief port along the welding direction.
[0019] It should be noted that the pressure relief port typically appears as a localized opening that is darker than the main molten pool. However, welding arc light, spatter, and exposure fluctuations cause the absolute brightness of the entire forward-looking molten pool image to constantly change. Therefore, a fixed grayscale threshold cannot be used directly to identify the pressure relief port. Instead, the average brightness of a localized area of the molten pool should first be used as an adaptive reference, and then... Describe the degree of darkening of each pixel relative to the brightness baseline, and... The set of pixels with a value greater than zero is defined as the pressure relief port region. This allows for the identification of pressure relief ports based on local relative brightness differences rather than global absolute brightness. (Pressure relief port region) Irregular boundaries may appear at different sampling times. Directly using the major axis, minor axis, or circumscribed rectangle will cause the scale representation to be greatly affected by shape perturbation. Therefore, using a circular radius equal to the area of the depressurization port region as a unified scale index can compress the complex contour into a single-valued parameter. This facilitates subsequent dimensional harmonization and normalization with the curvature defect integral and the forward migration length. Furthermore, the geometric center of the pressure relief port... Firstly, it exists in the pixel coordinate domain of the front-view molten pool image. Subsequently, the pressure relief port location and the rear degradation center location need to be placed in the same welding direction for difference and migration analysis. Therefore, it is necessary to first utilize... Bundle Transform to the weld world coordinate system, and then utilize Welding direction coordinates are extracted from spatial coordinates to form the pressure relief port location that can be directly used in hysteresis migration calculations. .
[0020] It should be noted that the method of defining the local area of the molten pool is to first locate a continuously bright main body area of the molten pool in the front view molten pool image, and then expand the outer area of the main body area of the molten pool in the direction of the front edge and the sides by a fixed ratio to form a local area of the molten pool covering the main body of the molten pool and its front edge, and to limit the local area of the molten pool to not exceed the boundary of the front view molten pool image. The method for filtering connected components is to obtain the desired connection. After obtaining the pixel set, first delete discrete small connected regions with a pixel count lower than the preset minimum area, and then select the connected region with the largest area that is closest to the leading edge of the melt pool from the remaining connected regions as the final connected region. .also, The method for processing medium-noise pixels is to obtain... Then, isolated pixel deletion is performed first, followed by a neighborhood closure process to fill single-pixel holes. Finally, based on the... The distance is used to remove noise points that are far from the main area, and then the calculation is performed. and .
[0021] In one embodiment of the present invention, the three-dimensional contour of the weld section is reconstructed based on the rear-view structured light image, and the local analysis interval of the weld toe on the edge side of the upper plate is determined using the curvature inflection point, including: Rear view structured light image Extracting structured light fringe image coordinates Through the mapping operator Reconstructing sampling time Three-dimensional profile of weld cross section satisfy: ; in, Sampling time Corresponding weld section in the horizontal coordinate The height value at that location, Sampling time Time and horizontal coordinate The corresponding horizontal pixel coordinates of the rear-view structured light image. Sampling time Time and horizontal coordinate The corresponding longitudinal pixel coordinates of the rear-view structured light image. Transforming the rear-view structured light image coordinates to the weld seam world coordinate system Mid-height coordinates Mapping operators; According to the sampling time Three-dimensional profile of weld cross section Determine the position of the upper edge ; At the edge of the upper plate Determine the location of the curvature inflection point on the left side from both sides. Position of the curvature inflection point on the right side satisfy: ; ; in, This is the location of the curvature inflection point on the left side. This is the location of the curvature inflection point on the right side. Sampling time Three-dimensional profile of weld cross section For the horizontal coordinate The second derivative, To perform the maximum value operation, This is for calculating the minimum value; Based on the position of the curvature inflection point on the left and the position of the curvature inflection point on the right side Determine the sampling time Local analysis range of weld toe on the upper edge of the plate satisfy: ; in, Sampling time The local analysis range of the weld toe on the edge of the upper plate.
[0022] It should be noted that, These are the coordinates of the structured light fringe image; this parameter is used to characterize the sampling time. Time and horizontal coordinate The corresponding horizontal and vertical pixel coordinates of the rear-view structured light image can be obtained by extracting the center line of the stripes in the rear-view structured light image. It is the coordinate from the rear-view structured light image to the height coordinate in the weld seam world coordinate system. The mapping operator, whose parameter is used to convert the coordinates of the structured light stripe image into the height value of the three-dimensional profile of the weld section. It is the three-dimensional profile of the weld cross-section; this parameter is used to characterize the sampling time. When the weld section is in the horizontal coordinate The height distribution at that location. It is the position of the upper plate edge. This parameter is used to characterize the lateral boundary position connecting the upper plate surface and the weld toe transition zone. It is the three-dimensional profile of the weld section relative to the transverse coordinate. The second derivative of is used to characterize the curvature variation trend of the three-dimensional profile of the weld cross section in the transverse direction. It is the location of the curvature inflection point on the left side. This parameter is used to characterize the point on the left side of the upper plate edge where the curvature property changes the closest. It is the location of the curvature inflection point on the right side. This parameter is used to characterize the point on the right side of the upper plate edge where the curvature properties change most closely. This is the local analysis range for the weld toe on the upper edge side of the plate. This parameter is used to define the lateral range for performing local geometric degradation analysis of the weld toe.
[0023] It should be noted that the information truly reflecting weld height changes in the rear-view structured light image is not the grayscale of the entire image itself, but rather the offset and curvature of the structured light stripes at different lateral positions. Therefore, it is necessary to first extract the structured light stripe image coordinates from the rear-view structured light image, and then... Map the stripe image coordinates to the height direction coordinates in the weld world coordinate system. Only then can the two-dimensional stripe pattern be restored into a three-dimensional profile of the weld cross-section with physical height significance. The weld toe on the upper plate edge is a localized curved zone between the upper plate surface and the weld toe transition area. Its effective analytical boundary should not be artificially defined by a fixed width, but rather determined by the actual location where the curve's curvature changes. Therefore, it is necessary to first analyze the upper plate edge. Find the nearest curvature inflection point where the second derivative is zero on both the left and right sides. and Then, the interval between the two is defined as the local analysis interval of the weld toe on the upper plate edge side. This allows subsequent curvature analysis to focus on the actual weld toe transition zone.
[0024] It should be noted that, The extraction method involves first enhancing the grayscale of the structured light stripes in the rear-view structured light image, then searching for the peak position of the stripes along each column or each normal intercept, and using sub-pixel center localization to obtain the corresponding horizontal and vertical pixel coordinates, thereby forming a continuous sequence of structured light stripe image coordinates. . The calibration method involves setting up a stepped or planar reference with a known height in the weld world coordinate system, acquiring the corresponding back-view structured light image, and establishing the structured light fringe image coordinates and height direction coordinates. The mapping relationship between them is then determined through multi-height layer repeated fitting and error verification. . The method of determination is in First, search for an approximately flat section on the upper plate surface. Then, search for the starting position where the curvature of the weld toe transition zone begins to continuously increase, and determine the connection point between the end position of the flat section and the starting position of the transition zone. . and The method of obtaining is to first... Perform smoothing processing, then calculate its relationship with the horizontal coordinate. The second derivative, and then in Left side and The search function on the right finds the locations where the sign of the second derivative changes, and uses linear interpolation to find the coordinates of the points where the second derivative is zero. Finally, the distance is calculated. The nearest left coordinate point as Take distance The nearest right coordinate point as . The smooth derivative method is to first... Perform local polynomial smoothing or moving average smoothing, then calculate the first and second derivatives on the smoothed discrete contours, and limit the smoothing window length to no more than [a certain value]. Estimate half the width to avoid over-smoothing the shape of the weld toe.
[0025] In one embodiment of the present invention, a smooth reference weld toe is constructed based on the boundary constraints of the local analysis interval. The curvature loss integral and the maximum degradation depth are calculated by comparing the actual weld toe with the smooth reference weld toe, and the degradation center position along the welding direction is calculated, including: In the local analysis interval Smooth internal structure reference weld toe satisfy: ; And it satisfies the boundary constraints: ; ; in, Sampling time Smooth reference weld toe in the horizontal coordinate The height value at that location, , , , To smooth the reference weld toe polynomial coefficients, For local analysis intervals Left boundary, For local analysis intervals Right boundary, To smooth the reference weld toe For the horizontal coordinate The first derivative, Three-dimensional profile of weld cross section For the horizontal coordinate The first derivative; Calculate curvature loss density satisfy: in, Sampling time The actual weld toe on the horizontal coordinate The actual curvature at that point. Sampling time Smooth reference weld toe in the horizontal coordinate Reference curvature at that point Three-dimensional profile of weld cross section For the horizontal coordinate The second derivative, To smooth the reference weld toe For the horizontal coordinate The second derivative, Horizontal coordinate Curvature defect density at the location, To perform calculations to obtain the larger value, This is for absolute value operations; In the local analysis interval Inner curvature defect density Along the horizontal coordinate Integrating to obtain the sampling time Curvature loss integral satisfy: ; In the local analysis interval The sampling time is determined by taking the maximum value inside. Maximum Depth of Degradation satisfy: ; Calculate sampling time Corresponding degeneration center location satisfy: in, The location of the degradation center, To use the sampling time The center of the degradation calculation window, For degenerate calculation window Internal sampling time The corresponding welding direction position, For degenerate calculation window Internal sampling time The corresponding curvature loss integral, It is a very small positive number.
[0026] It should be noted that, It is the smooth reference weld toe, which is used to represent the smooth reference transition profile obtained by the joint constraints of boundary height and boundary slope within the local analysis interval. is the polynomial coefficient of the smoothing reference weld toe, which is used to adjust the curve bending contribution of the smoothing reference weld toe on the cubic term. is the polynomial coefficient of the smoothing reference weld toe, which is used to adjust the curve bending contribution of the smoothing reference weld toe on the quadratic term. These are the polynomial coefficients of the smoothing reference weld toe, a parameter used to adjust the overall slope contribution of the smoothing reference weld toe on the first-order terms. These are the polynomial coefficients of the smoothing reference weld toe, a parameter used to adjust the overall height reference of the smoothing reference weld toe on the constant term. It is a smooth reference weld toe relative to the lateral coordinate. The first derivative of the parameter is used to characterize the smooth reference weld toe in the lateral position. The local slope at that point. It is the three-dimensional profile of the weld section relative to the transverse coordinate. The first derivative of , which is used to characterize the actual weld toe profile in the lateral position. The local slope at that point. It is the actual curvature, a parameter used to characterize the actual weld toe in the lateral position. The degree of local curvature at that location. It is the reference curvature, a parameter used to characterize the smooth reference weld toe in the lateral position. The degree of local curvature at that location. It is a smooth reference weld toe relative to the lateral coordinate. The second derivative of the parameter is used to characterize the smooth reference weld toe in the lateral position. The intensity of curvature change at that point. It is the curvature loss density, a parameter used to characterize the lateral position of the actual weld toe relative to a smooth reference weld toe. The degree of curvature loss at that point. It is the curvature loss integral, which is used to characterize the cumulative curvature degradation intensity over the entire local analysis interval. It is the maximum degradation depth, which is used to characterize the maximum height difference between the reference weld toe and the actual weld toe within the local analysis interval. This is the degradation calculation window. This parameter is used to collect the curvature loss integral of multiple consecutive sampling times in the welding direction and calculate the degradation center position. The preferred value is 3 to 21 consecutive sampling times. If the window is too short, the degradation center position will be greatly affected by single-section noise. If the window is too long, multiple adjacent degradation zones will be over-averaged. It is a degradation calculation window Internal sampling time The corresponding welding direction position is used to characterize the discrete position in the welding direction at each sampling time within the window. It is the location of the degradation center; this parameter is used to characterize the degradation calculation window. The center position of the welding direction after weighting by integral of curvature loss.
[0027] It should be noted that the actual weld toe may have experienced localized collapse, thinning, or transition distortion. Directly using a fixed template as a reference will be affected by differences in workpiece posture and fluctuations in the overall weld formation. Therefore, a localized analysis interval should be utilized. The true height and true local slope at both ends are constructed to naturally connect with the current cross-sectional boundary using a cubic polynomial smooth reference weld toe. This method of obtaining a reference weld toe maintains the boundary consistency of the current section and provides a smooth transition benchmark without local degradation. Early signs of weld toe degradation are often not a sharp decrease in absolute height, but rather a local weakening of the originally smooth and rounded transition curvature. Therefore, using only the height difference is insufficient to reliably distinguish between normal and abnormal transitions; instead, the lateral positions of the actual weld toe and the smooth reference weld toe should be calculated separately. The local curvature at a given point is used to define the curvature defect density, which is the positive value of the difference between the reference curvature and the actual curvature. This allows only the degraded portion where the actual curvature is lower than the reference curvature to be retained. The curvature defect density at a single lateral location can only reflect the degradation at a local point, while online detection of welding defects requires simultaneous knowledge of the overall degradation intensity of a cross-section, the deepest degradation degree, and the degradation concentration locations of multiple continuous cross-sections along the welding direction. Therefore, it is necessary to... exist Inner integral yields curvature loss integral To characterize the lateral cumulative degradation intensity, the maximum value of the height difference between the smoothed reference weld toe and the actual weld toe is then obtained. To characterize the deepest degree of degradation, and finally in The inner curvature loss integral weighted is obtained This is used to characterize the location of the degradation center along the welding direction.
[0028] It should be noted that, The method for solving the polynomial coefficients is to... Substituting the equal height constraints of the left and right boundaries of the local analysis interval and the equal local slope constraints, we form four linear equations, which are then solved simultaneously. , , and The solution results are then substituted back to verify whether the height and local slope at the left and right boundaries simultaneously satisfy the constraints. and The discrete calculation method is to first discrete the horizontal coordinates Top and Calculate the first-order and second-order differences separately, and then normalize them using the adjacent sampling interval to obtain the result. , , and Finally, substitute and The curvature expression is calculated point by point. The numerical integration method is as follows: The internal calculation of each point is performed in the order of discrete horizontal coordinates. The numerical integration is then performed by multiplying the average of adjacent sampling points by the horizontal sampling interval, and finally summing all discrete integral terms to obtain the result. . The construction method is based on the current sampling time. Centered on the welding direction, a preset number of adjacent sampling times are selected forward and backward, ensuring that all sampling times within the window are valid. And the corresponding welding direction position, thus forming a basis for calculation Degradation calculation window . The boundary handling method is when When located at the start or end of the weld, only the actual valid sampling times are used in the weighted calculation, and the numerator and denominator use the same set of valid sampling times to avoid false offsets at the start and end.
[0029] In one embodiment of the present invention, the positive migration length between the degradation center location and the pressure relief port location is calculated, and the positive migration length, the curvature loss integral, and the equivalent radius of the pressure relief port are combined to calculate the thermal hysteresis curvature migration coefficient, including: Based on spatiotemporal correspondence Determine the sampling time of the forward-looking molten pool image. Corresponding rear-view structured light image sampling time Extraction and sampling time pressure relief port location Corresponding sampling time Location of the degradation center and curvature loss integral ; Calculate sampling time Forward migration length satisfy: ; in, This is the forward migration length. The location of the degradation center, This is the location of the pressure relief port. To calculate the larger value; Calculate sampling time Thermal hysteresis curvature migration coefficient satisfy: ; in, Sampling time The thermal hysteresis curvature transfer coefficient, This is the forward migration length. For the curvature loss integral, The equivalent radius of the pressure relief port, It is a very small positive number.
[0030] It should be noted that, It is the forward migration length, which is used to characterize the backward displacement of the degradation center position relative to the pressure relief port position in the welding direction. This is the thermal hysteresis curvature migration coefficient, a parameter used to integrate the forward migration length, curvature defect integral, and equivalent radius of the pressure relief port into a single-valued hysteresis degradation characterization. Definition The present invention focuses on the spatial misalignment of the delayed manifestation of pressure relief anomalies on the weld toe, as expressed in the positive migration length of the degradation center relative to the pressure relief port position. This misalignment only has physical causal significance when the degradation center position is located after the pressure relief port position. Therefore, it is necessary to first subtract the pressure relief port position from the degradation center position, and then, by taking the larger value, retain only the positive-zero backward displacement portion, thereby determining the positive migration length. Limited to the shift distance that truly represents the delayed manifestation. The forward migration length. The curvature defect integral and the equivalent radius of the pressure relief port are combined into a thermal hysteresis curvature migration coefficient. The content is that the positive migration length alone cannot distinguish between cases of shallow regression and cases of significant regression, and the curvature loss integral alone cannot distinguish whether the regression has a hysteretic correspondence with the anomaly of pressure release ahead. Therefore, it is necessary to include the positive migration length. Together with the curvature loss integral as the numerator, and then using the equivalent radius of the pressure relief port... Scale normalization is performed to form a thermal hysteresis curvature migration coefficient that simultaneously characterizes the hysteresis distance, degradation intensity, and decompression scale. .
[0031] It should be noted that, based on The synchronous pairing method for extracting the location of the degradation center and the curvature loss integral is based on... Locate the unique corresponding sampling time in the rear-view structured light image sequence, and then synchronously read the values of the same sampling time from the degradation center position and curvature loss integral results that have been calculated at that sampling time. Mixing across sampling times is prohibited. The zero-truncation method involves first calculating the difference between the location of the degradation center and the location of the pressure relief port; if the difference is greater than zero, the original value is retained. If the difference is equal to or less than zero, it is directly set to zero, and the negative value is not passed on to subsequent calculations of the thermal hysteresis curvature migration coefficient. The outlier constraint method is to complete... , and After the fusion, for Perform upper limit pruning or outlier removal, and replace extreme values that exceed the upper bound of the continuous statistical distribution with the median of the effective values in the neighborhood to prevent individual noisy frames from dominating the overall results within the detection window.
[0032] In one embodiment of the present invention, within a detection window, the hysteresis instability energy is calculated using multiple thermal hysteresis curvature migration coefficients, the corresponding maximum degradation depth, and the equivalent radius of the pressure relief port, including: Multiple sampling times are aggregated within the detection window. Corresponding thermal hysteresis curvature migration coefficient Corresponding maximum degradation depth equivalent radius of pressure relief port And determine the total number of sampling times. ; Calculate sampling time Degradation depth normalization satisfy: ; in, Sampling time The normalized value of the degradation depth, To correspond to the maximum degradation depth, Sampling time The equivalent radius of the pressure relief port, It is a very small positive number; Calculate the hysteresis instability energy within the detection window. satisfy: ; Substitute the normalized value of the degradation depth Afterwards, the energy of delayed instability The calculation formula satisfies: ; in, For lagging instability energy, Sampling time The thermal hysteresis curvature transfer coefficient, To correspond to the maximum degradation depth, Sampling time The equivalent radius of the pressure relief port, The total number of sampling times. It is a very small positive number.
[0033] It should be noted that the detection window is a set of continuous sampling moments used to calculate the hysteresis instability energy. This parameter is used to collect the thermal hysteresis curvature migration coefficient and degradation depth normalization of multiple sampling moments. The preferred value is 5 to 50 consecutive sampling moments. If the detection window is too short, the hysteresis instability energy will fluctuate greatly. If the detection window is too long, the response sensitivity to local defect segments will be reduced. This is the total number of sampling times. This parameter is used to characterize the number of sampling times that participate in the calculation of hysteresis instability energy within the detection window. It is the degradation depth normalization factor, which is used to normalize the maximum degradation depth according to the pressure relief port scale. It is the hysteresis instability energy, which is used to characterize the combined energy level of hysteresis migration effect and entity degradation intensity within the detection window.
[0034] It should be noted that the size of the pressure relief port may vary at different sampling times. If the maximum degradation depth is used directly... Therefore, the same absolute depth carries different risk implications in scenarios with large and small pressure relief ports, thus requiring the use of the equivalent radius of the pressure relief port. Scale normalization is performed on the maximum degradation depth to obtain the degradation depth normalization value. This allows for comparison of degradation intensity between different sampling times. Furthermore, the thermal hysteresis curvature migration coefficient at a single sampling time... It is susceptible to transient arc light fluctuations, splash occlusion, and local stripe perturbations. Therefore, the final detection result cannot be directly output based on single-frame features alone. Instead, the results should be analyzed within the detection window. and Multiply by each time step and accumulate, then use the total number of sampling times. By averaging, we obtain the hysteresis instability energy, which simultaneously incorporates the hysteresis migration effect and the degree of entity degradation. The detection window is constructed by continuously collecting a fixed number of sampling moments, centered on or ending with the current output moment, ensuring that each sampling moment has effective sampling time. The detection window is formed by the corresponding maximum degradation depth and the equivalent radius of the pressure relief port. The method for determining the effective sampling time is to count each sampling time within the detection window that meets the valid pairing condition and has not been rejected, and record the final number of effective sampling times as follows: . The sliding update method involves removing the oldest sampling time from the detection window when a new sampling time enters the window, and then recalculating all valid sampling times within the window. and Summing the products and using the new The updated result is obtained by averaging. .
[0035] In one embodiment of the present invention, the hysteresis instability energy is exponentially mapped and numerically discretized to output welding defect detection results, including: Hysteresis instability energy Obtain intermediate detection results by performing exponential mapping. satisfy: ; in, This is an intermediate test result. For lagging instability energy, It is a natural exponential function; Intermediate detection results Numerical discretization is used to obtain welding defect detection results. satisfy: ; in, For welding defect detection results, This is an intermediate test result. For rounding operations, constants This is the discretization scale factor.
[0036] It should be noted that, This is an intermediate detection result. This parameter is used to map the hysteresis instability energy into a bounded continuous detection quantity. This is the result of welding defect detection. This parameter is used to convert intermediate detection results into discrete output values with fixed precision. It is the discretization scaling factor, which is used to control the welding defect detection results. The decimal precision is preferably set to 1000, which retains three decimal places, maintaining defect sorting resolution without introducing too many invalid decimal places. Hysteresis instability energy Under different welding conditions and different defect stages, it may exhibit unlimited growth; if directly output... This can lead to unstable numerical ranges and make engineering threshold management difficult; therefore, a natural exponential function is needed to adjust the values. Mapping to a bounded interval between zero and one results in monotonically increasing intermediate detection results that are easy to compare. In addition, intermediate test results Since the value is continuous, directly outputting too many decimal places would amplify the display fluctuations caused by sampling jitter, and would also be detrimental to the human-machine interface display and batch archiving of online systems. Therefore, it is necessary to first multiply by the discretization scaling factor, then perform rounding, and finally divide by the same discretization scaling factor to achieve the desired result. Stable conversion of welding defect detection results to fixed accuracy The discretization scale factor is pre-set according to the required output accuracy of the welding defect detection results. When three decimal places are required, it is set to 1000, and the accuracy definition before and after the numerical discretization process is kept consistent.
[0037] In one embodiment of the present invention, a machine vision-based online detection method for welding defects includes the following steps: Step S1: Simultaneously acquire the front-view molten pool image and the rear-view structured light image, and convert the front-view molten pool image and the rear-view structured light image to a unified weld world coordinate system; Step S2: Extract the pressure relief port from the front-view molten pool image, and calculate the position and equivalent radius of the pressure relief port in the welding direction; Step S3: Reconstruct the three-dimensional contour of the weld section based on the rear-view structured light image, and determine the local analysis interval of the weld toe on the edge side of the upper plate using the curvature inflection point; Step S4: Construct a smooth reference weld toe based on the boundary constraints of the local analysis interval, compare the actual weld toe with the smooth reference weld toe to calculate the curvature loss integral and the maximum degradation depth, and calculate the degradation center position along the welding direction. Step S5: Calculate the positive migration length between the degradation center location and the pressure relief port location. Combine the positive migration length, the curvature loss integral, and the equivalent radius of the pressure relief port to calculate the thermal hysteresis curvature migration coefficient. Step S6: Within the detection window, the hysteresis instability energy is calculated using multiple thermal hysteresis curvature migration coefficients, the corresponding maximum degradation depth, and the equivalent radius of the pressure relief port. Step S7: Perform exponential mapping and numerical discretization on the hysteresis instability energy to output the welding defect detection results.
[0038] Specifically, the hardware installation and system calibration phase of this invention includes: a forward-looking vision unit fixed to the front of the welding torch, with its lens facing the molten pool area in the welding direction, used to acquire images of the molten pool and leading edge area during welding. A rear-looking structured light unit fixed to the rear of the welding torch, with a line laser projector and imaging camera working together, projecting vertically to cover the weld cross-section area, used to acquire structured light images of the weld surface during the post-weld solidification stage. The forward-looking vision unit and the rear-looking structured light unit share the same synchronous triggering system, linked with the welding equipment controller, to ensure the timing synchronization of image acquisition and welding progress. After installation, a system calibration operation is performed, calibrating the intrinsic and extrinsic parameters of the forward-looking vision unit to obtain the transformation matrix from the forward-looking image coordinate domain to the weld world coordinate system. The triangulation model of the rear-looking structured light unit is calibrated to obtain the mapping relationship from the rear-looking image coordinates to the weld world coordinate system, and the spatial distance between the forward-looking and rear-looking observation positions along the welding direction is calibrated, completing the preparatory work for system deployment.
[0039] The online operation and data acquisition phase of this invention includes: Upon startup of the welding operation, the forward-looking vision unit and the rear-looking structured light unit are simultaneously triggered to continuously acquire images according to a preset synchronous sampling frequency. The forward-looking vision unit outputs a sequence of molten pool images frame by frame, which is synchronously transmitted to the image processing unit. The rear-looking structured light unit synchronously outputs a sequence of structured light images of the weld cross-section, which is synchronously transmitted to the 3D contour reconstruction unit. During the welding process, the system reads the welding speed output by the welding equipment in real time to update the spatiotemporal correspondence between the forward and rear-looking images. All acquired image data and welding process parameters are cached and matched simultaneously, providing input for subsequent defect detection calculations. Throughout the entire welding operation, the system continuously executes the aforementioned seven-step calculation process, completing the entire process from image acquisition to defect result output.
[0040] Specifically, for example, if the welding process is stable, zinc vapor release is smooth, and the weld toe transition is smooth without degradation, the calculated hysteresis instability energy value is extremely small. After exponential mapping and discretization, the final output result is 0.021, indicating that there are no obvious defects in the current weld area and the welding quality meets the process requirements. For example, if the welding process involves a brief contraction of the pressure release port, resulting in slight curvature loss and shallow depression at the weld toe, the calculated hysteresis instability energy is in the low to medium range. After exponential mapping and discretization, the final output result is 0.315, indicating slight geometric degradation in the current weld area, which can be included in process monitoring and subsequent re-inspection. For example, if the welding process involves continuous closure of the pressure release port, severely obstructing zinc vapor release, and large-scale collapse and obvious undercut defects at the weld toe, the calculated hysteresis instability energy is in the high range. After exponential mapping and discretization, the final output result is 0.892, indicating serious welding defects in the current weld area, which can trigger the welding equipment's early warning or shutdown procedures.
[0041] It should be noted that this invention is adaptable to continuous production scenarios involving zero-gap lap welding of galvanized high-strength steel, enabling full-process online monitoring of the welding process. The system can simultaneously perform image acquisition, feature calculation, and defect quantification output during welding operations, without interrupting the production process or waiting for the workpiece to fully cool before conducting offline inspection, significantly improving the efficiency of welding quality inspection. The quantification results output by this invention can be directly integrated with the process control system of the welding production line, providing data support for real-time adjustment of welding process parameters. When abnormal fluctuations occur in the detection results, the welding equipment can be linked to adjust process parameters such as welding current and welding speed to suppress further expansion of defects and reduce the proportion of defective products. This invention constructs a detection process based on the physical mechanism of welding defect formation, possessing a unique ability to identify the hysteretic geometric degradation defects specific to galvanized steel lap welding. It can capture process anomaly signals in the early stages of defect formation. Compared to traditional post-weld visual inspection and offline sampling methods, it can detect welding process stability issues earlier, improving the quality control level of welding production. Furthermore, the present invention outputs a single-valued quantitative result, which allows inspectors to intuitively judge the welding quality status without requiring professional image recognition or welding process knowledge. It is suitable for the unmanned or minimally manned operation requirements of automated production lines and can be widely used in industries that use galvanized steel lap welding processes extensively, such as automobile body manufacturing, home appliance housing production, and steel structure processing.
[0042] It should be noted that the interval and threshold sizes are set for ease of comparison. The size of the threshold depends on the amount of sample data and the base number set by those skilled in the art for each set of sample data, as long as it does not affect the proportional relationship between the parameter and the quantized value. Furthermore, the above formulas are all dimensionless calculations, and the formulas are derived from software simulations using a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0043] The embodiments of this example have been described above. However, this example is not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms based on the guidance of this example, and all of them are within the protection scope of this example.
Claims
1. A machine vision-based online welding defect detection system, characterized in that, include: The first module simultaneously acquires the front-view molten pool image and the rear-view structured light image, and converts the front-view molten pool image and the rear-view structured light image to a unified weld world coordinate system. The second module extracts the pressure relief port from the front-view molten pool image and calculates the position and equivalent radius of the pressure relief port in the welding direction. The third module reconstructs the three-dimensional contour of the weld section based on the rear-view structured light image and uses the curvature inflection point to determine the local analysis range of the weld toe on the edge of the upper plate. The fourth module constructs a smooth reference weld toe based on the boundary constraints of the local analysis interval, compares the actual weld toe with the smooth reference weld toe to calculate the curvature loss integral and the maximum degradation depth, and calculates the degradation center position along the welding direction. The fifth module calculates the positive migration length between the degradation center and the pressure relief port. It then integrates the positive migration length, the curvature loss integral, and the equivalent radius of the pressure relief port to calculate the thermal hysteresis curvature migration coefficient. The sixth module calculates the hysteresis instability energy within the detection window using multiple thermal hysteresis curvature migration coefficients, the corresponding maximum degradation depth, and the equivalent radius of the pressure relief port. The seventh module performs exponential mapping and numerical discretization of the hysteresis instability energy to output the welding defect detection results.
2. The online welding defect detection system based on machine vision according to claim 1, characterized in that, Simultaneously acquire the forward-looking molten pool image sequence and the rear-looking structured light image sequence; Establish a weld world coordinate system consisting of welding direction coordinates, weld width direction coordinates, and weld height direction coordinates; Define the homogeneous coordinates of pixels in the front-view molten pool image and the homogeneous coordinates of pixels in the rear-view structured light image; By using the coordinate transformation matrix from the coordinate domain of the front-view molten pool image to the world coordinate system of the weld and the coordinate transformation matrix from the coordinate domain of the rear-view structured light image to the world coordinate system of the weld, the homogeneous coordinates of the pixels in the front-view molten pool image and the homogeneous coordinates of the pixels in the rear-view structured light image are mapped to the spatial coordinates of the world coordinate system of the weld, respectively. The sampling time offset is calculated based on the spatial distance between the foresight and backsight observation positions along the welding direction, the synchronous sampling frequency, and the welding travel speed. By rounding up or down, the sampling time offset is added to the sampling time of the forward-looking molten pool image to determine the corresponding sampling time of the rear-looking structured light image, thus establishing a spatiotemporal correspondence.
3. The online welding defect detection system based on machine vision according to claim 1, characterized in that, Define a local region of the molten pool within the forward-looking molten pool image and calculate the average brightness of the local region of the molten pool; The pressure relief enhancement amount of the foreseeable molten pool image at the pixel coordinates is constructed based on the average brightness of the local area of the molten pool, the brightness value of the foreseeable molten pool image at the pixel coordinates at the sampling time, and the minimum positive number. The pressure relief port region at the sampling time is obtained by extracting the set of pixels that satisfy the condition that the pressure relief port enhancement is positive. The area of the pressure relief port region is calculated based on the number of pixels contained in the pressure relief port region at the sampling time; The geometric center of the pressure relief port at the sampling time is obtained by summing and averaging the pixel coordinates within the pressure relief port region. The equivalent radius of the pressure relief port at the sampling time is calculated by using the area of the pressure relief port region and pi. The coordinate transformation matrix from the forward-looking molten pool image coordinate domain to the weld world coordinate system is invoked to transform the geometric center of the pressure relief port at the sampling time into the weld world coordinate system composed of the welding direction coordinate, the weld width direction coordinate, and the weld height direction coordinate. The welding direction coordinates are extracted using the welding direction coordinate extraction operator to determine the position of the pressure relief port in the welding direction at the sampling time.
4. The online welding defect detection system based on machine vision according to claim 1, characterized in that, The structured light stripe image coordinates are extracted from the back-view structured light image sequence at the sampling time, and the three-dimensional contour of the weld section at the sampling time is reconstructed by the mapping operator from the back-view structured light image coordinates to the height direction coordinates in the weld world coordinate system. The position of the upper plate edge connecting the upper plate surface and the weld toe transition zone is determined on the three-dimensional profile of the weld section at the sampling time. Using the three-dimensional profile of the weld section and the position of the upper plate edge at the sampling time as input, find the coordinate point on the left side of the upper plate edge position that makes the second derivative of the three-dimensional profile of the weld section with respect to the transverse coordinate zero, and determine the position of the left curvature inflection point closest to the upper plate edge position. Find the coordinate point on the right side of the upper plate edge position that makes the second derivative of the three-dimensional profile of the weld section with respect to the transverse coordinate at the sampling time zero, and determine the right curvature inflection point position closest to the upper plate edge position; Using the left and right curvature inflection points as boundaries, the local analysis interval of the upper plate edge weld toe at the sampling time is determined.
5. The online welding defect detection system based on machine vision according to claim 1, characterized in that, Within the local analysis interval, a smooth reference weld toe is constructed using a polynomial; Ensure that the smooth reference weld toe and the three-dimensional profile of the weld section have equal height and equal local slope at the left boundary of the local analysis interval; Ensure that the smooth reference weld toe and the three-dimensional profile of the weld section have equal height and equal local slope at the right boundary of the local analysis interval; Calculate the actual curvature of the three-dimensional profile of the weld cross section and the reference curvature of the smooth reference weld toe, respectively.
6. The online welding defect detection system based on machine vision according to claim 5, characterized in that, The curvature defect density is obtained by taking the larger value between the difference between the reference curvature and the actual curvature and zero. The curvature defect density within the local analysis interval is integrated along the horizontal coordinate to determine the curvature defect integral at the sampling time. Within the local analysis interval, the maximum height difference between the smooth reference weld toe and the three-dimensional profile of the weld section is taken to determine the maximum degradation depth at the sampling time. A degradation calculation window is constructed along the welding direction. The curvature loss integrals of all sampling times within the degradation calculation window are used to perform a weighted summation of the welding direction positions at all sampling times. The summation is then divided by the sum of the curvature loss integrals of all sampling times and the sum of the smallest positive numbers to determine the degradation center position corresponding to the sampling time.
7. The online welding defect detection system based on machine vision according to claim 1, characterized in that, The spatiotemporal correspondence is invoked to determine the sampling time of the rear-view structured light image corresponding to the sampling time of the front-view molten pool image, and the degradation center position and curvature loss integral corresponding to the sampling time are extracted. The positive migration length is calculated by subtracting the pressure relief port location from the extracted degradation center location and taking the larger value between the result and zero. The thermal hysteresis curvature migration coefficient is calculated by multiplying the positive migration length by the curvature loss integral and dividing by the sum of the equivalent radius of the pressure relief port and the smallest positive number.
8. The online welding defect detection system based on machine vision according to claim 1, characterized in that, Within the detection window, the thermal hysteresis curvature migration coefficient, the corresponding maximum degradation depth, and the equivalent radius of the pressure relief port corresponding to multiple sampling times are collected, and the total number of sampling times participating in the calculation of hysteresis instability energy within the detection window is determined. For each sampling time, the corresponding maximum degradation depth is divided by the sum of the equivalent radius of the pressure relief port and the smallest positive number to calculate the degradation depth normalization amount at the sampling time; Within the detection window, the thermal hysteresis curvature migration coefficient and the normalized degradation depth are multiplied and summed at all sampling times; The result of the product summation operation is averaged by dividing the total number of sampling times to calculate the hysteresis instability energy within the detection window.
9. The online welding defect detection system based on machine vision according to claim 1, characterized in that, The natural exponential function is used to perform exponential mapping calculation on the hysteresis instability energy to obtain intermediate detection results; Multiply the intermediate detection results by the discretization scaling factor and perform rounding. The rounding result is divided by the discretization scale factor to complete the numerical discretization process and generate the welding defect detection result.
10. A machine vision-based online detection method for welding defects, characterized in that, Implementing the machine vision-based online welding defect detection system as described in any one of claims 1 to 9 includes the following steps: Step S1: Simultaneously acquire the front-view molten pool image and the rear-view structured light image, and convert the front-view molten pool image and the rear-view structured light image to a unified weld world coordinate system; Step S2: Extract the pressure relief port from the front-view molten pool image, and calculate the position and equivalent radius of the pressure relief port in the welding direction; Step S3: Reconstruct the three-dimensional contour of the weld section based on the rear-view structured light image, and determine the local analysis interval of the weld toe on the edge side of the upper plate using the curvature inflection point; Step S4: Construct a smooth reference weld toe based on the boundary constraints of the local analysis interval, compare the actual weld toe with the smooth reference weld toe to calculate the curvature loss integral and the maximum degradation depth, and calculate the degradation center position along the welding direction. Step S5: Calculate the positive migration length between the degradation center location and the pressure relief port location. Combine the positive migration length, the curvature loss integral, and the equivalent radius of the pressure relief port to calculate the thermal hysteresis curvature migration coefficient. Step S6: Within the detection window, the hysteresis instability energy is calculated using multiple thermal hysteresis curvature migration coefficients, the corresponding maximum degradation depth, and the equivalent radius of the pressure relief port. Step S7: Perform exponential mapping and numerical discretization on the hysteresis instability energy to output the welding defect detection results.
