Welding track correction method and equipment thereof

By acquiring weld seam images in real time during the welding process and using an incremental PID algorithm to adjust the welding head position, the accuracy problem caused by assembly errors during welding was solved, and high-precision welding was achieved.

CN120901462APending Publication Date: 2025-11-07GUANGDONG MIDEA ELECTRIC CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511397161.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-26
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

In existing technologies, during welding, assembly errors in the workpiece can cause the predefined trajectory to fail to match the actual weld seam with high precision, resulting in decreased welding accuracy or even failure, causing economic losses.

Method used

A camera in a friction stir welding system is used to acquire real-time images of the weld seam around the tip of the welding head. A binary image is obtained through a weld seam segmentation model, the offset distance is calculated, and an incremental PID algorithm is used to adjust the position of the welding head to achieve adaptive correction of the welding path.

Benefits of technology

Improve welding precision, ensure that the welding path is precisely aligned with the actual weld, improve welding quality, and avoid processing failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120901462A_ABST
    Figure CN120901462A_ABST
Patent Text Reader

Abstract

The invention discloses a welding track correction method and equipment thereof. The equipment comprises a friction stir welding system, a computer readable storage medium and a computer program product. The welding track correction method is applied to the friction stir welding system, and the friction stir welding system comprises a camera and a welding head. The welding track correction method comprises the steps that in the welding process, a camera is used for obtaining a welding seam image of a to-be-welded workpiece within a preset area range around the tip of a welding head in real time; inputting the welding seam image into a welding seam segmentation model to obtain a welding seam binary image; calculating the actual offset distance of the weld joint relative to the tip of the welding head based on the weld joint binary image; and the horizontal position of the tip of the welding head is correspondingly adjusted based on the actual offset distance. According to the welding track correction method, the horizontal position of the welding head can be adjusted in real time in a self-adaptive mode according to the installation error of the workpiece, it is ensured that the welding path is accurately aligned with the actual welding seam, and the purpose of improving the welding precision is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of industrial guided processing, in particular to a welding trajectory correction method and device thereof. BACKGROUND

[0002] In the field of industrial guided processing, such as typical application scenarios of welding, gluing, etc., high-precision trajectory recognition and tracking technology has important engineering value. Taking the welding process as an example, with the emergence of robot welding method, the welding production efficiency is greatly improved, at the same time, the welding flexibility is obviously increased, and the welding cost is also reduced, which has important promoting effect on the rapid development of welding field. However, in the prior art, when welding a weld, a predefined trajectory is usually used to perform a weld welding operation, but when the workpiece is replaced during repeated processing of the workpiece, assembly error will occur, and the assembly temperature difference will cause the predefined trajectory to not match the real weld with high precision. If the predefined trajectory is continued to be used for processing, not only the processing precision of welding will be significantly reduced, but also serious problems such as processing failure may be caused, thereby causing economic loss. SUMMARY

[0003] In order to solve the above problems, the present application provides a welding trajectory correction method and device thereof, which aims to solve the above problems.

[0004] To solve the above technical problems, one technical solution adopted by the present application is to provide a welding trajectory correction method, which is applied to a friction stir welding system, and the friction stir welding system includes a camera and a welding head. The welding trajectory correction method comprises: in the welding process, using the camera to acquire a weld image of a workpiece to be welded within a preset area range around the tip of the welding head in real time; inputting the weld image into a weld segmentation model to obtain a binary weld image; calculating the actual offset distance of the weld relative to the tip of the welding head based on the binary weld image; and adjusting the horizontal position of the tip of the welding head based on the actual offset distance.

[0005] The step of acquiring the weld image of the workpiece to be welded within the preset area range around the tip of the welding head in real time by using the camera comprises: acquiring a shooting image collected by the camera, and extracting the pixel coordinates of the tip of the welding head in the shooting image; taking the pixel coordinates as the center point of the upper edge of the preset area, and cutting the target area of the shooting image to obtain the weld image of the workpiece to be welded.

[0006] The step of calculating the actual offset distance of the weld relative to the tip of the welding head based on the binary weld image comprises: extracting, based on the binary weld image, an upper endpoint coordinate of the weld intersecting the binary weld image; calculating a pixel distance between the upper endpoint coordinate and a center point coordinate of an upper boundary of the binary weld image; and calculating, based on the pixel distance and a pre-calibrated pixel resolution, the actual offset distance of the weld relative to the tip of the welding head.

