Straight seam recognition method and device, electronic equipment and storage medium
By filtering similar plane pairs in point cloud data and judging the validity of planes, and combining the spatial relationship of weld lines, the problem of inaccurate identification of lap welds in existing technologies has been solved, and accurate positioning and identification of lap welds have been achieved.
Patent Information
- Application Number
- CN202511453426.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-13
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2045-10-13
AI Technical Summary
Existing technologies struggle to accurately identify lap welds consisting of a regular plane and an extremely narrow plane, leading to missed weld detections.
By performing planar recognition on point cloud data, pairs of similar planes with a normal angle less than a preset threshold and a plane spacing less than a preset distance are selected to determine the validity of the planes. Based on the spatial relationship of the weld lines, lap welds are identified to avoid directly identifying extremely narrow planes.
It improves the accuracy and reliability of lap weld identification, avoids the problem of inaccurate weld identification results caused by inaccurate identification of extremely narrow planes, and realizes accurate positioning and identification of lap welds.
Smart Images

Figure CN120931636B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of welding, in particular to a straight weld seam identification method and device, electronic equipment and a storage medium. BACKGROUND
[0002] Point cloud data, as an important carrier of three-dimensional space information, plays a key role in weld seam identification and detection. In the prior art, the straight weld seam detection method based on point cloud usually adopts a multi-step processing procedure: first, a plane detection algorithm is used to identify the plane structure in the point cloud, and then a face structure topology is established, including a three-face intersection structure and a double-face intersection structure. The system filters out the target face structure by using the constraint conditions such as the direction vector filtering and the structure flag filtering, and finally determines the position of the weld seam to be detected by using the pre-set weld seam database and the specified weld seam number.
[0003] The current method is mainly aimed at the traditional straight weld seam composed of two obvious planes, and the two planes need to meet the minimum height threshold (usually more than 5 mm) and the area threshold to be effectively detected. However, in actual industrial scenarios, there is a special weld structure, such as Figure 1 as shown in Figure 1 is a schematic view of a straight lap weld seam, which is composed of a conventional plane and a plane with extremely narrow height (below 4 mm), and is called a lap weld seam. Due to the difficulty of the extremely narrow plane to reach the sensitivity threshold of the plane detection algorithm, the existing detection procedure cannot completely identify the face structure topology, which causes the weld seam to be missed.
[0004] Therefore, how to improve the identification accuracy of the straight weld seam to avoid the missed detection of the lap weld seam is a technical problem to be solved. SUMMARY
[0005] Therefore, the purpose of the present application is to provide a straight weld seam identification method, device, electronic equipment and storage medium, which can improve the identification accuracy of the straight weld seam, and is especially suitable for accurate identification of the lap weld seam.
[0006] To achieve the above purpose, the technical solutions adopted by the embodiments of the present application are as follows: in a first aspect, the present application provides a straight weld seam identification method, which comprises: performing plane identification on point cloud data, and determining a pair of similar planes based on all the identified planes; wherein the normal angle between the two planes in the pair of similar planes is less than a preset angle threshold, and the distance between the two planes is less than a preset distance threshold; for each pair of similar planes, it is judged whether the two planes are valid planes; if yes, the weld straight line corresponding to each of the two planes is detected, and it is judged whether the two planes are adjacent planes according to the weld straight line; otherwise, no processing is performed; if yes, the straight weld seam between the two planes is identified according to the weld straight line corresponding to the plane closest to the tool center point, otherwise no processing is performed.
[0007] In a second aspect, the present application provides a straight weld seam identification device, comprising: a determination module configured to perform plane identification on point cloud data, and determine a similar plane pair based on all identified planes; wherein the normal included angle of the two planes in the similar plane pair is less than a preset included angle threshold, and the plane distance is less than a preset distance threshold; a judgment module configured to judge whether the two planes are valid planes for each similar plane pair; an identification module further configured to detect the respective weld seam straight lines of the two planes if the result of the judgment module is yes; the judgment module is configured to judge whether the two planes are adjacent planes according to the weld seam straight lines; otherwise, no processing is performed; the identification module is further configured to identify the straight weld seam between the two planes according to the weld seam straight line corresponding to the plane closest to the tool center point if the judgment result of the judgment module is yes, and otherwise, no processing is performed.
[0008] In a third aspect, the present application provides an electronic device comprising a processor and a memory, wherein the memory stores a computer program capable of being executed by the processor, and the processor can execute the computer program to implement the straight weld seam identification method of any one of the preceding embodiments.
[0009] In a fourth aspect, the present application provides a storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the straight weld seam identification method of any one of the preceding embodiments.
[0010] The straight weld seam identification method, device, electronic device and storage medium provided by the embodiments of the present application, the method comprises: performing plane identification on point cloud data, and determining a similar plane pair based on all identified planes, wherein the definition of the similar plane pair is that the normal included angle of the two planes is less than a preset included angle threshold and the plane distance is less than a preset distance threshold, which effectively screens out candidate plane combinations that may constitute a lap weld seam, avoiding the instability caused by relying on traditional extremely narrow plane identification, thereby improving the feasibility of identification at the source; then, for each similar plane pair, it is further judged whether the two planes are valid planes, if they are valid planes, the respective weld seam straight lines are further detected, and whether the two planes are adjacent planes is judged based on the spatial relationship of the weld seam straight lines; if the adjacent relationship is established, the straight weld seam between the two planes is further identified according to the weld seam straight line corresponding to the plane closest to the tool center point, thereby realizing accurate positioning and identification of the lap weld seam, and the method can complete accurate identification of the lap weld seam without relying on identification of extremely narrow planes, thereby improving the weld seam identification accuracy and reliability.
[0011] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the following preferred embodiments are described in detail below, and the accompanying drawings are described as follows. BRIEF DESCRIPTION OF DRAWINGS
[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be considered as limiting the scope. For those skilled in the art, other related drawings can also be obtained from these drawings without creative labor.
[0013] Figure 1 Point cloud diagram for overlap welds;
[0014] Figure 2 The schematic flow chart of the straight weld seam identification method provided by the embodiments of the present application;
[0015] Figure 3 The edge point and non-edge point neighborhood diagram is given in the middle;
[0016] Figure 4 The overlap weld identification result display diagram provided by the embodiments of the present application;
[0017] Figure 5 The functional module diagram of the straight weld seam identification device provided by the embodiments of the present application;
[0018] Figure 6 The structural block diagram of the electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0019] The technical solutions of the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. The components of the embodiments of the present application described and shown in the drawings can be arranged and designed in various different configurations.
[0020] Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of the present application.
[0021] It should be noted that the relational terms herein, such as first and second and the like, are used solely to distinguish one from another entity or action without necessarily requiring or implying any actual relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0022] Referring to Figure 1 , Figure 1 For the point cloud diagram containing the lap joint weld, it can be seen that one of the two planes constituting the lap joint weld has an extremely narrow height. Since the extremely narrow plane is difficult to reach the sensitivity threshold of the plane detection algorithm, it cannot be accurately identified in the detection process, thereby causing the problem of missed detection of the weld.
[0023] To solve the above problems, the embodiment of the present application provides an improved straight weld seam identification method, which can more accurately identify the weld seam in the workpiece, especially the lap joint weld, effectively overcoming the problem of insufficient identification ability of the traditional algorithm in identifying the lap joint weld.
[0024] Referring to Figure 2 , Figure 2 The schematic flow chart of the straight weld seam identification method provided by the embodiment of the present application comprises steps S201 to S204, which are described as follows:
[0025] S201: performing plane identification on the point cloud data, and determining a pair of similar planes based on all the identified planes; wherein the normal angle of the two planes in the pair of similar planes is less than a preset angle threshold;
[0026] S202: for each pair of similar planes, judging whether the two planes are valid planes;
[0027] S203: if yes, detecting the weld straight line corresponding to each of the two planes, and judging whether the two planes are adjacent planes according to the weld straight line; otherwise, no processing is performed;
[0028] S204: if yes, identifying the straight weld seam between the two planes according to the weld straight line corresponding to the plane closest to the tool center point, otherwise, no processing is performed.
[0029] In the above linear weld seam identification process, the point cloud data is identified by a plane, and based on all the identified planes, a pair of similar planes is determined, wherein the definition of the similar planes is that the normal angle of the two planes is less than a preset angle threshold and the distance between the planes is less than a preset distance threshold, which effectively filters out the candidate plane combination that may constitute the lap weld seam, avoids the instability caused by relying on the traditional narrow plane identification, and thus improves the feasibility of the identification at the source; then, for each pair of similar planes, it is further judged whether the two planes are valid planes, if they are valid planes, the corresponding weld straight lines are further detected, and based on the spatial relationship of the weld straight lines, it is judged whether they are adjacent planes; if the adjacent relationship is established, the linear weld seam between the two planes is further identified according to the weld straight line corresponding to the plane closest to the tool center point, so as to realize the accurate positioning and identification of the lap weld seam, which can complete the accurate identification of the lap weld seam without relying on the identification of the narrow plane, and improves the weld seam identification accuracy and reliability.
[0030] Next, the embodiment of the present application will clearly and specifically describe the above linear weld seam identification process in combination with the related drawings.
[0031] In step S201, considering that there may be a narrow plane in the point cloud data, and the detection accuracy of the existing method for such narrow plane is low. Therefore, the embodiment of the present application does not directly identify these narrow planes, but detects a pair of similar planes, and performs subsequent weld seam identification process based on these plane pairs. In this way, the problem of inaccurate weld seam identification result caused by inaccurate narrow plane detection can be effectively avoided.
[0032] In the embodiment of the present application, the normal angle of the two planes in the pair of similar planes is less than a preset angle threshold and the distance between the planes is less than a preset distance threshold. In the process of determining the pair of similar planes, the point cloud data is first detected by a plane, and thus all the planes are obtained to form a plane list; then each plane in the plane list is traversed, and the pair of similar planes is found according to the above angle requirement and distance requirement.
[0033] In the actual implementation process, the i and j variables can be used to traverse the plane list, the value of i is from 0 to the total number of planes-2, the value of j is from i+1 to the total number of planes-1, it is judged whether the distance between the plane i and the plane j satisfies the distance requirement, and it is judged whether the angle threshold between the normal of the plane i and the normal of the plane j satisfies the angle requirement, and the two planes that satisfy the distance requirement and the angle requirement at the same time constitute the pair of similar planes.
[0034] After obtaining the similar plane pairs through the above implementation method, considering that different similar plane pairs may contain the same plane, and that some similar plane pairs contain planes that are not the planes forming the lap weld, but rather small miscellaneous planes, for each pair of similar planes, the edge line of the plane and a flag indicating whether the plane is a valid plane can be pre-stored. The flags for valid and invalid planes can be distinguished by different characters. For example, as an example, the flag for a valid plane is 1, and the flag for an invalid plane is 0.
[0035] In this embodiment of the invention, the purpose of storing the number of edge lines is to directly read and use the edge lines in the future, and to prevent repeated detection of edge lines; the purpose of storing the valid plane flag is to directly skip the identification of welds with plane pairs containing invalid planes, and to avoid invalid identification.
[0036] Initially, in this embodiment of the invention, the edge lines of all planes are set to empty, and all planes are considered valid planes, i.e., the flag bits are all 1. In subsequent processes, the stored information of edge lines and flag bits can be updated according to the edge line detection results of each plane and the detection results of whether the plane is valid or not.
[0037] In step S202, for each pair of adjacent planes, it can be determined whether both planes are valid planes. As shown in steps a1 to a2:
[0038] Step a1: Detect the edge points of each plane;
[0039] Step a2: If the ratio of the number of edge points of the plane to the total number of points of the plane is greater than the preset ratio, then the plane is determined to be a valid plane; otherwise, it is an invalid plane.
[0040] The above implementation method can be used to determine whether a plane is an invalid plane or a valid plane.
[0041] To ensure the accuracy of the above detection results, during the detection of edge points, the distribution of neighboring points near a point on the plane can be used to determine whether a point is an edge point. If a point is inside the plane, its neighboring points are distributed around it; if a point is on the edge of the plane, its neighboring points are distributed on one side of it.
[0042] To better understand this approach, please refer to [link / reference]. Figure 3 , Figure 3 The diagram shows the neighborhoods of edge points and non-edge points. Figure 3 In the first example, a point and its neighborhood are given inside the plane. It can be seen that the neighborhood points are distributed around this point, so the maximum adjacent angle difference is small. Conversely, a point and its neighborhood are given at the edge of the plane. It can be seen that the neighborhood points are distributed on one side of this point, while there are no points on the other side, so the maximum adjacent angle difference is large.
[0043] Based on the above idea, the embodiment of the present application provides an implementation of detecting edge points, as shown in steps a1-1 to a1-4, which are described as follows:
[0044] Step a1-1: Obtain the neighborhood points of each point on the plane; wherein the distance between each neighborhood point and the point is less than or equal to a preset radius;
[0045] Step a1-2: Calculate the included angle between the line connecting each neighborhood point and the point and the coordinate axis perpendicular to the normal of the plane, to obtain the included angle set corresponding to each point;
[0046] Step a1-3: In the included angle set, calculate the difference between adjacent included angles and the difference between the minimum included angle and the maximum included angle, and determine the maximum difference;
[0047] Step a1-4: When the maximum difference is greater than or equal to a preset angle value, the point is determined as an edge point.
[0048] Before performing the above step a1-1, the embodiment of the present application can first obtain the normal of the plane, and establish a coordinate system on the plane according to the normal, denoted as t1t2 coordinate system, wherein the t1 axis and the t2 axis are perpendicular to each other, and both the t1 axis and the t2 axis are perpendicular to the normal. Then, a KD tree is established for the points on the plane.
[0049] After the above preparation is completed, in order to obtain the neighborhood points of each point, a point (denoted as p i ) can be taken as a center point, and points within a preset neighborhood radius from p i point in the KD tree are found, which are the neighborhood points of p i point.
[0050] Since the neighborhood search process of the KD tree will certainly find the p i point itself, the neighborhood points of the p i point contain at least one point. At this time, it can be first judged whether the number of neighborhood points is equal to 2, if not, it means that the neighborhood points of the p i point only have one point, then the p i point is directly determined as an edge point, without the need to perform subsequent processes. If the number of neighborhood points is greater than 2, the subsequent processes are continued to be performed.
[0051] In step a1-2, in order to facilitate description and understanding, the jth neighborhood point of p i point is denoted as p j . For each p j , the difference between p i and p j is first calculated, i.e. pdiff = p j - p iThen the angle between pdiff and the t1 axis is calculated The angle is stored in angle_i. angle_i stores the angle between pdiff and the t1 axis of the point. i The angle between the line connecting the neighborhood point of the point and the t1 axis, until all neighborhood points of the point are traversed. i The angle between the line connecting the neighborhood point of the point and the t1 axis, until all neighborhood points of the point are traversed. i The angle between the line connecting the neighborhood point of the point and the t1 axis, until all neighborhood points of the point are traversed.
[0052] In step a1-3, angle_i obtained in the above steps can be sorted from small to large first, then the difference between adjacent angles is calculated, that is, theta_diff_j = angle_i[j+1]-angle_i[j] is calculated, and theta_diff_j is stored in theta_diff_i. theta_diff_i stores the difference between adjacent angles in angle_i. Since the neighborhood points of p i are distributed around p i , the difference between the minimum angle and the maximum angle also needs to be calculated, but this time the minimum angle needs to be added by 2 and then subtracted by the maximum angle. That is, angle_i[0] + 2 - angle_i[angle_i.size()-1] is calculated, and the value is stored in theta_diff_i.
[0053] In step a1-4, the maximum value max_angle_diff in theta_diff_i is found. This value represents the maximum value of the difference between adjacent angles. It is judged whether max_angle_diff is greater than or equal to a preset angle value, if yes, it means that p i is an edge point. In this way, the result of whether each point on the plane is an edge point can be obtained.
[0054] Through the above embodiment, all edge points on a plane can be accurately distinguished, which provides a basis for subsequent judgment of whether the plane is a valid plane or an invalid plane.
[0055] In an embodiment of the present application, for a plane, since the valid flag bit is stored initially. Therefore, if it is determined through steps a1 to a2 that the plane is an invalid plane, the valid flag bit stored by the plane can be modified to an invalid flag bit, for example, 1 is modified to 0. If it is a valid plane, the flag bit is not modified.
[0056] Of course, the detection process of steps a1 to a2 above is applicable to a plane which has not been processed at all, i.e. the stored information of which is still in the initial state, the number of edge straight lines of which is 0 and the plane is a valid plane. However, since the same plane can appear in different pairs of adjacent planes, a plane in a pair of adjacent planes can have been processed by steps a1 to a2. In order to avoid repeated detection of the same plane, before performing step a1, it can be determined whether the plane has been processed by steps a1 to a2 based on the number of edge straight lines and the valid state stored in advance. In this way, the efficiency of the processing process can be ensured.
[0057] Based on the above considerations, a judgment condition is provided in the embodiments of the present application to identify whether a plane has been processed. The condition is that the number of edge straight lines is 0 and the plane is marked as a valid plane. If a plane satisfies this condition, it means that the plane has not been processed by any detection process, and steps a1 to a2 can be performed at this time. On the contrary, if the condition is not satisfied, it means that the plane has been processed by edge point detection and its flag bit has been modified. At this time, the flag bit of the plane can be directly used to determine whether the plane is a valid plane or an invalid plane. In this way, repeated detection can be effectively avoided, and the processing efficiency can be improved.
[0058] It should be understood that, in a pair of adjacent planes, if a plane is identified as an invalid plane, the other plane is not determined to be a valid plane or an invalid plane, and the next pair of adjacent planes is directly processed. If a plane is identified as a valid plane, the other plane is determined to be a valid plane or an invalid plane. If the other plane is also a valid plane, step S203 is performed, otherwise, the next pair of adjacent planes is directly processed.
[0059] In order to facilitate the understanding of the above embodiments, it is assumed that the pair of adjacent planes includes plane 1 and plane 2, and the number of edge straight lines stored in the two planes is 0 and the two planes are valid planes at the initial time. Then, the validity of plane 1 and plane 2 can be determined in the following way:
[0060] Step 1: determine whether the number of edge straight lines of plane 1 is 0 and plane 1 is a valid plane;
[0061] If not, step 4 is performed; if yes, step 2 is performed;
[0062] Step 2: determine whether the ratio of the number of edge points of plane 1 to the total number of points of plane 1 is greater than a preset ratio;
[0063] If yes, step 3 is performed; otherwise, no processing is performed;
[0064] Step 3: determine that plane 1 is an invalid plane, and set the flag bit to 0.
[0065] Step 4: judging whether the plane 1 is a valid plane or an invalid plane according to the stored flag bit;
[0066] If the plane 1 is a valid plane, then judging whether the plane 2 is a valid plane or an invalid plane according to the above steps 1 to 4, and if the plane 2 is a valid plane, the subsequent step S203 can be executed; otherwise, directly jumping to the judgment process of the next adjacent plane pair.
[0067] In step 203, the welding seam straight lines corresponding to the two planes respectively are detected. The welding seam straight lines are the preliminary welding seam lines identified on the planes, and the detection of the welding seam straight lines on the planes is shown in steps b1 to b4 and explained as follows:
[0068] Step b1: obtaining the edge straight lines of the two planes respectively;
[0069] In the embodiment of the present application, for each plane, firstly, it is determined whether the edge straight lines are stored or not, and if not, the edge straight lines of the plane are detected, and if yes, the edge straight lines can be directly obtained.
[0070] In the edge straight line detection process, the accurate edge straight lines can be obtained by detecting the corner points and then connecting the corner points. Therefore, the implementation process of step b1 can be as follows:
[0071] Step b1-1: detecting the corner points of the two planes respectively;
[0072] Step b1-2: connecting all the corner points to obtain the edge straight lines.
[0073] Through the above implementation, the edge straight lines of the planes can be quickly detected.
[0074] In an embodiment of the present application, in step b1-1, the corner points can be detected by using the coordinate axis collision detection method on the edge points of the planes. However, considering that the coordinate axis is rotated many times in the process of detecting the corner points (referred to as initial corner points) by using the coordinate axis collision detection method, some of the initial corner points are very close in position, and therefore the initial corner points need to be optimized to obtain the final corner points.
[0075] Based on the above consideration, after step b1-1 is executed and before step b1-2 is executed, the initial corner points detected can be optimized by merging the corner points with a distance less than or equal to a preset distance threshold as the final corner points, so as to ensure the correctness of the subsequent identification result.
[0076] In the specific implementation process, the above merging can be completed in the following manner, as shown in steps c1 to c5:
[0077] Step c1: sorting all the corner points to determine the first corner point;
[0078] Step c2: from the sorted corner points, the rest of the corner points are clustered in turn, except for the first corner point, when the distance between adjacent corner points is greater than a preset threshold, the current clustering is ended;
[0079] Step c3: calculate the centroid of the corner points in each cluster;
[0080] Step c4: if the distance between the centroid and the first corner point is less than a preset threshold, then the corner points in the cluster and the first corner point are merged to recalculate the centroid as the final corner point;
[0081] Step c5, otherwise, the centroid of the cluster is taken as the final corner point;
[0082] Repeat the above clustering process until all corner points are processed.
[0083] In order to facilitate the understanding of the above process, it is assumed that the initial corner points are stored in corner, and the number of initial corner points is greater than or equal to 2. Each initial corner point in corner has been arranged in a preset arrangement order. The above process can be understood in the following way:
[0084] Step 1: create arrays corner_temp and corner_0; wherein, corner_temp is used to save the final corner point, and corner_0 is used to save the corner points in a cluster with the first initial corner point;
[0085] Step 2: store the first initial corner point corner[0] in the preset arrays corner_temp and corner_0 at the same time;
[0086] Step 3: set i = 1;
[0087] Step 4: determine whether i is less than the number of initial corner points, if not, execute step 13; if yes, execute step 5;
[0088] Step 5: initialize the array local_corner, and store corner[i] in local_corner. Wherein, local_corner represents the corner points in the same cluster as corner i.
[0089] Step 6: set j = i + 1, determine whether j is less than the number of initial corner points, if not, execute step 8; if yes, execute step 7;
[0090] Step 7: determine whether the following conditions are met: less than or equal to a preset distance threshold; wherein, L2 norm of the computed vector, if true, it means that corner[j] is close to the last corner in local_corner, so corner[j] and the corner in local_corner belong to the same cluster, and corner[j] is stored in local_corner, and return to step 6.
[0091] If the condition is not true, it means that corner[j] is not close to the corner in local_corner, and step 8 is executed.
[0092] Step 8: The centroid of each corner in local_corner is calculated, denoted as local_m.
[0093] Step 9: Determine whether the following condition is true: Less than or equal to a preset distance threshold;
[0094] If yes, it means that local_corner and the first initial corner belong to the same cluster, and step 10 is executed; if no, step 11 is executed.
[0095] Step 10: The corners in local_corner are all stored in corner_0.
[0096] Step 11: local_m is stored in corner_temp.
[0097] Step 12: i = j, return to step 4.
[0098] Step 13: The centroid corresponding to each corner in corner_0 is calculated, and the centroid replaces corner_temp[0], and the corner maintained in corner_temp is the final corner.
[0099] Through the above steps, the close corners can be combined into one corner, which facilitates the final connection of the corners and ensures the accuracy of the edge straight line.
[0100] Based on the edge straight line obtained above, the subsequent process of detecting the planar weld straight line of the embodiment of the application is performed, i.e., steps b2 to b4.
[0101] Step b2: For each of the two planes, the projection interval of the points adjacent to each edge straight line on the edge straight line is determined.
[0102] Step b3: The intersection interval of the projection intervals on each edge straight line is determined.
[0103] Step b4: The straight line corresponding to the maximum intersection interval is taken as the weld straight line of the plane.
[0104] By the above embodiment, the welding straight lines of the two planes can be quickly determined. Then, the lengths of the two welding straight lines are used to determine whether the two planes are adjacent planes. The determination condition is that the lengths of the welding straight lines of the two planes are both greater than 0. If the condition is met, it is indicated that the two planes are adjacent planes, otherwise, they are not. If the two planes are adjacent planes, step S204 is further performed, otherwise, the adjacent plane pair is skipped and the straight line welding seam recognition of the next adjacent plane pair is directly performed.
[0105] In step S204, if it is determined that the two planes are adjacent planes, it is determined which plane is closer to the tool center point, and the welding straight line of the closer plane is used as the projection straight line to project on the other plane, and the intersection interval is determined according to the points on the two planes near the projection straight line, so as to determine the start point and the end point. The end point and the start point are connected, and the straight line welding seam of the two planes can be obtained.
[0106] Therefore, for step S204, the embodiment provided by the embodiment of the present application is as shown in steps d1 to d4, and the description is as follows:
[0107] Step d1: obtaining the projection straight line of the welding straight line corresponding to the plane closest to the tool center point on the other plane;
[0108] In the embodiment of the present application, the tool center point (Tool Center Point, TCP) refers to the reference position of the current point cloud scanning device or the welding tool. The projection straight line is a new straight line formed by further projecting the welding straight line on the other plane, which is used for subsequent analysis.
[0109] By determining which plane is closer to the TCP, it is determined to use the welding straight line on which plane as the projection straight line, so as to ensure that the position of the identified lap welding seam is closer to the actual working position of the tool, and the practicability and accuracy of the identification are improved.
[0110] Step d2: finding the points adjacent to the projection straight line on the two planes;
[0111] In the embodiment of the present application, a distance threshold can be set, and then the points on the two planes with a distance less than or equal to the distance threshold from the projection straight line are determined as the adjacent points of the projection straight line. These points are considered as points "close" to the welding line, which can be part of the actual welding seam.
[0112] Step d3: determining the projection interval of the adjacent points on the other plane in the direction of the projection straight line;
[0113] In the embodiment of the present application, by projecting the adjacent points, the position distribution of the adjacent points on the two planes in the projection direction, i.e. the projection interval, can be obtained.
[0114] Step d4: Determine the intersection interval of the projection intervals, and use the line connecting the start and end points of the intersection interval as a straight weld.
[0115] Understandably, this is achieved by finding the maximum overlap between two locations, i.e., the intersection interval. For example, if the projection interval of adjacent points on plane 1 is [100, 200], and the projection interval of adjacent points on plane 2 is [150, 250], then their intersection interval is [150, 200]. The start and end points of this overlap are the start and end points of the lap weld. By taking the intersection, the region that is "valid" on both planes is found as a more accurate weld segment.
[0116] To provide a clear and intuitive demonstration of the effects of the embodiments of the present invention, please refer to [link / reference]. Figure 4 , Figure 4 This is a diagram illustrating the identification results of lap welds provided in an embodiment of the present invention. (Combined with...) Figure 1 ,exist Figure 4 The middle gives Figure 1 The results of the midpoint cloud lap weld identification clearly show that the embodiments of the present invention can accurately identify lap welds in the workpiece, overcoming the shortcomings of existing straight weld identification algorithms in lap weld identification.
[0117] In summary, the straight weld identification method provided in this invention primarily identifies the weld location by detecting pairs of adjacent planes and utilizing the projection of the edge lines of these pairs, rather than directly identifying extremely narrow planes. First, the validity of a plane is determined by evaluating the proportion of edge points to the total number of points on each plane; if the proportion of edge points is too high, the plane is considered invalid. If either of a pair of adjacent planes is marked as invalid, then this pair of planes will not contain any valid lap welds. This method improves the accuracy and efficiency of the lap weld identification process. Furthermore, in determining the validity of a plane, the distribution of points in the neighborhood of the current point, combined with whether the maximum angle difference exceeds a preset threshold, accurately determines whether the point is a plane edge point, providing a basis for the validity determination. Subsequently, coordinate axis collision detection technology is used to extract corner points from the identified edge points, and cluster analysis is used to further confirm the location of the final corner points. Next, all final corner points are connected to form edge lines, and weld lines are further filtered out based on this, and the lines used for projection are calculated, ultimately completing the location of the lap weld. The entire process can accurately identify lap welds between extremely narrow planes without the need to detect the extremely narrow planes, thus improving the accuracy and reliability of weld identification.
[0118] To perform the corresponding steps in the above embodiments and various possible methods, an implementation of the straight weld seam recognition device 50 is given below. Please refer to [link / reference]. Figure 5 ,Figure 5 A function module diagram of the straight weld joint recognition device provided by the embodiment of the present application is provided. The straight weld joint recognition device 50 comprises:
[0119] The determining module 501 is configured to perform plane recognition on the point cloud data, and determine a similar plane pair based on all the recognized planes; wherein the normal included angle of the two planes in the similar plane pair is less than a preset included angle threshold, and the plane distance is less than a preset distance threshold.
[0120] The judging module 502 is configured to judge whether the two planes are valid planes for each similar plane pair.
[0121] The recognition module 503 is further configured to, if the result of the judging module 502 is yes, detect the respective weld joint lines of the two planes, and the judging module 502 is configured to judge whether the two planes are adjacent planes according to the weld joint lines; otherwise, no processing is performed.
[0122] The recognition module 503 is further configured to, if the result of the judging module is yes, recognize the straight weld joint between the two planes according to the weld joint line corresponding to the plane closest to the tool center point; otherwise, no processing is performed.
[0123] It can be understood that the determining module 501, the judging module 502 and the recognition module 503 can cooperatively perform each step in the above method to achieve the corresponding technical effects. Figure 2
[0124] It should be noted that the straight weld joint recognition device 50 provided by the embodiment of the present application has the same basic principle and technical effects as the above embodiment, and for brief description, the part not mentioned in this embodiment can refer to the corresponding content in the above embodiment, which will not be described here.
[0125] Optionally, the above modules can be stored in the memory shown in the form of software or firmware (Firmware) or solidified in the operating system (Operating System, OS) of the electronic device, and can be executed by the processor in the electronic device. Figure 6 Figure 6 Meanwhile, the data, program code and the like required for executing the above modules can be stored in the memory.
[0126] Please refer to Figure 6 , Figure 6 The structural block diagram of the electronic device provided by the embodiment of the present application comprises a memory 601, a processor 602 and a communication interface 603, and the memory 601, the processor 602 and the communication interface 603 are directly or indirectly electrically connected with each other to realize the transmission or interaction of data. For example, these elements can be electrically connected with each other through one or more communication buses or signal lines.
[0127] Optionally, the bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus or the like. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 6 Only one bus is shown for each bus interface, but it is understood that the bus interface can include a plurality of buses. Further, the bus is only one example of a suitable bus or set of buses.
[0128] In the embodiments of the present application, the processor 602 can be a general processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application. The general processor can be a microprocessor or any conventional processor or the like. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as execution by a hardware processor, or executed by a combination of hardware and software modules in the processor. The software modules can be located in the memory 601, and the processor 602 reads the program instructions in the memory 601 and combines them with the hardware to complete the steps of the above method.
[0129] In the embodiments of the present application, the memory 601 can be a non-volatile memory such as a Hard Disk Drive (HDD) or a Solid-State Drive (SSD), and can also be a volatile memory such as a RAM. The memory can also be any other medium capable of carrying or storing desired program executable code in the form of instructions or data structures and capable of being accessed by a computer, but is not limited to this. The memory in the embodiments of the present application can also be a circuit or any other device capable of realizing a storage function, used for storing instructions and / or data.
[0130] The memory 601 can be used to store software programs and modules, such as the instructions / modules of the straight weld seam identification device 50 provided by the embodiments of the present application, which can be stored in the memory 601 in the form of software or firmware or solidified in the Operating System (OS) of the electronic device 60. The processor 602 executes the software programs and modules stored in the memory 601 to perform various functional applications and data processing. The communication interface 603 can be used for signaling or data communication with other node devices.
[0131] It can be understood that Figure 6 The structure shown is only schematic, and the electronic device 60 can further include more components than those shown Figure 6more or less components than those shown, or configurations of the components other than those shown. Figure 6 Figure 6 The components shown can be implemented in hardware, software, or a combination thereof.
[0132] Based on the above embodiments, the present application further provides a readable storage medium, and the readable storage medium stores a computer program. When the computer program is executed by a computer, the computer program causes the computer to execute the straight weld seam identification method provided by the above embodiments. For details, refer to the method embodiments, which will not be described here.
[0133] The present application also provides a computer program product for executing the straight weld seam identification method. The computer program product includes a computer readable storage medium storing program codes. The program codes include instructions for executing the method in the above method embodiments. For details, refer to the method embodiments, which will not be described here.
[0134] In the embodiments provided by the present application, it should be understood that the disclosed device and method can be implemented in other manners. The described device embodiments are merely schematic, and the division of units is merely a logical function division, and there can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different units, can be indirect couplings or communication connections through some interfaces, and there can be electric, mechanical or other forms.
[0135] In addition, the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. According to actual needs, some or all of the units can be selected to achieve the purpose of the embodiments of the present application.
[0136] In addition, each functional module in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0137] It should be noted that, if the functions are realized in the form of software function modules and sold or used as independent products, they can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or the parts of the present application that essentially contribute to the prior art or the parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, an electronic device, or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0138] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A straight weld seam recognition method, characterized in that, The method comprises: plane recognition is performed on the point cloud data, and a similar plane pair is determined based on all the recognized planes; wherein the normal included angle of the two planes in the similar plane pair is less than a preset included angle threshold and the plane distance is less than a preset distance threshold; for each similar plane pair, it is determined whether the two planes are valid planes; if the two planes are valid planes, edge straight lines of the two planes are obtained; for each of the two planes, a projection interval of points adjacent to each edge straight line on the edge straight line is determined; an intersection interval of the projection intervals on each edge straight line is determined; a straight line corresponding to the maximum intersection interval is taken as a weld straight line of the plane; if the lengths of the weld straight lines of the two planes are both greater than 0, the two planes are adjacent planes, otherwise they are not adjacent planes; if the two planes are not valid planes, no processing is performed; if the two planes are adjacent planes, a projection straight line of the weld straight line corresponding to the plane closest to the tool center point on the other plane is obtained; points adjacent to the projection straight line on the two planes are found; a projection interval of the adjacent points projected onto the other plane along the projection straight line direction is determined; an intersection interval of the projection interval is determined, and a line between the start point and the end point of the intersection interval is taken as the straight line weld; if the two planes are not adjacent planes, no processing is performed.
2. The straight weld seam recognition method according to claim 1, characterized in that, obtaining the edge straight lines of the two planes comprises: detecting corner points of the two planes; connecting all the corner points to obtain the edge straight lines.
3. The straight weld seam recognition method according to claim 2, characterized in that, Before connecting all the corner points to obtain the edge straight lines, the method further comprises: combining corner points with a distance less than or equal to a preset distance threshold as final corner points.
4. The straight weld seam recognition method according to claim 1, characterized in that, for each similar plane pair, it is determined whether the two planes are valid planes, comprising: detecting edge points of each plane; if the ratio of the number of edge points of the plane to the total number of points of the plane is greater than a preset proportion, the plane is determined to be an invalid plane, otherwise it is a valid plane.
5. The straight weld seam recognition method according to claim 4, characterized in that, detecting edge points of each plane comprises: obtaining neighborhood points of each point on the plane; wherein the distance between each neighborhood point and the point is less than or equal to a preset radius; calculating the included angle between the line connecting each neighborhood point and the point and the coordinate axis perpendicular to the plane normal to obtain an included angle set corresponding to each point; in the included angle set, the difference between adjacent included angles and the difference between the minimum included angle and the maximum included angle are calculated, and the maximum difference is determined; when the maximum difference is greater than or equal to a preset angle value, the point is determined to be an edge point.
6. A straight weld seam recognition device, characterized by comprise: a determination module configured to perform plane recognition on the point cloud data and determine a similar plane pair based on all the recognized planes; wherein the normal included angle of the two planes in the similar plane pair is less than a preset included angle threshold and the plane distance is less than a preset distance threshold; a judgment module configured to determine whether the two planes are valid planes for each similar plane pair. The identifying module is further configured to, if the result of the judging module is that the two planes are valid planes, obtain an edge line of each of the two planes; for each of the two planes, determine a projection interval of a point adjacent to each edge line on the edge line on the plane; determine an intersection interval of the projection intervals on each edge line; and take a line corresponding to the intersection interval with the largest intersection interval as a weld line of the plane. The judging module is configured to judge whether the two planes are adjacent planes if lengths of the weld lines of the two planes are both greater than 0, and not adjacent planes otherwise. If the two planes are not valid planes, no processing is performed. The identifying module is further configured to, if the result of the judging module is that the two planes are adjacent planes, obtain a projection line of a weld line corresponding to a plane closest to a tool center point on another plane; find out points adjacent to the projection line on the two planes; determine a projection interval of the adjacent points on the another plane in a direction of the projection line; determine an intersection interval of the projection interval, and take a line between a start point and an end point of the intersection interval as the straight weld. If the two planes are not adjacent planes, no processing is performed.
7. An electronic device, comprising: A computer program product includes a processor and a memory storing a computer program executable by the processor, and the processor is capable of executing the computer program to implement the straight weld identifying method of any one of claims 1-5.
8. A storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to implement the straight weld identifying method of any one of claims 1-5.
Citation Information
Patent Citations
Transition surface group identification and gap detection method and device, equipment and storage medium
CN114399783A
Workpiece welding seam identification method and device, computer readable medium and electronic equipment
CN115409805A