Robot welding control method and system
Through depth image processing and sliding window clustering technology, welding target features are identified in real time and welding planning paths are generated, which solves the problems of unstable and inefficient welding quality in the existing technology, and achieves more efficient and consistent welding quality.
Patent Information
- Application Number
- CN202411907432.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-24
AI Technical Summary
The existing robot welding control methods rely on preset welding paths and parameters, and lack real-time identification and adaptability adjustment of welding target characteristics, resulting in unstable welding quality and inefficient efficiency.
By obtaining the depth image of the welding target, identifying the welding area image, extracting the area with a high degree of defect as the welding point area, using sliding window clustering to determine the welding point center, generating the welding plan path and controlling the robot to perform welding.
It improves the stability of the welding process and the consistency of welding quality, reduces manual intervention, and improves production efficiency.
Smart Images

Figure CN119347192B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent control technology, and in particular to a robot welding control method and system. Background Art
[0002] In the traditional welding process, the welding quality is limited by the skill level of the operator and the efficiency is low. With the development of industrial automation, robotic welding technology has gradually become mainstream, but the existing robotic welding control methods often rely on preset welding paths and parameters, lack of real-time recognition and adaptive adjustment of welding target features, resulting in unstable welding quality.
[0003] In existing robotic welding technology, the key to controlling welding quality lies in the accurate identification and control of the welding area. However, traditional welding control methods often rely on manual intervention, which is not only inefficient but also difficult to ensure the consistency of welding quality. Summary of the invention
[0004] In order to solve the above problems, the present invention provides a robot welding control method and system, aiming to solve the problems of unstable welding quality and low efficiency existing in the existing welding control technology.
[0005] In order to achieve the above object, the present invention provides the following technical solutions:
[0006] In one aspect, an embodiment of the present invention provides a robot welding control method, the method comprising the following steps:
[0007] S100, acquiring a depth image of a welding target, and identifying a welding area image in the depth image;
[0008] S200, extracting a plurality of regions with larger defect degrees from the welding region image as welding spot regions, clustering the welding spot regions through sliding windows, and determining welding spot centers based on the load-bearing degrees of each sliding window;
[0009] S300, determining feature point cloud data of the center of each welding spot, generating a welding planning path according to the feature point cloud data of the center of each welding spot, and controlling a robot to weld the welding target based on the welding planning path.
[0010] Optionally, in S100, acquiring a depth image of the welding target and identifying a welding area image in the depth image includes:
[0011] S110, acquiring a depth image including a welding target, and extracting a plane image from the depth image;
[0012] S120, converting the plane image into a grayscale image, performing Gaussian filtering on the grayscale image, identifying the contour of the welding target using a contour detection method, and using the image area within the contour as a welding area image.
[0013] Optionally, in S200, extracting a plurality of regions with larger defect degrees from the welding region image as weld spot regions, clustering the weld spot regions through sliding windows, and determining weld spot centers based on the bearing capacity of each sliding window includes:
[0014] S210, performing wavelet decomposition on the welding area image, retaining high-frequency components in the welding area image, removing low-frequency components in the welding area image, and obtaining a region enhanced image;
[0015] S220, using a Canny edge detection algorithm to detect a weld contour in the regional enhanced image, and performing morphological processing on the weld contour to obtain a weld image;
[0016] S230, if it is determined that the weld width of the weld image is lower than a set width threshold, extracting a plurality of connected components from the weld image, determining the degree of defect of the connected components based on characteristic lines in the connected components, and taking a plurality of connected components with larger degrees of defect as weld point regions; wherein the characteristic lines include a center line of the connected components and a plurality of auxiliary lines perpendicular to the center line;
[0017] S240: For each solder joint area, cluster the solder joint area into a plurality of sliding windows, and determine a solder joint center based on the load capacity of each sliding window.
[0018] Optionally, in S230, extracting a plurality of connected components from the weld image, determining the degree of defect of the connected components based on characteristic lines in the connected components, and taking a plurality of connected components with larger degrees of defect as weld point regions includes:
[0019] S231, determining connected components in the weld image, performing morphological expansion processing on each connected component, connecting each connected component and performing skeleton extraction to obtain the center line of each connected component;
[0020] S232, extracting a plurality of pixel points at equal intervals from the center line, and determining an auxiliary line passing through the pixel points and perpendicular to the center line;
[0021] S233, determine the centroid point of each connected component, for each connected component, obtain the length of each auxiliary line in the connected component and the distance between the pixel point located on the center line of the auxiliary line and the centroid point, determine the defect degree of each connected component based on the length and distance, and screen out multiple connected components with larger defect degrees as welding point areas.
[0022] Optionally, the calculation formula of the defect degree is:
[0023]
[0024] in, represents the defect degree of the connected component, Represents the total number of pixels on the center line, is the length of the i-th auxiliary line in the connected component, is the average length of all auxiliary lines in the connected component, is the coordinate of the pixel point located at the center line of the i-th auxiliary line in the connected component, are the coordinates of the centroid of the connected components.
[0025] Optionally, in S240, clustering each solder joint area into a plurality of sliding windows, and determining the solder joint center based on the load capacity of each sliding window includes:
[0026] S241, determining the minimum bounding rectangle of the solder joint area, and acquiring a two-dimensional image within the minimum bounding rectangle; wherein the size of the two-dimensional image is M×N;
[0027] S242, obtaining the size of the welding spot to be welded by the robot, setting the size of the sliding window to ε×ε according to the size of the welding spot, and moving the sliding window in a sequence from top to bottom and then from left to right to traverse each pixel in the two-dimensional image in turn;
[0028] S243, respectively determining a vertical distance between a center point of the sliding window and a center line, and a shortest horizontal distance between the center point and a boundary line of the two-dimensional image, and determining a bearing capacity of the sliding window based on the vertical distance between the center point of the sliding window and the center line, and the shortest horizontal distance between the center point and the boundary line of the two-dimensional image;
[0029] S244, determining the number k of solder joints according to the size of the two-dimensional image and the size of the solder joints, selecting k pixels in equal proportion from the two-dimensional image, determining a sliding window with the pixels as the center point, and obtaining k sliding windows as initial center windows;
[0030] S245, establishing k clusters with k central windows as cluster centers, respectively calculating the correlation coefficient between the carrying capacity of each sliding window and the carrying capacity of the central window, and dividing the sliding windows into the cluster where the central window with the largest correlation coefficient is located;
[0031] S246, calculating the mean carrying capacity of each cluster, and taking the sliding window with the smallest difference from the mean carrying capacity as the new central window;
[0032] S247, repeatedly executing S245 and S246 until the change value of the mean value of the carrying degree of each cluster after iteration is less than the preset change threshold value, and k center windows are obtained, and the k center windows are used as the welding point centers.
[0033] Optionally, the loadability of the sliding window is calculated by the following formula:
[0034]
[0035] in, The coordinates of the center point are The load of the sliding window, is the vertical distance between the center point of the sliding window and the center line, is the shortest horizontal distance between the center point of the sliding window and the boundary line of the connected component, are the horizontal coordinates of the left and right sides of the two-dimensional image, are the ordinates of the upper and lower sides of the two-dimensional image, respectively, is the coordinate of the center point of the sliding window, It means to find the minimum value. .
[0036] Optionally, the correlation coefficient is calculated using the following formula:
[0037]
[0038] in, The coordinates of the center point are The correlation coefficient between the central window and the adjacent sliding window, and Respectively represent the moving step size of the sliding window in the horizontal and vertical directions, The interval range is , The interval range is .
[0039] On the other hand, an embodiment of the present invention provides a robot welding control system, comprising:
[0040] at least one processor;
[0041] at least one memory for storing at least one program;
[0042] When the at least one program is executed by the at least one processor, the at least one processor implements the above method.
[0043] The beneficial effects of the present invention are as follows: the present invention discloses a robot welding control method and system. In the embodiment provided by the present invention, a depth image of a welding target is obtained by a depth camera, an image processing technology is used to identify a welding area image in the depth image, a welding path is generated according to the identified welding area image, and the robot is controlled to perform welding operations according to the path. The present invention improves the stability of the welding process and the consistency of welding quality through image recognition and feature point cloud extraction technology. It reduces manual intervention and improves production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0045] Figure 1 It is a flow chart of a robot welding control method according to an embodiment of the present invention;
[0046] Figure 2 It is a structural schematic diagram of a robot welding control system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The following will be combined with the embodiments and drawings to clearly and completely describe the concept, specific structure and technical effects disclosed in the present invention, so as to fully understand the purpose, scheme and effect disclosed in the present invention. It should be noted that the embodiments and features in the embodiments in this application can be combined with each other without conflict.
[0048] The assembly welding line in the automobile industry replaces the traditional profiling inspection fixtures and manual measurement mode, and completes the fully automatic inspection process through intelligent scanning. The application of the present invention can not only improve welding accuracy, but also greatly improve production efficiency, effectively promote the intelligent transformation of the automobile manufacturing industry, reduce production costs, and ensure the consistency and stability of welding quality, providing strong technical support for the development of my country's automobile industry. Through precise control of the welding process, the present invention further optimizes the welding quality, realizes the automation and informatization of welding operations, and improves overall operating efficiency.
[0049] refer to Figure 1 ,like Figure 1 A robot welding control method provided by an embodiment of the present invention is shown, and the method comprises the following steps:
[0050] S100, acquiring a depth image of a welding target, and identifying a welding area image in the depth image;
[0051] Specifically, the front mounting seat of the car is welded from two metal workpieces, and the two metal workpieces are connected at nearly 90 degrees. When welding the front mounting seat of the car, the two metal workpieces are fixed on the welding frame. After fixing the locking device on the welding frame, the robot is triggered to start welding. The robot's mechanical arm rotates to a position facing the welding frame area, performs an all-round scan of the welding target, obtains a depth image of the welding target, positions the two metal workpieces, and identifies the connection between the two metal workpieces as the area that needs to be welded.
[0052] S200, extracting a plurality of regions with larger defect degrees from the welding region image as welding spot regions, clustering the welding spot regions through sliding windows, and determining welding spot centers based on the load-bearing degrees of each sliding window;
[0053] Specifically, by extracting multiple areas with larger defects as weld areas, the key welding parts of the welding target can be determined, and the center of the weld can be accurately located using image processing technology to provide accurate data support for subsequent welding.
[0054] S300, determining feature point cloud data of the center of each welding spot, generating a welding planning path according to the feature point cloud data of the center of each welding spot, and controlling a robot to weld the welding target based on the welding planning path.
[0055] Specifically, through point cloud registration technology, the characteristic point cloud data of the center of each weld is extracted, and the characteristic point cloud data is accurately matched to the actual welding position to determine the three-dimensional coordinates of the center of each weld. In combination with the welding process requirements, the three-dimensional coordinates are optimized to generate an accurate welding path. Through the robot control program, the robotic arm is enabled to weld according to a predetermined path to ensure welding accuracy and efficiency.
[0056] In the embodiment provided by the present invention, a depth image of the welding target is first obtained by a depth camera. Then, an image processing technology is used to identify the welding area image in the depth image. Next, a welding path is generated according to the identified welding area image, and the robot is controlled to perform welding operations according to the path. The present invention improves the stability of the welding process and the consistency of the welding quality through image recognition and feature point cloud extraction technology. At the same time, manual intervention is reduced and production efficiency is improved.
[0057] As an improvement of the above embodiment, in S100, acquiring a depth image of the welding target and identifying a welding area image in the depth image includes:
[0058] S110, acquiring a depth image including a welding target, and extracting a plane image from the depth image;
[0059] S120, converting the plane image into a grayscale image, performing Gaussian filtering on the grayscale image, identifying the contour of the welding target using a contour detection method, and using the image area within the contour as a welding area image.
[0060] In this embodiment, by converting the plane image into a grayscale image, the grayscale image is further processed using edge enhancement and threshold segmentation technology, which effectively improves the accuracy of welding area identification, thereby making the subsequent welding path planning more reasonable and ensuring the improvement of welding quality and efficiency.
[0061] As an improvement of the above embodiment, in S200, extracting a plurality of regions with larger defect degrees from the welding region image as weld spot regions, clustering the weld spot regions through sliding windows, and determining weld spot centers based on the bearing degrees of each sliding window includes:
[0062] S210, performing wavelet decomposition on the welding area image, retaining high-frequency components in the welding area image, removing low-frequency components in the welding area image, and obtaining a region enhanced image;
[0063] Specifically, the image of the welding area disturbed by arc light is decomposed by Haar-based secondary wavelet. The low-frequency component contains the arc light area and the background area of the stainless steel plate, and the high-frequency component mainly contains the weld information and some interference points. The image contrast after removing the low-frequency arc light interference is low, and the grayscale image can be enhanced to facilitate further weld extraction. In the high-frequency component after wavelet decomposition, the weld information is well preserved, and the arc light part is effectively removed, which is convenient for accurate extraction and detection of the weld and subsequent welding path tracking.
[0064] S220, using a Canny edge detection algorithm to detect a weld contour in the regional enhanced image, and performing morphological processing on the weld contour to obtain a weld image;
[0065] It should be noted that edge detection obtains weld contour information, which is theoretically a closed curve that surrounds the weld. However, since the welds of the two metal workpieces are not completely fitted, there are some discontinuous segments in the weld contour. When welding, welding at the center of the weld can be more solid. In order to complete the welding repair work of the weld, the center position of the weld needs to be obtained through the weld contour.
[0066] S230, if it is determined that the weld width of the weld image is lower than a set width threshold, extracting a plurality of connected components from the weld image, determining the degree of defect of the connected components based on characteristic lines in the connected components, and taking a plurality of connected components with larger degrees of defect as weld point regions; wherein the characteristic lines include a center line of the connected components and a plurality of auxiliary lines perpendicular to the center line;
[0067] It should be noted that the weld width at each position in the weld image is different, but the weld width cannot exceed the set width threshold. If the weld width exceeds the set width threshold, it is determined that the two metal workpieces are not aligned and need to be readjusted and installed; when the weld width is lower than the set width threshold, the position with a larger weld width needs to be reinforced. Based on this principle, multiple connected components are extracted from the weld image, and then the defect degree of each connected component is analyzed. The larger the defect degree, the more it needs to be reinforced as a weld point area.
[0068] S240: For each solder joint area, cluster the solder joint area into a plurality of sliding windows, and determine a solder joint center based on the load capacity of each sliding window.
[0069] Specifically, combined with the load-bearing analysis, a scientific basis is provided for optimizing the welding process to ensure that the welding quality meets the requirements of high-precision manufacturing. By statistically analyzing the correlation between the defect degree and the load-bearing degree, accurate defect prediction is performed on the weld area, assisting the welding automation equipment to achieve efficient and high-quality repair. This method not only improves welding efficiency, but also reduces human errors, making an important contribution to the transformation and upgrading of my country's manufacturing industry.
[0070] As an improvement of the above embodiment, in S230, extracting multiple connected components from the weld image, determining the defect degree of the connected components based on the characteristic lines in the connected components, and taking multiple connected components with larger defect degrees as weld point areas, includes:
[0071] S231, determining connected components in the weld image, performing morphological expansion processing on each connected component, connecting each connected component and performing skeleton extraction to obtain the center line of each connected component;
[0072] Specifically, for each pixel point of the weld image, pixels with the same pixel value and interconnected are divided into the same group, so as to obtain all pixel connected components in the weld image. The connected components are marked and analyzed by using the connectedComponents or connectedComponents With Stats function in the Open CV library, and the number of connected components, marked images, and the area, circumscribed rectangle size, and center position of each connected component are output.
[0073] S232, extracting a plurality of pixel points at equal intervals from the center line, and determining an auxiliary line passing through the pixel points and perpendicular to the center line;
[0074] Specifically, when skeleton extraction is performed on the weld image, burrs, discontinuities and other phenomena will appear. First, the image is morphologically expanded to connect multiple independent areas with smaller areas, so that the entire weld image becomes a connected area. Then, the center line of the weld is extracted using the skeleton extraction method. The center line includes multiple continuous pixel points. Finally, the center line is discretized to obtain several pixel points on the center line, which serve as the basis for selecting connected components.
[0075] S233, determine the centroid point of each connected component, for each connected component, obtain the length of each auxiliary line in the connected component and the distance between the pixel point located on the center line of the auxiliary line and the centroid point, determine the defect degree of each connected component based on the length and distance, and screen out multiple connected components with larger defect degrees as welding point areas.
[0076] Specifically, according to the relevant parameters of the centroid and the auxiliary line, the defect degree of each connected component is calculated and compared with the preset threshold. For connected components with a defect degree greater than the threshold, key monitoring and reinforcement treatment are implemented to improve the stability and safety of the overall welded structure.
[0077] As an improvement of the above embodiment, the calculation formula of the defect degree is:
[0078]
[0079] in, represents the defect degree of the connected component, Represents the total number of pixels on the center line, is the length of the i-th auxiliary line in the connected component, is the average length of all auxiliary lines in the connected component, is the coordinate of the pixel point located at the center line of the i-th auxiliary line in the connected component, are the coordinates of the centroid of the connected components.
[0080] It should be noted that Represents the absolute difference between the length of the i-th auxiliary line and the average length of the connected component. The larger the absolute difference, the more obvious the difference between the i-th auxiliary line and other areas of the connected component, thus reflecting the degree of weld defects. Based on the distance difference between each pixel point and the centroid point on the center line, according to the principle that the farther the distance from the centroid point, the smaller the weight coefficient value, different weights are set for the absolute difference of each auxiliary line for weighted summation, which more accurately reflects the defect degree of each connected component and provides a more reliable basis for the evaluation of welding quality.
[0081] As an improvement of the above embodiment, in S240, for each solder joint area, clustering the solder joint area into a plurality of sliding windows, and determining the solder joint center based on the load capacity of each sliding window includes:
[0082] S241, determining the minimum bounding rectangle of the solder joint area, and acquiring a two-dimensional image within the minimum bounding rectangle; wherein the size of the two-dimensional image is M×N;
[0083] S242, obtaining the size of the welding spot to be welded by the robot, setting the size of the sliding window to ε×ε according to the size of the welding spot, and moving the sliding window in a sequence from top to bottom and then from left to right to traverse each pixel in the two-dimensional image in turn;
[0084] S243, respectively determining a vertical distance between a center point of the sliding window and a center line, and a shortest horizontal distance between the center point and a boundary line of the two-dimensional image, and determining a bearing capacity of the sliding window based on the vertical distance between the center point of the sliding window and the center line, and the shortest horizontal distance between the center point and the boundary line of the two-dimensional image;
[0085] In this embodiment, the bearing degree represents the range and size of the bearing effect of the welding point on the surrounding welding area, reflecting the bearing utility of the welding point;
[0086] S244, determining the number k of solder joints according to the size of the two-dimensional image and the size of the solder joints, selecting k pixels in equal proportion from the two-dimensional image, determining a sliding window with the pixels as the center point, and obtaining k sliding windows as initial center windows;
[0087] Specifically, the size of the two-dimensional image is M×N, M and N are both greater than 2, the number of solder joints k=k1×k2, M / k1=N / k2, and k pixels are selected from the two-dimensional image according to the quantity ratio of k1×k2 to ensure that the selected pixels are evenly distributed. In the initial state, a global search can be performed on the two-dimensional image.
[0088] S245, establishing k clusters with k central windows as cluster centers, respectively calculating the correlation coefficient between the carrying capacity of each sliding window and the carrying capacity of the central window, and dividing the sliding windows into the cluster where the central window with the largest correlation coefficient is located;
[0089] In the embodiments provided by the present invention, not only the evaluation process of welding quality is optimized, but also the reliability and safety performance of the welding structure are further improved through accurate mathematical models. Through the detailed analysis of the load-bearing capacity of each welding point, a scientific basis is provided for the improvement and optimization of the welding process, achieving a dual improvement in the accuracy and efficiency of welding technology.
[0090] S246, calculating the mean carrying capacity of each cluster, and taking the sliding window with the smallest difference from the mean carrying capacity as the new central window;
[0091] In the embodiment provided by the present invention, the central window of each cluster is continuously optimized through iterative updating, so that the evaluation of the weld bearing capacity is more accurate, and the dynamic regulation of the weld quality during the welding process is realized, which greatly reduces the risk of welding defects.
[0092] S247, repeatedly executing S245 and S246 until the change value of the mean value of the carrying degree of each cluster after iteration is less than the preset change threshold value, and k center windows are obtained, and the k center windows are used as the welding point centers.
[0093] In the embodiment provided by the present invention, the accuracy of welding point positioning during welding is optimized through a precise iterative process, thereby improving welding quality and efficiency.
[0094] As an improvement of the above embodiment, the loadability of the sliding window is calculated by the following formula:
[0095]
[0096] in, The coordinates of the center point are The load of the sliding window, is the vertical distance between the center point of the sliding window and the center line, is the shortest horizontal distance between the center point of the sliding window and the boundary line of the connected component, are the horizontal coordinates of the left and right sides of the two-dimensional image, are the ordinates of the upper and lower sides of the two-dimensional image, respectively, is the coordinate of the center point of the sliding window, It means to find the minimum value. .
[0097] The present invention realizes continuous improvement of welding quality assessment through accurate calculation of bearing capacity and iterative optimization of cluster centers, and the performance of each welding point is meticulously monitored and adjusted, thereby ensuring the long-term stability and safety of the welding structure.
[0098] As an improvement of the above embodiment, the correlation coefficient is calculated by the following formula:
[0099]
[0100] in, The coordinates of the center point are The correlation coefficient between the central window and the adjacent sliding window, and Respectively represent the moving step size of the sliding window in the horizontal and vertical directions, The interval range is , The interval range is .
[0101] The present invention can perform a more detailed analysis of the area surrounding the solder joint by calculating the correlation coefficient, can adjust the welding parameters in real time, accurately locate the center of the solder joint, and ensure the stability of the solder joint quality. It should be noted that when the center point of the sliding window exceeds the range of the connected component, the pixels at the boundary of the connected component are processed by the boundary expansion method.
[0102] refer to Figure 2 The embodiment of the present invention further provides a robot welding control system, comprising:
[0103] at least one processor;
[0104] at least one memory for storing at least one program;
[0105] When the at least one program is executed by the at least one processor, the at least one processor implements the above method.
[0106] The contents of the above method embodiments are all applicable to this embodiment. The functions specifically implemented by this embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments, which will not be repeated here.
[0107] Although the description of the present disclosure has been quite detailed and specifically describes several described embodiments, it is not intended to be limited to any of these details or embodiments or any particular embodiment, but should be regarded as providing a broad possible interpretation of these claims by reference to the appended claims, taking into account the prior art, so as to effectively cover the intended scope of the present disclosure. In addition, the above description of the present disclosure is based on the embodiments foreseeable by the inventor, and its purpose is to provide a useful description, and those non-substantial changes to the present disclosure that have not yet been foreseen may still represent equivalent changes to the present disclosure.
Claims
1. A robot welding control method, characterized in that: The method comprises the following steps: S100, acquiring a depth image of a welding target, and identifying a welding area image in the depth image; S200, extracting a plurality of regions with larger defect degrees from the welding region image as welding spot regions, clustering the welding spot regions through sliding windows, and determining welding spot centers based on the load-bearing degrees of each sliding window; S300, determining feature point cloud data of the center of each welding spot, generating a welding planning path according to the feature point cloud data of the center of each welding spot, and controlling the robot to weld the welding target based on the welding planning path; In S200, extracting a plurality of regions with larger defect degrees from the welding region image as welding spot regions, clustering the welding spot regions through sliding windows, and determining welding spot centers based on the bearing capacity of each sliding window includes: S210, performing wavelet decomposition on the welding area image, retaining high-frequency components in the welding area image, removing low-frequency components in the welding area image, and obtaining a region enhanced image; S220, using a Canny edge detection algorithm to detect a weld contour in the regional enhanced image, and performing morphological processing on the weld contour to obtain a weld image; S230, if it is determined that the weld width of the weld image is lower than a set width threshold, extracting a plurality of connected components from the weld image, determining the degree of defect of the connected components based on characteristic lines in the connected components, and taking a plurality of connected components with larger degrees of defect as weld point regions; wherein the characteristic lines include a center line of the connected components and a plurality of auxiliary lines perpendicular to the center line; S240: For each solder joint area, cluster the solder joint area into a plurality of sliding windows, and determine a solder joint center based on the load capacity of each sliding window.
2. A robot welding control method according to claim 1, characterized in that: In S100, the step of acquiring a depth image of a welding target and identifying a welding area image in the depth image includes: S110, acquiring a depth image including a welding target, and extracting a plane image from the depth image; S120, converting the plane image into a grayscale image, performing Gaussian filtering on the grayscale image, identifying the contour of the welding target using a contour detection method, and using the image area within the contour as a welding area image.
3. A robot welding control method according to claim 1, characterized in that: In S230, extracting a plurality of connected components from the weld image, determining the degree of defect of the connected components based on characteristic lines in the connected components, and taking a plurality of connected components with larger degrees of defect as weld point regions includes: S231, determining connected components in the weld image, performing morphological expansion processing on each connected component, connecting each connected component and performing skeleton extraction to obtain the center line of each connected component; S232, extracting a plurality of pixel points at equal intervals from the center line, and determining an auxiliary line passing through the pixel points and perpendicular to the center line; S233, determine the centroid point of each connected component, for each connected component, obtain the length of each auxiliary line in the connected component and the distance between the pixel point located on the center line of the auxiliary line and the centroid point, determine the defect degree of each connected component based on the length and distance, and screen out multiple connected components with larger defect degrees as welding point areas.
4. A robot welding control method according to claim 3, characterized in that: The calculation formula of the defect degree is: ; Where D represents the defect degree of the connected component, p represents the total number of pixels on the center line, d(xi,yi) is the length of the i-th auxiliary line in the connected component, d0 is the average length of all auxiliary lines in the connected component, (xi,yi) is the coordinate of the pixel point located on the center line of the i-th auxiliary line in the connected component, and (x0,y0) is the coordinate of the centroid of the connected component.
5. A robot welding control method according to claim 3, characterized in that: In S240, for each solder joint area, clustering the solder joint area into a plurality of sliding windows, and determining the solder joint center based on the load capacity of each sliding window includes: S241, determining the minimum bounding rectangle of the solder joint area, and acquiring a two-dimensional image within the minimum bounding rectangle; wherein the size of the two-dimensional image is M×N; S242, obtaining the size of the welding spot to be welded by the robot, setting the size of the sliding window to ε×ε according to the size of the welding spot, and moving the sliding window in a sequence from top to bottom and then from left to right to traverse each pixel in the two-dimensional image in turn; S243, respectively determining a vertical distance between a center point of the sliding window and a center line, and a shortest horizontal distance between the center point and a boundary line of the two-dimensional image, and determining a bearing capacity of the sliding window based on the vertical distance between the center point of the sliding window and the center line, and the shortest horizontal distance between the center point and the boundary line of the two-dimensional image; S244, determining the number k of solder joints according to the size of the two-dimensional image and the size of the solder joints, selecting k pixels in equal proportion from the two-dimensional image, determining a sliding window with the pixels as the center point, and obtaining k sliding windows as initial center windows; S245, establishing k clusters with k central windows as cluster centers, respectively calculating the correlation coefficient between the carrying capacity of each sliding window and the carrying capacity of the central window, and dividing the sliding windows into the cluster where the central window with the largest correlation coefficient is located; S246, calculating the mean carrying capacity of each cluster, and taking the sliding window with the smallest difference from the mean carrying capacity as the new central window; S247, repeatedly executing S245 and S246 until the change value of the mean value of the carrying degree of each cluster after iteration is less than the preset change threshold value, and k center windows are obtained, and the k center windows are used as the welding point centers.
6. A robot welding control method according to claim 5, characterized in that: The loadability of the sliding window is calculated by the following formula: ; Among them, B(xi,yj) represents the bearing capacity of the sliding window with the center point coordinates (xi,yj), d(yj) is the vertical distance between the center point and the center line of the sliding window, d(xi) is the shortest horizontal distance between the center point of the sliding window and the boundary line of the connected component, x1 and x2 are the horizontal coordinates of the left and right sides of the two-dimensional image, y1 and y2 are the vertical coordinates of the upper and lower sides of the two-dimensional image, (xi,yj) is the coordinate of the center point of the sliding window, min() means finding the minimum value, 1≤i≤M, 1≤j≤N.
7. A robot welding control method according to claim 6, characterized in that: The correlation coefficient is calculated by the following formula: ; Among them, R(xi,yj) represents the correlation coefficient between the central window with the center point coordinates (xi,yj) and the adjacent sliding window, μ and η represent the moving steps of the sliding window in the horizontal and vertical directions respectively, the interval range of μ is [0, (ε-1) / 2], and the interval range of η is [0, (ε-1) / 2].
8. A robot welding control system, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Welding seam path planning teaching-free method based on random self-adaption
CN115556120A