[0007] The welding trajectory correction method further comprises, before the step of calculating the actual offset distance of the weld relative to the tip of the welding head based on the binary weld image: determining whether there is a situation of local weld invisibility in the binary weld image; in response to the situation of local weld invisibility, reconstructing a complete weld based on the weld in the observable area using a polynomial fitting method; and in response to the absence of the situation of local weld invisibility, performing the step of calculating the actual offset distance of the weld relative to the tip of the welding head based on the binary weld image.

[0008] The step of adjusting the horizontal position of the tip of the welding head based on the actual offset distance comprises: using an incremental PID algorithm to process the actual offset distance in real time to obtain an error control signal; and adjusting the horizontal position of the tip of the welding head based on the error control signal.

[0009] The step of processing the actual offset distance using the incremental PID to obtain the error signal comprises: obtaining a proportional coefficient, an integral coefficient and a differential coefficient of the incremental PID algorithm; obtaining two historical actual offset distances calculated in the previous two control periods; and calculating, based on the proportional coefficient, the integral coefficient, the differential coefficient, the two historical actual offset distances and the actual offset distance in the current control period, to obtain the error control signal.

[0010] The welding trajectory correction method further comprises, before the step of inputting the weld image into the weld segmentation model to obtain the binary weld image: obtaining training data of the weld segmentation model; and training the weld segmentation model based on the training data.

[0011] To solve the above technical problems, another technical solution adopted by the present application is to provide a friction stir welding system, which comprises a camera, a welding head, a workbench and a controller. The camera and the welding head are rigidly fixedly connected, the workpiece to be welded is arranged on the workbench, the camera faces the welding head and is used to capture the working process of the welding head during the welding process, and the controller is in communication connection with the welding head and the camera and is used to execute the welding trajectory correction method of any one of the above.

[0012] To solve the above technical problems, another technical solution adopted by the present application is to provide a computer readable storage medium, which internally stores program instructions. The program instructions are executed by a processor to implement the welding trajectory correction method of any one of the above.

[0013] To solve the above technical problems, another technical solution adopted by the present application is to provide a computer program product, wherein the computer program is executed by a processor to implement the welding trajectory correction method of any one of the above.

[0014] The beneficial effects of the present application are: different from the prior art, the welding trajectory correction method of the present application comprises: in the welding process, the camera is used to acquire the weld image of the workpiece to be welded in the preset area range around the welding head tip in real time; the weld image is input into the weld segmentation model to obtain a weld binary image; the actual offset distance of the weld relative to the welding head tip is calculated based on the weld binary image; and the horizontal position of the welding head tip is adjusted accordingly based on the actual offset distance. In the above manner, the welding trajectory correction method of the present application can adaptively adjust the horizontal position of the welding head in real time according to the installation error of the workpiece, ensure that the welding path is accurately aligned with the actual weld, and achieve the purpose of improving the welding precision. BRIEF DESCRIPTION OF DRAWINGS

[0015] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present application and, together with the specification, serve to explain the technical solutions of the present application.

[0016] Figure 1 is a flowchart of the welding trajectory correction method according to the first embodiment of the present application; Figure 2 is a schematic diagram of an embodiment of the camera image according to the present application; Figure 3 is a schematic diagram of an embodiment of the weld binary image according to the present application; Figure 4 is Figure 1 is a flowchart of a specific embodiment of step S101 in Figure 5 is a schematic diagram of the weld image obtained by cropping according to an embodiment of the present application; Figure 6 is Figure 1 is a flowchart of a specific embodiment of step S103 in Figure 7 is Figure 1 is a flowchart of a specific embodiment of step S104 in Figure 8 is Figure 7 is a flowchart of a specific embodiment of step S401 in Figure 9 is a flowchart of the welding trajectory correction method according to the second embodiment of the present application; Figure 10is a process schematic diagram of an embodiment of the reestablished completed weld provided by the present application; Figure 11 is a flow schematic diagram of a third embodiment of the welding trajectory correction method provided by the present application; Figure 12 is a schematic diagram of an embodiment of the training data provided by the present application; Figure 13 is a visual error recording schematic diagram of the welding trajectory correction method provided by the present application in the welding process; Figure 14 is a visual correction comparison schematic diagram of the welding trajectory correction method and the pre-trajectory method provided by the present application; Figure 15 is a structural schematic diagram of an embodiment of the friction stir welding system provided by the present application; Figure 16 is an application schematic diagram of the friction stir welding system provided by the present application; Figure 17 is a structural schematic diagram of an embodiment of the computer-readable storage medium provided by the present application. DETAILED DESCRIPTION

