A method and system for tracking underwater narrow-gap welding seams based on vision sensing
By establishing a camera-welding coordinate system mapping and confidence-level fault tolerance technology in underwater welding, the problem of decreased visual quality in underwater narrow-gap welding was solved, achieving high-precision and stable weld tracking and correction control, thus improving welding quality and efficiency.
Patent Information
- Application Number
- CN202611361506.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2026-04-21
- Filing Date
- 2026-09-03
- Publication Date
- 2026-11-17
AI Technical Summary
Existing underwater narrow gap welding technology suffers from severe obstruction, a large number of bubbles and scattered light generated by the underwater arc leading to a decline in visual quality, inability to achieve stable tracking, lack of real-time visual feedback, and is prone to defects such as undercut and incomplete penetration.
A mapping relationship between the camera pixel coordinate system and the welding coordinate system is established by using a high-speed camera to generate a reference trajectory. During the welding process, the real-time relative position is evaluated using confidence-level fault tolerance technology to generate correction commands. Combined with multi-medium refraction correction and dual-threshold image segmentation, stable tracking is achieved.
It achieves stable feature extraction of narrow gap welds in underwater high turbidity environments, with weld tracking accuracy within ±0.5mm, correction response time ≤100ms, and welding first-pass yield rate increased to over 90%, reducing defects such as undercut and incomplete penetration.
Smart Images

