Linear welding seam extraction method and device and electronic equipment

By detecting the target straight line and the corresponding local point cloud, the real linear weld segment is judged and extracted, and the problem of being unable to determine the starting and end points of the linear weld and multi-stage welds in the prior art is solved, and accurate linear weld extraction is achieved.

CN119180796APending Publication Date: 2024-12-24FAIR INNOVATION (SUZHOU) ROBOTIC SYSTEM CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411244723.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2024-12-24

AI Technical Summary

Technical Problem

The prior art cannot accurately detect the true linear weld and its start and end points, resulting in welding abnormalities and the multi-stage weld cannot be determined.

Method used

By obtaining the target line, the first local point cloud and the second local point cloud, it is judged whether there is a real straight line intersection segment on the target line, and when it exists, it is detected that the real straight line intersection segment is used as a linear weld segment. This method is based on the linear intersection lines calculated by plane equations and analyzes them in combination with the corresponding local point clouds.

Benefits of technology

It realizes the detection of the real linear weld and determines its starting and end points, avoids welding abnormalities, and accurately extracts information about multiple linear welds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119180796A_ABST
    Figure CN119180796A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a linear welding seam extraction method and device and electronic equipment, and relates to the technical field of computers. The method comprises the steps that a target straight line, a first local point cloud and a second local point cloud are obtained, the target straight line is a straight line intersecting line obtained through calculation based on a first plane equation and a second plane equation, and the first plane equation and the second plane equation are obtained through detection based on a to-be-processed target point cloud; the first local point cloud is a point cloud corresponding to the first plane equation in the target point cloud, and the second local point cloud is a point cloud corresponding to the second plane equation in the target point cloud; and according to the target straight line, the first local point cloud and the second local point cloud, whether a real straight line intersection section exists on the target straight line or not is judged, and when the real straight line intersection section exists, the real straight line intersection section is detected as a straight line welding seam section. In this way, the real linear welding seam is obtained through detection, and the starting point and the ending point of the real linear welding seam are obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device and electronic equipment for extracting a straight weld. Background Art

[0002] At present, the method of extracting straight welds based on point clouds is as follows: use a plane detection algorithm to perform plane detection on the point cloud to obtain a plane equation, then find the straight line equation of the intersection line between the two planes represented by the two plane equations based on the two plane equations, and use the straight line equation as the solved straight weld. However, the straight line represented by the straight line equation obtained in the above method does not necessarily correspond to the real straight line intersection line, that is, it does not necessarily correspond to the straight line where the real straight line intersection line segment is located. As a result, the obtained straight weld is not necessarily a real straight weld, and the starting point and end point of the straight weld cannot be determined. Summary of the invention

[0003] The embodiments of the present application provide a linear weld extraction method, device, electronic device and readable storage medium, which can detect and obtain a real linear weld and obtain the starting and ending points of the real linear weld.

[0004] The embodiments of the present application can be implemented as follows:

[0005] In a first aspect, an embodiment of the present application provides a method for extracting a straight weld, the method comprising:

[0006] Obtaining a target straight line, a first local point cloud, and a second local point cloud, wherein the target straight line is a straight line intersection calculated based on a first plane equation and a second plane equation, the first plane equation and the second plane equation are detected based on a target point cloud to be processed, the first local point cloud is a point cloud in the target point cloud corresponding to the first plane equation, and the second local point cloud is a point cloud in the target point cloud corresponding to the second plane equation;

[0007] According to the target straight line, the first partial point cloud and the second partial point cloud, it is determined whether there is a real straight line intersection segment on the target straight line, and if so, the real straight line intersection segment is detected as a straight line weld segment.

[0008] In a second aspect, an embodiment of the present application provides a linear weld extraction device, the device comprising:

[0009] an information acquisition module, configured to obtain a target straight line, a first local point cloud, and a second local point cloud, wherein the target straight line is a straight line intersection calculated based on a first plane equation and a second plane equation, the first plane equation and the second plane equation are detected based on a target point cloud to be processed, the first local point cloud is a point cloud in the target point cloud corresponding to the first plane equation, and the second local point cloud is a point cloud in the target point cloud corresponding to the second plane equation;

[0010] The processing module is used to determine whether there is a real straight line intersection segment on the target straight line according to the target straight line, the first local point cloud and the second local point cloud, and detect the real straight line intersection segment as a straight line weld segment if it exists.

[0011] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the linear weld extraction method described in the aforementioned embodiment.

[0012] In a fourth aspect, an embodiment of the present application provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the linear weld extraction method as described in the aforementioned embodiment is implemented.

[0013] The linear weld extraction method, device and electronic device provided in the embodiment of the present application first obtain a target straight line and a first local point cloud and a second local point cloud corresponding to the target straight line, and then determine whether there is a real straight line intersection segment on the target straight line based on the target straight line, the first local point cloud and the second local point cloud, and detect the real straight line intersection segment as a linear weld segment if it exists. The target straight line is a straight line intersection calculated based on the first plane equation and the second plane equation, the plane equation is detected based on the target point cloud to be processed, the first local point cloud is the point cloud corresponding to the first plane equation in the target point cloud, and the second local point cloud is the point cloud corresponding to the second plane equation in the target point cloud. In this way, the real linear weld can be detected and obtained, and the starting and ending points of the real linear weld can be obtained. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0015] Figure 1 Schematic diagram of two real positions of the plane;

[0016] Figure 2 It is another real position diagram of the plane;

[0017] Figure 3 A block diagram of an electronic device provided in an embodiment of the present application;

[0018] Figure 4 A schematic diagram of a flow chart of a linear weld extraction method provided in an embodiment of the present application;

[0019] Figure 5 A schematic diagram of a process for obtaining all straight welds in a target point cloud provided in an embodiment of the present application;

[0020] Figure 6 A schematic diagram of a process for obtaining an intersection line of two planes provided in an embodiment of the present application;

[0021] Figure 7 for Figure 4 One of the flowcharts of the sub-steps included in step S200;

[0022] Figure 8 A schematic diagram of a projection interval obtained by clustering provided in an embodiment of the present application;

[0023] Fig. 9 A schematic diagram of a process for obtaining a projection value provided in an embodiment of the present application;

[0024] Fig.10 for Figure 7 A schematic flow chart of the sub-steps included in sub-step S250;

