Weld joint identification method and device, computer equipment and storage medium
By scanning the welds along a preset vertical scanning trajectory on the welded workpiece, the approximate intersection points of the scanning line are determined, which solves the problem of insufficient weld recognition accuracy and consistency in traditional welding technology, and achieves higher welding accuracy and reliability.
Patent Information
- Application Number
- CN202411905397.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-12-23
AI Technical Summary
In traditional welding technology, weld recognition accuracy and consistency are insufficient, especially in the needs of complex workpieces or high-precision welding, which makes it difficult to ensure welding accuracy.
By scanning the welded workpiece along a preset mutually perpendicular first scanning trajectory and a second scanning trajectory, the approximate intersection points of the first scanning line and the second scanning line are determined, and the starting point and end coordinates of the weld are accurately determined.
It improves the accuracy and consistency of weld recognition, reduces the uncertainty caused by human operations, and makes the welding process more standardized and reliable.
Smart Images

Figure CN119820054A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of welding technology, and in particular to a weld identification method, device, computer equipment, storage medium and computer program product. Background Art
[0002] With the development of welding technology, in order to meet the needs of high-precision and high-efficiency welding, the weld is usually planned on the welding workpiece before actual welding, and then the welding robot or other welding equipment is controlled to weld along the weld. Therefore, how to accurately identify the weld has become the key to improving welding accuracy.
[0003] In traditional solutions, it is usually necessary to identify the starting and ending points of the weld through manual teaching, or rely on manual visual inspection, simple sensors, etc. For example, the operator first manually controls the welding robot to move along the weld to inform the welding robot of the starting and ending points of the weld.
[0004] However, traditional solutions, whether manual teaching, visual inspection or weld identification through simple sensors, have obvious deficiencies in accuracy and consistency, especially when facing complex workpieces or high-precision welding requirements, the weld identification accuracy of the above solutions is low. Summary of the invention
[0005] Based on this, it is necessary to provide a weld identification method, device, computer equipment, computer readable storage medium and computer program product that can improve the accuracy of weld identification in order to solve the above technical problems.
[0006] In a first aspect, the present application provides a weld identification method. The method comprises:
[0007] Scanning the welding workpiece along a preset first scanning trajectory and a preset second scanning trajectory respectively, determining a first scanning line and a second scanning line, wherein the first scanning trajectory and the second scanning trajectory are respectively located in a first plane and a second plane perpendicular to each other, and both the first scanning trajectory and the second scanning trajectory include a welding seam;
[0008] determining an approximate intersection of the first scan line and the second scan line;
[0009] The starting point coordinates and the ending point coordinates of the weld are determined according to the first scanning line, the second scanning line and the approximate intersection point.
[0010] In one embodiment, scanning the welding workpiece along a preset first scanning trajectory and a preset second scanning trajectory respectively to determine a first scanning line and a second scanning line includes:
[0011] Scanning the welding workpiece along a preset first scanning trajectory and a preset second scanning trajectory respectively to obtain a first scanning result and a second scanning result;
[0012] The first scanning result and the second scanning result are respectively fitted into a broken line containing a preset number of line segments to obtain a first scanning line and a second scanning line.
[0013] In one embodiment, fitting the first scanning result and the second scanning result into a polyline including a preset number of line segments to obtain a first scanning line and a second scanning line includes:
[0014] Fitting the first scanning result into a first scanning line including three line segments, where the first scanning line includes a first line segment, a second line segment, and a third line segment connected in sequence;
[0015] The second scanning result is fitted into a second scanning line including three line segments, where the second scanning line includes a fourth line segment, a fifth line segment, and a sixth line segment connected in sequence.
[0016] In one embodiment, determining the approximate intersection point of the first scan line and the second scan line includes:
[0017] Determine a first approximate intersection point of the first line segment and the fourth line segment, and determine a second approximate intersection point of the third line segment and the sixth line segment;
[0018] The approximate intersection points include the first approximate intersection point and the second approximate intersection point.
[0019] In one embodiment, the first plane is an XY plane, the second plane is an XZ plane, the approximate intersection point includes a first approximate intersection point between the first line segment and the fourth line segment, and a second approximate intersection point between the third line segment and the sixth line segment; and determining the starting point coordinates and the ending point coordinates of the weld according to the first scanning line, the second scanning line and the approximate intersection point includes:
[0020] Determine the X coordinate value and Y coordinate value of the starting point of the weld according to the X coordinate value and Y coordinate value of the first approximate intersection point;
[0021] Determine the X-coordinate value and the Y-coordinate value of the end point of the weld according to the X-coordinate value and the Y-coordinate value of the second approximate intersection point;
[0022] Determine a Z coordinate value of a starting point of the weld and a Z coordinate value of an end point of the weld according to the second line segment, the fifth line segment, the coordinate value of the first approximate intersection, and the coordinate value of the second approximate intersection;
[0023] The starting point coordinates of the weld include an X coordinate value, a Y coordinate value, and a Z coordinate value of the starting point of the weld, and the end point coordinates of the weld include an X coordinate value, a Y coordinate value, and a Z coordinate value of the end point of the weld.
[0024] In one embodiment, determining the Z coordinate value of the starting point of the weld and the Z coordinate value of the end point of the weld according to the coordinate value of the second line segment, the fifth line segment, the first approximate intersection point, and the coordinate value of the second approximate intersection point includes:
[0025] In the case where the second line segment is parallel to the fifth line segment, determining a distance between the second line segment and the fifth line segment, determining a Z coordinate value of a starting point of the weld based on the distance and a Z coordinate value of the first approximate intersection, and determining a Z coordinate value of an end point of the weld based on the distance and the Z coordinate value of the second approximate intersection;
[0026] When the second line segment is not parallel to the fifth line segment, the Z coordinate value of the starting point of the weld and the Z coordinate value of the end point of the weld are determined by interpolation method based on the coordinate values of the first approximate intersection point and the coordinate values of the second approximate intersection point.
[0027] In a second aspect, the present application also provides a weld identification device. The device comprises:
[0028] A scanning module, used for scanning the welding workpiece along a preset first scanning trajectory and a preset second scanning trajectory to determine a first scanning line and a second scanning line, wherein the first scanning trajectory and the second scanning trajectory are respectively located in a first plane and a second plane perpendicular to each other, and both the first scanning trajectory and the second scanning trajectory include a welding seam;
[0029] An approximate intersection point determination module, used to determine an approximate intersection point between the first scanning line and the second scanning line;
[0030] The weld seam identification module is used to determine the starting point coordinates and the ending point coordinates of the weld seam according to the first scanning line, the second scanning line and the approximate intersection point.
[0031] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps in the above-mentioned weld identification method embodiment are implemented.
[0032] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the above-mentioned weld identification method embodiment are implemented.
[0033] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned weld identification method embodiment are implemented.
[0034] The above-mentioned weld identification method, device, computer equipment, storage medium and computer program product are different from the manual teaching of the traditional scheme. The present scheme scans the welding workpiece along the preset first scanning track and the preset second scanning track respectively, and the first scanning track and the second scanning track are respectively in the first plane and the second plane perpendicular to each other, and both contain welds. In this way, scanning in different planes can cover the welds from multiple angles, reduce the uncertainty caused by manual operation, make the process of obtaining weld-related information more standardized, and can effectively improve the problem of insufficient consistency in the traditional scheme. Furthermore, after obtaining the first scanning line and the second scanning line, their approximate intersection is determined. Finally, according to the first scanning line, the second scanning line and the determined approximate intersection, the starting point and the end point of the weld can be fully and accurately reflected, thereby improving the accuracy of weld identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 is an application environment diagram of a weld identification method in an embodiment;
[0036] Figure 2 A schematic diagram of a flow chart of a weld identification method in one embodiment;
[0037] Figure 3 is a schematic diagram of a weld in one embodiment;
[0038] Figure 4 is a schematic diagram of a first scanning trajectory in one embodiment;
[0039] Figure 5 is a schematic diagram of a second scanning trajectory in one embodiment;
[0040] Figure 6 A schematic diagram of a flow chart of a weld identification method in another embodiment;
[0041] Figure 7 is a schematic flow chart of a weld identification method in yet another embodiment;
[0042] Figure 8 is a schematic diagram of a first scan line and a second scan line in one embodiment;
[0043] Fig. 9 A schematic diagram of a process for determining the Z coordinate values of the starting point and the end point of a weld in one embodiment;
[0044] Fig.10A schematic diagram of a process for determining the Z coordinate values of the starting point and the end point of a weld in another embodiment;
[0045] Fig.11 is a structural block diagram of a weld identification device in one embodiment;
[0046] Fig.12 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. 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.
[0048] The weld identification method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.
[0049] Specifically, the terminal 102 can be a visual acquisition device such as a laser scanner, or the server 104 can control the terminal 102 to scan the welding workpiece along a preset first scanning trajectory and a preset second scanning trajectory, respectively, to determine a first scanning line and a second scanning line, wherein the first scanning trajectory and the second scanning trajectory are respectively in a first plane and a second plane perpendicular to each other, and both the first scanning trajectory and the second scanning trajectory contain welds, and then the server 104 determines the approximate intersection of the first scanning line and the second scanning line, and finally the server 104 determines the starting coordinates and the ending coordinates of the weld based on the first scanning line, the second scanning line and the approximate intersection.
[0050] The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0051] In one embodiment, Figure 2 As shown, a weld identification method is provided, which is applied to Figure 1 Taking the server 104 in the example as an example, the following steps are included:
[0052] S100, scanning the welding workpiece along a preset first scanning trajectory and a preset second scanning trajectory respectively, and determining a first scanning line and a second scanning line.
[0053] The first scanning trajectory and the second scanning trajectory are respectively in a first plane and a second plane perpendicular to each other, and both the first scanning trajectory and the second scanning trajectory include welds. The first scanning line and the second scanning line are essentially point sets composed of a number of points, and since the first scanning trajectory and the second scanning trajectory are in two planes perpendicular to each other, the first scanning line actually reflects the projection characteristics of the weld on the first plane, and the second scanning line actually reflects the projection characteristics of the weld on the second plane, so that the first scanning line and the second scanning line obtained by scanning can cover the range of the weld as comprehensively as possible.
[0054] like Figure 3 As shown, the PQ line segment is the weld to be welded, the P point is the starting point of the weld, and the Q point is the end point of the weld. In order to accurately control the welding robot to weld the welding workpiece along the weld, it is necessary to first determine the coordinates of the P point and the Q point as the arc starting point and arc ending point of the welding robot. Specifically, the laser can scan the welding workpiece along the preset first scanning trajectory and the preset second scanning trajectory respectively. The laser can be calibrated with the collaborative robot (such as a welding robot) in advance, and the first scanning line and the second scanning line obtained by the subsequent laser scanning of the welding workpiece are both in the collaborative robot coordinate system.
[0055] S200, determining an approximate intersection point between a first scanning line and a second scanning line.
[0056] The first scan line and the second scan line are not actually in the same plane, so the first scan line and the second scan line do not actually have a real intersection. In three-dimensional space, the two closest points on the first scan line and the second scan line can be considered to be the approximate intersection of the two.
[0057] Exemplarily, since the first scan line and the second scan line are both point sets containing a number of points, a number of straight lines can be used to approximate these points, respectively, to obtain the first scan line and the second scan line, and the first scan line and the second scan line are represented in the form of a broken line segment. In space, the approximate focus of two straight lines in different planes can be determined by numerical iteration method, geometric approximation method, etc., and the two points closest to each other on the two straight lines can be determined. For example, two points can be randomly selected on the first scan line and the second scan line, and the distance between the two points in space can be calculated. The positions of the two points on the first scan line and the second scan line are continuously iterated until the two points corresponding to the minimum distance between the two are determined as the approximate intersection points of the first scan line and the second scan line.
[0058] It should be noted that for complex welding workpieces, the approximate intersection may not necessarily be the starting point or end point of the weld, but the approximate intersection can still provide some position information for the starting point and end point of the weld, because the first scan line and the second scan line depict the position of the weld in space from different vertical planes. The starting point and end point of the weld can be further analyzed by combining information such as the approximate intersection and the direction of the first scan line and the second scan line.
[0059] S300, determining the starting point coordinates and the ending point coordinates of the weld according to the first scanning line, the second scanning line and the approximate intersection point.
[0060] Specifically, the first scan line and the second scan line are obtained by scanning the welded workpiece along a preset scan trajectory, and reflect the position information of the weld in space from different vertical planes. Following the above steps, the first scan line and the second scan line can be fitted with a preset number of line segments, for example, three line segments.
[0061] For example, Figure 4 As shown, the preset first scanning trajectory can be as shown by the arrow direction, and the laser moves along Figure 4 Scan the welding workpiece in the direction of the arrow in the figure to obtain the first scanning line, and then use three line segments to fit the first scanning line, that is, Figure 4 Get Similarly, Figure 5 As shown, the preset first scanning trajectory can be as shown by the arrow direction, and the laser moves along Figure 5 Scan the welding workpiece in the direction of the arrow to obtain the second scanning line. Similarly, three line segments are used to fit the second scanning line, namely Figure 5 In .
[0062] Furthermore, we can calculate and The approximate intersection of and The approximate intersection of is used as the reference point for the end point of the weld, for example and The approximate intersection point is and ,in In superior, In On, you can take and The midpoint of the X coordinate value and the end point of the Y coordinate value are determined as the X coordinate value and Y coordinate value of the starting point of the weld, and the same applies to the end point of the weld.
[0063] In addition, since the scan lines obtained by the laser scanning are all in the collaborative robot coordinate system, the posture of the collaborative robot may change during the two scans. and There may be slight deviations in the Z direction, so and The angle and other information are used to fit the Z coordinate values of the starting point and end point of the weld through interpolation and other methods, and finally the starting point coordinate and end point coordinate of the weld are determined.
[0064] The above-mentioned weld identification method is different from the manual teaching of the traditional solution. The present solution scans the welded workpiece along the preset first scanning track and the preset second scanning track respectively, and the first scanning track and the second scanning track are respectively in the first plane and the second plane perpendicular to each other, and both contain welds. In this way, scanning in different planes can cover welds from multiple angles, reducing the uncertainty caused by manual operation, making the process of obtaining weld-related information more standardized, and can effectively improve the problem of insufficient consistency in the traditional solution. Furthermore, after obtaining the first scanning line and the second scanning line, their approximate intersection is determined. Finally, according to the first scanning line, the second scanning line and the determined approximate intersection, the starting point and the end point of the weld can be fully and accurately reflected, thereby improving the accuracy of weld identification.
[0065] In one embodiment, Figure 6 As shown, S100 includes:
[0066] S110, scanning the welding workpiece along a preset first scanning trajectory and a preset second scanning trajectory respectively to obtain a first scanning result and a second scanning result.
[0067] S120, fitting the first scanning result and the second scanning result into polylines including a preset number of line segments, respectively, to obtain a first scanning line and a second scanning line.
[0068] Specifically, when the laser or other scanning device scans the welding workpiece along the first scanning trajectory, the scanning device will collect data on the surface of the welding workpiece at a preset sampling frequency to obtain the spatial coordinates of multiple scanning points, etc. These numerous data points are collected together to form the first scanning result. Similarly, when the laser or other scanning device scans the welding workpiece along the second scanning trajectory, the spatial coordinates of multiple scanning points can also be obtained to form the second scanning result.
[0069] Furthermore, since the first scan result and the second scan result contain a large number of data points, it is difficult to directly use these data points to analyze the weld position. Therefore, it is necessary to simplify and abstract them, and fit the data points in the first scan result and the second scan result into broken line segments to obtain the first scan line and the second scan line. The fitting method includes but is not limited to the least squares method, the Ramer-Douglas-Peucker (RDP) algorithm, etc. The basic idea of the RDP algorithm is to recursively find the point farthest from the given broken line fitting line, and according to the preset accuracy threshold To determine whether to keep this point, if the distance from the point to the fitting line is greater than the preset accuracy threshold , then this point will be retained, and the polyline will be split into two segments at this point. The same process is recursively performed on these two polylines until the distance from all points to the given fitting line is less than or equal to the preset accuracy threshold. , and, by adjusting the preset accuracy threshold , the number of line segments in the first scan line and the second scan line finally obtained by fitting can be adjusted.
[0070] In this embodiment, the scanning results directly obtained by the scanning device include a large number of discrete points. After fitting these points with line segments, the originally complex point set can be simplified into a broken line. In the subsequent operations of calculating the approximate intersection of two scanning lines and determining the starting and ending coordinates of the weld, processing a broken line is much simpler than processing a large number of discrete scanning points. The calculation complexity is greatly reduced, and the efficiency of weld recognition is effectively improved.
[0071] In one embodiment, Figure 7 As shown, S120 includes:
[0072] S121, fitting the first scanning result into a first scanning line including three line segments, where the first scanning line includes a first line segment, a second line segment, and a third line segment connected in sequence.
[0073] S122, fitting the second scanning result into a second scanning line including three line segments, where the second scanning line includes a fourth line segment, a fifth line segment, and a sixth line segment connected in sequence.
[0074] Following the above embodiment, taking the number of line segments as 3 as an example, as Figure 4 As shown in , the first line segment is The second line segment is , the third line segment is ,like Figure 5 As shown in , the fourth line segment is , the fifth line segment is , the sixth line segment is .
[0075] Specifically, the following takes the use of the RDP algorithm to fit the first scanning result as an example to explain in detail how to simplify the point set in the scanning result into line segments. The first scanning result is recorded as the point set , initially, simplify the point set into line segments ,in is the starting point of the point set, is the end point of the point set, calculate These intermediate points to the line segment The vertical distance of , which is the point with the largest vertical distance from the line connecting the starting point and the end point. The vertical distance is recorded as .like Less than or equal to the preset threshold , then discard , directly use line segments to represent the middle points of this part Instead, if Greater than the preset threshold , then keep And change the line segment from It is split into two segments, namely line segments and line segments , and then for the line segment and line segments , process the middle points in the same way until the vertical distance from the middle point of each line segment to the corresponding line segment is less than or equal to the preset threshold In this embodiment, by adjusting the preset threshold , so that the first scan line and the second scan line finally obtained only contain three line segments.
[0076] In this embodiment, by fitting the scanning results into three line segments, the three line segments greatly reduce the complexity of subsequent data processing compared to using a large number of discrete scanning points. Since the three line segments can more accurately describe the trajectory of the weld, the starting point coordinates and the end point coordinates of the weld can be accurately determined based on the positional relationship of each line segment, thereby improving the efficiency of weld recognition.
[0077] In one embodiment, S200 includes: determining a first approximate intersection point between the first line segment and the fourth line segment, and determining a second approximate intersection point between the third line segment and the sixth line segment, wherein the approximate intersection points include the first approximate intersection point and the second approximate intersection point.
[0078] Following the above embodiment, the positional relationship between the first scanning line and the second scanning line in space is as follows: Figure 8 As shown, by determining the first line segment With the fourth line segment The first approximate intersection of can further determine the X coordinate value and Y coordinate value of the starting point of the weld. Similarly, by determining the third line segment With the sixth line segment The second approximate intersection point can be further used to determine the X-coordinate value and Y-coordinate value of the end point of the weld.
[0079] Specifically, to determine the first line segment With the fourth line segment As an example, the calculation process is as follows: There is a point , the fourth line segment There is a point on ,based on and the first line segment Direction vector , and based on and the fourth line segment Direction vector , we can construct the first line segment Parametric equation of the line , and the fourth line segment The parametric equation , as shown in formula (1) and formula (2) respectively:
[0080] (1)
[0081] (2)
[0082] To determine the first line segment With the fourth line segment The first approximate intersection of , we need to find the shortest distance of the line on which it is located. We can first determine a vector perpendicular to the line on which the two line segments are located (that is, the normal vector of the two lines), and find the point pair that makes the vector length the smallest. Specifically, first construct a connection and Vector , then determine the vector The point where the cross product of the direction vectors of the two straight lines is 0, by solving equation (3), we can determine the parameter and ,parameter Corresponding to the first line segment Points on the line, parameters Corresponding to the fourth line segment The coordinates of the two points on the straight line are the points that minimize the distance between the two straight lines, that is, the first approximate intersection point.
[0083] (3)
[0084] It should be noted that after the first approximate intersection point is obtained, it is necessary to determine whether the first approximate intersection point meets the preset conditions. For example, the first approximate intersection point needs to be within the first line segment. or the fourth line segment If the calculated first approximate intersection point does not meet the preset condition, it is necessary to adjust the preset threshold value in the fitting stage. , refit the first scan result until the first approximate intersection meets the preset condition. Similarly, the third line segment can be determined by the same method as above and the sixth line segment The second approximate intersection point of .
[0085] In this embodiment, through the first line segment With the fourth line segment The first approximate intersection point of and the sixth line segment The second approximate intersection point can be used as the first approximate intersection point as an important reference point for the starting point of the weld, and the second approximate intersection point can be used as an important reference point for the end point of the weld, thereby providing a high-quality data basis for subsequent determination of the position of the weld in space and improving the efficiency of weld identification.
[0086] In one embodiment, Fig. 9 As shown, S300 includes:
[0087] S310, determining the X coordinate value and the Y coordinate value of the starting point of the weld according to the X coordinate value and the Y coordinate value of the first approximate intersection point.
[0088] S320, determining the X-coordinate value and the Y-coordinate value of the end point of the weld according to the X-coordinate value and the Y-coordinate value of the second approximate intersection point.
[0089] S330, determining the Z coordinate value of the starting point of the weld and the Z coordinate value of the end point of the weld according to the coordinate values of the second line segment, the fifth line segment, the first approximate intersection point, and the second approximate intersection point.
[0090] Among them, the first plane is the XY plane, the second plane is the XZ plane, the approximate intersection point includes the first approximate intersection point of the first line segment and the fourth line segment, and the second approximate intersection point of the third line segment and the sixth line segment, the starting point coordinates of the weld include the X coordinate value, Y coordinate value, and Z coordinate value of the starting point of the weld, and the end point coordinates of the weld include the X coordinate value, Y coordinate value, and Z coordinate value of the end point of the weld.
[0091] Specifically, assuming that the first approximate intersection points are and ,in In the first line superior, In the fourth line Similarly, assuming that the second approximate intersection points are and ,in In the third line superior, In the sixth line The X and Y coordinates of the weld start point can be , The mean of the X and Y coordinates of Figure 8 As shown in , The X coordinate values are equal, , The Y coordinate values of are also equal, so we can directly , The X and Y coordinate values of the weld are used as the starting point of the weld. Similarly, the X and Y coordinate values of the weld end point can be , The mean of the X-coordinate value and the Y-coordinate value, in an ideal situation, , The X coordinate values are equal, , The Y coordinate values of are also equal, so we can directly , The X coordinate value and Y coordinate value of the weld end point are used as the X coordinate value and Y coordinate value of the weld end point respectively.
[0092] Furthermore, since the posture of the collaborative robot may have changed slightly during the first and second scans, and The Z coordinate values of The Z coordinate value of will also be slightly different. You can combine the angle between the second line segment and the fifth line segment, and , The coordinate values of the starting point of the weld and the Z coordinate value of the end point of the weld are calculated by averaging or interpolation.
[0093] In this embodiment, the X-coordinate value and Y-coordinate value of the starting point and the end point of the weld can be determined first through the coordinates of the first approximate intersection point and the coordinates of the second approximate intersection point. In addition, this scheme also takes into account that the posture of the collaborative robot may change during the two scanning processes, and then considers using interpolation method to determine the Z-coordinate value of the starting point and the end point of the weld, thereby improving the efficiency and accuracy of weld recognition.
[0094] In one embodiment, Fig.10As shown, S330 includes:
[0095] S331, when the second line segment is parallel to the fifth line segment, determine the distance between the second line segment and the fifth line segment, determine the Z coordinate value of the starting point of the weld based on the distance and the Z coordinate value of the first approximate intersection, and determine the Z coordinate value of the end point of the weld based on the distance and the Z coordinate value of the second approximate intersection.
[0096] S332, when the second line segment is not parallel to the fifth line segment, the Z coordinate value of the starting point of the weld and the Z coordinate value of the end point of the weld are determined by interpolation method according to the coordinate value of the first approximate intersection point and the coordinate value of the second approximate intersection point.
[0097] Specifically, first determine whether the second line segment is and the fifth line segment is Are they parallel? For example, to determine whether the second line segment is and the fifth line segment is Are the direction vectors proportional? If they are proportional, it means that the two are parallel, or calculate the second line segment as and the fifth line segment is The angle between , angle Based on the second line segment and the fifth line segment is The direction vector is calculated, for example The value of is equal to the dot product of the two direction vectors divided by the modulus of the up direction vector.
[0098] The second line segment is and the fifth line segment is In the case of parallel, we only need to calculate the second line segment as and the fifth line segment is Minimum distance between , at this time, it can be considered that the starting point of the weld is located in the z direction and The Z coordinate value of the middle, the minimum distance The second line segment can be and the fifth line segment is Connect any points on the line segment to form a vector on the second line segment. and the fifth line segment is The projection on the normal vector of and The Z coordinate value and the minimum distance , the Z coordinate value of the starting point of the weld can be determined. Similarly, the end point of the weld is located in the z direction The Z coordinate value of the middle, based on The Z coordinate value and the minimum distance , the Z coordinate value of the end point of the weld can be determined.
[0099] The second line segment is and the fifth line segment is In the case of non-parallelism, the Z coordinate values of the start and end points of the weld can be calculated by interpolation. Specifically, according to the first approximate intersection and , determine the starting point of the weld The formula for the Z coordinate value is shown in formula (4):
[0100] (4)
[0101] In formula (4), is the X coordinate value of the starting point of the weld, is the Z coordinate value of the starting point of the weld. Similarly, the end point of the weld can also be calculated The Z coordinate value of .
[0102] In this embodiment, the second line segment is and the fifth line segment is In the case of parallelism, we only need to calculate the minimum distance between the two to quickly determine the starting and ending coordinates of the weld. and the fifth line segment is In the case of non-parallelism, the starting and ending coordinates of the weld can be quickly determined through interpolation, which can improve the efficiency of weld identification.
[0103] In order to make a clearer description of the weld identification method proposed in the present application, a specific embodiment is explained below. The specific embodiment includes the following steps:
[0104] The welding workpiece is scanned along a preset first scanning trajectory and a preset second scanning trajectory respectively to obtain a first scanning result and a second scanning result.
[0105] The first scanning result is fitted into three line segments to obtain a first scanning line, which includes a first line segment, a second line segment and a third line segment connected in sequence. The second scanning result is fitted into three line segments to obtain a second scanning line, which includes a fourth line segment, a fifth line segment and a sixth line segment connected in sequence.
[0106] A first approximate intersection point of the first line segment and the fourth line segment is determined, and a second approximate intersection point of the third line segment and the sixth line segment is determined.
[0107] The X-coordinate value and Y-coordinate value of the starting point of the weld are determined based on the X-coordinate value and Y-coordinate value of the first approximate intersection point, and the X-coordinate value and Y-coordinate value of the end point of the weld are determined based on the X-coordinate value and Y-coordinate value of the second approximate intersection point.
[0108] When the second line segment is parallel to the fifth line segment, determine the distance between the second line segment and the fifth line segment, determine the Z coordinate value of the starting point of the weld based on the distance and the Z coordinate value of the first approximate intersection, and determine the Z coordinate value of the end point of the weld based on the distance and the Z coordinate value of the second approximate intersection.
[0109] When the second line segment is not parallel to the fifth line segment, the Z coordinate value of the starting point of the weld and the Z coordinate value of the end point of the weld are determined by interpolation method according to the coordinate values of the first approximate intersection point and the second approximate intersection point.
[0110] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0111] Based on the same inventive concept, the embodiment of the present application also provides a weld identification device for implementing the weld identification method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more weld identification device embodiments provided below can refer to the limitations of the weld identification method above, and will not be repeated here.
[0112] In one embodiment, Fig.11 As shown, a weld identification device 500 is provided, comprising: a scanning module 510, an approximate intersection determination module 520 and a weld identification module 530, wherein:
[0113] The scanning module 510 is used to scan the welding workpiece along a preset first scanning trajectory and a preset second scanning trajectory to determine a first scanning line and a second scanning line. The first scanning trajectory and the second scanning trajectory are respectively in a first plane and a second plane perpendicular to each other, and both the first scanning trajectory and the second scanning trajectory contain welds.
[0114] The approximate intersection point determination module 520 is used to determine the approximate intersection point of the first scan line and the second scan line.
[0115] The weld identification module 530 is used to determine the starting point coordinates and the ending point coordinates of the weld according to the first scanning line, the second scanning line and the approximate intersection point.
[0116] In one embodiment, the scanning module 510 is used to scan the welding workpiece along a preset first scanning trajectory and a preset second scanning trajectory, respectively, to obtain a first scanning result and a second scanning result, and to fit the first scanning result and the second scanning result into a broken line containing a preset number of line segments, respectively, to obtain a first scanning line and a second scanning line.
[0117] In one embodiment, the scanning module 510 is used to fit the first scanning result into a first scanning line including three line segments, the first scanning line includes a first line segment, a second line segment and a third line segment connected in sequence, and to fit the second scanning result into a second scanning line including three line segments, the second scanning line includes a fourth line segment, a fifth line segment and a sixth line segment connected in sequence.
[0118] In one embodiment, the approximate intersection determination module 520 is used to determine a first approximate intersection of the first line segment and the fourth line segment, and to determine a second approximate intersection of the third line segment and the sixth line segment, wherein the approximate intersections include the first approximate intersection and the second approximate intersection.
[0119] In one embodiment, the first plane is an XY plane, the second plane is an XZ plane, the approximate intersection includes a first approximate intersection of the first line segment and the fourth line segment, and a second approximate intersection of the third line segment and the sixth line segment. The weld identification module 530 is used to determine the X coordinate value and the Y coordinate value of the starting point of the weld according to the X coordinate value and the Y coordinate value of the first approximate intersection, determine the X coordinate value and the Y coordinate value of the end point of the weld according to the X coordinate value and the Y coordinate value of the second approximate intersection, determine the Z coordinate value of the starting point of the weld and the Z coordinate value of the end point of the weld according to the coordinate value of the second line segment, the fifth line segment, the coordinate value of the first approximate intersection, and the coordinate value of the second approximate intersection, the starting point coordinates of the weld include the X coordinate value, the Y coordinate value, and the Z coordinate value of the starting point of the weld, and the end point coordinates of the weld include the X coordinate value, the Y coordinate value, and the Z coordinate value of the end point of the weld.
[0120] In one embodiment, the weld identification module 530 is used to determine the distance between the second line segment and the fifth line segment when the second line segment is parallel to the fifth line segment, determine the Z coordinate value of the starting point of the weld based on the distance and the Z coordinate value of the first approximate intersection, determine the Z coordinate value of the end point of the weld based on the distance and the Z coordinate value of the second approximate intersection, and when the second line segment is not parallel to the fifth line segment, determine the Z coordinate value of the starting point of the weld and the Z coordinate value of the end point of the weld by interpolation method based on the coordinate value of the first approximate intersection and the coordinate value of the second approximate intersection.
[0121] Each module in the weld identification device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0122] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.12 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as a preset first scanning trajectory and a preset second scanning trajectory. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a weld identification method is implemented.
[0123] Those skilled in the art will understand that Fig.12 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0124] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps in the above-mentioned weld identification method embodiment are implemented.
[0125] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned weld identification method embodiment are implemented.
[0126] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above-mentioned weld identification method embodiment when executed by a processor.
[0127] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0128] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0129] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0130] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A weld identification method, characterized in that: The method comprises: Scanning the welding workpiece along a preset first scanning trajectory and a preset second scanning trajectory respectively, determining a first scanning line and a second scanning line, wherein the first scanning trajectory and the second scanning trajectory are respectively located in a first plane and a second plane perpendicular to each other, and both the first scanning trajectory and the second scanning trajectory include a welding seam; determining an approximate intersection of the first scan line and the second scan line; The starting point coordinates and the ending point coordinates of the weld are determined according to the first scanning line, the second scanning line and the approximate intersection point.
2. The method according to claim 1, characterized in that The method of scanning the welding workpiece along a preset first scanning track and a preset second scanning track respectively to determine a first scanning line and a second scanning line comprises: Scanning the welding workpiece along a preset first scanning trajectory and a preset second scanning trajectory respectively to obtain a first scanning result and a second scanning result; The first scanning result and the second scanning result are respectively fitted into a broken line containing a preset number of line segments to obtain a first scanning line and a second scanning line.
3. The method according to claim 2, characterized in that The first scanning result and the second scanning result are respectively fitted into a polyline including a preset number of line segments to obtain a first scanning line and a second scanning line, comprising: Fitting the first scanning result into a first scanning line including three line segments, where the first scanning line includes a first line segment, a second line segment, and a third line segment connected in sequence; The second scanning result is fitted into a second scanning line including three line segments, where the second scanning line includes a fourth line segment, a fifth line segment, and a sixth line segment connected in sequence.
4. The method according to claim 3, characterized in that: The determining an approximate intersection point of the first scanning line and the second scanning line comprises: Determine a first approximate intersection point of the first line segment and the fourth line segment, and determine a second approximate intersection point of the third line segment and the sixth line segment; The approximate intersection points include the first approximate intersection point and the second approximate intersection point.
5. The method according to claim 3, characterized in that: The first plane is an XY plane, the second plane is an XZ plane, the approximate intersection point includes a first approximate intersection point between the first line segment and the fourth line segment, and a second approximate intersection point between the third line segment and the sixth line segment; and determining the starting point coordinates and the ending point coordinates of the weld according to the first scanning line, the second scanning line and the approximate intersection point includes: Determine the X coordinate value and Y coordinate value of the starting point of the weld according to the X coordinate value and Y coordinate value of the first approximate intersection point; Determine the X-coordinate value and the Y-coordinate value of the end point of the weld according to the X-coordinate value and the Y-coordinate value of the second approximate intersection point; Determine a Z coordinate value of a starting point of the weld and a Z coordinate value of an end point of the weld according to the second line segment, the fifth line segment, the coordinate value of the first approximate intersection, and the coordinate value of the second approximate intersection; The starting point coordinates of the weld include an X coordinate value, a Y coordinate value, and a Z coordinate value of the starting point of the weld, and the end point coordinates of the weld include an X coordinate value, a Y coordinate value, and a Z coordinate value of the end point of the weld.
6. The method according to claim 5, characterized in that Determining the Z coordinate value of the starting point of the weld and the Z coordinate value of the end point of the weld according to the coordinate value of the second line segment, the fifth line segment, the first approximate intersection point, and the coordinate value of the second approximate intersection point, including: In the case where the second line segment is parallel to the fifth line segment, determining a distance between the second line segment and the fifth line segment, determining a Z coordinate value of a starting point of the weld based on the distance and a Z coordinate value of the first approximate intersection, and determining a Z coordinate value of an end point of the weld based on the distance and the Z coordinate value of the second approximate intersection; When the second line segment is not parallel to the fifth line segment, the Z coordinate value of the starting point of the weld and the Z coordinate value of the end point of the weld are determined by interpolation method based on the coordinate values of the first approximate intersection point and the coordinate values of the second approximate intersection point.
7. A weld identification device, characterized in that: The device comprises: A scanning module, used for scanning the welding workpiece along a preset first scanning trajectory and a preset second scanning trajectory to determine a first scanning line and a second scanning line, wherein the first scanning trajectory and the second scanning trajectory are respectively located in a first plane and a second plane perpendicular to each other, and both the first scanning trajectory and the second scanning trajectory include a welding seam; An approximate intersection point determination module, used to determine an approximate intersection point between the first scanning line and the second scanning line; The weld seam identification module is used to determine the starting point coordinates and the ending point coordinates of the weld seam according to the first scanning line, the second scanning line and the approximate intersection point.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method for 3D scanning weld joint of laser scanning weld joint equipment
CN110102856A
Plate and tube welding seam high-precision identification and welding track acquisition method based on laser scanning
CN114346528A
Double-layer feedback grinding system and method based on image recognition and welding seam force control grinding
CN117697558A
Welding path planning method and device, computer equipment and storage medium
CN117876358A
Method for identifying and correcting welding seam of heating pipe at bottom of boiler based on laser vision
CN118710595A