[0017] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.

[0018] In the field of industrial guided processing, such as typical application scenarios of welding, gluing, etc., high-precision trajectory recognition and tracking technology has important engineering value. Taking the welding process as an example, with the emergence of robot welding method, the welding production efficiency is greatly improved, at the same time, the welding flexibility is obviously increased, and the welding cost is also reduced, which has important promoting effect on the rapid development of welding field. However, in the prior art, when welding a weld, a pre-defined trajectory is usually used to perform a weld joint welding operation, but when the workpiece is replaced during repeated processing of the workpiece, assembly error will occur, and the assembly temperature difference will cause the pre-defined trajectory to not match the real weld joint with high precision. If the pre-defined trajectory is continued to be used for processing, not only the processing precision of the welding will be significantly reduced, but also serious problems such as processing failure may be caused, thereby causing economic loss.

[0019] In order to solve the above problems, the present application first proposes a welding trajectory correction method, please refer to Figure 1 , Figure 1is a flowchart of a first embodiment of the welding trajectory correction method provided by the present application. In the present embodiment, the welding trajectory correction method of the present embodiment is applied to a friction stir welding system, which includes a camera and a welding head. As shown in Figure 1 the present embodiment, the welding trajectory correction method of the present embodiment specifically includes steps S101 to S104: Step S101: During the welding process, the camera is used to acquire a weld image of the workpiece to be welded within a preset area range around the tip of the welding head in real time.

[0020] In the present embodiment, the camera of the present embodiment is fixedly and rigidly connected with the welding head. Please refer to Figure 2 , Figure 2 is a schematic diagram of an embodiment of the image captured by the camera provided by the present application. As shown in Figure 2 , since the camera is fixedly and rigidly connected with the welding head, the position of the tip of the welding head is always located at the center position in the image captured by the camera during the welding process.

[0021] Therefore, during the welding process, the present embodiment can crop the real-time image captured by the camera, so as to acquire the weld image of the workpiece to be welded within the preset area range around the tip of the welding head. In other embodiments, the real-time image captured by the camera can also be cropped every preset time, so as to acquire the weld image of the workpiece to be welded within the preset area range around the tip of the welding head, which is not limited herein.

[0022] In the present embodiment, the preset size can be set based on actual conditions, which is not limited herein. In addition, the specific steps of acquiring the weld image of the workpiece to be welded within the preset area range around the tip of the welding head are described below, which will not be described in detail herein.

[0023] Step S102: Input the weld image into a weld segmentation model to acquire a weld binary image.

[0024] After the weld image described above is acquired in real time, the present embodiment can input the weld image into the trained weld segmentation model, so as to acquire a weld binary image. Please refer to Figure 3 , Figure 3 is a schematic diagram of an embodiment of the weld binary image provided by the present application. As shown in Figure 3 , in the output weld binary image, the weld position is a white area, and the non-weld position is a black area.

[0025] In the present embodiment, the weld segmentation model of the present embodiment includes but is not limited to a Mask region convolutional neural network model, a yolo instance segmentation model and a U-shaped convolutional neural network.

[0026] Step S103: calculating the actual offset distance of the welding seam relative to the welding head tip based on the welding seam binary image.

[0027] As described above, since the camera and the welding head are rigidly fixed, the requirement of keeping the welding head on the welding seam can be approximated as ensuring that the upper endpoint of the intersection of the welding seam and the upper edge of the welding seam binary image is at the center of the upper edge of the image. After obtaining the welding seam binary image, the actual offset distance of the welding seam relative to the welding head tip can be calculated based on the pixel distance of the upper endpoint of the intersection of the welding seam and the upper edge of the welding seam binary image from the center point of the upper edge of the welding seam binary image. The specific calculation process is described below and will not be described in detail here.