[0025] Fig.11 for Figure 7 A schematic flow chart of the sub-steps included in sub-step S260;

[0026] Fig.12 for Figure 4 2 is a flow chart of the sub-steps included in step S200;

[0027] Fig.13 A schematic block diagram of a linear weld extraction device provided in an embodiment of the present application.

[0028] Icon: 100 - electronic device; 110 - memory; 120 - processor; 130 - communication unit; 200 - straight weld extraction device; 210 - information acquisition module; 220 - processing module. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.

[0030] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely 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 work are within the scope of protection of the present application.

[0031] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0032] Currently, a linear weld is obtained based on a point cloud in the following manner: a plane represented by a plane equation is obtained based on the point cloud, and then a straight line equation representing the intersection line between the two planes is calculated based on the two plane equations, and the intersection line represented by the straight line equation is directly used as a linear weld.

[0033] The inventor of the present application has found that the above-mentioned method of obtaining a straight weld has the following disadvantages. 1. Only the intersection line between the planes can be obtained, and the intersection line can be represented by a straight line equation, but it cannot be determined whether the straight line equation corresponds to the real weld. In other words, the straight line equation may correspond to the real straight line intersection line or may not correspond to the real straight line intersection line. If the straight line equation that does not correspond to the real straight line intersection line is used as the straight weld, the real weld is not extracted, which will cause welding abnormalities, etc. The real straight line intersection line represents the straight line where the real straight weld segment is located.

[0034] For example, Figure 1As shown in a in , plane 1 and plane 2 intersect in reality, and there is a real straight line intersection. In this case, the straight line equation calculated based on the plane equations corresponding to plane 1 and plane 2 obtained from the point cloud corresponds to the real straight line intersection, that is, the calculated intersection is the real straight line intersection. Or, Figure 1 As shown in b in the figure, plane 1 and plane 2 do not intersect in reality, and there is no real straight line intersection. In this case, the straight line equation calculated based on the plane equations corresponding to plane 1 and plane 2 obtained from the point cloud does not correspond to the real straight line intersection, that is, the calculated intersection is not the real straight line intersection.

[0035] 2. It is impossible to determine the starting point and end point of each straight weld. This is because the existing algorithm only finds the intersection equation between planes, which represents a straight line without a starting point or end point.

[0036] 3. Such as Figure 2 As shown in the figure, when plane 1 includes two sub-planes distributed at intervals in the real situation, and plane 1 intersects plane 2, there should be two straight welds at this time. These two straight welds have the same straight direction vector, their own starting points and end points, and are located on a straight line. Since the existing algorithm only finds the intersection line between the planes, it is also impossible to give the possible multiple welds on the same intersection line.

[0037] In view of the above situation, the embodiments of the present application provide a straight line weld extraction method, device, electronic device and readable storage medium, which can detect and obtain a real straight line weld and obtain the starting and ending points of the real straight line weld.

[0038] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0039] Please refer to Figure 3 , Figure 3 A block diagram of an electronic device 100 provided in an embodiment of the present application. The electronic device 100 may be, but is not limited to, a computer, a server, etc. The electronic device 100 may include a memory 110, a processor 120, and a communication unit 130. The memory 110, the processor 120, and the communication unit 130 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components may be electrically connected to each other via one or more communication buses or signal lines.

[0040] The memory 110 is used to store programs or data. The memory 110 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.

[0041] The processor 120 is used to read / write data or programs stored in the memory 110 and execute corresponding functions. For example, the memory 110 stores a linear weld extraction device 200, which includes at least one software function module that can be stored in the memory 110 in the form of software or firmware. The processor 120 executes various functional applications and data processing by running software programs and modules stored in the memory 110, such as the linear weld extraction device 200 in the embodiment of the present application, that is, realizing the linear weld extraction method in the embodiment of the present application.

[0042] The communication unit 130 is used to establish a communication connection between the electronic device 100 and other communication terminals through a network, and to send and receive data through the network.

[0043] It should be understood that Figure 3 The structure shown is only a schematic diagram of the structure of the electronic device 100. The electronic device 100 may also include Figure 3 More or fewer components as shown, or with Figure 3 Different configurations shown. Figure 3 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0044] Please refer to Figure 4 , Figure 4 The schematic diagram of the process of the linear weld extraction method provided in the embodiment of the present application. The method can be applied to the above-mentioned electronic device 100. The specific process of the linear weld extraction method is described in detail below. In this embodiment, the method may include steps S100 to S200.

[0045] Step S100, obtaining a target straight line, a first partial point cloud and a second partial point cloud.

[0046] In this embodiment, the plane equations of two non-parallel planes can be obtained, and a straight line equation can be calculated based on the two obtained plane equations, and the straight line intersection represented by the straight line equation is used as the target straight line. Among them, the two plane equations are obtained based on plane detection of the target point cloud to be processed. The target point cloud may include multiple planes, so there may be multiple plane equations obtained based on the target point cloud. The specific determination method of determining the two plane equations from multiple plane equations can be determined in combination with actual needs, and is not specifically limited here. Among the two plane equations, one plane equation is a first plane equation, and the first plane equation is used to indicate that it is a first plane; the other plane equation is a second plane equation, and the second plane equation is used to indicate that it is a second plane. The plane represented by the plane equation is infinite, so the target straight line intersection determined based on the plane equation is a straight line without a start and end point; the plane has a size in the actual scene, so the straight line weld between the two intersecting planes in the actual scene has a start and end point, and this straight line weld is a real straight line intersection segment, and the straight line where the real straight line intersection segment is located can be represented as a real straight line intersection.

[0047] A first local point cloud corresponding to the first plane equation and a second local point cloud corresponding to the second plane equation can be determined from the target point cloud. The point cloud points included in the first local point cloud are point cloud points in the target point cloud located on the first plane, or point cloud points in the target point cloud located on the first plane and near the first plane; the point cloud points included in the second local point cloud are point cloud points in the target point cloud located on the second plane, or point cloud points in the target point cloud located on the second plane and near the second plane. Optionally, only the plane equation can be obtained during plane detection, and when the local point cloud corresponding to the plane equation is needed, the local point cloud is determined based on the plane equation and the target point cloud; or the local point cloud corresponding to the plane detection and the plane equation can be obtained during plane detection. The specific acquisition time and acquisition method of the local point cloud corresponding to a plane equation can be determined in combination with actual needs.