Figure CN123118697A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to automated welding and weld seam tracking methods, and more particularly to a method and system for underwater narrow-gap welding seam tracking based on vision sensing. Background Technology
[0002] There is a significant demand for underwater connections and repairs in marine engineering, ship maintenance, subsea pipelines, and offshore platform structures. Traditional underwater welding relies heavily on the experience of underwater welders, which presents challenges such as low visibility, water current disturbances, limited operation time, and high risks, resulting in poor weld quality consistency, low efficiency, and insufficient safety.
[0003] For underwater automated welding, existing technologies have proposed underwater welding robots and tracking devices. However, most solutions are geared towards open bevels or regular welds, or primarily achieve "weld alignment" by modifying the mechanical structure (such as adding a follower mechanism, guide wheels, or mechanical tracking frame). But in narrow-gap bevels, due to the small bevel width, severe obstruction, and the need for the welding torch to extend into the narrow gap, the large number of bubbles and scattered light generated by the underwater arc significantly reduce visual quality. This leads to the following problems: the "direct edge detection / light stripe extraction" commonly used in traditional land-based weld tracking is easily submerged by arc halo, bubble flicker, and turbid scattering underwater, resulting in feature extraction failure; underwater optical paths have multi-medium refraction of "water-window-air," and without correction, pixel measurements cannot stably correspond to the real spatial position; relying solely on a single sensor (visual or mechanical only) is prone to misjudgment when obstructed or saturated, causing miscorrection and leading to defects such as undercut and incomplete penetration; some existing "purely mechanical / sensorless" follower structures lack observable measurements of the relative relationship between the welding torch and the weld, and are essentially still unable to cope with underwater dynamic disturbances and narrow-gap obstruction.
[0004] Existing underwater narrow-gap welding devices employing mechanical servo mechanisms lack real-time visual feedback and cannot cope with underwater flow disturbances and bubble drift causing welding torch trajectory deviations, easily leading to defects such as undercut and incomplete penetration. Conventional land-based visual weld seam tracking methods do not consider image degradation issues caused by multi-medium refraction (water-window-air), water turbidity scattering, and strong arc halo rings. When directly applied to underwater scenarios, their feature extraction accuracy is less than 30%, making stable tracking impossible. Furthermore, while some existing visual tracking solutions provide initial position guidance before welding, they fail to convert the pre-welding bevel geometry information into a spatial reference benchmark throughout the entire welding process. This results in a lack of stable constraint references when visual measurements fail during welding, easily leading to cumulative offsets. Summary of the Invention
[0005] Purpose of the invention: The purpose of this invention is to provide a visual sensing-based underwater narrow gap welding seam tracking method that establishes a reference trajectory in a clean environment and achieves stable tracking, strong anti-interference ability, and high positioning accuracy through confidence level fault tolerance during the welding process. Another purpose of this invention is to provide a visual sensing-based underwater narrow gap welding seam tracking system.
[0006] Technical solution: The underwater narrow-gap welding seam tracking method based on vision sensing described in this invention includes the following:
[0007] S1. Install and calibrate the high-speed camera set in the underwater welding area, and establish the mapping relationship between the camera pixel coordinate system and the welding coordinate system;
[0008] S2. In the non-arc state, control the welding torch to move along the preset welding path, acquire narrow gap bevel images through the high-speed camera, obtain bevel path information based on the acquired bevel images, and generate a reference trajectory based on the bevel path information.
[0009] S3. In the arc-starting welding state, the high-speed camera acquires images containing the electric arc, extracts the feature positions of the arc area and the bevel area based on the acquired images, determines the real-time relative position between the welding torch and the bevel, and calculates the real-time deviation based on the real-time relative position information; wherein, in the process of calculating the real-time deviation, the confidence level of the real-time relative position information is evaluated, and when the confidence level is lower than a preset threshold, the reference trajectory and historical position information are used to generate a replacement deviation value to replace the real-time deviation of the welding torch and the bevel in the lateral direction calculated based on the real-time relative position information of the current frame;
[0010] S4. Based on the real-time deviation or alternative deviation value obtained in step S3, generate a correction command to control the welding torch to adjust its position in order to achieve weld seam tracking.
[0011] Preferably, the method further includes step S5: after the current weld layer is completed, it is determined whether the next layer of welding is required; if so, the position of the working center point of the welding torch after the previous layer correction is superimposed with a preset layer height increment as the starting position of the next layer of welding, and the process returns to step S3; if not, the welding is ended and the welding torch is moved to the preset welding end position.
[0012] Preferably, establishing the mapping relationship in step S1 includes: arranging a planar calibration plate in the underwater welding area and acquiring calibration images; using the calibration images to obtain camera intrinsic parameters and distortion parameters to correct lens distortion; correcting the refraction effect of the water body and the observation window on the light path; performing ray tracing on the corrected pixel coordinates to determine the world coordinates corresponding to the pixel.
[0013] Preferably, the planar calibration board is a checkerboard calibration board; the lens distortion correction adopts Zhang's calibration method; the ray tracing is based on Snell's law; when it is inconvenient to perform analytical solution, an equivalent calibration method is used to establish the mapping relationship between pixel coordinates and world coordinates.
[0014] Preferably, the correction includes: based on the law of refraction. Calculate the direction of the refracted ray, where, , , These are the refractive indices of water, waterproof window materials, and air, respectively. , , These are the propagation angles of light relative to the interface normal in the corresponding medium; the spatial light is obtained by combining the waterproof window thickness, window normal vector, and camera extrinsic parameters, and the spatial light is intersected with the preset welding reference plane or bevel plane to obtain the world coordinates corresponding to the pixel.
[0015] Preferably, step S2, which involves obtaining slope path information and generating a reference trajectory based on the acquired slope images, includes: using an edge extraction algorithm to extract the left edge position of the slope in each frame of the slope image. and the right edge position Calculate the center position of the bevel ; The center positions of multiple bevels obtained within a preset time interval Least squares fitting is performed to obtain the reference center trajectory curve. , as the reference trajectory.
[0016] Preferably, step S2 further includes: extracting the extreme left position value when the welding torch tip swings to the left and right extreme positions. and far right position value Calculate the center position of the welding torch The difference between the minimum distances from the tip of the welding torch to the left and right bevel edges is calculated as the offset between the center position of the welding torch and the center position of the bevel, and the motion trajectory is corrected in real time accordingly.
[0017] Preferably, the swinging of the welding torch tip to the left and right extreme positions is achieved by controlling the rotation of the narrow gap consumable electrode welding torch by a narrow gap welding torch controller.
[0018] Preferably, step S3, which involves acquiring the real-time relative position information between the welding torch and the bevel based on the acquired image and calculating the real-time deviation, includes:
[0019] Obtain the grayscale histogram of the image, and set the first peak and valley grayscale value corresponding to the boundary between the bevel background and the sidewall edge as a low threshold. Combine image grayscale values with The comparison is performed using binarization to extract the positions of the left and right sidewall edges of the bevel. , Calculate the center position of the bevel in the current frame. ;
[0020] Obtain the grayscale histogram of the image, and set the second peak-valley grayscale value of the corresponding arc highlight region as a high threshold. Combine image grayscale values with The comparison is performed by binarization, the arc region is extracted and morphologically processed, and the arc center position is obtained by contour extraction. ;
[0021] Calculate the real-time deviation between the welding torch and the bevel in the lateral direction for the current frame. For the preset time interval Real-time deviation of a preset number of images acquired internally Take the mean to obtain the average deviation. , ,when When the preset safety threshold is exceeded, a correction command is generated.
[0022] Preferably, the low threshold and the high threshold It is based on the preset parameters of the neutral density filter and narrowband filter used in the experiment; the morphological treatment is morphological dilation treatment.
[0023] Preferably, step S3, evaluating the confidence level of the real-time relative position information, includes calculating the comprehensive confidence level. The calculation method is as follows:
[0024] ,
[0025] in, , , , These are preset weight coefficients, and satisfy... ; As a marginal effectiveness indicator, As a geometric symmetry index, As a time-series consistency indicator, It is a saturation suppression index;
[0026] Marginal effectiveness index Represented as: ,in, This represents the number of valid edge points after filtering by length, orientation, and position constraints. The expected number of edge points within the region of interest;
[0027] Geometric symmetry index This is expressed as the normalized value of the average distance difference between the left and right bevel edges and the fitted center line: ,in, , The average distance from the left and right bevel edges to the fitted center line is denoted as . To prevent extremely small positive numbers with a denominator of zero;
[0028] Time series consistency index This is represented as the result of normalizing the difference between the welding torch-groove lateral deviation in the current frame and the deviation in the previous frame using the scale parameter: ,in, The welding torch-groove lateral deviation for the current frame. This refers to the lateral deviation of the welding torch-groove in the previous frame. The scale parameter for deviation variation, with a value range of 0.2mm-1.0mm, is used to adjust the system's sensitivity to deviation fluctuations between adjacent frames, thereby achieving robust suppression of sudden noise disturbances.
[0029] Saturation inhibition index Represented as: ,in, This represents the area of the grayscale region exceeding the threshold. This represents the total area of the region of interest.
[0030] Preferably, the over-threshold grayscale region in the saturation suppression index is the pixel region whose grayscale value exceeds a preset saturation threshold.
[0031] Preferably, in step S3, generating a substitution bias value when the confidence level is lower than a preset threshold includes:
[0032] When the overall confidence level C is not lower than the first threshold, the real-time deviation of the current frame is used. To correct the deviation;
[0033] When the overall confidence level C is between the second threshold and the first threshold, the weighted average of the effective real-time deviations in a preset number of historical frames is used as the output, and the lateral compensation gain is limited to a preset proportion of the normal gain.
[0034] When the overall confidence level C is lower than the second threshold, the predicted bevel center position is obtained by fitting the bevel center position based on the bevel center position corresponding to a preset number of historical high confidence frames, and the substitution deviation value is calculated by combining the current frame arc center position.
[0035] When the number of historical high-confidence frames is less than the preset number, the corresponding point of the reference trajectory at the current path position is used as the predicted slope center position.
[0036] When multiple consecutive frames that reach a preset number of frames all satisfy the condition that the overall confidence level is lower than the second threshold, lateral correction is restricted, and motion control is only performed along the welding direction until the confidence level recovers to above the second threshold.
[0037] Preferably, the restriction of lateral deviation includes reducing the welding speed, or freezing the lateral deviation by only maintaining longitudinal and vertical follow-up, until the confidence level recovers to above the second threshold.
[0038] Preferably, the gain is 30% to 70% of the normal gain; the number of historical high-confidence frames is 3 to 10; and the number of frames is 2 to 5.
[0039] Preferably, the first threshold is 0.7 and the second threshold is 0.5.
[0040] Preferably, the historical high-confidence frames are image frames with a comprehensive confidence level C greater than the second threshold.
[0041] Preferably, in steps S2 and S3, the high-speed camera is triggered to acquire images when the welding wire tip or the arc swings to the extreme positions on both sides of the welding direction, and the triggering time is located in the low range of the arc current, and the exposure time of the high-speed camera is less than the peak duration of the arc current.
[0042] Preferably, the low arc current range is the time period during which the current is in the non-peak stable region during the arc oscillation cycle.
[0043] A system for implementing the above-mentioned vision-sensing-based underwater narrow-gap welding seam tracking method according to the present invention includes:
[0044] The system includes a narrow-gap welding torch controller, a narrow-gap metal arc welding torch, a welding power source, a computer, a motion device, a lighting assembly, an image acquisition assembly, a dust collection assembly, and a high-speed camera; the narrow-gap welding torch controller, welding power source, computer, motion device, and image acquisition assembly are located in the above-water portion; the narrow-gap metal arc welding torch, lighting assembly, dust collection assembly, and high-speed camera are located in the underwater portion.
[0045] The centerlines of the lighting component, high-speed camera, and dust collection component are located on the same plane as the central axis of the arc rotation or oscillation, and are all relatively fixed to the narrow gap metal arc welding torch.
[0046] The narrow gap welding torch controller is connected to the narrow gap consumable electrode welding torch and is used to control the rotation of the narrow gap consumable electrode welding torch so that the electric arc can be shaken, oscillated or rotated; when the electric arc deflects to the left limit position or the right limit position of the welding direction, the narrow gap consumable electrode welding torch outputs a trigger signal to the high-speed camera;
[0047] The image acquisition component is used to acquire images captured by the high-speed camera and send the images to the computer; the computer is used to execute the above method and send a correction command to the motion device, and the motion device drives the narrow gap metal arc welding torch to adjust its spatial position according to the correction command in order to achieve weld seam tracking.
[0048] Preferably, when the motion device drives the narrow-gap metal arc welding torch to perform position compensation, the lateral compensation amount is equal in magnitude and opposite in direction to the lateral deviation value, the longitudinal compensation amount is matched with the welding speed, and the vertical compensation amount is matched with the change in the extension length of the arc voltage feedback.
[0049] Preferably, the high-speed camera is positioned above the workpiece to be welded and is aimed at the welding area at an oblique angle; the high-speed camera is equipped with a light-reducing component and a bandpass filter component, wherein the light transmission band of the bandpass filter component matches the light emission band of the illumination component; the illumination component is a narrowband LED or line laser illumination; the dust collection component is used to control local fluid disturbance in the arc area to reduce the interference of bubbles and impurities on imaging.
[0050] Preferably, the dust collection component is a water suction device.
[0051] Preferably, the calibration accuracy of the high-speed camera is no greater than 0.2 mm to ensure the lateral tracking accuracy requirements for underwater narrow-gap welding.
[0052] Preferably, the bandpass filter has a half-width of 10nm to 20nm to match the narrowband light source band of the illumination component.
[0053] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: (1) The present invention uses the arc oscillation cycle and camera exposure to trigger synchronously, suppressing underwater arc saturation and scattering halo interference from the source. Combined with multi-medium refraction geometric correction, double threshold image segmentation and narrow gap geometric constraint screening, it can achieve stable feature extraction of narrow gap welds in underwater environments with high turbidity. (2) The weld tracking method of the present invention has a lateral tracking accuracy of up to ±0.5mm and a correction response time of ≤100ms. It is suitable for narrow gap bevels with a width of 6-16mm, effectively reducing defects such as undercut, incomplete penetration and sidewall fusion, and improving the first-pass welding qualification rate to over 90%. (3) The present invention introduces a time-series multi-frame averaging and confidence degradation control mechanism. When a sudden bubble blockage causes the loss of single-frame image features, the system generates a replacement deviation value based on the reference trajectory and historical position information, and restricts lateral correction when the confidence of multiple consecutive frames is insufficient, avoiding false correction and greatly improving the tracking stability and engineering practicality under complex underwater working conditions. Attached Figure Description
[0054] Figure 1This is a schematic diagram of the overall system structure of the present invention;
[0055] Figure 2 This is a flowchart illustrating the overall process of the method of the present invention.
[0056] Figure 3-4 This is a schematic diagram of the original image of the narrow gap bevel acquired by a high-speed camera in the pre-welding state of the present invention and the image processing process.
[0057] Figure 5 This is a schematic diagram of the bevel image containing the electric arc acquired by a high-speed camera during the welding process of this invention and the dual-threshold binarization processing. Detailed Implementation
[0058] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0059] This embodiment provides a method and system for tracking underwater narrow-gap welding seams based on vision sensing, the overall structure of which is as follows: Figure 1 As shown, the method flow is as follows: Figure 2 As shown.
[0060] Step S1: System configuration, installation, and calibration;
[0061] like Figure 1 As shown, the weld seam tracking system of this embodiment includes: a narrow gap welding torch controller 1, a narrow gap metal arc welding torch 2, a welding power source 3, a computer 4, a motion device 5, a lighting assembly 6, an image acquisition assembly 7, a dust extraction assembly 8, and a high-speed camera 9. The narrow gap welding torch controller 1, welding power source 3, computer 4, motion device 5, and image acquisition assembly 7 are located above water to prevent damage to the core control and electrical equipment from water immersion, while also facilitating monitoring and debugging by operators. The narrow gap metal arc welding torch 2, lighting assembly 6, dust extraction assembly 8, and high-speed camera 9 are located underwater, allowing them to be directly close to the welding area to acquire high-quality real-time images and perform welding actions.
[0062] The workpiece 10 to be welded, the narrow-gap metal arc welding torch 2, and the contact tip 11 are placed in an underwater environment. The workpiece 10 is connected to the negative terminal of the welding power source 3, and the narrow-gap metal arc welding torch 2 is connected to the positive terminal of the welding power source 3. A waterproof high-speed camera 9 and a dust extraction assembly 8 are fixed to the narrow-gap metal arc welding torch 2 using clamps. The centerlines of the lighting assembly 6, the high-speed camera 9, and the dust extraction assembly 8 are on the same plane as the central axis of the arc rotation or oscillation, and all are relatively fixed to the narrow-gap metal arc welding torch 2, ensuring that the camera's field of view always follows the contact area between the torch tip and the bevel. The lighting beam is coaxial or near-axial with the camera's line of sight, minimizing underwater light scattering interference. The narrow-gap welding torch controller 1 is connected to the narrow-gap metal arc welding torch 2 and is used to control the rotation of the narrow-gap metal arc welding torch 2 to make the arc rock, oscillate, or rotate. The center point of the arc rocking, oscillating, or rotating is defined as the working center TCP point, which is a certain distance below the contact tip along the contact tip axis.
[0063] A high-speed camera 9 is positioned above the workpiece 10 to be welded, with an oblique angle aimed at the contact area between the end of the narrow-gap metal arc welding torch 2 and the narrow-gap bevel. In this embodiment, the welding environment is a water tank with a water depth of 50cm and dimensions of 200cm, 150cm, and 100cm (length, width, and height). A φ1.6mm nickel-based self-shielded flux-cored welding wire is used. The workpiece 10 to be welded is Q235 low-carbon steel, with a narrow-gap bevel width of 13mm and a bevel depth of 20mm. The distance between the high-speed camera 9 and the workpiece 10 is 300-1200mm, and the tilt angle is 20°-70°. In this embodiment, the camera's pitch angle is 20°, and the horizontal deflection angle is 25°. The high-speed camera 9 is equipped with a neutral density filter (ND2-ND8) and a bandpass filter (10-20nm half-width). The illumination component 6 is a narrowband LED or line laser illumination, with its wavelength matching the center wavelength of the bandpass filter, selected within the range of 450nm-850nm. Neutral density filters (ND2-ND8) are used to attenuate the intense radiation of the electric arc, preventing camera sensor saturation. The bandpass filter (10-20nm half-width) only allows narrowband light matching the illumination component's wavelength to pass through, effectively suppressing interference from stray light and the arc's continuous spectrum in the underwater environment. The use of narrowband LEDs or line lasers in the illumination component, matched with the center wavelength of the filter, results in a high-contrast image of the bevel area in the camera, while the intense arc light is significantly suppressed, fundamentally improving the signal-to-noise ratio for feature extraction. The suction component 8 is a water extraction device with a suction flow rate of 5-30L / min, covering a circular area with a radius of 5-10cm centered on the electric arc. It is used for localized fluid disturbance control in the arc area to reduce interference from bubbles and impurities on imaging, thereby ensuring the clarity of the visual window. During underwater wet welding, the high temperature of the electric arc decomposes water, generating a large number of hydrogen and oxygen bubbles. At the same time, the melting of the welding wire produces spatter and fumes. These substances quickly contaminate the viewing window and obscure the bevel. A water flow extraction device is used to create a local negative pressure zone around the arc at a flow rate of 5-30 L / min. This rapidly removes bubbles and impurities, ensuring a clear optical path between the camera and the bevel, thus enabling continuous and stable visual tracking.
[0064] The welding wire is threaded into the narrow-gap consumable electrode welding torch 2 and then passed through the contact tip 11 under the conveying action of the wire feeder. The position of the narrow-gap consumable electrode welding torch 2 is adjusted by the motion device 5, the lighting component 6 is turned on and aligned with the center of the upper surface of the workpiece 10 to be welded, and the vertical distance between the bottom of the contact tip 11 and the upper surface of the workpiece 10 to be welded is between 20-30mm.
[0065] Camera calibration is performed to establish a mapping relationship between the camera pixel coordinate system and the welding coordinate system. First, a planar calibration plate parallel to the bevel face is placed at the same depth in the underwater welding area, and a checkerboard array is set on the calibration plate. Multiple sets of calibration images are acquired under still water conditions, with the camera shooting at an angle through the waterproof window. In this embodiment, a 12×9 checkerboard calibration plate is used, and 25 calibration images are acquired. First, the camera intrinsic parameter matrix and radial and tangential distortion parameters are obtained using Zhang's calibration method. Lens distortion correction is then performed on the original pixel coordinates to obtain the corrected pixel coordinates. Then, based on the propagation path of light passing through the three layers of media—water, waterproof window, and air—the direction of the refracted light is calculated according to the law of refraction. ,in, , , These are the refractive indices of water, waterproof window materials, and air, respectively. , , The angles of light propagation relative to the interface normal in the corresponding medium are given. Spatial light rays are calculated by combining the waterproof window thickness, window normal vector, and camera extrinsic parameters. These spatial light rays intersect with a preset welding reference plane or bevel plane to obtain the world coordinates of the pixel. When the weld layer height changes, the reference plane is updated synchronously based on the interlayer height deviation to ensure consistency of lateral measurements under different weld layer conditions. When analytical refraction calculation is inconvenient on-site, an equivalent calibration method can be used: calibration plates parallel to the bevel face are placed at multiple depth planes in the underwater welding area (at least covering the range of weld layer height variation, e.g., 5mm, 10mm, and 15mm from the bottom of the bevel), and calibration images of each depth plane are collected. For each depth plane, the homography matrix is obtained using Zhang's calibration method, establishing a linear mapping relationship between pixel coordinates and world coordinates at that depth. In actual welding, based on the current weld layer depth, the homography matrices of adjacent depth planes are selected for interpolation to obtain the pixel-physical coordinate transformation relationship at the current depth. In this embodiment, the calibration accuracy is ≤0.2mm, and the physical size of a single pixel after correction is 0.08mm / pixel.
[0066] Step S2: Pre-welding scanning and reference trajectory generation;
[0067] After calibration, a pre-welding scan is performed. In the non-arc state, the illumination component 6 is turned on, causing the working center TCP point of the welding wire to move along the initially set welding path. The rotation amplitude and frequency of the narrow-gap consumable electrode welding torch 2 are adjusted by the narrow-gap welding torch controller 1. The preset arc oscillation period is T, with a value ranging from 0.1s to 0.5s. In this embodiment, T = 0.4s (corresponding to an oscillation frequency of 2.5Hz). Every preset time interval Δt (Δt is an integer multiple of the arc oscillation period, preferably Δt = T, i.e., every complete oscillation period), when the welding wire end oscillates to the left or right extreme positions in the welding direction, the narrow-gap consumable electrode welding torch 2 outputs a trigger signal to the high-speed camera 9. The narrow-gap welding torch controller 1 integrates an arc oscillation position sensor, which can acquire the oscillation phase of the welding wire end in real time; simultaneously, the controller 1 is connected to the welding power supply 3 through an analog interface or a digital communication interface to acquire the instantaneous value of the welding current in real time. Controller 1 uses a comparator circuit or software logic to determine whether the current value is below a preset low threshold (e.g., below 30% of the peak current) and whether the swing position has reached its limit. When both conditions are met simultaneously, a TTL trigger pulse is sent after delay compensation. Synchronous trigger parameters are configured as follows: when the welding torch swings to its left or right limit position, a TTL level trigger pulse is sent to the high-speed camera 9 300μs-500μs in advance (400μs in this embodiment). The exposure time of the high-speed camera 9 is set to 20μs-100μs (50μs in this embodiment), ensuring the exposure window completely covers the low arc current range and avoids the peak arc light range. The arc current changes in a pulse or alternating manner within one swing cycle. During the current peak period, the arc light is extremely strong, and the image is easily saturated; during the current low period, the arc light is weaker, and the bevel edge features are relatively clear. This invention uses a narrow-gap welding torch controller to send a trigger signal 300-500μs in advance when the welding wire / arc swings to the left or right extreme position, so that the camera exposure window (20-100μs) falls exactly in the current trough range, thereby "freezing" the movement with short exposure and avoiding the peak of strong light, and obtaining a high-quality image in which the edge of the bevel and the position of the welding wire / arc are clearly distinguishable.
[0068] High-speed camera 9 acquires images of the narrow-gap bevel, which includes the welding torch contact tip and the narrow-gap bevel below it. The bevel width occupies approximately 1 / 2 to 5 / 6 of the image. The acquired images are sent to computer 4 for processing via image acquisition component 7.
[0069] Computer 4 uses an edge extraction algorithm on each frame of the bevel image to extract the position of the left edge of the bevel. and the right edge position (n=1,2,...,N, where N is the total number of images within Δt, all being the x-coordinate in a pixel coordinate system). Since the pre-welding scan is performed in an arc-free state, the bevel edge is illuminated only by the active light source provided by lighting component 6, resulting in lower image contrast compared to the welding process. Therefore, this step employs an edge detection algorithm based on grayscale gradients, and sets corresponding high and low thresholds according to image contrast to eliminate short-arc artifacts caused by suspended matter in the water. The center position of the bevel is calculated. The center positions of multiple bevels obtained within a preset time interval will be... Least squares fitting is performed to obtain the reference center trajectory curve. , as the reference trajectory.
[0070] Simultaneously, an edge extraction algorithm is used to obtain the extreme left position value when the welding torch tip swings to its left and right extreme positions. and far right position value Calculate the center position of the welding torch Calculate the minimum distance from the tip of the welding torch to the left and right bevel edges within a single cycle. and According to the formula , Calculate the offset X between the welding torch center position and the bevel center position, where, , The motion trajectory is corrected in real time during the process. After the motion is completed, the welding torch is reset to the starting welding position, and the corrected TCP trajectory is saved as the current welding trajectory (i.e., the reference trajectory).
[0071] like Figure 3 and Figure 4 The image shown is a schematic diagram of the original image of the narrow gap bevel acquired by a high-speed camera before welding and the image processing process. Figure 4 The left side of the upper middle image shows the original grayscale image, revealing the contours of the sidewalls of the bevel and the brightness distribution under the illumination source; the right side shows the result after grayscale gradient edge detection processing, where the edges of the left and right sidewalls of the bevel are clearly extracted and... Figure 3 The center of the bevel is marked with a blue line. The results, calculated from the average values of the left and right edges and superimposed, present the groove feature extraction and reference center trajectory during the pre-welding scanning stage. ( Figure 3 The complete image processing workflow generated by the yellow-marked line in the middle.
[0072] Step S3: Real-time tracking of the welding process;
[0073] Initiate single-pass welding by igniting the arc. Turn on welding power supply 3 and adjust the welding parameters: arc voltage 25V-35V (28V in this embodiment), welding current 150A-350A (240A in this embodiment), welding speed 16cm / min. Turn on the wire feeder to ignite the arc. During welding, the arc also oscillates periodically. When the arc oscillates to the left or right extreme positions in the welding direction, the high-speed camera 9 is triggered to capture an image containing the arc. The triggering time is located in the trough of the arc current, and the exposure time is less than the peak duration of the arc current.
[0074] Image acquisition component 7 transmits the collected image information, filtered by neutral density filters and optical filters, to computer 4. Computer 4 then sequentially performs multi-media refractive geometric correction, image processing, deviation calculation, confidence assessment, and degradation control on the acquired image.
[0075] 1. Real-time deviation calculation;
[0076] For each frame of the image, computer 4 processes it in the following manner:
[0077] Obtain the grayscale histogram of the image, and set the first peak and valley grayscale value corresponding to the boundary between the bevel background and the sidewall edge as a low threshold. (Based on preset parameters of the experimental neutral density filter and narrowband filter). The image grayscale value is compared with... The comparison is performed using binarization to extract the positions of the left and right sidewall edges of the bevel. , Calculate the center position of the bevel in the current frame. .
[0078] Obtain the grayscale histogram of the image, and set the second peak-valley grayscale value of the corresponding arc highlight region as a high threshold. (Also based on preset experimental parameters). The image grayscale value and... The comparison is performed using binarization, the arc region is extracted and subjected to morphological dilation (in this embodiment, a 3×3 rectangular kernel is used, with one iteration), and the arc center position is obtained through contour extraction. .
[0079] Calculate the real-time deviation between the welding torch and the bevel in the lateral direction for the current frame. Real-time deviation of a preset number of images acquired within a preset time interval Δt. Take the mean to obtain the average deviation. , .when Exceeding the preset safety threshold When the value ranges from 2 to 5 pixels, a correction instruction is generated. In this embodiment, the high and low thresholds for edge detection are set to 120 and 50, respectively.
[0080] like Figure 5The image shown is a schematic diagram of the bevel image containing the electric arc acquired by a high-speed camera during the welding process of this invention, and the dual-threshold binarization processing. The image displays three pairs of images: the left side is the original grayscale image of the bevel containing the electric arc acquired by the high-speed camera, showing the coexistence of the bright area of the electric arc and the outline of the bevel sidewall; the middle side is the image processed using a low threshold... The binarization process filters out the arc highlights, clearly revealing the edges of the left and right sidewalls of the bevel, which are then used to extract the center position of the bevel. The right side uses a high threshold. The result of binarization and morphological dilation retains only the bright core region of the electric arc, which is used to extract the center position of the electric arc. The difference between the two is the lateral real-time deviation. This intuitively demonstrates the implementation principle of the dual-threshold segmentation strategy to simultaneously acquire bevel and arc features in the same frame image.
[0081] 2. Confidence assessment;
[0082] Computer 4 evaluates the confidence level of the real-time relative position information for each frame of image and calculates the overall confidence level C. The calculation method for the overall confidence level C is as follows:
[0083] ,
[0084] in, , , , These are preset weight coefficients, and satisfy... ; As a marginal effectiveness indicator, As a geometric symmetry index, As a time-series consistency indicator, This is a saturation suppression index. In this embodiment, it is preferred. =0.35、 =0.25、 =0.25、 =0.15.
[0085] The definitions of each sub-indicator are as follows:
[0086] Marginal effectiveness index Represented as: ,in, This represents the number of valid edge points after filtering by length, orientation, and position constraints. The expected number of edge points within the region of interest; edge validity index. Ensure that the extracted bevel edge is complete enough to avoid mistaking bubbles or splashes for a bevel;
[0087] Geometric symmetry index This is expressed as the normalized value of the average distance difference between the left and right bevel edges and the fitted center line: ,in, , The average distance from the left and right bevel edges to the fitted center line is denoted as . To prevent extremely small positive numbers with a denominator of zero, the "fitting centerline" refers to: performing least-squares straight-line fitting on the left and right bevel edge segments retained after validity screening in the current frame, and taking the midpoint of the two fitted lines as the fitting centerline. The average distance from the left edge point to this centerline is then calculated. Average distance to the right edge point .
[0088] Time series consistency index This is represented as the result of normalizing the difference between the welding torch-groove lateral deviation in the current frame and the deviation in the previous frame using the scale parameter: ,in, The welding torch-groove lateral deviation for the current frame. This refers to the lateral deviation of the welding torch-groove in the previous frame. The scale parameter is the deviation change in units of pixels, with a value range of 0.2mm-1.0mm. It is used to adjust the system's sensitivity to deviation fluctuations between adjacent frames, thereby achieving robust suppression of sudden noise disturbances.
[0089] Saturation inhibition index Represented as: ,in, This represents the area of the grayscale region exceeding the threshold. This represents the total area of the region of interest.
[0090] 3. Degradation control and substitution deviation generation;
[0091] Based on the value of the overall confidence level C, the system generates the deviation value used for correction according to the following strategy:
[0092] When C ≥ 0.7 (first threshold), the real-time deviation of the current frame is used. Perform full-gain bias correction.
[0093] When 0.5≤C<0.7, the weighted average of the effective real-time deviations in the most recent preset number of historical frames (in this embodiment, the preset number of historical frames ranges from 3 to 10) is used as the output, and the horizontal compensation gain is limited to 30%-70% of the normal gain. At the same time, an upper limit Δe_max is set for the maximum compensation amount in a single cycle.
[0094] When C < 0.5 (second threshold), the predicted bevel center position is obtained by least-squares fitting based on the bevel center positions corresponding to the most recent preset number of historical high-confidence frames (image frames with C ≥ 0.7), and combined with the arc center position of the current frame. Calculate the substitution bias value. When the number of historical high-confidence frames is less than the preset number, the reference trajectory is used. The corresponding point at the current path location is taken as the predicted slope center location.
[0095] When multiple frames that continuously reach a preset number of frames all satisfy the comprehensive confidence level being lower than the second threshold (0.5) (in this embodiment, the preset number of frames ranges from 2 to 5), further measures to restrict lateral deviation correction are triggered: the welding speed is reduced, or only the longitudinal and vertical follow-up is maintained while the lateral deviation correction is frozen, and only motion control along the welding direction is executed until the confidence level recovers to above 0.5.
[0096] Step S4: Corrective action executed;
[0097] After completing the above processing, computer 4 converts the welding torch-groove deviation value in the pixel coordinate system into the actual physical deviation in the welding world coordinate system through the coordinate mapping relationship established in step S1. It then sends pulse control commands to motion device 5 to drive the narrow-gap consumable electrode welding torch 2 to perform position compensation. Specifically, the lateral compensation amount is equal in magnitude and opposite in direction to the lateral deviation value; the longitudinal compensation amount matches the welding speed; and the vertical compensation amount matches the change in arc voltage extension length. The compensation response time is ≤100ms, achieving closed-loop deviation correction control of the welding process.
[0098] After the signal processing for the current Δt cycle is completed, it is determined whether the welding of this layer is finished. If not, signal processing continues for the next Δt cycle; if finished, the process proceeds to the next step.
[0099] Step S5: Multi-layer welding cycle;
[0100] After completing the current weld layer, determine whether the next layer needs to be welded. If so, the TCP position after correction of the previous layer is superimposed with the preset layer height deviation Δh as the initial welding position for this layer. The TCP of the narrow gap consumable electrode welding torch 2 is moved to this position, and the process returns to step S3. If welding is not required, the TCP of the narrow gap consumable electrode welding torch 2 is moved to the set position after welding is completed, and welding ends. For single-pass welding, the arc is extinguished and the welding power supply 3 is turned off 3-5 seconds after welding is completed. For multi-layer, multi-pass welding, the corresponding steps are repeated until all weld passes are completed.
[0101] In this embodiment, the welding torch alignment deviation was stably controlled within ±0.2mm during the welding process, the accuracy of bevel edge extraction was ≥90%, there were no miscorrections caused by sudden obstruction, the weld formation was good, and there were no defects such as undercut or incomplete penetration. It effectively suppressed underwater arc light scattering interference, improved the stability and tracking accuracy of narrow gap weld feature extraction, reduced welding defects such as undercut and incomplete penetration, and enhanced the engineering practicality and robustness in complex underwater working conditions.
[0102] After the test, turn off the welding power supply 3, and disassemble the narrow gap consumable electrode welding torch 2, the conductive nozzle 11 in sequence, and take out the dust collection assembly 8, the high-speed camera 9, the lighting assembly 6 and the workpiece to be welded 10.
Claims
1. A method for tracking underwater narrow-gap welding seams based on vision sensing, characterized in that, include: S1. Install and calibrate the high-speed camera set in the underwater welding area, and establish the mapping relationship between the camera pixel coordinate system and the welding coordinate system; S2. In the non-arc state, control the welding torch to move along the preset welding path, acquire narrow gap bevel images through the high-speed camera, obtain bevel path information based on the acquired bevel images, and generate a reference trajectory based on the bevel path information. S3. In the arc-starting welding state, the high-speed camera acquires images containing the electric arc, extracts the feature positions of the arc area and the bevel area based on the acquired images, determines the real-time relative position between the welding torch and the bevel, and calculates the real-time deviation based on the real-time relative position information; wherein, in the process of calculating the real-time deviation, the confidence level of the real-time relative position information is evaluated, and when the confidence level is lower than a preset threshold, the reference trajectory and historical position information are used to generate a replacement deviation value to replace the real-time deviation of the welding torch and the bevel in the lateral direction calculated based on the real-time relative position information of the current frame; S4. Based on the real-time deviation or alternative deviation value obtained in step S3, generate a correction command to control the welding torch to adjust its position in order to achieve weld seam tracking.
2. The underwater narrow-gap welding seam tracking method according to claim 1, characterized in that: The steps in S1 to establish the mapping relationship include: setting up a planar calibration plate in the underwater welding area and acquiring calibration images; using the calibration images to obtain camera intrinsic parameters and distortion parameters to correct lens distortion; correcting the refraction effect of the water body and the observation window on the light path; performing ray tracing on the corrected pixel coordinates to determine the world coordinates corresponding to the pixel.
3. The underwater narrow-gap welding seam tracking method according to claim 1, characterized in that: Step S2 involves obtaining slope path information and generating a reference trajectory based on the acquired slope images, including: using an edge extraction algorithm to extract the left edge position of the slope in each frame of the slope image. and the right edge position Calculate the center position of the bevel ; The center positions of multiple bevels obtained within a preset time interval Least squares fitting is performed to obtain the reference center trajectory curve. , as the reference trajectory.
4. The underwater narrow-gap welding seam tracking method according to claim 3, characterized in that: Step S2 also includes: extracting the extreme left position value when the welding torch tip swings to the left and right extreme positions. and far right position value Calculate the center position of the welding torch The difference between the minimum distances from the tip of the welding torch to the left and right bevel edges is calculated as the offset between the center position of the welding torch and the center position of the bevel, and the motion trajectory is corrected in real time accordingly.
5. The underwater narrow-gap welding seam tracking method according to claim 1, characterized in that: Step S3 involves acquiring the real-time relative position information between the welding torch and the bevel based on the acquired image and calculating the real-time deviation, including: Obtain the grayscale histogram of the image, and set the first peak and valley grayscale value corresponding to the boundary between the bevel background and the sidewall edge as a low threshold. Combine image grayscale values with The comparison is performed using binarization to extract the positions of the left and right sidewall edges of the bevel. , Calculate the center position of the bevel in the current frame. ; Obtain the grayscale histogram of the image, and set the second peak-valley grayscale value of the corresponding arc highlight region as a high threshold. Combine image grayscale values with The comparison is performed by binarization, the arc region is extracted and morphologically processed, and the arc center position is obtained by contour extraction. ; Calculate the real-time deviation between the welding torch and the bevel in the lateral direction for the current frame. For the preset time interval Real-time deviation of a preset number of images acquired internally Take the mean to obtain the average deviation. , ,when When the preset safety threshold is exceeded, a correction command is generated.
6. The underwater narrow-gap welding seam tracking method according to claim 5, characterized in that: Step S3 evaluates the confidence level of the real-time relative position information, including calculating the comprehensive confidence level. The calculation method is as follows: , in, , , , These are preset weight coefficients, and satisfy... ; As a marginal effectiveness indicator, As a geometric symmetry index, As a time-series consistency indicator, It is a saturation suppression index; Marginal effectiveness index Represented as: ,in, This represents the number of valid edge points after filtering by length, orientation, and position constraints. The expected number of edge points within the region of interest; Geometric symmetry index This is expressed as the normalized value of the average distance difference between the left and right bevel edges and the fitted center line: ,in, , The average distance from the left and right bevel edges to the fitted center line is denoted as . To prevent extremely small positive numbers with a denominator of zero; Time series consistency index This is represented as the result of normalizing the difference between the welding torch-groove lateral deviation in the current frame and the deviation in the previous frame using the scale parameter: ,in, The welding torch-groove lateral deviation for the current frame. This refers to the lateral deviation of the welding torch-groove in the previous frame. The scale parameter for deviation variation ranges from 0.2 mm to 1.0 mm. Saturation inhibition index Represented as: ,in, This represents the area of the grayscale region exceeding the threshold. This represents the total area of the region of interest.
7. The underwater narrow-gap welding seam tracking method according to claim 6, characterized in that: In step S3, when the confidence level is lower than a preset threshold, a substitution bias value is generated, including: When the overall confidence level C is not lower than the first threshold, the real-time deviation of the current frame is used. To correct the deviation; When the overall confidence level C is between the second threshold and the first threshold, the weighted average of the effective real-time deviations in a preset number of historical frames is used as the output, and the lateral compensation gain is limited to a preset proportion of the normal gain. When the overall confidence level C is lower than the second threshold, the predicted bevel center position is obtained by fitting the bevel center position based on the bevel center position corresponding to a preset number of historical high confidence frames, and the substitution deviation value is calculated by combining the current frame arc center position. When the number of historical high-confidence frames is less than the preset number, the corresponding point of the reference trajectory at the current path position is used as the predicted slope center position. When multiple consecutive frames that reach a preset number of frames all satisfy the condition that the overall confidence level is lower than the second threshold, lateral correction is restricted, and motion control is only performed along the welding direction.
8. The underwater narrow-gap welding seam tracking method according to claim 1, characterized in that, In steps S2 and S3, the high-speed camera is triggered to acquire images when the welding wire tip or the arc swings to the extreme positions on both sides of the welding direction, and the triggering time is located in the low range of the arc current. The exposure time of the high-speed camera is less than the peak duration of the arc current.
9. A system for implementing the underwater narrow-gap welding seam tracking method based on vision sensing as described in any one of claims 1-8, characterized in that, include: The narrow gap welding torch controller (1), narrow gap metal arc welding torch (2), welding power source (3), computer (4), motion device (5), lighting assembly (6), image acquisition assembly (7), dust collection assembly (8), and high-speed camera (9) are provided; the narrow gap welding torch controller (1), welding power source (3), computer (4), motion device (5), and image acquisition assembly (7) are located above water; the narrow gap metal arc welding torch (2), lighting assembly (6), dust collection assembly (8), and high-speed camera (9) are located underwater. The center lines of the lighting component (6), the high-speed camera (9) and the dust collection component (8) are located on the same plane as the central axis of the arc rotation or oscillation, and are all relatively fixed to the narrow gap metal arc welding torch (2); The narrow gap welding torch controller (1) is connected to the narrow gap consumable electrode welding torch (2) and is used to control the rotation of the narrow gap consumable electrode welding torch (2) so that the electric arc can be shaken, oscillated or rotated; when the electric arc deflects to the left limit position or the right limit position of the welding direction, the narrow gap consumable electrode welding torch (2) outputs a trigger signal to the high-speed camera (9); The image acquisition component (7) is used to acquire images captured by the high-speed camera (9) and send the images to the computer (4); the computer (4) is used to execute the method described in any one of claims 1 to 8 and send a correction command to the motion device (5), and the motion device (5) drives the narrow gap metal arc welding torch (2) to adjust its spatial position according to the correction command in order to achieve weld seam tracking.
10. The system according to claim 9, characterized in that, The high-speed camera (9) is positioned above the workpiece (10) to be welded and is aimed at the welding area at an oblique angle. The high-speed camera (9) is equipped with a light-reducing component and a bandpass filter component, wherein the light transmission band of the bandpass filter component matches the light emission band of the illumination component (6). The illumination component (6) is a narrowband LED or line laser illumination. The dust collection component (8) is used to control the local fluid disturbance in the arc area to reduce the interference of bubbles and impurities on the imaging.