[0028] Step S104: adjusting the horizontal position of the welding head tip based on the actual offset distance.

[0029] After obtaining the actual offset distance between the welding head tip and the welding seam, the horizontal position of the welding head tip can be adjusted based on the actual offset distance, so that the welding seam is always kept at the center of the image, and the welding head tip follows the welding seam in the horizontal position at all times. The specific adjustment process is described below and will not be described in detail here.

[0030] Unlike the prior art, the welding trajectory correction method of the present application includes: during welding, using a camera to obtain a welding seam image of a workpiece to be welded within a predetermined area around the welding head tip in real time; inputting the welding seam image into a welding seam segmentation model to obtain a welding seam binary image; calculating the actual offset distance of the welding seam relative to the welding head tip based on the welding seam binary image; and adjusting the horizontal position of the welding head tip based on the actual offset distance. In this way, the welding trajectory correction method of the present application can adaptively adjust the horizontal position of the welding head in real time according to the installation error of the workpiece, ensure that the welding path is accurately aligned with the actual welding seam, and achieve the purpose of improving welding precision.

[0031] Optionally, based on the above embodiments, please refer to Figure 4 , Figure 4 is Figure 1 the flowchart of a specific embodiment of step S101. This embodiment can implement step S101 by the method shown in Figure 4 , specifically including steps S201 to S202: Step S201: obtaining a captured image collected by a camera and extracting the pixel coordinates of the welding head tip in the captured image.

[0032] In this embodiment, when obtaining a captured image collected by a camera as shown in Figure 2 , the pixel coordinates of the welding head tip in the captured image can be extracted, denoted as ctr=[ctr_x,ctr_y].

[0033] Step S202: Taking the pixel coordinate of the upper edge center point of the preset region as the target region of the captured image to obtain the weld image of the workpiece to be welded.

[0034] Please refer to Figure 5 , Figure 5 is an embodiment of the welding head provided by the present application. As shown in the figure Figure 5 , the pixel coordinate of the tip of the welding head is taken as the upper edge center point of the preset region, and the target region of the captured image is cut off to obtain the weld image of the workpiece to be welded. In this embodiment, the size of the cut-off weld image can be set to 256*256, and in other embodiments, the size of the cut-off weld image can also be set based on actual conditions, which is not limited here.

[0035] In the above manner, the present embodiment can significantly improve the real-time performance and accuracy of weld recognition by accurately positioning the tip of the welding head and dynamically cutting off the key region image.

[0036] Optionally, based on the above embodiment, please refer to Figure 6 , Figure 6 is a flowchart of a specific embodiment of step S103 in Figure 1 . The present embodiment can implement step S103 by the method shown in Figure 3 , which specifically includes steps S301 to S303: Step S301: Based on the weld binary image, the upper endpoint coordinates of the intersection of the weld and the weld binary image are extracted.

[0037] After the weld image is input into the weld segmentation model, the weld binary image can be obtained, and after the weld binary image is obtained, the upper endpoint coordinates of the intersection of the weld and the weld binary image can be extracted.

[0038] In this embodiment, if the weld and the weld binary image have no upper endpoint intersection, the coordinates of the upper endpoint can be fitted from the observable weld. The specific fitting method is described below.

[0039] Step S302: Calculate the pixel distance between the upper endpoint coordinates and the upper boundary center point coordinates of the weld binary image.

[0040] After obtaining the upper endpoint coordinates P, the pixel distance between the upper endpoint coordinates P and the upper boundary center point coordinates of the weld binary image can be calculated based on the upper endpoint coordinates P and the upper boundary center point coordinates of the weld binary image.

[0041] Step S303: Based on the pixel distance and the pre-calibrated pixel resolution calculation, the actual offset distance of the weld relative to the tip of the welding head is obtained.

[0042] As described above, since the camera and the welding head are rigidly fixed, the requirement of keeping the welding head on the weld can be approximated as ensuring that the upper endpoint of the weld intersecting the upper edge of the binary image of the weld is at the center of the upper edge of the image. At this time, the pixel resolution of the camera can be pre-calibrated in advance. After obtaining the pre-calibrated pixel resolution, the actual offset distance of the weld relative to the tip of the welding head can be calculated based on the pixel distance and the pre-calibrated pixel resolution.