[0048] The electronic device can obtain the target straight line, the first local point cloud and the second local point cloud in any manner. For example, when other devices obtain multiple plane equations based on the target point cloud, the electronic device can determine the first plane equation and the second plane equation from the multiple plane equations obtained by other devices to determine the target straight line, and then determine the first local point cloud and the second local point cloud from the target point cloud. For another example, when other devices obtain multiple plane equations and local point clouds corresponding to each plane equation based on the target point cloud, the electronic device can obtain the first plane equation and the second plane equation based on the above information obtained by other devices to obtain the target straight line, and simultaneously obtain the first local point cloud and the second local point cloud. For another example, the electronic device performs plane detection based on the target point cloud, and then obtains the target straight line, the first local point cloud and the second local point cloud. It can be understood that the above method is only an example, and the specific method can be determined in combination with actual needs.

[0049] Step S200, judging whether there is a real straight line intersection segment on the target straight line according to the target straight line, the first local point cloud and the second local point cloud, and detecting the real straight line intersection segment as a straight line weld segment if there is.

[0050] In this embodiment, analysis can be performed based on the target straight line, the first local point cloud, and the second local point cloud to determine whether there is a real straight line intersection segment on the target straight line, that is, to determine whether the target straight line is a real straight line intersection. A real straight line intersection segment represents a straight weld. Therefore, if it is determined that there is no real straight line intersection segment on the target straight line, that is, it is determined that the target straight line is not a real straight line intersection, it can be determined that the straight weld cannot be extracted; if it is determined that there is a real straight line intersection segment on the target straight line, that is, it is determined that the target straight line is a real straight line intersection, the start and end points of the existing real straight line intersection segment can be detected, and the start and end points of the detected real straight line intersection segment are used as the start and end points of the straight weld segment. In this way, the real straight weld can be detected and the start and end points of the real straight weld can be obtained.

[0051] Optionally, as a possible implementation method, a point cloud of a target that needs to be inspected for a straight weld can be first obtained as a target point cloud. Then, a plane detection algorithm can be used to perform plane detection on the target point cloud to obtain a plane detection result. Among them, the plane detection algorithm used can be, but is not limited to, a random Hough transform (RHT) algorithm, a random sampling consensus (RANSAC) algorithm, a deterministic voting algorithm, etc. The plane in the plane detection result is represented by a plane equation. While detecting and obtaining the plane, it is also possible to simultaneously determine which point cloud points in the target point cloud are included in the plane represented by the plane equation, so as to obtain the local point cloud corresponding to the plane equation, so as to facilitate the subsequent rapid acquisition of the target straight line, the first local point cloud and the second local point cloud. The plane detection result may include all planes in the target point cloud.

[0052] When the plane detection result is obtained, for each plane in the plane detection result, it can be determined whether there is a straight line intersection between the plane and other planes in the plane detection result except the plane. If it is determined that there is a straight line intersection for the plane and one other plane, the straight line intersection can be calculated, and the direct intersection can be used as the target straight line, and the plane equation of the plane and the plane equation of the other plane can be used as the equations in the first plane equation and the second plane equation, and then the straight line weld segment can be analyzed when the target straight line includes a real straight line intersection segment. Other planes are planes other than the plane in the plane detection result. In this way, all real straight line intersections can be determined based on the target point cloud, and multiple straight line welds that may exist on the real straight line intersections can be determined, and the starting and ending points of each straight line weld can be given.

[0053] Optionally, it can be determined whether there is a straight line intersection between the two planes represented by the plane equations in the following manner. The normal vectors of the two planes represented by the two plane equations can be obtained, and then the angle between the two normal vectors can be calculated. If the angle is greater than a preset angle, for example, 30 degrees, it can be determined that the two planes are not parallel, it can be determined that there is a straight line intersection between the two planes, the two planes may have a real intersection, and the straight line intersection can be calculated based on the plane equations of the two planes. If the angle is not greater than the preset angle, it can be determined that there is no straight line intersection between the two planes.

[0054] As a possible implementation method, in order to avoid missing a plane or repeating calculation when determining a straight line intersection based on two planes, the following method can be used. The planes in the plane detection result can be sorted in any way to obtain a sorting result. Perform a first-level traversal on the planes in the sorting result, keep the first current plane unchanged for the first current plane traversed in the first level, and perform a second-level traversal starting from the next plane of the current plane in the sorting result to determine the second current plane. The second current plane is the current plane traversed in the second level traversal. Determine whether there is a straight line intersection between the first current plane and the second current plane. If so, steps S100 to S200 can be executed; if not, the second current plane can be updated until the second level traversal based on a first current plane is completed, and then the first current plane is updated, and the above process is repeated until the second level traversal for the last plane in the first level traversal is completed.

[0055] For example, Figure 5 As shown, two variables are set to traverse the planes in the plane detection result, the two variables are i and j, the variable i ranges from 0 to the number of planes minus 1, and the variable j ranges from i+1 to the number of planes. First, the initial value of i is set to 0, and then it is determined whether i is less than the number of planes minus 1. If i is less than the number of planes minus 1, the normal vector n of plane i is obtained. i When i is less than the number of planes minus 1, the current value of j (j=i+1) is also determined, and it is judged whether j is less than the number of planes. If j is less than the number of planes, the normal vector n of plane j is obtained. j , and then calculate the normal vector n i and the normal vector n j The angle is acos(n i ·n j ), if the angle is greater than the preset angle, it means that plane i and plane j are not parallel, and there may be a real intersection line between the two planes. At this time, it is necessary to find the straight line intersection line between plane i and plane j, and then calculate the multiple straight line welds that may exist on the straight line intersection line. If the angle is less than or equal to the preset angle, it is determined that there is no straight line intersection line between plane i and plane j, and the processing of plane i and plane j can be stopped.

[0056] After the processing of planes i and j is completed, j can be updated by adding 1 to obtain a new current value of j, and then the process jumps to the step of determining whether j is less than the number of planes.

[0057] If j is not less than the number of planes after the update operation of adding 1 to j, then i can be updated by adding 1 to obtain the new current value of i, and then jump to the step of determining whether i is less than the number of planes minus 1.

[0058] If after the update operation of adding 1 to i, the new current value of i is not less than the number of planes minus 1, it is determined that the traversal is completed and the traversal for determining the intersection of the straight lines is no longer required.

