Laser welding trajectory detection method, device and storage medium
By obtaining welding parameters in Wobble welding, driving the galvanometer and using the image acquisition module to identify welding trajectory parameters, the problem of insufficient welding stability is solved, real-time monitoring and warning of the welding process is achieved, and welding accuracy and stability are improved.
Patent Information
- Application Number
- CN202411322019.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-09-23
AI Technical Summary
In scenarios where welding accuracy requirements are high, Wobble welding is prone to deviating the welding trajectory due to complex situations such as workpiece shape, material characteristics, environmental factors and nozzle defects, resulting in insufficient welding stability.
By obtaining welding parameters, driving the motor to move and controlling the galvanometer to perform swinging actions, using the image acquisition module to obtain welding images, identify welding trajectory parameters, and output prompt information when the trajectory parameters do not match the welding parameters to ensure the stability of the welding process.
Through real-time image recognition and comparison, warning information is output in a timely manner, the stability of Wobble welding is improved, ensuring that the welding process complies with welding parameters and improving welding accuracy.
Smart Images

Figure CN118840373B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image data processing, and in particular to a laser welding trajectory detection method, device and storage medium. Background Art
[0002] Wobble welding controls the laser to adopt circular, rectangular, figure-8 and other trajectories during the welding process, and performs regular lateral swings to widen the weld. At the same time, it avoids bubbles in the molten pool to a certain extent, thereby achieving efficient and precise welding effects.
[0003] In actual situations, Wobble welding is easily disturbed during the swinging process due to complex conditions such as workpiece shape, material properties, environmental factors, and nozzle defects, resulting in deviations in the welding trajectory. In scenarios where high welding accuracy is required, the deviation in the trajectory will affect the welding effect of Wobble welding, resulting in insufficient stability of Wobble welding.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide a laser welding trajectory detection method, device and storage medium, aiming to solve the technical problem of insufficient stability of Wobble welding in scenarios with high welding accuracy requirements.
[0006] To achieve the above object, the present application provides a laser welding trajectory detection method, the method comprising the following steps:
[0007] Acquire welding parameters, drive the motor to move based on the welding parameters, and control the galvanometer to perform a swinging motion according to the welding parameters;
[0008] Acquire welding images through the image acquisition module;
[0009] The track parameters of the welding track in the welding image are identified, and prompt information is output when the track parameters do not match the welding parameters.
[0010] In one embodiment, the steps of obtaining welding parameters, driving the motor to move based on the welding parameters, and controlling the galvanometer to perform a swinging motion according to the welding parameters include:
[0011] After receiving the welding instruction, the welding parameters in the welding instruction are obtained, wherein the welding parameters include welding path and galvanometer oscillation parameters;
[0012] Determine the starting point of the welding path, drive the motor to align the starting point with the laser output point of the galvanometer, and move based on the welding path;
[0013] The galvanometer is controlled to perform the swinging action according to the swinging parameters of the galvanometer.
[0014] In one embodiment, the step of identifying the trajectory parameters of the welding trajectory in the welding image and outputting prompt information when the trajectory parameters do not match the welding parameters includes:
[0015] Inputting the welding image into an image recognition model, and determining a trajectory feature image of the welding image according to an output result of the image recognition model;
[0016] Converting the trajectory feature image into a binary image;
[0017] extracting the trajectory parameters of the welding trajectory in the binary image, and comparing the trajectory parameters with the welding parameters;
[0018] When the comparison result is mismatched, the prompt information indicating that the welding trajectory is abnormal is output.
[0019] In one embodiment, the step of extracting the welding parameters of the welding trajectory in the binary image and comparing the welding parameters with the welding parameters comprises:
[0020] Extracting contour information of the binary image, segmenting the binary image according to the contour information, and generating a segmented image;
[0021] Determine, according to the contour information, a welding trajectory type corresponding to a target welding trajectory in the segmented image, and calculate the trajectory parameters of the target welding trajectory;
[0022] Based on the welding trajectory type, the trajectory parameters are compared with the welding parameters.
[0023] In one embodiment, the step of determining the welding trajectory type corresponding to the target welding trajectory in the segmented image according to the contour information, and calculating the trajectory parameters of the target welding trajectory includes:
[0024] In the contour information, determining the target contour information corresponding to the segmented image;
[0025] Matching the target contour information with the trajectory sample, and determining the welding trajectory type of the target welding trajectory in the segmented image according to the matching result;
[0026] Calculating the width and / or roundness of the target welding track, and identifying thread information in the target welding track;
[0027] The trajectory parameters are determined according to the width and / or roundness, and the thread information.
[0028] In one embodiment, when the comparison result is mismatched, the step of outputting the prompt information that the welding trajectory is abnormal includes:
[0029] Acquire abnormal parameters in the trajectory parameters that do not match the welding parameters;
[0030] Determining a parameter difference between the abnormal parameter and the welding parameter;
[0031] The abnormal reason of the welding is determined according to the abnormal parameter and the parameter difference, and the prompt information is generated and output according to the abnormal reason.
[0032] In one embodiment, the step of acquiring the welding image through the image acquisition module includes:
[0033] Obtaining a photographing time interval of the image acquisition module;
[0034] Determining the shooting time of the image acquisition module according to the shooting time interval;
[0035] When the system time is the shooting time, the image acquisition module is used to execute a shooting action to obtain the welding image.
[0036] In one embodiment, after the step of acquiring the welding image through the image acquisition module, the method further includes:
[0037] Obtain the laser output power in the welding parameters;
[0038] Determining a brightness range of the laser according to the laser output power;
[0039] The brightness of the laser in the welding image is identified, and when the brightness is not within the brightness range, the prompt information is output.
[0040] In addition, to achieve the above-mentioned purpose, the present application also provides a laser welding trajectory detection device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the laser welding trajectory detection method as described above.
[0041] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the laser welding trajectory detection method as described above are implemented.
[0042] One or more technical solutions proposed in this application have at least the following technical effects:
[0043] After obtaining the welding parameters for wobble welding, the present application drives the galvanometer to move based on the welding path in the welding parameters through a motor, and controls the galvanometer to perform a swinging action according to the galvanometer swing parameters in the welding parameters. Through the image acquisition module, the welding image after the galvanometer moves is obtained, the trajectory parameters of the welding trajectory in the welding image are identified, and when the trajectory parameters do not match the welding parameters, prompt information is output. Therefore, during the wobble welding process, the welding image is obtained through the image acquisition module and the welding trajectory is image recognized, it is determined whether the laser welding is performed in accordance with the welding parameters, and a warning message is output in time when it does not meet the requirements, thereby improving the stability of welding. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0045] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0046] Figure 1 This is a schematic diagram of the flow chart of the first embodiment of the laser welding trajectory detection method of the present application;
[0047] Figure 2 A schematic diagram of the structure of a laser welding machine according to a first embodiment of the laser welding trajectory detection method of the present application;
[0048] Figure 3 This is a schematic diagram of welding image acquisition involved in the first embodiment of the laser welding trajectory detection method of the present application;
[0049] Figure 4 A schematic diagram of the flow chart of the second embodiment of the laser welding trajectory detection method of the present application;
[0050] Figure 5 A schematic diagram of a flow chart of a third embodiment of a laser welding trajectory detection method of the present application;
[0051] Figure 6 A schematic diagram of a normal nozzle image according to a third embodiment of the laser welding trajectory detection method of the present application;
[0052] Figure 7 This is a schematic diagram of an unqualified nozzle image involved in the third embodiment of the laser welding trajectory detection method of the present application;
[0053] Figure 8 A brief flow chart of the laser welding trajectory detection method of the present application;
[0054] Fig. 9 It is a structural schematic diagram of a laser welding trajectory detection device in the hardware operating environment involved in the embodiment of the present application.
[0055] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0056] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0057] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0058] The main solution of the embodiment of the present application is: obtaining welding parameters, driving the motor to move based on the welding parameters, and controlling the galvanometer to perform a swinging motion according to the welding parameters; obtaining a welding image through an image acquisition module; identifying the trajectory parameters of the welding trajectory in the welding image, and outputting a prompt message when the trajectory parameters do not match the welding parameters.
[0059] In the prior art, Wobble welding is easily disturbed during the swinging process due to complex conditions such as workpiece shape, material properties, environmental factors, and nozzle defects, resulting in deviations in the welding trajectory. In scenarios where high welding accuracy is required, the deviation in the trajectory will affect the welding effect of Wobble welding, resulting in insufficient stability of Wobble welding.
[0060] After obtaining the welding parameters for Wobble welding, the present application drives the galvanometer to move based on the welding path in the welding parameters through a motor, and controls the galvanometer to perform a swinging action according to the galvanometer swing parameters in the welding parameters. Through the image acquisition module, the welding image after the galvanometer moves is obtained, the trajectory parameters of the welding trajectory in the welding image are identified, and when the trajectory parameters do not match the welding parameters, prompt information is output. Therefore, during the Wobble welding process, the welding image is obtained through the image acquisition module and the welding trajectory is image recognized, it is determined whether the laser welding meets the welding parameters to perform welding, and a warning message is output in time when it does not meet the requirements, thereby improving the stability of welding.
[0061] In order to better understand the above technical solution, exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0062] It should be noted that the execution subject of this embodiment can be a laser welding machine, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a laser welding trajectory detection device, etc., and this embodiment does not specifically limit this. The following takes a laser welding machine as an example to illustrate this embodiment and the following embodiments.
[0063] Based on this, the present application embodiment provides a laser welding trajectory detection method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the laser welding trajectory detection method of the present application.
[0064] In this embodiment, the laser welding trajectory detection method includes steps S10 to S30:
[0065] Step S10: obtaining welding parameters, driving the motor to move based on the welding parameters, and controlling the galvanometer to perform a swinging motion according to the welding parameters;
[0066] In this embodiment, the laser welding machine includes a control system, a laser, a galvanometer and a motor. Figure 2 As shown, Figure 2This is a schematic diagram of the structure of the laser welding machine involved in this embodiment. The laser is used to generate laser light and output it to the galvanometer. After receiving the laser light emitted by the laser, the galvanometer focuses the laser light on the surface of the material to be welded. The interior includes a galvanometer motor, a laser light path, a focusing lens and other optical parts, wherein the galvanometer motor is used to control the galvanometer to perform a swinging motion based on the welding parameters. The motor contains a motion driver, an encoder, etc., which are used to drive the galvanometer to move. The control system is used to control the operation of the entire system, which can detect external welding parameters and welding instructions, and control the laser light emission, control the galvanometer swing in the galvanometer based on the welding parameters, and drive the motor to perform XY plane motion.
[0067] Specifically, the user can input welding parameters and welding instructions on the terminal device connected to the laser welding machine through the user interface on the application or web page, and transmit them to the laser welding machine, or input relevant welding parameters and welding instructions to the laser welding machine on the display screen of the laser welding machine. Among them, the welding parameters include welding path and galvanometer swing parameters. The galvanometer swing parameters include Wobble trajectory, speed and other parameters. The laser welding machine drives the motor to move according to the welding path so that the welding head and the material to be welded are relatively displaced based on the welding path. The motor can move the material to be welded or the welding head with the galvanometer so that the material to be welded is transported to the target position where the starting point of the welding path is aligned with the output point of the galvanometer for welding. The galvanometer can perform Wobble swing according to the Wobble trajectory, speed and other parameters in the galvanometer swing parameters through the galvanometer motor set inside the galvanometer. Among them, the Wobble trajectory can be a circular, 8-shaped trajectory, etc. The galvanometer can leave a trajectory corresponding to the Wobble trajectory on the material to be welded through the swing of the Wobble trajectory, that is, a trajectory of a circular trajectory or an 8-shaped trajectory.
[0068] It should be noted that the swing of the galvanometer can change the optical path, so that the laser emitted by welding has a certain swing range, and the XY plane movement of the motor can move the material to be welded, so that the material to be welded moves to the target position for welding processing.
[0069] In one embodiment, after receiving a welding instruction, the laser welding machine obtains the welding parameters in the welding instruction and controls the motor and the galvanometer to perform welding at the same time. The laser welding machine can determine the starting point of the welding path, drive the motor to align the starting point with the laser output point of the galvanometer, and move based on the welding path, while controlling the galvanometer to perform a swinging action according to the galvanometer swing parameters, thereby achieving wobble welding.
[0070] Optionally, the laser welding machine can also drive the galvanometer to move by a motor to achieve relative movement between the laser and the material to be welded based on the welding path. Based on different motor drive objects, the laser welding machine determines the mutual transposition of the welding paths based on the welding parameters.
[0071] In another embodiment, the control system can also control the motor to perform mechanical movement in the XY plane, and when the motor moves to the target position, the motor movement is paused, and the laser light is controlled according to the laser output frequency, power, etc. in the welding parameters, and the galvanometer movement control signal is sent to control the galvanometer to perform wobble welding according to the galvanometer swing parameters. After the welding at the target position is completed, the laser stops emitting light, the galvanometer stops swinging, and the motor continues to move to the next target position, and this is repeated.
[0072] Step S20: acquiring a welding image through an image acquisition module;
[0073] In this embodiment, the laser welding machine is also equipped with an image acquisition module, which is used to acquire a welding image containing a welding track on the surface of the material to be welded. The welding image contains the shape and texture of the welding track, and the shape and texture of the welding track are used to extract the track parameters of the welding track. The image acquisition device is a camera device whose clarity of the acquired welding image meets the requirements of welding image recognition, for example, it can be composed of a 500w pixel industrial camera and a 50mm standard lens, or an industrial camera with higher pixels, so as to clearly acquire the shape and texture of the welding track on the surface of the material to be welded.
[0074] In one embodiment, the laser welding machine can obtain the preset shooting time interval of the image acquisition module, and control the image acquisition module to perform the shooting action every time the shooting time interval is exceeded. The laser welding machine can determine the shooting time of the image acquisition module according to the shooting time interval, and when the system time is the shooting time, the image acquisition module performs the shooting action to obtain the welding image.
[0075] Optionally, the laser welding machine can also acquire welding images during the welding process in real time through an image acquisition module, thereby realizing real-time detection of the welding process and improving the speed of discovering welding defects.
[0076] In one example, refer to Figure 3 , Figure 3 FIG. 1 is a schematic diagram of welding image acquisition involved in this embodiment. Figure 3 As shown, during the motor movement, the galvanometer is included in the welding head. The welding head receives the laser emitted by the laser through the optical fiber inlet, and the laser is refracted by the galvanometer and focused on the surface of the material to be welded. During the laser processing process, the image acquisition module can also obtain the welding image through the camera channel in the welding head.
[0077] Step S30: identifying the trajectory parameters of the welding trajectory in the welding image, and outputting prompt information when the trajectory parameters do not match the welding parameters.
[0078] In this embodiment, the image acquisition module can obtain a welding image including a welding track during the movement of the motor. The laser welding machine can extract the trajectory parameters of the welding track in the welding image by identifying the welding image, and determine whether the welding process meets the welding parameters based on the comparison results between the trajectory parameters and the welding parameters, and output a prompt message when the trajectory parameters do not match the welding parameters.
[0079] Specifically, after acquiring the welding image, the laser welding machine inputs the welding image into the image recognition model, and the image recognition model extracts features through pooling and sampling in the neural network, and determines the trajectory feature image of the welding image according to the output result of the image recognition model. The laser welding machine further converts the trajectory feature image into a binary image, extracts the trajectory parameters of the welding trajectory in the binary image, and compares the trajectory parameters with the welding parameters. When the comparison result is mismatched, a prompt message indicating that the welding trajectory is abnormal is output.
[0080] In an optional embodiment, the laser welding machine can extract the contour information of the binary image, segment the binary image according to the contour information, and generate a segmented image. According to the contour information, the laser welding machine can also determine the welding trajectory type corresponding to the target welding trajectory in the segmented image, and calculate the trajectory parameters of the target welding trajectory. Based on the welding trajectory type, the laser welding machine can compare the trajectory parameters with the part of the welding parameters corresponding to the welding trajectory type to determine the comparison result.
[0081] It should be noted that in the process of segmenting the binary image, the welding track can be divided into parts of different shapes based on different welding paths to facilitate the extraction of track parameters. Among them, the welding track can be divided into a matrix shape, and / or a circular welding track, or a welding track of other shapes. By extracting the width and / or roundness of the welding track based on the contour information, identifying the thread information in the target welding track, and extracting other relevant information, the laser welding machine can determine the track parameters.
[0082] Furthermore, the laser welding machine can also determine the target contour information corresponding to the segmented image in the contour information, and match the target contour information with the trajectory sample. According to the matching result, the welding trajectory type of the target welding trajectory in the segmented image is determined, and the width and / or roundness of the target welding trajectory is calculated, and the thread information in the target welding trajectory is identified. Through the information of the entire width and / or roundness, as well as the thread information, the laser welding machine can determine the trajectory parameters.
[0083] For example, the laser welding machine can calculate the roundness of the welding track by fitting a circle using the least squares method. In the process of calculating the roundness, the circle finding function in Opencv can be used to detect the set of circles in the welding track in the binary image, and the roundness analysis of the detection results can be performed to screen out the targets that meet the conditions. The calculation of the roundness can be done by the formula:
[0084]
[0085]
[0086]
[0087]
[0088] Among them, let p be a mass point, that is, the center point of the region, p_i is all the pixel points on the contour, F is the number of contour pixels, D is the average distance from the pixel point to the center point of the region, σ is the discrete degree of the pixel points on the contour, R is the roundness, and S is the number of edges of the contour.
[0089] After calculating the roundness, the laser welding machine will take the target with roundness greater than the threshold as a qualified target, and perform circle fitting on the qualified target using the least squares method. 2 =(xA) 2 + (yB) 2 Based on the formula derivation, the roundness fitting circular curve can be expressed as x2+y2+ax+by+C=0, where A=-a / 2, B=-b / 2, 4R 2 =a 2 +b 2 -4C. In the fitting process, it is necessary to first determine the coordinates of the middle point, and then calculate the distance between the edge points in the welding trajectory, and then perform fitting based on the distance and the coordinates of the edge points to generate a fitting curve.
[0090] As another optional implementation, after extracting the contour information of the binary image, the laser marking machine can determine the trajectory parameters based on the entire contour information, and compare the trajectory parameters with the welding parameters one by one, and determine whether there are trajectory parameters inconsistent with the welding parameters, thereby determining whether the trajectory parameters match the welding parameters.
[0091] Furthermore, when it is determined that the trajectory parameters do not match the welding parameters, the laser welding machine obtains the abnormal parameters in the trajectory parameters that do not match the welding parameters, and calculates the parameter difference between the abnormal parameters and the welding parameters. Based on the abnormal parameters and the parameter difference, the laser welding machine can determine the abnormal cause of the welding and determine the corresponding abnormal status code. The abnormal status code and the abnormal parameters are input into the information prompt template in the system, and the prompt information of the welding abnormality is generated and output to the management terminal.
[0092] After obtaining the welding parameters for Wobble welding, the embodiment of the present application drives the galvanometer to move based on the welding path in the welding parameters through a motor, and controls the galvanometer to perform a swinging action according to the galvanometer swing parameters in the welding parameters. Through the image acquisition module, a welding image after the galvanometer moves is obtained, and the trajectory parameters of the welding trajectory in the welding image are identified. When the trajectory parameters do not match the welding parameters, a prompt message is output. Therefore, during the Wobble welding process, the welding image is obtained through the image acquisition module and the welding trajectory is image recognized, and it is determined whether the laser welding is performed in accordance with the welding parameters, and a warning message is output in time when it does not meet the requirements, thereby improving the stability of welding.
[0093] Based on the same inventive concept, the present application also provides a second embodiment, referring to Figure 4 , Figure 4 This is a flow chart of the second embodiment of the laser welding trajectory detection method of the present application.
[0094] In this embodiment, after the welding image is acquired by the image acquisition module as described in step S20, steps S41 to S43 are also included:
[0095] Step S41: obtaining the laser output power in the welding parameters;
[0096] Step S42: determining the brightness range of the laser according to the laser output power;
[0097] Step S43: Identify the brightness of the laser in the welding image, and output the prompt information when the brightness is not within the brightness range.
[0098] In this embodiment, after the laser welding machine obtains the welding image through the image acquisition device, it can identify the brightness of the laser in the welding image. At the same time, the laser welding machine will determine the corresponding welding output power and the brightness range of the laser output power in the welding parameters. When the laser brightness is not within the brightness range, the laser welding machine can determine that the laser output power is too high or too low, and output a prompt message of welding abnormality.
[0099] It should be noted that the brightness of the laser output based on the laser output power is relatively stable. After being affected by environmental factors, it fluctuates within a range, which is the brightness range mentioned above. Therefore, when the laser brightness is lower than this brightness range, or higher than this brightness range, the laser welding machine can determine that the laser output power of the laser is abnormal.
[0100] The embodiment of the present application obtains the laser output power in the welding parameters, determines the brightness range of the laser according to the laser output power, identifies the brightness of the laser in the welding image, and outputs the prompt information when the brightness is not within the brightness range, thereby judging whether there is an abnormality in the welding process through the laser brightness, thereby further improving the stability of laser welding.
[0101] Since the system introduced in the second embodiment of the present application is a system used to implement the method of the first embodiment of the present application, based on the method introduced in the first embodiment of the present application, the person skilled in the art can understand the specific structure and deformation of the system, so it is not repeated here. All systems used in the method of the first embodiment of the present application belong to the scope of protection of this application.
[0102] During the laser welding process, due to the excessively high welding power, the welding head nozzle may be melted, thus affecting the subsequent laser welding accuracy. Based on this, the present application also provides a third embodiment, referring to Figure 5 , Figure 5 This is a flow chart of a third embodiment of a laser welding trajectory detection method of the present application.
[0103] In this embodiment, after the welding image is acquired by the image acquisition module as described in step S20, steps S51 to S54 are also included:
[0104] Step S51: acquiring a nozzle image in the welding image;
[0105] Step S52: binarizing the nozzle image to generate a binary nozzle image, and calculating the roundness of the contour information in the binary nozzle image;
[0106] Step S53: selecting target contour information whose roundness is higher than the roundness threshold in the contour information, and performing circle fitting on the target contour information;
[0107] Step S54: Compare the circle fitting image with the circle size of the standard workpiece, and determine the nozzle state according to the comparison result.
[0108] In this embodiment, based on the image acquisition module, the laser welding machine can also detect the nozzle status during the welding process, collect pictures in real time, analyze the nozzle status based on the images in the pictures, and replace unqualified nozzles in time. The nozzle image is the trace image of the laser emitted by the nozzle on the material.
[0109] Specifically, similar to the process of welding track roundness detection, after determining the nozzle image in the welding image, the laser welding machine can binarize the nozzle image and extract the contour information. By calculating the roundness in the binary image, the target contour information with a roundness higher than the roundness threshold is selected from the contour information, and the target contour information is circularly fitted. The circular fitting image after fitting the target contour information is compared with the circular size of the standard workpiece, and the laser welding machine determines the nozzle state based on whether the comparison result is a match.
[0110] For example, Figure 6 and Figure 7 As shown, Figure 6 A schematic diagram of a normal nozzle image involved in this embodiment, Figure 7 The figure is a schematic diagram of an unqualified nozzle image. After the circle fitting of the contour information, the unqualified nozzle image will have defects, which will cause the expression of the fitted circle to be different from the expression of the normal nozzle image fitting circle, which is reflected in the situation of larger or smaller area. After the laser welding machine is fitted, the size of the circle fitting image is compared with the circle size of the standard workpiece to determine whether the nozzle state is normal.
[0111] The embodiment of the present application can detect whether there is any abnormality in the nozzle state by calculating the roundness and circle fitting of the nozzle image and comparing the calculation result with the circle size of the standard workpiece, thereby further improving the stability of the laser welding process.
[0112] For example, in order to help understand the implementation process of the laser welding trajectory detection method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 8 , Figure 8 A brief schematic diagram of a laser welding trajectory detection method is provided, specifically:
[0113] When receiving welding instructions and welding parameters, the laser welding machine will control the galvanometer and click to perform corresponding actions based on the welding parameters, and during the execution process, the welding image is obtained through the image acquisition device. After obtaining the welding image, the laser welding machine inputs the welding image into the image recognition model, and determines the trajectory feature image of the welding image based on the output result of the image recognition model.
[0114] Among them, the laser welding machine converts the trajectory feature image into a binary image, extracts the trajectory parameters of the welding trajectory in the binary image, and compares the trajectory parameters with the welding parameters. When the comparison result is a mismatch, a prompt message of abnormal welding trajectory is output. The laser welding machine can extract the contour information of the binary image, segment the binary image according to the contour information, and generate a segmented image. Based on the contour information, the laser welding machine can also determine the welding trajectory type corresponding to the target welding trajectory in the segmented image, and calculate the trajectory parameters of the target welding trajectory. Based on the welding trajectory type, the laser welding machine can compare the trajectory parameters with the part of the welding parameters corresponding to the welding trajectory type to determine the comparison result.
[0115] When the comparison result is a mismatch, the laser welding machine will output a welding abnormality prompt message to the administrator terminal.
[0116] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the trajectory detection method for laser welding of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0117] The present application provides a laser welding trajectory detection device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the laser welding trajectory detection method in the above-mentioned embodiment one.
[0118] Reference below Fig. 9 , which shows a schematic diagram of the structure of a laser welding trajectory detection device suitable for implementing the embodiment of the present application. The laser welding trajectory detection device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9 The laser welding trajectory detection device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0119] like Fig. 9As shown, the laser welding trajectory detection device may include a processing device 1001 (such as a core processor, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the laser welding trajectory detection device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the laser welding track detection device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a laser welding track detection device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.
[0120] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0121] The laser welding trajectory detection device provided by the present application adopts the laser welding trajectory detection method in the above embodiment, which can solve the technical problem of insufficient stability of Wobble welding in scenarios with high welding precision requirements. Compared with the prior art, the beneficial effects of the laser welding trajectory detection device provided by the present application are the same as the beneficial effects of the laser welding trajectory detection method provided by the above embodiment, and the other technical features of the laser welding trajectory detection device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0122] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0123] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0124] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the trajectory detection method for laser welding in the above-mentioned embodiment.
[0125] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0126] The computer-readable storage medium may be included in the laser welding trajectory detection device; or may exist independently without being assembled into the laser welding trajectory detection device.
[0127] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the laser welding trajectory detection device, the laser welding trajectory detection device: obtains welding parameters, drives the motor to move based on the welding parameters, and controls the galvanometer to perform a swinging motion according to the welding parameters; obtains a welding image through an image acquisition module; identifies the trajectory parameters of the welding trajectory in the welding image, and outputs a prompt message when the trajectory parameters do not match the welding parameters.
[0128] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0129] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0130] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0131] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned laser welding trajectory detection method, and can solve the technical problem of insufficient stability of Wobble welding in scenarios with high welding accuracy requirements. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the laser welding trajectory detection method provided in the above-mentioned embodiment, and will not be repeated here.
[0132] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A laser welding trajectory detection method, characterized in that: The method comprises the following steps: Acquire welding parameters, drive the motor to move based on the welding parameters, and control the galvanometer to perform a swinging motion according to the welding parameters; Acquire welding images through the image acquisition module; Inputting the welding image into an image recognition model, and determining a trajectory feature image of the welding image according to an output result of the image recognition model; Converting the trajectory feature image into a binary image, extracting contour information of the binary image, and segmenting the binary image according to the contour information to generate a segmented image; In the contour information, determine the target contour information corresponding to the segmented image, match the target contour information with the trajectory sample, and determine the welding trajectory type of the target welding trajectory in the segmented image according to the matching result; Calculating the width and / or roundness of the target welding track, and identifying thread information in the target welding track; Determining trajectory parameters according to the width and / or roundness, and the thread information, and comparing the trajectory parameters with the welding parameters based on the welding trajectory type; When the comparison result is mismatched, a prompt message indicating that the welding trajectory is abnormal is output.
2. The method according to claim 1, characterized in that The steps of obtaining welding parameters, driving the motor to move based on the welding parameters, and controlling the galvanometer to perform a swinging motion according to the welding parameters include: After receiving the welding instruction, obtaining the welding parameters in the welding instruction, wherein the welding parameters include welding path and galvanometer oscillation parameters; Determine the starting point of the welding path, drive the motor to align the starting point with the laser output point of the galvanometer, and move based on the welding path; The galvanometer is controlled to perform the swinging action according to the galvanometer swinging parameters.
3. The method according to claim 1, characterized in that When the comparison result is mismatched, the step of outputting the prompt information of abnormal welding trajectory includes: Acquire abnormal parameters in the trajectory parameters that do not match the welding parameters; Determining a parameter difference between the abnormal parameter and the welding parameter; According to the abnormal parameter and the parameter difference, the abnormal cause of the welding is determined, and the prompt information is generated and output according to the abnormal cause.
4. The method according to claim 1, characterized in that The step of acquiring the welding image through the image acquisition module includes: Obtaining a photographing time interval of the image acquisition module; Determining the shooting time of the image acquisition module according to the shooting time interval; When the system time is the shooting time, the image acquisition module is used to execute a shooting action to obtain the welding image.
5. The method according to claim 1, characterized in that After the step of acquiring the welding image through the image acquisition module, the method further includes: Obtain the laser output power in the welding parameters; Determining a brightness range of the laser according to the laser output power; The brightness of the laser in the welding image is identified, and when the brightness is not within the brightness range, the prompt information is output.
6. A laser welding trajectory detection device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the laser welding trajectory detection method according to any one of claims 1 to 5.
7. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the laser welding trajectory detection method according to any one of claims 1 to 5 are implemented.