[0043] In the above manner, the present embodiment can reflect the horizontal offset of the weld in the image by extracting the upper endpoint coordinates, and can directly obtain the horizontal displacement amount that the welding head needs to adjust by calculating the pixel distance and converting it into the actual distance. In addition, the present embodiment can eliminate the measurement error caused by image distortion by combining pixel resolution calibration, thereby improving positioning accuracy.

[0044] Alternatively, based on the above embodiment, please refer to Figure 7 , Figure 7 is Figure 1 a flowchart of a specific embodiment of step S104 in the method. The present embodiment can implement step S104 by the method as shown in Figure 7 , and specifically includes steps S401 to S402: Step S401: Real-time processing of the actual offset distance is performed using an incremental PID algorithm to obtain an error control signal.

[0045] After obtaining the actual offset distance of the weld relative to the tip of the welding head, the present embodiment can perform real-time processing of the actual offset distance using an incremental PID algorithm to obtain an error control signal. The specific processing method is described below.

[0046] Step S402: Adjust the horizontal position of the tip of the welding head based on the error control signal.

[0047] After obtaining the error control signal based on the incremental PID algorithm, the error control signal can be sent to the control mechanism of the welding head through a communication system to adjust the horizontal position of the tip of the welding head. In the present embodiment, the communication of the present embodiment can be RSI communication, and in other embodiments, other communication methods can also be used, which are not limited herein. In addition, the error control signal of the present embodiment only adjusts the horizontal position offset of the tip of the welding head. The vertical direction of the tip of the welding head is controlled by the force control sensor and is not controlled by the error control signal.

[0048] Alternatively, based on the embodiment of Figure 7 , please refer to Figure 8 , Figure 8 is Figure 7 a flowchart of a specific embodiment of step S401 in the method. The present embodiment can implement step S401 by the method as shown in Figure 8The method shown realizes step S401, and specifically includes steps S501 to S503. Step S501: Obtain the proportional coefficient, integral coefficient, and differential coefficient of the incremental PID algorithm.

[0049] When processing the actual offset distance of the current period An incremental PID algorithm is needed, and the proportional coefficient P, integral coefficient I, and differential coefficient D of the incremental PID algorithm are first obtained.

[0050] Step S502: Obtain two historical actual offset distances calculated in the previous two control periods.

[0051] After obtaining the proportional coefficient P, integral coefficient I, and differential coefficient D of the incremental PID algorithm, two historical actual offset distances calculated in the previous two control periods are obtained, and are denoted as , .

[0052] Step S503: Calculate the error control signal based on the proportional coefficient, integral coefficient, differential coefficient, two historical actual offset distances, and actual offset distance of the current control period.

[0053] At this time, the error control signal can be obtained by calculating the proportional coefficient, integral coefficient, differential coefficient, two historical actual offset distances, and actual offset distance of the current control period . The calculation formula is as follows:

[0054] wherein, is the error control signal; P, I, and D respectively represent the proportional coefficient, integral coefficient, and differential coefficient; is the actual offset distance of the current period, is the historical actual offset distance of the previous period, is the historical actual offset distance of the previous two periods.

[0055] In the foregoing manner, the actual offset distance is processed by using the incremental PID algorithm, so that dynamic and real-time correction of the welding track can be realized. The proportional coefficient, integral coefficient, and differential coefficient work together to make the system maintain rapid response characteristics and good stability, and the introduction of the historical actual offset distance enhances the prediction ability of the incremental PID algorithm for the change trend.

[0056] Optionally, based on all the embodiments described above, please refer to Figure 9 , Figure 9 is a flowchart of a second embodiment of the welding track correction method provided in the present application. As shown inFigure 9 As shown, the welding track correction method of the embodiment specifically includes steps S601 to S606: Step S601: In the welding process, the weld seam image of the workpiece to be welded within the preset area range around the welding head tip is acquired in real time by using the camera.

[0057] Step S601 is consistent with step S101, and will not be described here again.

[0058] Step S602: The weld seam image is input into the weld seam segmentation model to obtain a weld seam binary image.