[0059] For example, if four planes 0-3 are detected, then Figure 5 In the method shown, the normal vector angles between plane 0 and planes 1-3 can be calculated for plane 0, and based on the calculated normal vector angles, it can be determined whether it is necessary to calculate the straight line intersection line; then, the normal vector angles between plane 1 and planes 2-3 can be calculated for plane 1, and based on the calculated normal vector angles, it can be determined whether it is necessary to calculate the straight line intersection line; finally, the normal vector angles between plane 2 and plane 3 can be calculated for plane 2, and based on the calculated normal vector angles, it can be determined whether it is necessary to calculate the straight line intersection line.

[0060] The specific method of the straight line equation corresponding to the intersection of two plane equations can be determined in combination with actual needs and is not specifically limited here. As a possible example, Figure 6 As shown, the target straight line can be obtained based on the first plane equation and the second plane equation in the following manner.

[0061] The first plane corresponding to the first plane equation can be expressed as: Figure 6 In plane 1, the second plane equation corresponding to the second plane can be expressed as Figure 6 Plane 2 in the equation. The first plane equation includes the normal vector n1 of the first plane and the distance parameter ρ1, and the second plane equation includes the normal vector n2 of the second plane and the distance parameter ρ2. The direction vector t of the target straight line between the first plane and the second plane is perpendicular to n1 and n2, so the direction vector of the target straight line can be calculated based on the normal vectors of the first plane equation and the second plane equation. Optionally, t1×t2 can be directly used as the direction vector t of the target straight line; t1×t2 can also be normalized, and the normalized result can be used as the direction vector t of the target straight line for subsequent use.

[0062] In order to obtain the coordinates of a point on the intersection of two planes (i.e., a straight line point), plane 3 can be used, and then the intersection of planes 1, 2, and 3 can be obtained by combining planes 1 and 2, so that the coordinates of a straight line point located on the target straight line can be obtained. Among them, the normal vector of plane 3 is the direction vector of the target straight line, and plane 3 passes through the coordinate origin.

[0063] For example, if the straight line point is p0 and the direction vector t of the target straight line is a unit vector, the coordinates of the straight line point p0 can be obtained by solving the following set of equations.

[0064]

[0065] Among them, (n 1,x ,n 1,y ,n 1,z ) is expressed as a unit vector when the normal vector n1, (n 2,x ,n 2,y ,n 2,z ) is expressed as a unit vector when the normal vector n2, (t x ,t y ,t z ) represents the vector t when it is a unit vector, and (x, y, z) represents the coordinates of the straight line point p0. In this way, the straight line equation of the target straight line can be obtained.

[0066] When the target straight line, the first local point cloud and the second local point cloud are obtained, the real straight line intersection segment can be analyzed based on the projection of the point cloud points of the first local point cloud and the second local point cloud near the target straight line on the target straight line. Figure 7 , Figure 7 for Figure 4 One of the flowchart diagrams of the sub-steps included in step S200. In this embodiment, step S200 may include sub-steps S240 to S260.

[0067] Sub-step S240 , when the number of categories is unknown, clustering the first set of projection points to obtain at least one first cluster, and clustering the second set of projection points to obtain at least one second cluster.

[0068] In this embodiment, the first projection point set and the second projection point set can be obtained. The first projection point set includes the first projection point, and the first projection point in the first projection point set is the projection point of each point cloud point in the first local point cloud located within the first preset distance of the target straight line on the target straight line. The second projection point set includes the second projection point, and the second projection point in the second projection point set is the projection point of each point cloud point in the second local point cloud located within the first preset distance of the target straight line on the target straight line. In this way, it can be ensured that the projection points in the above two projection point sets are all from the point cloud points near the target straight line.

[0069] When there is Figure 2 In the case shown, Figure 2 It can be seen that there are two clusters in one group of projection points. In order to obtain multiple straight line welds that may exist on the target straight line, the projection points can be clustered when the number of categories is unknown.

[0070] In this embodiment, when the number of categories is unknown, that is, without setting a specific value of the number of categories in advance, the first projection points in the first projection point set can be clustered to obtain multiple first clusters, each of which includes the first projection point.

[0071] Similarly, when the number of categories is unknown, the second projection points in the second projection point set are clustered to obtain multiple second clusters, each of which includes the second projection point. As a possible implementation method, Euclidean clustering can be used to divide the projection points on the target line. The idea of ​​Euclidean clustering is to randomly select a point from all current projection points, mark the point, add the point to the cluster, and perform a radius search with the point as the center of the sphere. Among the searched points, if there is an unmarked point, add the point to the cluster and mark the point, then continue the radius search with the added point as the center of the sphere, and repeat the above search steps until no new points are added to the cluster, at which time a cluster is determined. Then, randomly select another point from the remaining unmarked points and repeat the above steps. Finally, multiple clusters can be obtained.

[0072] Euclidean clustering is performed on the first projection point set plane1_pro_points and the second projection point set plane2_pro_points respectively to obtain multiple clusters, each cluster corresponds to a projection interval, and the first cluster corresponding to the first projection point set can be saved in plane1_cluster_indices, and the second cluster corresponding to the second projection point set can be saved in plane2_cluster_indices for subsequent use.

[0073] Sub-step S250 , for each first cluster corresponding to the first projection interval, analyzing whether the first projection interval and the second projection interval corresponding to each second cluster have an intersection interval, and obtaining the intersection interval if there is an intersection interval, so as to obtain an analysis result.

[0074] In this embodiment, when clusters are obtained, for each first cluster, the first projection interval corresponding to the first cluster can be determined according to the coordinates of each first projection point in the first cluster. And for each second cluster, the second projection interval corresponding to the second cluster can be determined according to the coordinates of each second projection point in the second cluster.

[0075] like Figure 8 As shown, the black points on the number axis represent projection points in a projection set. After clustering, the projection intervals 0, 1, and 2 can be determined, and each projection interval is determined by the corresponding cluster.

[0076] In this embodiment, traversal or parallel processing can be used to analyze whether there is an intersection interval between each first projection interval and each second projection interval, and when it is determined that there is an intersection interval, the existing intersection interval can be determined. After completing the above processing, the analysis result can be obtained.

