A welding trajectory planning method and system
Patent Information
- Application Number
- CN202610565168.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-27
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2046-04-27
AI Technical Summary
实时采集焊接过程中焊接区域图像;
本发明当焊接区域图像因焊缝实际情况(如弯曲、转折、宽度变化)而改变时,通过U-Net神经网络实时感知该图像中焊缝的位置信息,通过后处理机制与Canny边缘检测算法结合识别出焊缝的连续轮廓特征,最后通过自适应取中点法调整焊枪运动的基准引导线。这一技术方案将现有自动化焊接设备的静态预编程方式转变为动态视觉引导规划,能够对不同形状与走向的焊缝进行实时精准识别与自主轨迹规划,有效减小焊接路径偏差,显著提升焊接路径的精度与自适应能力。
Smart Images

Figure CN122425410B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automated welding equipment technology, and in particular to a welding trajectory planning method and system. Background Technology
[0002] Welding operations in complex outdoor or urban environments, such as welding of power grid grounding wires and municipal utility tunnels, have traditionally relied primarily on manual labor. Manual welding not only demands highly skilled welders but is also limited by the working environment (such as heights, confined spaces, and rainy / foggy weather), resulting in poor weld quality consistency, low first-pass yield, and high rework rates. Especially in urban construction, factors such as noise control and traffic restrictions further reduce the efficiency of manual welding.
[0003] In terms of weld seam recognition and trajectory planning, existing automated welding equipment mostly adopts a pre-programming approach: based on known workpiece drawings or offline 3D models, the theoretical position and posture of the weld seam are determined in advance in the programming software; through manual teaching, point recording or model import, a detailed welding robot motion trajectory and process parameter program are planned and generated; the solidified program is loaded into the welding equipment, and the preset path is strictly reproduced in actual welding.
[0004] Existing automated welding equipment can only rely on limited contact sensing (such as positioning and tracking) to compensate for minor deviations, and lacks the ability to autonomously identify and adjust unknown or large-scale weld seams in real time, resulting in large deviations in the welding path. Summary of the Invention
[0005] Therefore, it is necessary to provide a welding trajectory planning method and system to address the aforementioned technical problems.
[0006] This invention provides a welding trajectory planning method, comprising: Real-time acquisition of images of the welding area during the welding process; Semantic segmentation of the welding area image is performed using a pre-trained U-NET neural network model to extract the location information of the weld during the welding process, resulting in multiple binary images containing the weld area. A post-processing mechanism is used to perform connected component analysis on all binary images and determine the pixel area of each connected component. The connected component with the largest pixel area is identified as the main weld area image. The Canny edge detection algorithm is used to perform contour detection on the main weld area image to locate the complete geometric boundary of the main weld and obtain the continuous contour features of the weld. An adaptive midpoint method is used to process the continuous contour features of the weld to obtain the center path of the weld trajectory. Based on the center path of the weld trajectory, a reference guide line for the movement of the welding torch during the welding process is generated, thus obtaining a welding trajectory planning scheme.
[0007] Optionally, the U-NET neural network model is trained, specifically including: Acquire a set of historical welding process images and corresponding weld area recognition results. The set of historical welding process images includes noisy images with welding noise and noise-free images. The noisy image and the noise-free image are respectively input into the U-NET neural network model to obtain the corresponding weld area prediction results; With the goal of minimizing the loss function between the weld area identification result and the weld area prediction result and maximizing the identification accuracy of the U-NET neural network model, the U-NET neural network model is trained to obtain the trained U-NET neural network model.
[0008] Optionally, the welding area image is semantically segmented using a pre-trained U-NET neural network model to extract the location information of the weld during the welding process, resulting in multiple binary images containing the weld area, specifically including: The pre-trained U-NET neural network model consists of an encoder, a decoder, and a convolutional layer connected in sequence. The image of the welding area is upsampled by an encoder to capture the contextual information of the weld area and obtain initial features; The initial features are downsampled by the decoder to locate the boundary information of the weld area and obtain intermediate features; By performing convolution operations on intermediate features through convolutional layers, the category prediction results of each pixel in the welding area image are determined, resulting in a semantic segmentation mask with the same size as the welding area image. Thresholding is applied to the semantic segmentation mask to mark the weld seam region as the foreground and the non-weld seam region as the background, resulting in multiple binary images containing the weld seam region.
[0009] Optionally, a post-processing mechanism is used to perform connected component analysis on all binary images and determine the pixel area of each connected component. The connected component with the largest pixel area is determined as the main weld area image. Specifically, this includes: Mark all interconnected weld pixel regions in all binary images and assign a unique identifier to each independent connected region; Determine the number of pixels contained in each connected component to obtain the pixel area of that connected component. The pixel area represents the degree of integrity of the weld structure occupied by the connected component. The connected region with the largest pixel area is taken as the effective main weld area, and the connected regions outside the effective main weld area are removed to obtain the main weld area image.
[0010] Optionally, the Canny edge detection algorithm is used to perform contour detection on the main area image of the weld to locate the complete geometric boundary of the weld and obtain the continuous contour features of the weld, specifically including: The image of the main weld area is smoothed by Gaussian filtering to remove Gaussian noise and obtain a noisy image. The gradient magnitude and gradient direction of each pixel in the noisy image are determined by operators such as Sobel, and a preliminary edge image is obtained. The local maxima of the gradient magnitude of the preliminary edge image are compared along the gradient direction, and only the pixels with large magnitudes in the gradient direction are retained to obtain the intermediate edge image; Pixels with gradient magnitudes higher than the high threshold in the middle edge image are retained, and pixels with gradient magnitudes lower than the low threshold in the middle edge image are removed to obtain the final edge image. A morphological closing operation is performed on the final edge image to connect the horizontally broken contours in the final edge image, resulting in a set of edge points; B-spline curve interpolation is performed on the set of edge points to generate a continuous and smooth curved weld trajectory, thus obtaining the continuous contour features of the weld.
[0011] Optionally, an adaptive midpoint method is used to process the continuous contour features of the weld to obtain the center path of the weld trajectory, specifically including: Horizontal sampling lines are set at fixed pixel intervals along the weld seam extension direction. The center point of each interval is determined within the interval where each horizontal sampling line intersects with the continuous contour feature. The line connecting the center points of all intervals is taken as the center path of the weld seam trajectory.
[0012] Optionally, it also includes: smoothing after obtaining the center path of the weld trajectory, specifically including: if the angle between the lines connecting adjacent trajectory points in the center point path of the weld trajectory is within a set angle range, then the weld trajectory segment is determined to be a straight line, and redundant intermediate points in the weld trajectory segment are filtered out.
[0013] This invention provides a welding trajectory planning system, comprising: The data acquisition module is used to acquire images of the welding area in real time during the welding process; The semantic segmentation module is used to perform semantic segmentation on the welding area image using a pre-trained U-NET neural network model to extract the location information of the weld during the welding process and obtain multiple binary images containing the weld area. The contour extraction module is used to perform connected component analysis on all binary images using a post-processing mechanism, and determine the pixel area of each connected component. The connected component with the largest pixel area is identified as the main weld area image. The Canny edge detection algorithm is used to perform contour detection on the main weld area image to locate the complete geometric boundary of the main weld and obtain the continuous contour features of the weld. The trajectory planning module is used to process the continuous contour features of the weld using an adaptive midpoint method to obtain the center path of the weld trajectory, and to generate a reference guide line for the movement of the welding torch during the welding process based on the center path of the weld trajectory, thus obtaining a welding trajectory planning scheme.
[0014] The welding trajectory planning method and system provided in this invention have the following advantages compared with the prior art: This invention addresses the issue of weld area image changes due to actual weld conditions (such as bending, turning, and width variations). It utilizes a U-Net neural network to perceive the weld's position in real-time, combining post-processing with the Canny edge detection algorithm to identify continuous weld contour features. Finally, it adjusts the welding torch's guide line using an adaptive midpoint method. This solution transforms the static pre-programming of existing automated welding equipment into dynamic visual guidance planning, enabling real-time accurate identification and autonomous trajectory planning of welds with different shapes and orientations. This effectively reduces welding path deviation and significantly improves welding path accuracy and adaptability. Attached Figure Description
[0015] Figure 1 Figure 1 illustrates an unprocessed raw weld image and a processed weld image, representing a welding trajectory planning method provided in one embodiment. Figure 1 Image (a) shows the original, clear, and noise-free weld image without any processing. Figure 1 Image (b) shows a clear, noise-free weld image after processing. Figure 1 Image (c) in the image is the original weld image with clear weld and low noise, without any processing. Figure 1 Image (d) in the image shows a clean, low-noise weld image after processing. Figure 1 Image (e) in the image is the original weld image with clear weld and medium noise, without any processing. Figure 1 (f) in the image represents the processed weld image with clear weld seam and medium noise. Figure 1 Image (g) in the image represents the original weld image with clear weld details and high noise, without any processing. Figure 1 (h) in the image represents the processed weld image with clear weld seam and high noise level. Figure 2 Figure 2 illustrates an unprocessed raw weld image and a processed weld image, representing a welding trajectory planning method provided in one embodiment. Figure 2 In the image (i), the original weld image is unprocessed, with blurred and noise-free weld seams. Figure 2 In the image, (j) represents the processed weld image with blurred and noise-free weld seam. Figure 2 In the image, (k) represents the original weld image with unprocessed weld blur and low noise. Figure 2(l) in the image represents the processed weld image with blurred weld seams and reduced noise. Figure 2 In the image (m), the original weld image is unprocessed and contains blurred and noisy weld seams. Figure 2 In the image, (n) represents the processed weld image with blurred and noisy weld seams; Figure 3 The images provided in one embodiment are an unprocessed image after weld region identification and a processed image after weld region identification, representing a welding trajectory planning method. Figure 3 Image (a) shows a continuous, highly curved weld area after weld area identification without post-processing. Figure 3 Image (b) is a continuous, highly curved weld area image after the weld area has been identified and post-processed. Figure 3 Image (c) shows a weld area with minor breaks and curvature that has been identified but not yet post-processed. Figure 3 Image (d) in the image represents a weld region with breakpoints and minimal curvature after post-processing following weld region identification. Figure 3 Image (e) in the image represents a continuous weld region with minimal curvature that has been identified but not yet post-processed. Figure 3 (f) in the image represents a continuous weld area with minimal curvature after the weld area has been identified and post-processed.
[0016] Figure 4 The images provided in one embodiment are a welding trajectory planning method with and without trajectory planning. Figure 4 Image (a) shows a weld area with clear welds and low noise brightness without trajectory planning. Figure 4 Image (b) shows a weld area with clear weld seams and low noise brightness after trajectory planning has been added. Figure 4 Image (c) shows a weld area with clear weld seam and moderate noise brightness without trajectory planning. Figure 4 Image (d) in the image shows a weld area with clear weld seams and moderate noise brightness after trajectory planning has been added. Figure 4 Image (e) in the image shows a weld area with clear weld seams and high noise brightness without trajectory planning. Figure 4 Image (f) in the image shows a weld area with clear weld seams and high noise brightness after trajectory planning has been added. Figure 4 (g) in the image represents a weld area with blurred weld seams and moderate noise brightness without trajectory planning. Figure 4 (h) in the image represents the weld area image with weld blur and moderate noise brightness after trajectory planning was added; Figure 5 This is a flowchart illustrating a welding trajectory planning method provided in one embodiment. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0018] To improve welding automation, industrial welding robots, such as the KUKA KR CYBERTECH series, have emerged on the market, possessing high-precision welding capabilities. However, these devices are typically bulky, weighing over 300 kg, and require fixed mounting bases, making them unsuitable for mobile operations in outdoor environments, confined urban spaces, or high-rise buildings. Furthermore, existing industrial robots often integrate high-end functions such as laser welding and electron beam welding, resulting in high costs and redundant features, making them unsuitable for power grid grounding welding scenarios where conventional arc welding is the primary method.
[0019] In terms of weld seam recognition and trajectory planning, existing automated welding equipment mostly adopts pre-programming or teaching methods, lacking the ability to perceive and adaptively adjust complex weld seam morphologies in real time. Although some equipment is equipped with vision sensors, image quality deteriorates and recognition accuracy is low in harsh environments such as rain, fog, and electromagnetic interference, resulting in large welding path deviations and failing to meet the requirement of ≤0.5mm welding tolerance for urban power grids. In addition, traditional image processing methods are inaccurate in extracting weld seam edges in complex backgrounds, have large response delays, and are difficult to achieve real-time, high-precision trajectory tracking.
[0020] This invention provides a welding trajectory planning method, such as... Figure 5 As shown, the method includes: Real-time acquisition of images of the welding area during the welding process.
[0021] Semantic segmentation of the welding area image was performed using a pre-trained U-NET neural network model to extract the location information of the weld during the welding process, resulting in multiple binary images containing the weld area.
[0022] A post-processing mechanism is used to perform connected component analysis on all binary images and determine the pixel area of each connected component. The connected component with the largest pixel area is identified as the main weld region image. The Canny edge detection algorithm is used to perform contour detection on the main weld region image to locate the complete geometric boundary of the weld and obtain the continuous contour features of the weld.
[0023] An adaptive midpoint method is used to process the continuous contour features of the weld to obtain the center path of the weld trajectory. Based on the center path of the weld trajectory, a reference guide line for the movement of the welding torch during the welding process is generated, thus obtaining a welding trajectory planning scheme.
[0024] Preferably, training the U-NET neural network model specifically includes: acquiring a set of historical welding process images and corresponding weld area recognition results. The historical welding process image set includes noisy images with welding noise and noise-free images. The noisy images and noise-free images are respectively input into the U-NET neural network model to obtain corresponding weld area prediction results. The U-NET neural network model is trained with the goal of minimizing the loss function between the weld area recognition results and the weld area prediction results, and maximizing the recognition accuracy of the U-NET neural network model, to obtain the trained U-NET neural network model.
[0025] Preferably, a pre-trained U-NET neural network model is used to perform semantic segmentation on the welding area image to extract the positional information of the weld during the welding process, resulting in multiple binary images containing the weld area. Specifically, the pre-trained U-NET neural network model includes an encoder, a decoder, and a convolutional layer connected in sequence. The encoder performs an upsampling operation on the welding area image to capture the contextual information of the weld area, obtaining initial features. The decoder performs a downsampling operation on the initial features to locate the boundary information of the weld area, obtaining intermediate features. The convolutional layer performs a convolution operation on the intermediate features to determine the category prediction result of each pixel in the welding area image, obtaining a semantic segmentation mask of the same size as the welding area image. The semantic segmentation mask is thresholded, marking the weld area as foreground (pixel value 1) and the non-weld area as background (pixel value 0), resulting in multiple binary images containing the weld area.
[0026] Preferably, a post-processing mechanism is used to perform connected component analysis on all binary images and determine the pixel area of each connected component. The connected component with the largest pixel area is identified as the main weld region image. Specifically, this includes: marking all interconnected weld pixel regions in all binary images and assigning a unique identifier to each independent connected component; determining the number of pixels contained in each connected component to obtain its pixel area, which represents the degree of completeness of the weld structure occupied by the connected component; and selecting the connected component with the largest pixel area as the effective main weld region, removing connected components outside the effective main weld region to obtain the main weld region image.
[0027] Preferably, the Canny edge detection algorithm is used to perform contour detection on the weld body region image to locate the complete geometric boundary of the weld body and obtain the continuous contour features of the weld. Specifically, this includes: smoothing the weld body region image using Gaussian filtering to remove Gaussian noise and obtain a noisy image; determining the gradient magnitude and gradient direction of each pixel in the noisy image using operators such as Sobel to obtain a preliminary edge image; comparing the local maxima of the gradient magnitude of the preliminary edge image along the gradient direction and retaining only pixels with large magnitudes in the gradient direction to obtain an intermediate edge image; retaining pixels in the intermediate edge image with gradient magnitudes higher than a high threshold and removing pixels with gradient magnitudes lower than a low threshold to obtain a final edge image; performing morphological closing operations on the final edge image to connect the horizontally broken contours in the final edge image to obtain a set of edge points; and performing B-spline curve interpolation on the set of edge points to generate a continuous and smooth curved weld trajectory, thus obtaining the continuous contour features of the weld.
[0028] Preferably, the adaptive midpoint method is used to process the continuous contour features of the weld to obtain the center path of the weld trajectory. Specifically, it includes: setting horizontal sampling lines at fixed pixel intervals along the extension direction of the weld; determining the center point of each interval in which each horizontal sampling line intersects with the continuous contour features; and using the line connecting the center points of all intervals as the center path of the weld trajectory.
[0029] Preferably, it further includes: smoothing after obtaining the center path of the weld trajectory, specifically including: if the angle between the lines connecting adjacent trajectory points in the center point path of the weld trajectory is within a set angle range, then the weld trajectory segment is determined to be a straight line, and redundant intermediate points in the weld trajectory segment are filtered out.
[0030] A specific embodiment of the present invention is provided: 1. Implementation process.
[0031] In the weld seam tracking process, image data of the welding area is first acquired using a laser binocular vision system (which includes an industrial camera and a line laser for projecting structured laser light). The captured images are then input into a pre-trained U-NET neural network model for semantic segmentation of the weld seam region. This model extracts features and generates pixel-level predictions through an encoder-decoder structure, processes the predictions using a Softmax function to obtain a probability distribution, and optimizes the segmentation results through connected component analysis and morphological operations, retaining the largest continuous region and applying angle constraints to filter out regions that do not conform to the orientation. Based on the segmented weld seam region, the Canny edge detection algorithm is further used to accurately extract the continuous contour features of the weld seam. Gaussian filtering is used to smooth noise, dual-threshold detection and hysteresis thresholding are used to determine the edges, and morphological closing operations are used to connect the horizontal fracture contours. Combined with B-spline interpolation smoothing, a continuous and smooth curve trajectory is generated. Finally, based on the contour features, an adaptive midpoint method is used to generate the center path of the weld seam trajectory, thus completing high-precision and robust welding trajectory planning.
[0032] Regarding the selection of visual sensing units, a laser binocular vision system is preferred as the image acquisition solution. This system consists of a high-performance monochrome industrial camera and a line laser. The laser projects structured laser light onto the weld seam identification area, while the industrial camera simultaneously acquires images of the light stripe contours formed by diffuse reflection on the workpiece surface. Precise weld seam positioning is achieved by analyzing the light stripe contours. This solution offers multiple technical advantages: line lasers are cost-effective, have a simple structure, high technological maturity, and excellent resistance to ambient light interference; the generated structured light stripes are highly distinctive in the image, facilitating efficient extraction of key visual information in subsequent processing, thereby significantly improving the accuracy and stability of weld seam detection. Industrial cameras such as Hikvision's MV-CA032-10GC can be selected to meet the requirements of high frame rate, high resolution, and strong environmental adaptability.
[0033] During the training phase of the U-NET neural network model, this invention uses image data containing real welding noise as the training set to enhance the model's robustness under complex real-world conditions. Specifically, the training set contains 100 welding process images, of which 65 images contain noise such as sparks and smoke, and 35 images are clear and noise-free, thus covering various welding scenarios from ideal to heavily disturbed conditions. Test results show that after 100 rounds of training, the model achieves a recognition accuracy of 99.31% on the test set, and can stably and accurately identify weld areas under various complex conditions, including clear, blurred, noise-free, weakly noisy, moderately noisy, and strongly noisy welds.
[0034] To further improve the reliability of the recognition results, this invention introduces an area-based post-processing mechanism after the neural network output. This mechanism calculates the pixel areas of all identified weld candidate regions, compares their sizes, and retains only the connected region with the largest area as the valid weld body. This method effectively filters out misidentified segments caused by noise interference, eliminates trajectory discontinuity problems, and accurately extracts the complete and continuous weld body trajectory, providing a stable and reliable data foundation for subsequent trajectory planning.
[0035] In the process of identifying the weld seam area using the U-NET neural network model, noise may be mistakenly identified as weld seam areas. The image processing steps involved in this situation are collectively referred to as post-processing. This involves optimizing the segmentation results through connected component analysis and morphological operations, preserving the largest continuous region to ensure that the identified weld seam is a continuous and complete entity. After identifying the complete and continuous weld seam, Canny edge detection is performed to detect the weld seam edges, and B-spline interpolation is used for smoothing to generate a continuous and smooth curve trajectory. Finally, an adaptive midpoint extraction method is used to extract the weld seam centerline. (The sequence can be viewed as: Input – Output – Post-processing – Canny edge detection and B-spline interpolation to draw the edge contour – Adaptive midpoint extraction).
[0036] After accurately identifying and post-processing the weld seam area, the system enters the trajectory planning stage. This scheme employs an algorithm based on "laterally equidistant midpoint selection" to generate the welding torch's movement path. Specifically, along the weld seam extension direction, the center point of the weld seam area is calculated at fixed pixel intervals on the corresponding lateral cross-section, and this point sequence serves as the reference trajectory for the welding torch's movement. To further optimize trajectory quality, an adaptive smoothing strategy based on angle discrimination is introduced. This strategy calculates the angle between the lines connecting adjacent trajectory points in real time. If the angle is close to a 180° angle, the trajectory segment is considered a straight line, and redundant midpoints are automatically filtered out. This effectively suppresses trajectory jitter caused by image noise or minor fluctuations in recognition, ensuring smooth movement of the welding torch on straight segments. After processing by this algorithm, the final generated trajectory point distribution exhibits intelligent adaptability: sparse distribution on straight segments and dense distribution at corners with significant curvature changes. This design not only significantly reduces the amount of trajectory data and the burden of subsequent control calculations but also greatly improves the smoothness of the welding torch's movement path and the stability of the overall welding process while maintaining tracking accuracy.
[0037] 2. Beneficial effects.
[0038] (1) It is accurate and efficient in identification and has a high degree of intelligence. By introducing a U-NET-based neural network model for weld semantic segmentation, end-to-end accurate identification of the weld region is achieved, avoiding the complex feature engineering design required by traditional algorithms. This method maintains a high recognition rate under various working conditions, significantly improving the accuracy and intelligence level of trajectory planning, and laying a solid foundation for high-quality automated welding.
[0039] (2) Significantly saves manpower and lowers the threshold for operation.
[0040] This device automates the entire process from identification and planning to welding, effectively overcoming the heavy reliance on skilled workers in traditional manual welding. This not only significantly reduces the labor intensity and skill requirements for welders, but also helps alleviate the labor shortage problem in the industry and improves overall operational efficiency.
[0041] (3) It has strong anti-interference ability and excellent system robustness.
[0042] The system employs a laser binocular vision sensing solution, combined with a neural network model trained on noisy data, effectively resisting interference from sparks, smoke, and changes in ambient light. Simultaneously, through a multi-level processing architecture of "neural network recognition + post-processing optimization + trajectory planning," the system can automatically filter out misidentifications, repair trajectory breaks, and generate smooth motion paths, demonstrating excellent adaptability and stability under abnormal operating conditions.
[0043] 3. Testing experiments.
[0044] To verify and demonstrate the superior performance of the U-NET neural network and its post-processing mechanism in real-world welding scenarios, a weld image dataset containing various complex conditions was constructed for system testing. This dataset covers multiple scenarios, including noise-free, low-noise, medium-noise, high-noise, and both clear and blurred welds, fully simulating interference factors that may be encountered in real-world welding environments. Figure 1 (a) Figure 1 (c) Figure 1 The input (e) in the model is trained on the aforementioned mixed dataset to obtain the U-NET neural network. The model can effectively perform semantic segmentation tasks, accurately identify weld seam regions and extract corresponding trajectories, and the output results are as follows: Figure 1 (b) Figure 1 (d) Figure 1 As shown in (f) of the figure, under the condition of a clear weld, the system can stably output a complete and accurate weld area regardless of the presence and intensity of noise interference. Furthermore, to evaluate the model's adaptability in more challenging fuzzy weld scenarios, the input is as follows... Figure 2 (i) Figure 2 (k) in Figure 2 The blurred weld image shown in (m) is as follows. Figure 2(j) in Figure 2 (l) in Figure 2 As shown in the output of (n), even under the adverse conditions of weld seam blurring caused by the superposition of weak, medium and strong noise levels, the neural network can still effectively identify and extract the target weld seam trajectory, demonstrating excellent environmental robustness.
[0045] In the post-processing stage of the recognition results, in order to verify its role in filtering out misidentifications and enhancing trajectory coherence, the output effects of unprocessed and post-processed results will be compared. Figure 3 (a) Figure 3 (c) Figure 3 (e) in the figure represents the recognition result without the introduction of a post-processing mechanism, which contains many misclassified regions; however, after introducing a post-processing mechanism based on the maximum connected component filtering, the system output is as follows: Figure 3 (b) Figure 3 (d) Figure 3 As shown in (f), the misidentified areas are effectively eliminated, and only the single connected region with the largest area is retained as the final weld trajectory, which significantly improves the accuracy and reliability of the identification results and lays a high-quality data foundation for subsequent trajectory planning.
[0046] During the trajectory planning phase, the adaptive smoothing strategy based on angle discrimination adopted in this solution effectively reduces the number of trajectory points while ensuring a high degree of fit between the trajectory and the weld area. For example... Figure 4 (b) Figure 4 (d) Figure 4 (f) in Figure 4 As shown in (h), compared to not introducing a smoothing strategy... Figure 4 (a) Figure 4 (c) Figure 4 (e) Figure 4 In section (g), the algorithm accurately selects representative trajectory points within the identified area and intelligently eliminates redundant points. In the visualization of the trajectory planning results, candidate trajectory pixels extracted along the weld seam are marked with blue dots, while the continuous red line segments represent the final welding motion trajectory generated after optimization by the adaptive smoothing algorithm. Testing showed that setting the lateral sampling interval to 15 pixels and filtering out redundant points when the angle between adjacent points is between 175° and 180° significantly improves the efficiency and quality of motion control by generating a smooth and efficient welding path with fewer trajectory points while maintaining trajectory accuracy.
[0047] Based on the same inventive concept, embodiments of the present invention also provide a welding trajectory planning system, the system comprising: The data acquisition module is used to acquire images of the welding area in real time during the welding process.
[0048] The semantic segmentation module is used to perform semantic segmentation on the welding area image using a pre-trained U-NET neural network model to extract the position information of the weld during the welding process and obtain multiple binary images containing the weld area.
[0049] The contour extraction module performs connected component analysis on all binary images using a post-processing mechanism, determines the pixel area of each connected component, and identifies the connected component with the largest pixel area as the main weld region image. The Canny edge detection algorithm is then used to perform contour detection on the main weld region image to locate the complete geometric boundary of the weld and obtain the continuous contour features of the weld.
[0050] The trajectory planning module is used to process the continuous contour features of the weld using an adaptive midpoint method to obtain the center path of the weld trajectory, and to generate a reference guide line for the movement of the welding torch during the welding process based on the center path of the weld trajectory, thus obtaining a welding trajectory planning scheme.
[0051] The embodiments described above are merely examples of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.
Claims
1. A welding trajectory planning method, characterized in that, include: Real-time acquisition of images of the welding area during the welding process; Semantic segmentation of the welding area image is performed using a pre-trained U-NET neural network model to extract the location information of the weld during the welding process, resulting in multiple binary images containing the weld area. A post-processing mechanism is used to perform connected component analysis on all binary images and determine the pixel area of each connected component. The connected component with the largest pixel area is identified as the main weld area image. The Canny edge detection algorithm is used to perform contour detection on the main weld area image to locate the complete geometric boundary of the main weld and obtain the continuous contour features of the weld. An adaptive midpoint method is used to process the continuous contour features of the weld to obtain the center path of the weld trajectory. Based on the center path of the weld trajectory, a reference guide line for the movement of the welding torch during the welding process is generated to obtain a welding trajectory planning scheme. Specifically, the Canny edge detection algorithm is used to perform contour detection on the weld body region image to locate the complete geometric boundary of the weld body and obtain the continuous contour features of the weld. The main area image of the weld seam is smoothed by Gaussian filtering to remove Gaussian noise, resulting in a noisy image. The gradient magnitude and direction of each pixel in the noisy image are determined using operators such as Sobel, yielding a preliminary edge image. Local maxima comparisons are performed on the gradient magnitudes of the preliminary edge image along the gradient direction, retaining only pixels with large gradient magnitudes to obtain an intermediate edge image. Pixels with gradient magnitudes higher than a high threshold in the intermediate edge image are retained, while pixels with gradient magnitudes lower than a low threshold are removed, resulting in the final edge image. Morphological closing operations are performed on the final edge image to connect the horizontally broken contours, obtaining a set of edge points. B-spline curve interpolation is then performed on the edge point set to generate a continuous and smooth curved weld seam trajectory, yielding the continuous contour features of the weld seam. The method of using an adaptive midpoint method to process the continuous contour features of the weld to obtain the center path of the weld trajectory specifically includes: setting horizontal sampling lines at fixed pixel intervals along the extension direction of the weld; determining the center point of each interval in which the horizontal sampling lines intersect with the continuous contour features; and using the line connecting the center points of all intervals as the center path of the weld trajectory. After obtaining the center path of the weld trajectory, smoothing is performed, specifically including: if the angle between the lines connecting adjacent trajectory points in the center point path of the weld trajectory is within a set angle range, then the weld trajectory segment is determined to be a straight line, and redundant intermediate points in the weld trajectory segment are filtered out.
2. The welding trajectory planning method as described in claim 1, characterized in that, Training the U-NET neural network model specifically includes: Acquire a set of historical welding process images and corresponding weld area recognition results. The set of historical welding process images includes: noisy images with welding noise and no noise images. The noisy image and the noise-free image are respectively input into the U-NET neural network model to obtain the corresponding weld area prediction results; With the goal of minimizing the loss function between the weld area identification result and the weld area prediction result and maximizing the identification accuracy of the U-NET neural network model, the U-NET neural network model is trained to obtain the trained U-NET neural network model.
3. The welding trajectory planning method as described in claim 1, characterized in that, The step involves semantic segmentation of the welding area image using a pre-trained U-NET neural network model to extract the location information of the weld seam during the welding process, resulting in multiple binary images containing the weld seam area. Specifically, this includes: The pre-trained U-NET neural network model includes: an encoder, a decoder, and a convolutional layer connected in sequence; The encoder performs an upsampling operation on the welding area image to capture the contextual information of the weld area and obtain initial features; The decoder performs a downsampling operation on the initial features to locate the boundary information of the weld area and obtain intermediate features; The intermediate features are convolved by the convolutional layer to determine the category prediction results of each pixel in the welding area image, and a semantic segmentation mask with the same size as the welding area image is obtained. Thresholding is applied to the semantic segmentation mask to mark the weld seam area as the foreground and the non-weld seam area as the background, resulting in multiple binary images containing the weld seam area.
4. The welding trajectory planning method as described in claim 1, characterized in that, The post-processing mechanism performs connected component analysis on all binary images and determines the pixel area of each connected component. The connected component with the largest pixel area is identified as the main weld area image. Specifically, this includes: Mark all interconnected weld pixel regions in all binary images and assign a unique identifier to each independent connected region; The number of pixels contained in each connected component is determined to obtain the pixel area of the connected component, which represents the degree of integrity of the weld structure occupied by the connected component. The connected region with the largest pixel area is taken as the effective main weld area, and the connected regions outside the effective main weld area are removed to obtain the main weld area image.
5. A welding trajectory planning system based on the method of any one of claims 1-4, characterized in that, include: The data acquisition module is used to acquire images of the welding area in real time during the welding process; The semantic segmentation module is used to perform semantic segmentation on the welding area image using a pre-trained U-NET neural network model to extract the location information of the weld during the welding process and obtain multiple binary images containing the weld area. The contour extraction module is used to perform connected component analysis on all binary images using a post-processing mechanism, and determine the pixel area of each connected component. The connected component with the largest pixel area is identified as the main weld area image. The Canny edge detection algorithm is used to perform contour detection on the main weld area image to locate the complete geometric boundary of the main weld and obtain the continuous contour features of the weld. The trajectory planning module is used to process the continuous contour features of the weld using an adaptive midpoint method to obtain the center path of the weld trajectory, and to generate a reference guide line for the movement of the welding torch during the welding process based on the center path of the weld trajectory, thus obtaining a welding trajectory planning scheme.
Citation Information
Patent Citations
Weld joint tracking system based on image recognition and optimization method thereof
CN109483017A
Welding seam track extraction method based on red line laser
CN112381783A