[0059] Step S602 is consistent with step S102, and will not be described here again.

[0060] Step S603: It is judged whether there is a situation of local weld seam invisibility in the weld seam binary image.

[0061] In the embodiment, after the weld seam binary image is acquired, it is also necessary to judge whether there is a situation of local weld seam invisibility in the weld seam binary image. Because in actual application, there may be a situation that the accumulation of welding spatter causes part of the weld seam to be invisible in the weld seam binary image. In this case, the upper endpoint of the weld seam intersecting with the weld seam binary image cannot be obtained. Therefore, the weld seam in this case needs to be fitted and compensated to obtain the upper endpoint.

[0062] In response to the situation of local weld seam invisibility, step S604 is performed; in response to the absence of the situation of local weld seam invisibility, step S605 is performed.

[0063] Step S604: The complete weld seam is reconstructed based on the observable area using a polynomial fitting method.

[0064] When the acquired weld seam binary image has the situation of local weld seam invisibility, the complete weld seam needs to be reconstructed based on the observable area using a polynomial fitting method, and after the complete weld seam is reconstructed, the step of extracting the upper endpoint of the weld seam intersecting with the weld seam binary image described above can be performed.

[0065] In the embodiment, the third-order polynomial can be used to generate the coordinates of the upper endpoint of the weld seam intersecting with the weld seam binary image from the observable weld seam. In other embodiments, other methods can be used to reconstruct the complete weld seam, which is not limited here.

[0066] In an application scenario, please refer to Figure 10 , Figure 10 is a process schematic diagram of an embodiment of the complete weld seam reconstruction provided by the present application. Figure 10 (a) in is a schematic diagram of the weld seam image input into the weld seam segmentation model; Figure 10(b) in FIG. 1 is a schematic view of a weld binary image output by the weld segmentation model; Figure 10 (c) in FIG. 1 is a schematic view of a weld binary image with complete welds reconstructed by the polynomial fitting method of the embodiment.

[0067] In the embodiment, the embodiment effectively solves the problem of local weld missing caused by weld spatter shielding or image noise by identifying the weld visibility state in advance, and ensures that complete weld information can still be obtained under complex working conditions. Moreover, the weld contour reconstructed by the polynomial fitting method can maintain the continuity of geometric features, so that the offset calculation result is closer to the true value.

[0068] Step S605: Calculate the actual offset distance of the weld relative to the tip of the welding head based on the weld binary image.

[0069] Step S605 is consistent with step S103, and will not be described here.

[0070] Step S606: Adjust the horizontal position of the tip of the welding head based on the actual offset distance.

[0071] Step S606 is consistent with step S104, and will not be described here.

[0072] Optionally, based on all the above embodiments, please refer to Figure 11 , Figure 11 is a flowchart of a third embodiment of the welding trajectory correction method provided by the present application. As shown in Figure 11 , the welding trajectory correction method of the embodiment further includes steps S701 to S702 before step S102 of the foregoing embodiment or step S602 of the foregoing embodiment: Step S701: Obtain training data of the weld segmentation model.

[0073] In the embodiment, the weld segmentation model needs to be trained before the weld image is input into the weld segmentation model, and the training process is an offline training phase. In the embodiment, in the offline training phase, the training data of the weld segmentation model needs to be obtained first. Please refer to Figure 12 , Figure 12 is a schematic view of an embodiment of training data provided by the present application, Figure 12 the left image is a weld image of a workpiece, Figure 12 the left image is a weld annotation image corresponding to the weld image. In the embodiment, a plurality of sets of training data as shown in Figure 12 need to be collected.

[0074] Step S702: Train the weld segmentation model based on the training data.

[0075] After obtaining a plurality of sets of training data as shown in Figure 12After the training data is shown, the weld seam segmentation model can be trained based on the above training data until the weld seam segmentation model generates a corresponding weld seam binary image when a weld seam image containing a weld seam region is input.