[0077] In this embodiment, when the projection interval is determined, the maximum projection point, minimum projection point, maximum projection value and minimum projection value corresponding to the projection interval can be calculated according to the coordinates of the projection points in the cluster corresponding to the projection interval. Afterwards, it can be determined whether there is an intersection interval between the two projection intervals based on the above information. Among them, the projection value represents the value corresponding to the projection point when the target straight line is used as a number axis, and the projection value has a positive and negative sign. The following describes how to obtain the above information.

[0078] All first clusters in plane1_cluster_indices can be traversed. For the current cluster i traversed to, all projection points in cluster i can be traversed, and the projection value of projection point j corresponding to the traversed projection point j is obtained, and the projection value of projection point j is saved in the pro_length_i array. Then, the maximum projection value in pro_length_i is determined by comparison, and the projection point corresponding to the maximum projection value is used as the maximum projection point; and the minimum projection value in pro_length_i is determined by comparison, and the projection point corresponding to the minimum projection value is obtained as the minimum projection point. The above information can be saved in plane1_pro_info[i], where plane1_pro_info[i].max_ saves the maximum projection value, plane1_pro_info[i].pro_point_max_ saves the maximum projection point, plane1_pro_info[i].min_ saves the minimum projection value, and plane1_pro_info[i].pro_point_min_ saves the minimum projection point. Perform the same operation for plane2_cluster_indices and save the data to plane2_pro_info.

[0079] Among them, Fig. 9 Sub-steps S2501 to S2503 shown are used to quickly obtain a projection value corresponding to a projection point.

[0080] Sub-step S2501, calculating the direction vector and a straight line point of the target straight line according to the first plane equation and the second plane equation.

[0081] The straight line point is located on the target straight line. The method of obtaining the target straight line direction vector and the coordinates of a straight line point can be referred to the above description and will not be repeated here. It can be understood that, in the case where it is necessary to obtain the projection values ​​corresponding to multiple projection points, the target straight line direction vector and a set of straight line points can be calculated only once based on the first plane equation and the second plane equation, and can be used directly at other times.

[0082] Sub-step S2502, obtaining a vector to be processed according to a point cloud point in the first partial point cloud or the second partial point cloud and the straight line point that is located within a first preset distance from the target straight line.

[0083] Sub-step S2503, obtaining a projection value corresponding to a projection point corresponding to the point cloud point according to the projection of the vector to be processed on the direction vector of the target straight line.

[0084] Determine a point cloud point p in the first partial point cloud or the second partial point cloud that is within a first preset distance from the target straight line. i , and then according to the point cloud point p i and the straight line point p0, determine a vector to be processed p i -p0. Then, according to the vector to be processed p i -p0 is projected on the direction vector t of the target line to determine the point cloud point p i The corresponding projection value of the projection point. In the case where the direction vector t of the target line is a unit vector, the point cloud point p i The corresponding projection value is (p i -p0)·t.

[0085] As a possible implementation method, the maximum projection value, minimum projection value and other information of each cluster can be combined to obtain Fig.10 The method shown can quickly and accurately determine whether there is an intersection interval between a first projection interval and a second projection interval. Fig.10 , Fig.10 for Figure 7 Schematic diagram of the flow of sub-steps included in sub-step S250. In this embodiment, sub-step S250 may include sub-steps S251 to S252.

[0086] Sub-step S251, for the first projection interval and a second projection interval, determines whether the first minimum projection value of the first projection interval is greater than the second maximum projection value of the second projection interval, and determines whether the second minimum projection value of the second projection interval is greater than the first maximum projection value of the first projection interval, to obtain a projection value judgment result.

[0087] Sub-step S252: If the projection value judgment result indicates that the first minimum projection value is greater than the second maximum projection value or the second minimum projection value is greater than the first maximum projection value, it is determined that there is no intersection interval; otherwise, it is determined that there is an intersection interval, and the starting and ending points of the existing intersection interval are determined according to the projection value judgment result.

[0088] Optionally, a traversal method may be adopted, and for a first projection interval and a second projection interval traversed, sub-steps S251 and S252 are used to determine whether there is an intersection interval between the first projection interval and the second projection intervals. The process is described below.

[0089] Use variable i to traverse plane1_pro_info, and use variable j to traverse plane2_pro_info. That is, pro_info_i = plane1_pro_info[i], pro_info_j = plane2_pro_info[j]. Determine whether these two intervals have an intersection based on the information stored in pro_info_i and pro_info_j.

[0090] The judgment method is as follows: If pro_info_i.min_>pro_info_j.max_, it means that the minimum projection value of pro_info_i is greater than the maximum projection value of pro_info_j; or pro_info_j.min_>pro_info_i.max_, it means that the minimum projection value of pro_info_j is greater than the maximum projection value of pro_info_i. The above two situations indicate that the two intervals have no intersection at this time. If the above conditions are not met, it means that the two intervals have an intersection, and the intersection interval of the two intervals needs to be found. If pro_info_i.min_≥pro_info_j.min_, the starting point of the intersection interval is pro_info_i.pro_point_min_, otherwise the starting point of the intersection interval is pro_info_j.pro_point_min_. If pro_info_i.max_≥pro_info_j.max_, the end point of the intersection interval is pro_info_j.pro_point_max_, otherwise the end point of the intersection interval is pro_info_i.pro_point_max_. The intersection interval can be represented by p_inter_ij, and p_inter_ij is saved in the analysis result p_inters.

[0091] Sub-step S260, determining whether there is a real straight line intersection segment on the target straight line according to the obtained analysis result, and obtaining a straight line weld segment if there is.

[0092] In this embodiment, when the analysis result p_inters is obtained, it can be analyzed whether the size of the analysis result p_inters is 0, that is, it can be determined whether the number of determined intersection intervals is 0. If it is 0, that is, there is no intersection interval in the analysis result, it can be directly determined that there is no real straight line intersection segment on the target straight line, and the straight line weld extraction based on the target straight line can be terminated. If the analysis result p_inters includes the intersection interval, the straight line weld segment can be determined based on the included intersection interval. For example, the determined intersection interval can be directly used as a straight line weld segment, or further analyzed in combination with other means, which can be determined in combination with actual needs.