[0076] In an application scenario, please refer to Figure 13 and Figure 14 , Figure 13 is a visual error recording schematic diagram of the welding trajectory correction method provided by the present application in the welding process; Figure 14 is a visual correction comparison schematic diagram of the welding trajectory correction method provided by the present application and the pre-trace method. As shown in Figure 13 , the standard deviation of the weld seam error in the welding process of the welding trajectory correction method of the present application is about 0.25 mm; as shown in Figure 14 , under the control of the traditional pre-trace method, the error standard deviation of the weld seam in the welding process is 1.36 mm, and the maximum deviation reaches 5 mm; and the welding trajectory correction method of the present application, the error standard deviation of the weld seam in the welding process is 0.22 mm, and the maximum error is about 1 mm. It can be seen that compared with the traditional pre-trace method, the welding trajectory correction method of the present application can significantly improve the precision of welding.

[0077] Optionally, the present application further provides a friction stir welding system, please refer to Figure 15 and Figure 16 , Figure 15 is a structural schematic diagram of an embodiment of the friction stir welding system provided by the present application; Figure 16 is an application schematic diagram of the friction stir welding system provided by the present application. As shown in Figure 15 and Figure 16 , the friction stir welding system 100 of the embodiment includes a camera 10, a welding head 20, a workbench 40 and a controller 50, the camera 10 and the welding head 20 are rigidly fixedly connected, the workpiece to be welded 30 is arranged on the workbench 40, the camera 10 faces the welding head 20, and is used for shooting the working process of the welding head 20 in the welding process. The controller 50 is in communication connection with the welding head 20 and the camera 10 respectively, and is used for executing the welding trajectory correction method of any one of the above.

[0078] Optionally, the present application further provides a computer readable storage medium. Please refer to Figure 17 , Figure 17 is a structural schematic diagram of an embodiment of the computer readable storage medium provided by the present application.

[0079] The computer readable storage medium 300 of the embodiment of the present application internally stores program instructions 310, and the program instructions 310 are executed by a processor to implement the welding trajectory correction method of any one of the above embodiments.

[0080] The program instructions 310 can form a program file stored in the above-mentioned storage medium in the form of a software product, so that an electronic device (which can be a personal computer, a server, or a network device, etc.) or a processor executes all or part of the steps of the method of each embodiment of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes, or a computer, a server, a mobile phone, a tablet, and other terminal devices.

[0081] The computer readable storage medium 300 of the embodiment can be, but is not limited to, a U disk, an SD card, a PD optical drive, a mobile hard disk, a large-capacity floppy disk drive, a flash memory, a multimedia memory card, a server, etc.

[0082] In one embodiment, a computer program product or computer program is provided, which includes a computer program that, when executed by a controller, can implement the steps of the method described in any of the preceding embodiments. Specifically, the computer program product can be a software or program product containing a computer program that can be run on a computing device or stored in any available medium, which can be a software or program product.

[0083] In addition, the above-mentioned functions, if implemented in the form of software functions and sold or used as independent products, can be stored in a mobile terminal readable storage medium, that is, the present application also provides a storage device storing program data, which can be executed to implement the method of the above-mentioned embodiments, and the storage device can be, for example, a U disk, an optical disk, a server, etc. That is, the present application can be embodied in the form of a software product, which includes a plurality of instructions for causing an intelligent terminal to execute all or part of the steps of each embodiment method.

[0084] In addition, the terms "first", "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined as "first", "second" can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "a plurality of" is at least two, for example, two, three, etc., unless otherwise specifically limited.

[0085] Any processes or methods described in the flowcharts or otherwise described herein can be understood as representing a sequence of steps, or a set of steps, of executable instructions for achieving a particular logic function or process, and the scope of preferred embodiments of the present application encompasses other implementations that can not be precisely shown or described herein, including implementations involving the performance of functions in a different order, in substantially simultaneous fashion, or in reverse order, as appropriate, and as would be understood by one of ordinary skill in the art of the embodiments described herein.

[0086] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a list of steps to be executed in a particular order, and can be embodied in any computer-readable medium that includes executable instructions for execution by a computer, server, network device or other system that can fetch and execute instructions from the computer-readable medium, or in conjunction with such an instruction execution system. For the purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer-readable medium can specifically include a transmission line, a wired or wireless access network, or in other means fabricated or manufactured with a particular finite persistency of form, and a computer program product. More specific examples (a non-exhaustive list) of the computer-readable medium can include the following: an electrical connection (electronic) having one or more wires, a portable computer diskette (magnetic), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium can even be paper or another suitable medium upon which the program can be printed, as the program can be electronically captured, for example, via an optical scanner, then compiled, interpreted, or otherwise processed, and stored in a computer memory in a form that can be later executed by a computer. In some embodiments, the computer-readable medium can be a transmission line, a carrier wave, a signal, or a computer program product, including a computer readable medium that can be wired, wireless, or a combination thereof. The computer program product can include a computer readable medium, such as one that can be devised to store program instructions (e.g., software) for execution by the computer, server, network device, or other system.

[0087] The above is only the embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent flow transformation using the content of the specification and drawings of the present application, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method of weld track correction, characterized by, The application is applied to a friction stir welding system, the friction stir welding system comprising a camera and a welding head; The welding track correction method comprises: During the welding process, the camera is used to acquire a weld seam image of a workpiece to be welded within a preset area range around the welding head tip in real time; The weld seam image is input into a weld seam segmentation model to obtain a weld seam binary image; The actual offset distance of the weld seam relative to the welding head tip is calculated based on the weld seam binary image; The horizontal position of the welding head tip is adjusted based on the actual offset distance.

2. The weld trajectory correction method of claim 1, wherein, The step of acquiring the weld seam image of the workpiece to be welded within the preset area range around the welding head tip in real time by using the camera comprises: A shooting image captured by the camera is acquired, and a pixel coordinate of the welding head tip in the shooting image is extracted; The shooting image is cropped to obtain the weld seam image of the workpiece to be welded by taking the pixel coordinate as the upper edge center point of the preset area.

3. The weld trajectory correction method of claim 1, wherein, The step of calculating the actual offset distance of the weld seam relative to the welding head tip based on the weld seam binary image comprises: Based on the weld seam binary image, an upper endpoint coordinate of the intersection of the weld seam and the weld seam binary image is extracted; A pixel distance between the upper endpoint coordinate and a center point coordinate of the upper boundary of the weld seam binary image is calculated; The actual offset distance of the weld seam relative to the welding head tip is calculated based on the pixel distance and a pre-calibrated pixel resolution.

4. The weld trajectory correction method of claim 1, wherein, Before the step of calculating the actual offset distance of the weld seam relative to the welding head tip based on the weld seam binary image, the welding track correction method further comprises: It is judged whether there is a situation of local weld seam invisibility in the weld seam binary image; In response to the situation of local weld seam invisibility, a complete weld seam is reconstructed based on the weld seam of the observable area by using a polynomial fitting method; In response to the absence of the situation of local weld seam invisibility, the step of calculating the actual offset distance of the weld seam relative to the welding head tip based on the weld seam binary image is performed.

5. The weld trajectory correction method of claim 1, wherein, The step of adjusting the horizontal position of the welding head tip based on the actual offset distance comprises: An incremental PID algorithm is used to process the actual offset distance in real time to obtain an error control signal; The horizontal position of the welding head tip is adjusted based on the error control signal.

6. The weld trajectory correction method of claim 5, wherein, The step of processing the actual offset distance by using the incremental PID to obtain an error signal comprises: Proportional, integral and differential coefficients of the incremental PID algorithm are obtained; Two historical actual offset distances calculated in the previous two control periods are obtained; The error control signal is calculated based on the proportional, integral and differential coefficients, the two historical actual offset distances and the actual offset distance of the current control period.

7. The weld trajectory correction method of claim 1, wherein, Before the step of inputting the weld seam image into a weld seam segmentation model to obtain a weld seam binary image, the welding track correction method further comprises: Training data of the weld seam segmentation model is obtained; The weld seam segmentation model is trained based on the training data.

8. A friction stir welding system characterized by, The friction stir welding system comprises a camera, a welding head, a workbench and a controller, the camera is rigidly connected with the welding head, the workpiece to be welded is arranged on the workbench, the camera is opposite to the welding head and is used for shooting the working process of the welding head in the welding process, the controller is in communication connection with the welding head and the camera respectively, and is used for executing the welding track correction method in any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, The controller has program instructions stored therein, and the program instructions are executed to implement the welding track correction method in any one of claims 1-7.

10. A computer program product, characterised in that, The controller comprises a computer program, and the computer program is executed to implement the welding track correction method in any one of claims 1-7.