[0093] As a possible implementation, when the analysis result includes the intersection interval, Fig.11 The method accurately determines the straight weld segment based on the intersection interval. Fig.11 , Fig.11 for Figure 7 Schematic diagram of the flow of sub-steps included in sub-step S260. In this embodiment, sub-step S260 may include sub-steps S261 to S263.

[0094] Sub-step S261, for each intersection interval, determines from the first local point cloud a first closest point corresponding to the starting point of the intersection interval and a second closest point corresponding to the end point of the intersection interval, and determines from the second local point cloud a third closest point corresponding to the starting point of the intersection interval and a fourth closest point corresponding to the end point of the intersection interval.

[0095] Sub-step S262, judging whether the intersection interval corresponds to a real straight line intersection segment according to the first closest distance, the second closest distance, the third closest distance, the fourth closest distance and the second preset distance.

[0096] Sub-step S263, when it is determined that the intersection interval corresponds to a real straight line intersection segment, it is determined that there is a real straight line intersection segment on the target straight line, and the start and end points of the intersection interval are used as the start and end points of a straight line weld segment.

[0097] In this embodiment, whether an intersection interval corresponds to a real straight line intersection segment can be determined in the following manner. The nearest point of the starting point of the intersection interval is determined from the first local point cloud as the first nearest point, and the nearest distance is calculated as the first nearest distance; and, the nearest point of the end point of the intersection interval is determined from the first local point cloud as the second nearest point, and the nearest distance is calculated as the second nearest distance. Similarly, the nearest point of the starting point of the intersection interval is determined from the second local point cloud as the third nearest point, and the nearest distance is calculated as the third nearest distance; and, the nearest point of the end point of the intersection interval is determined from the second local point cloud as the fourth nearest point, and the nearest distance is calculated as the fourth nearest distance. It can be seen from the above description that the first nearest distance is the distance between the starting point of the intersection interval and the first nearest point, the second nearest distance is the distance between the end point of the intersection interval and the second nearest point, the third nearest distance is the distance between the starting point of the intersection interval and the third nearest point, and the fourth nearest distance is the distance between the end point of the intersection interval and the fourth nearest point.

[0098] A KD tree 1 may be established based on the first partial point cloud, and a KD tree 2 may be established based on the second partial point cloud. A first closest point and a second closest point may be determined based on the KD tree 1, and a third closest point and a fourth closest point may be determined based on the KD tree 2.

[0099] It can be determined whether one of the first closest distance, the second closest distance, the third closest distance and the fourth closest distance is greater than the second preset distance. If none of the above four closest distances is greater than the second preset distance, it can be determined that the intersection interval corresponds to a real straight line intersection segment, that is, the intersection interval is a real weld segment. In this case, it can be determined that there is a real straight line intersection segment on the target straight line, and the start and end points of the intersection interval are used as the start and end points of a straight line weld segment. If at least one of the above four closest distances is greater than the second preset distance, it means that the start and end points of the intersection interval are far away from the corresponding closest point, so it can be determined that the intersection interval is not a real straight line intersection segment. In this case, the intersection interval can be skipped, that is, the processing of the intersection interval is terminated.

[0100] Among them, in the above process, only one of the four closest points can be found first, and then a closest distance is calculated based on the closest point, and it is determined whether the closest distance is greater than the second preset distance, and if it is not greater, one of the remaining three closest points is found, and so on. Among them, when the calculated closest distance is greater than the second preset distance, the intersection interval can be skipped, which can reduce the amount of calculation. It is also possible to first find the four closest points, and then calculate the four closest distances at the same time, and then judge each closest distance in turn, or judge the four closest distances in parallel, etc. The specific execution order can be determined in combination with actual needs.

[0101] As a possible implementation method, before clustering, it can be determined whether clustering is needed. If not, it can be directly determined that there is no real intersection line segment on the target line, which can reduce unnecessary calculations. Fig.12 , Fig.12 for Figure 4 2 is a flow chart of sub-steps included in step S200. In this embodiment, the method may further include sub-steps S210 to S230 and sub-step S270, wherein sub-steps S210 to S230 are executed before sub-step S240.

[0102] Sub-step S210: projecting each point cloud point in the first local point cloud that is within a first preset distance from the target straight line onto the target straight line to obtain a first projection point set.

[0103] Sub-step S220: projecting each point cloud point in the second local point cloud that is within the first preset distance from the target straight line onto the target straight line to obtain a second projection point set.

[0104] In this embodiment, the point cloud points in the first local point cloud can be traversed, and for the i-th point cloud point p traversed to i , calculate the point cloud point p i The vertical distance between the point cloud point p and the target line is determined, and whether the vertical distance is less than a first preset distance is determined; if the vertical distance is less than the first preset distance, the point cloud point p is i Projected onto the target straight line, we get the point p i If the vertical distance corresponding to a point cloud point is less than the first preset distance, it means that the point cloud point is located near the target line. If the vertical distance is not less than the first preset distance, the point cloud point p is not calculated. iWhen the traversal of the point cloud points in the first local point cloud is completed, the first projection point set plane1_pro_points including the first projection point can be obtained. Wherein, when the direction vector t of the target straight line is a unit vector, the calculation formula of the vertical distance is as follows: d = |pi-p0-((pi-p0)·t)t|, p0 represents the coordinates of a straight line point on the target straight line; the projection point calculation formula is as follows: p pro =((p i -p0)·t)t+p0.

[0105] A similar operation is performed on the second partial point cloud, and the point cloud points that meet the requirements in the second partial point cloud are projected onto the target line to obtain corresponding second projection points. The obtained second projection points can be saved in the second projection point set plane2_pro_points.

[0106] Sub-step S230, judging whether the target straight line may be a true straight line intersection line according to the number of projection points in the first projection point set and the second projection point set.

[0107] When the first projection point set is obtained, the number of first projection points in the first projection point set can be obtained as the first number. When the second projection point set is obtained, the number of second projection points in the second projection point set can be obtained as the second number. Afterwards, it can be analyzed and determined whether there is a real straight line intersection between the first plane corresponding to the first plane equation and the second plane corresponding to the second plane equation based on the first number and the second number. If it can be determined that there is no real straight line intersection between the first plane and the second plane, it means that the target straight line cannot be the real straight line intersection. If it cannot be determined that there is no real straight line intersection between the first plane and the second plane, it means that there may be a real straight line intersection between the first plane and the second plane, and the target straight line may be a real intersection straight line.

[0108] For example, a preset number can be set. If both the first number and the second number are greater than the preset number, it can be determined that there may be a real straight line intersection between the first plane and the second plane, that is, the target straight line may be a real straight line intersection; conversely, if at least one of the first number and the second number is less than or equal to the preset number, it can be determined that there may not be a real straight line intersection between the first plane and the second plane, that is, there is no real straight line intersection between the first plane and the second plane, that is, the target straight line may not be a real straight line intersection. The preset number is greater than 0 and can be determined in combination with actual needs.

[0109] Optionally, as a possible implementation method, in order to reduce misjudgment, it can be determined whether the first number and the second number are 0, that is, whether the first projection point set and the second projection point set are empty. In the case that the first projection point set and / or the second projection point set are empty, that is, at least one projection point set is empty, it can be determined that there is no real straight line intersection between the first plane and the second plane, and the target straight line is not a real straight line intersection; if the first projection point set and the second projection point set are not empty, it can be determined that there may be a real straight line intersection between the first plane and the second plane, and the target straight line may be a real straight line intersection. Figure 1 As shown in b, the upper plane is plane 1, and the lower plane is plane 2. The point cloud points on plane 1 are far away from the theoretical intersection line (that is, the straight line calculated according to the plane equation), and the size of plane1_pro_points is 0. Therefore, it can be judged that there is no real intersection line between plane 1 and plane 2.

[0110] When it is determined that the target straight line may be a true straight line intersection line, it may be determined that clustering analysis is required, and thus sub-steps S240 to S260 may be executed to obtain a straight weld segment.

[0111] When it is determined that the target straight line cannot be the intersection line of the real straight lines, sub-step S270 is executed.

[0112] Sub-step S270, determining that there is no real straight line weld segment on the target straight line.

[0113] There is no real straight line intersection between the first plane and the second plane, which means that there is no real straight line weld segment on the target straight line. In this case, the straight line weld extraction for the target straight line can be terminated.

[0114] The above-mentioned linear weld extraction method provided in the embodiment of the present application can determine all real linear intersections, and can determine multiple linear welds that may exist on the real linear intersections, and give the starting point and end point of each linear weld. Figure 1 The plane intersection shown is Figure 1 The a in it means that two planes intersect and there is a real straight line intersection; Figure 1 The b in denoted the intersection of two planes, but there is no real straight line intersection. Using the straight line weld extraction method proposed in this scheme, for Figure 1 For a in , a real weld can be extracted and the correct starting point and end point can be determined. Figure 1 For b in the figure, the real weld cannot be extracted, which is consistent with the actual situation. Figure 2The plane intersection shown should correspond to two straight welds. Using the straight weld extraction method proposed in this scheme, these two straight welds can be extracted, and the correct starting point and end point of each straight weld can be given.

[0115] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for implementing a linear weld extraction device 200 is provided below. Optionally, the linear weld extraction device 200 may adopt the above Figure 3 The device structure of the electronic device 100 is shown. Fig.13 , Fig.13 The block diagram of the linear weld extraction device 200 provided in the embodiment of the present application is shown in FIG. It should be noted that the basic principle and technical effect of the linear weld extraction device 200 provided in the present embodiment are the same as those of the above embodiment. For the sake of brief description, for the parts not mentioned in the present embodiment, reference can be made to the corresponding contents in the above embodiment. In the present embodiment, the linear weld extraction device 200 may include: an information acquisition module 210 and a processing module 220.

[0116] The information acquisition module is used to obtain a target straight line, a first local point cloud and a second local point cloud. The target straight line is a straight line intersection calculated based on a first plane equation and a second plane equation, the plane equation is detected based on the target point cloud to be processed, the first local point cloud is a point cloud in the target point cloud corresponding to the first plane equation, and the second local point cloud is a point cloud in the target point cloud corresponding to the second plane equation.

[0117] The processing module 220 is used to determine whether there is a real straight line intersection segment on the target straight line according to the target straight line, the first local point cloud and the second local point cloud, and detect the real straight line intersection segment as a straight line weld segment if it exists.

[0118] Optionally, the above modules can be stored in the form of software or firmware. Figure 3 The memory 110 shown in the figure may be fixed in the operating system (OS) of the electronic device 100 and may be Figure 3 Meanwhile, the data and program codes required for executing the above modules may be stored in the memory 110.

[0119] An embodiment of the present application also provides a readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the linear weld extraction method is implemented.

[0120] In summary, the embodiments of the present application provide a linear weld extraction method, device and electronic device, first obtaining a target straight line and a first local point cloud and a second local point cloud corresponding to the target straight line, and then judging whether there is a real straight line intersection segment on the target straight line according to the target straight line, the first local point cloud and the second local point cloud, and detecting the real straight line intersection segment as a linear weld segment when it exists. The target straight line is a straight line intersection calculated based on the first plane equation and the second plane equation, the plane equation is detected based on the target point cloud to be processed, the first local point cloud is the point cloud corresponding to the first plane equation in the target point cloud, and the second local point cloud is the point cloud corresponding to the second plane equation in the target point cloud. In this way, the real linear weld can be detected and obtained, and the starting and ending points of the real linear weld can be obtained.

[0121] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0122] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0123] If the functions are implemented 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 this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0124] The above description is only an optional embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A linear weld extraction method, characterized in that: The method comprises: Obtaining a target straight line, a first local point cloud, and a second local point cloud, wherein the target straight line is a straight line intersection calculated based on a first plane equation and a second plane equation, the first plane equation and the second plane equation are detected based on a target point cloud to be processed, the first local point cloud is a point cloud in the target point cloud corresponding to the first plane equation, and the second local point cloud is a point cloud in the target point cloud corresponding to the second plane equation; According to the target straight line, the first partial point cloud and the second partial point cloud, it is determined whether there is a real straight line intersection segment on the target straight line, and if so, the real straight line intersection segment is detected as a straight line weld segment.

2. The method according to claim 1, characterized in that: The method of determining whether there is a true straight line intersection segment on the target straight line according to the target straight line, the first partial point cloud and the second partial point cloud, and detecting the true straight line intersection segment as a straight line weld segment when the true straight line intersection segment exists, comprises: In the case where the number of categories is unknown, clustering the first projection point set to obtain at least one first cluster, and clustering the second projection point set to obtain at least one second cluster, wherein the first projection point set includes projection points on the target line of each point cloud point in the first local point cloud that is located within a first preset distance from the target line, and the second projection point set includes projection points on the target line of each point cloud point in the second local point cloud that is located within the first preset distance from the target line; For the first projection interval corresponding to each first cluster, analyzing whether there is an intersection interval between the first projection interval and the second projection interval corresponding to each second cluster, and obtaining the intersection interval if there is, so as to obtain an analysis result; Determine whether there is a real straight line intersection segment on the target straight line based on the obtained analysis result, and obtain a straight line weld segment if there is one, wherein the absence of an intersection interval in the analysis result indicates that there is no real straight line intersection segment on the target straight line.

3. The method according to claim 2, characterized in that In the case where the analysis result includes the intersection interval, determining whether there is a real straight line intersection segment on the target straight line according to the obtained analysis result, and obtaining a straight line weld segment if there is, comprises: For each intersection interval, determine from the first local point cloud a first closest point corresponding to the starting point of the intersection interval and a second closest point corresponding to the end point of the intersection interval, and determine from the second local point cloud a third closest point corresponding to the starting point of the intersection interval and a fourth closest point corresponding to the end point of the intersection interval; Determine whether the intersection interval corresponds to a real straight line intersection segment according to a first closest distance, a second closest distance, a third closest distance, a fourth closest distance and a second preset distance, wherein the first closest distance is the distance between the starting point of the intersection interval and the first closest point, the second closest distance is the distance between the end point of the intersection interval and the second closest point, the third closest distance is the distance between the starting point of the intersection interval and the third closest point, and the fourth closest distance is the distance between the end point of the intersection interval and the fourth closest point; When it is determined that the intersection interval corresponds to a real straight line intersection segment, it is determined that there is a real straight line intersection segment on the target straight line, and the start and end points of the intersection interval are used as the start and end points of a straight weld segment.

4. The method according to claim 2, characterized in that: The step of determining, for each first cluster, whether there is an intersection interval between the first projection interval corresponding to the first cluster and the second projection interval corresponding to each second cluster, and obtaining the intersection interval if there is an intersection interval, includes: For the first projection interval and a second projection interval, determine whether a first minimum projection value of the first projection interval is greater than a second maximum projection value of the second projection interval, and determine whether the second minimum projection value of the second projection interval is greater than the first maximum projection value of the first projection interval, to obtain a projection value determination result, wherein the projection value represents a value corresponding to a projection point when the target straight line is used as a number axis, and the projection value has a positive and negative sign; If the projection value judgment result indicates that the first minimum projection value is greater than the second maximum projection value or the second minimum projection value is greater than the first maximum projection value, it is determined that there is no intersection interval; otherwise, it is determined that there is an intersection interval, and the starting and ending points of the existing intersection interval are determined according to the projection value judgment result.

5. The method according to claim 4, characterized in that A projection value is obtained as follows: According to the first plane equation and the second plane equation, a direction vector of the target straight line and a straight line point are calculated, wherein the straight line point is located on the target straight line; Obtaining a vector to be processed according to a point cloud point located within a first preset distance from the target straight line and the straight line point in the first partial point cloud or the second partial point cloud; According to the projection of the vector to be processed on the direction vector of the target straight line, a projection value corresponding to the projection point corresponding to the point cloud point is obtained.

6. The method according to claim 2, characterized in that The step of determining whether there is a true straight line intersection segment on the target straight line according to the target straight line, the first partial point cloud and the second partial point cloud, and detecting the true straight line intersection segment as a straight line weld segment when the true straight line intersection segment exists, further comprises: Projecting each point cloud point in the first local point cloud that is within a first preset distance from the target straight line onto the target straight line to obtain a first projection point set; Projecting each point cloud point in the second local point cloud that is within the first preset distance from the target straight line onto the target straight line to obtain a second projection point set; Determining whether the target straight line may be a true straight line intersection line according to the number of projection points in the first projection point set and the second projection point set; In the case where it is determined that the target straight line cannot be a true straight line intersection, determining that no true straight line intersection segment exists on the target straight line; When it is determined that the target straight line may be a true straight line intersection, the steps of clustering the first projection point set to obtain at least one first cluster and clustering the second projection point set to obtain at least one second cluster are performed when the number of categories is unknown.

7. The method according to claim 6, characterized in that The determining, based on the number of projection points in the first projection point set and the second projection point set, whether the target straight line may be a true straight line intersection line comprises: When the first projection point set and / or the second projection point set is empty, it is determined that the target straight line cannot be a true straight line intersection line.

8. The method according to any one of claims 1 to 7, characterized in that: Before obtaining the target straight line, the first partial point cloud and the second partial point cloud, the method further includes: Performing plane detection on the target point cloud to obtain a plane detection result; For each plane in the plane detection result, determine whether there is a straight line intersection between the plane and other planes in the plane detection result except the plane; When it is determined that there is an intersection of straight lines, obtaining the target straight line, the first local point cloud and the second local point cloud includes: for each existing intersection of straight lines, using the intersection of straight lines as the target straight line, and using the plane equations of two planes corresponding to the intersection of straight lines and located in the plane detection results as the first plane equation and the second plane equation, so as to obtain the first local point cloud and the second local point cloud.

9. A linear weld extraction device, characterized in that: The device comprises: an information acquisition module, configured to obtain a target straight line, a first local point cloud, and a second local point cloud, wherein the target straight line is a straight line intersection calculated based on a first plane equation and a second plane equation, the first plane equation and the second plane equation are detected based on a target point cloud to be processed, the first local point cloud is a point cloud in the target point cloud corresponding to the first plane equation, and the second local point cloud is a point cloud in the target point cloud corresponding to the second plane equation; The processing module is used to determine whether there is a real straight line intersection segment on the target straight line according to the target straight line, the first local point cloud and the second local point cloud, and detect the real straight line intersection segment as a straight line weld segment if it exists.

10. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the linear weld extraction method described in any one of claims 1-8.

Citation Information

Cited By

  • Thin and narrow weld joint identification method, computer equipment and readable storage medium

    CN121258989A

  • A fine narrow weld seam identification method, computer equipment and readable storage medium

    CN121258989B

  • Artificial welding seam identification method and computer equipment

    CN121259366A

  • A manual weld seam recognition method and a computer device

    CN121259366B