Straight-line weld seam point cloud extraction method and device, electronic equipment and readable storage medium

By using point cloud edge detection and line fitting, straight weld seam points are determined, solving the problem of missing straight weld seam points caused by incomplete edge point detection, and improving recognition accuracy and welding accuracy.

CN118334068BActive Publication Date: 2026-11-06FAIR INNOVATION (SUZHOU) ROBOTIC SYSTEM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410447983.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-15
Publication Date
2026-11-06
Estimated Expiration
2044-04-15

AI Technical Summary

Technical Problem

In existing technologies, incomplete edge point detection during the straight weld seam identification process leads to missing or incomplete straight weld seam points, reducing identification accuracy.

Method used

Edge point clouds are obtained through point cloud edge detection, and straight lines are fitted to obtain target edge straight lines. The straight line weld points are determined based on the distance between the three-dimensional points and the straight lines, and the missing straight line weld points are filled in.

Benefits of technology

It improves the accuracy of straight weld seam recognition, ensures the integrity of the straight weld seam point cloud, and improves the welding accuracy of welding robots.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118334068B_ABST
    Figure CN118334068B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a straight-line weld point cloud extraction method and device, electronic equipment and readable storage medium, relating to the technical field of computer. The method comprises: obtaining an object point cloud of a target object; determining an edge point cloud from the object point cloud as a to-be-processed point cloud by performing point cloud edge detection on the object point cloud; obtaining a target edge straight line by performing straight-line fitting on the to-be-processed point cloud; and determining whether each three-dimensional point in the object point cloud is a straight-line weld point according to a first distance value between each three-dimensional point in the object point cloud and the target edge straight line. In this way, the situation that the detected straight-line weld points are incomplete due to incomplete edge point detection in the point cloud edge detection process can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and more specifically, to a method, apparatus, electronic device, and readable storage medium for extracting point clouds of straight weld seams. Background Technology

[0002] Straight weld seam recognition technology can be used to identify and locate the position of straight weld seams for applications such as robotic welding or weld quality assessment. Currently, a point cloud is typically acquired, and then edge detection is performed to determine the edge points within the point cloud. A straight line is then fitted to these edge points, and the edge points corresponding to the fitted line are used as the straight weld seam points. However, since straight weld seams usually exist at the intersection of two surfaces, edge point identification at these intersections is challenging. Therefore, incomplete edge point detection often occurs during point cloud edge detection, leading to incomplete straight weld seam points and reducing the accuracy of straight weld seam recognition. Summary of the Invention

[0003] This application provides a method, apparatus, electronic device, and readable storage medium for extracting point clouds of straight weld seams, which can avoid the situation where the detected straight weld seam points are incomplete due to incomplete edge point detection during the point cloud edge detection process.

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

[0005] In a first aspect, embodiments of this application provide a method for extracting point clouds of straight weld seams, the method comprising:

[0006] Obtain the object point cloud of the target object;

[0007] By performing point cloud edge detection on the object point cloud, edge point clouds are determined from the object point cloud as point clouds to be processed;

[0008] By performing straight line fitting on the point cloud to be processed, a target edge straight line is obtained;

[0009] Based on the first distance value between each three-dimensional point in the object point cloud and the target edge line, determine whether each three-dimensional point in the object point cloud is a straight weld point.

[0010] Secondly, embodiments of this application provide a point cloud extraction device for straight weld seams, the device comprising:

[0011] The data acquisition module is used to obtain the point cloud of the target object;

[0012] The filtering module is used to determine edge point clouds as point clouds to be processed from the object point cloud by performing point cloud edge detection on the object point cloud;

[0013] The processing module is used to obtain a target edge line by performing line fitting on the point cloud to be processed;

[0014] The determination module is used to determine whether each three-dimensional point in the object point cloud is a straight weld point based on a first distance value between each three-dimensional point in the object point cloud and the target edge line.

[0015] Thirdly, embodiments of this application provide 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 seam point cloud extraction method described in the foregoing embodiments.

[0016] Fourthly, embodiments of this application provide a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the linear weld point cloud extraction method as described in the foregoing embodiments.

[0017] The method, apparatus, electronic device, and readable storage medium for extracting point clouds of straight welds provided in this application first obtain an object point cloud of the target object to be detected for straight welds. Then, edge point clouds in the object point cloud are detected through point cloud edge detection processing as point clouds to be processed. Next, a target edge line is obtained based on the point cloud to be processed through line fitting. Finally, the three-dimensional points included in the straight weld point cloud are determined from the object point cloud based on the distance values ​​between each three-dimensional point in the object point cloud and the target edge line. In this way, even if some straight weld points are not detected during the point cloud edge detection process, the missing straight weld points can be completed by determining the straight weld points from the object point cloud through the target edge line fitted based on the edge points detected by the point cloud edge detection, thus avoiding the situation where the final obtained straight weld points are incomplete. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram of the distribution of edge points;

[0020] Figure 2 These are schematic diagrams illustrating two results obtained from detecting the edges of straight lines;

[0021] Figure 3 A block diagram illustrating an electronic device provided in an embodiment of this application;

[0022] Figure 4 A schematic flowchart illustrating the point cloud extraction method for straight weld seams provided in this application embodiment;

[0023] Figure 5 for Figure 4 A flowchart illustrating the sub-steps included in step S300;

[0024] Figure 6 for Figure 5 A flowchart illustrating the sub-steps included in the neutron step S310;

[0025] Figure 7 for Figure 6 A flowchart illustrating the sub-steps included in the neutron step S311;

[0026] Figure 8 for Figure 5 A flowchart illustrating the sub-steps included in the neutron step S320;

[0027] Figure 9 for Figure 4 A flowchart illustrating the sub-steps included in step S400;

[0028] Figure 10 A block diagram of a point cloud extraction device for straight weld seams provided in an embodiment of this application.

[0029] Icons: 300 - Electronic device; 310 - Memory; 320 - Processor; 330 - Communication unit; 500 - Straight weld seam point cloud extraction device; 510 - Data acquisition module; 520 - Filtering module; 530 - Processing module; 540 - Determination module. Detailed Implementation

[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0031] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0032] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0033] like Figure 1 As shown, straight weld seams typically exist at the intersection of two planes. During point cloud edge detection, identifying edge points at these intersections is challenging, and issues such as… Figure 2 The right side of the image shows an incomplete edge point detection phenomenon. Among them, Figure 2 The left side of the image shows the ideal detection result for the point cloud edges, where all edge points are detected. Figure 2 The right side of the diagram illustrates the case where edge points at the junctions of point cloud edge detection have defects. If, in the detection of straight weld seams, a straight line is fitted to the set of edge points with missing edge points obtained through point cloud edge detection, and the edge points corresponding to the fitted straight line in the set of edge points are used as the straight weld seam points, then the determined straight weld seam points will be incomplete, reducing the accuracy of straight weld seam recognition.

[0034] To address the above situation, this application provides a method, apparatus, electronic device, and readable storage medium for extracting point clouds of straight weld seams. Based on the target edge straight line fitted by the edge points detected by the point cloud edge, the straight weld seam points are determined from the object point cloud. Thus, even if some straight weld seam points are not detected during the point cloud edge detection process, the above method can still complete the missing straight weld seam points during the cloud edge detection process, and will not result in the final obtained straight weld seam points being incomplete.

[0035] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0036] Please refer to Figure 3 , Figure 3This is a block diagram of an electronic device 300 provided in an embodiment of this application. The electronic device 300 may be, but is not limited to, a welding robot, a terminal device for weld quality assessment, etc. The electronic device 300 may include a memory 310, a processor 320, and a communication unit 330. The memory 310, processor 320, and communication unit 330 are electrically connected directly or indirectly to each other to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.

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

[0038] The processor 320 is used to read / write data or programs stored in the memory 310 and execute corresponding functions. For example, the memory 310 stores a straight weld seam point cloud extraction device 500, which includes at least one software function module that can be stored in the memory 310 in the form of software or firmware. The processor 320 executes various functional applications and data processing by running the software programs and modules stored in the memory 310, such as the straight weld seam point cloud extraction device 500 in this embodiment, thereby realizing the straight weld seam point cloud extraction method in this embodiment.

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

[0040] It should be understood that, Figure 3 The structure shown is only a schematic diagram of the electronic device 300. The electronic device 300 may also include components that are larger than... Figure 3 The more or fewer components shown, or having the same Figure 1 The different configurations shown. Figure 3 The components shown can be implemented using hardware, software, or a combination thereof.

[0041] Please refer to Figure 4 , Figure 4 This is a flowchart illustrating the method for extracting point clouds of straight welds according to an embodiment of this application. The method can be applied to the aforementioned electronic device 300. The specific process of the method for extracting point clouds of straight welds is described in detail below. In this embodiment, the method may include steps S100 to S400.

[0042] Step S100: Obtain the object point cloud of the target object.

[0043] In this embodiment, the target object is the object for which straight weld seam identification is required, such as a workpiece to be welded, which can be determined based on actual needs. Since the target object is the object for which straight weld seam identification is required, straight weld seams may exist within it. A 3D camera can be used to photograph the target object, thereby obtaining the object point cloud. That is, the object point cloud is the point cloud of the target object obtained through a 3D camera. The object point cloud can be a single frame of point cloud data or obtained by stitching together multiple frames of point cloud data, which can be determined based on actual needs. It is understood that the object point cloud includes multiple three-dimensional points, and each three-dimensional point can be represented by a three-dimensional coordinate.

[0044] Step S200: By performing point cloud edge detection on the object point cloud, edge point clouds are determined from the object point cloud as point clouds to be processed.

[0045] In this embodiment, after obtaining the object point cloud, a point cloud edge detection algorithm can be used to detect the edge points among the three-dimensional points included in the object point cloud. The detected edge points constitute the edge point cloud, which can be used as the point cloud to be processed in subsequent processing. The specific point cloud edge detection algorithm can be determined according to actual needs and is not specifically limited here. For example, the principal curvature method or the depth map edge detection method (e.g., the Canny edge detector) can be used to detect the edge points.

[0046] Step S300: By performing straight line fitting on the point cloud to be processed, a target edge straight line is obtained.

[0047] In this embodiment, given the point cloud to be processed, a target edge line can be obtained by fitting a straight line based on the three-dimensional points (i.e., edge points) included in the point cloud. The target edge line can be represented by a linear equation. The specific method for obtaining the target edge line through line fitting can be determined based on actual needs and is not specifically limited here.

[0048] Step S400: Determine whether each three-dimensional point in the object point cloud is a straight weld point based on the first distance value between each three-dimensional point in the object point cloud and the target edge line.

[0049] In this embodiment, after obtaining the target edge line, for each 3D point in the object point cloud, the distance between the 3D point and the target edge line can be calculated as a first distance value, and then it can be determined whether the 3D point is a straight weld point based on the first distance value. After completing the above processing for each 3D point in the object point cloud, the 3D points in the object point cloud that are straight weld points can be determined, and the determined straight weld points constitute the straight weld point cloud. Optionally, a 3D point in the object point cloud can be projected onto the target edge line to obtain the corresponding projection point, and then the distance between the 3D point and the projection point can be calculated. This distance value is the distance between the 3D point and the target edge line.

[0050] Thus, even if some straight weld points are not detected during the point cloud edge detection process, the missing straight weld points can be filled in by fitting the target edge line based on the edge points detected by the point cloud edge detection, and the final obtained straight weld points will not be incomplete.

[0051] As one possible implementation, given the point cloud to be processed, one or more fitted lines can be obtained through a round of line fitting, and one fitted line can be determined from the obtained fitted lines as the target edge line, thus facilitating the rapid acquisition of the target edge line.

[0052] Optionally, two 3D points can be extracted from the point cloud to be processed, and a straight line can be fitted based on these two 3D points as the fitted line. Then, for each 3D point in the point cloud to be processed, the distance between the 3D point and the fitted line is calculated, and 3D points with distance values ​​less than a preset distance value are considered as 3D points near the fitted line. Finally, the number of 3D points near the fitted line is obtained. Then, the above process of extracting two 3D points from the point cloud to be processed, fitting a straight line, and counting the number of 3D points near the fitted line is repeated until it is determined that fitting can be stopped, for example, when the number of fitting attempts reaches a preset number. Finally, the fitted line with the most 3D points is taken as the target edge line.

[0053] The accuracy of the target edge line directly affects the accuracy of the final straight weld seam point cloud extraction. As another possible implementation method, it can be as follows: Figure 5As shown, a more accurate straight line is obtained through two rounds of straight line fitting as the target edge line. Please refer to... Figure 5 , Figure 5 for Figure 4 A flowchart illustrating the sub-steps included in step S300. In this embodiment, step S300 may include sub-steps S310 to S320.

[0054] Sub-step S310 involves performing a first round of straight line fitting on the point cloud to be processed to obtain an edge line and the corresponding edge line point cloud.

[0055] In this embodiment, a first round of straight-line fitting can be performed on the point cloud to be processed to obtain one or more fitted straight lines. One fitted straight line is then selected from these as the final result of the first round of straight-line fitting, which is an edge straight line. Alternatively, three-dimensional points in the point cloud to be processed whose second distance value to the edge straight line is less than a preset second distance threshold can be determined as three-dimensional points in the edge straight line point cloud corresponding to the edge straight line. The specific method of the first round of straight-line fitting can be determined based on actual needs.

[0056] As one possible implementation method, it can be achieved through Figure 6 The edge lines and their corresponding point clouds are obtained as shown. Please refer to... Figure 6 , Figure 6 for Figure 5 A flowchart illustrating the sub-steps included in neutron step S310. In this embodiment, sub-step S310 may include sub-steps S311 to S312.

[0057] Sub-step S311 involves performing multiple line fitting operations on the point cloud to be processed to obtain multiple initial edge lines and the initial edge line point cloud corresponding to each initial edge line.

[0058] In this embodiment, the first round of line fitting includes multiple line fittings. A single line fitting is performed on the point cloud to be processed to fit a straight line as an initial edge line, and the corresponding initial edge line point cloud is obtained. That is, one line fitting yields one initial edge line. The three-dimensional points included in the initial edge line point cloud are the three-dimensional points in the point cloud to be processed whose second distance value to the initial edge line is less than a second distance threshold. Then, the above process is repeated at least once to obtain at least one more initial edge line point cloud corresponding to an initial edge line. Thus, the edge line can be subsequently determined based on the number of three-dimensional points in each initial edge line point cloud, thereby ensuring the accuracy of the subsequently obtained target edge line.

[0059] Optionally, it can be achieved through Figure 7 The method shown obtains multiple initial edge line point clouds. Please refer to... Figure 7 , Figure 7 for Figure 6 A flowchart illustrating the sub-steps included in neutron step S311. In this embodiment, sub-step S311 may include sub-steps S3111 to S3114.

[0060] Sub-step S3111: Determine whether the number of initial edge lines obtained has reached the preset number.

[0061] If the number of initial edge lines obtained does not reach the preset number, proceed to sub-step S3112.

[0062] Sub-step S3112: Select two three-dimensional points from the point cloud to be processed, and determine an initial edge line based on the selected two three-dimensional points.

[0063] Sub-step S3113 involves traversing the three-dimensional points in the point cloud to be processed, and determining whether the three-dimensional point currently traversed is a three-dimensional point in the initial edge line point cloud corresponding to the initial edge line based on the second distance value between the currently traversed three-dimensional point and the initial edge line, so as to obtain the three-dimensional point in the initial edge line point cloud corresponding to the initial edge line when the traversal is completed.

[0064] If the number of initial edge lines obtained reaches the preset number, proceed to sub-step S3114.

[0065] Sub-step S3114: Determine that the multiple linear fittings have been completed.

[0066] In this embodiment, it can be first determined whether the number of initial edge lines obtained in the first round of line fitting has reached a preset number, that is, whether the number of line fitting operations performed in the first round of line fitting has reached a preset number. If the number of initial edge lines obtained is less than the preset number, it means that line fitting needs to be continued in the first round of line fitting.

[0067] If the number of initial edge lines obtained so far does not reach the preset number, two 3D points can be selected from the 3D points included in the point cloud to be processed. Optionally, two 3D points can be randomly selected. To avoid the fitted initial edge lines being the same, the two 3D points selected in each line fitting can be different. After selecting two 3D points p1 and p2, a straight line can be determined based on 3D points p1 and p2 as an initial edge line, and the direction vector of this initial edge line is: Then, the three-dimensional points included in the point cloud to be processed are traversed, and the three-dimensional point p currently traversed is calculated.i The vector of the three-dimensional point p1: Then, the 3D point p being traversed is calculated. i The second distance value d from the initial edge line l : Determine the second distance value d l Is it less than the preset second distance threshold δ? l If the second distance value d l Less than the preset second distance threshold δ l Then the currently traversed 3D point p will be... i As the direction vector is The three-dimensional points in the point cloud corresponding to the initial edge line. When the three-dimensional points in the point cloud to be processed are traversed based on the initial edge line, the point cloud corresponding to the initial edge line can be obtained. The three-dimensional points in the point cloud of the initial edge line all satisfy d. l <δ l .

[0068] After obtaining an initial edge line and its corresponding point cloud through this line fitting, sub-step S3111 can be executed again.

[0069] If the number of initial edge lines obtained so far reaches the preset number, it can be determined that the number of line fitting attempts required for the first round of line fitting has been reached, and line fitting can no longer be performed in the first round of line fitting.

[0070] It is worth noting that other methods can also be used to determine whether the multiple line fittings required for the first round of line fitting have been completed. For example, if all the lines that can be fitted from the point cloud to be processed are fitted, it can be determined that the multiple line fittings required for the first round of line fitting have been completed.

[0071] Sub-step S312: The initial edge line point cloud with the largest number of three-dimensional points is taken as the edge line point cloud.

[0072] Given multiple initial edge lines and their corresponding initial edge line point clouds, the number of 3D points included in each initial edge line point cloud can be compared. Then, the initial edge line point cloud with the most 3D points is selected as the edge line point cloud. In this case, the edge line in sub-step S310 is the initial edge line corresponding to the initial edge line point cloud with the most 3D points.

[0073] Sub-step S320: Perform a second round of line fitting on the edge line point cloud to obtain the target edge line.

[0074] In this embodiment, after obtaining the edge line point cloud, a new round of line fitting can be performed on the edge line point cloud to obtain a target edge line. The specific method for obtaining the target edge line through this new round of line fitting can be determined based on actual needs.

[0075] As one possible implementation method, it can be achieved through Figure 8 The method shown quickly completes the second round of straight line fitting to obtain the target edge straight line. Please refer to... Figure 8 , Figure 8 for Figure 5 A flowchart illustrating the sub-steps included in neutron step S320. In this embodiment, sub-step S320 may include sub-steps S321 to S322.

[0076] Sub-step S321: Calculate the centroid of the point cloud of the edge straight line point cloud.

[0077] Sub-step S322: Obtain the covariance matrix based on the centroid of the point cloud and the edge line point cloud, and perform singular value decomposition on the covariance matrix to obtain the target direction vector.

[0078] In this embodiment, the centroid of the point cloud of the edge straight line point cloud is first calculated. The formula for calculating the centroid of a point cloud is shown below:

[0079]

[0080] Where n represents the number of three-dimensional points in the edge line point cloud.

[0081] Then, the midpoint of the point cloud and the centroid of the point cloud can be used as the reference. The difference is used to obtain the covariance matrix K. Then, singular value decomposition (SVD) is performed on the covariance matrix K: K = UΣV T U represents the left singular matrix after the singular value decomposition of the covariance matrix K, and V T Let V represent the right singular matrix after the singular value decomposition of the covariance matrix K, and Σ represent the diagonal matrix corresponding to the covariance matrix K. T The eigenvector corresponding to the minimum eigenvalue is obtained from the eigenvector. That is, the target direction vector, which is also the direction vector of the target edge line. Point cloud centroid Let a point be on the straight line of the target edge, according to the centroid of the point cloud. and target direction vector A single straight line can be uniquely determined, thus identifying the target edge line. This target edge line passes through the centroid of the point cloud. And the direction vector is the target direction vector.

[0082] When the target edge is a straight line, it can be achieved through... Figure 9 The method shown identifies straight weld points from the point cloud of the object. Please refer to... Figure 9 , Figure 9 for Figure 4 A flowchart illustrating the sub-steps included in step S400. In this embodiment, step S400 may include sub-steps S410 to S420.

[0083] Sub-step S410: For each three-dimensional point in the object point cloud, calculate the first distance value between the three-dimensional point and the target edge line.

[0084] Sub-step S420: If the first distance value is less than a preset first distance threshold, determine that the three-dimensional point is a straight weld point.

[0085] In this embodiment, the three-dimensional points included in the object point cloud can be traversed. For the currently traversed three-dimensional point p... i Construct point p i With the centroid of the point cloud vector Then the point p is calculated. i The distance to the straight line from the target edge is used as the first distance value d: If the first distance value d is less than the first preset distance threshold δ, then the currently traversed 3D point p will be... i As a straight weld point. After traversing the three-dimensional points included in the object point cloud, all straight weld points included in the object point cloud can be obtained, and these straight weld points constitute the straight weld point cloud.

[0086] Thus, when edge points that could be used as straight weld seam points are missing in the point cloud edge detection, the missing straight weld seam points can be automatically filled in by fitting the target edge line based on the edge points detected in the point cloud edge detection. These detected straight weld seam points can then be directly used as weld seam locations, and subsequent welding can be performed based on these points, thereby improving the welding accuracy of the welding robot.

[0087] To perform the corresponding steps in the above embodiments and various possible methods, an implementation of a straight weld point cloud extraction device 500 is given below. Optionally, the straight weld point cloud extraction device 500 can adopt the above-described... Figure 3 The device structure of the electronic device 300 shown is illustrated. Further, please refer to... Figure 10 , Figure 10This is a block diagram of the straight weld seam point cloud extraction device 500 provided in this embodiment. It should be noted that the basic principle and technical effects of the straight weld seam point cloud extraction device 500 provided in this embodiment are the same as those in the above embodiments. For the sake of brevity, any parts not mentioned in this embodiment can be referred to the corresponding content in the above embodiments. In this embodiment, the straight weld seam point cloud extraction device 500 may include: a data acquisition module 510, a filtering module 520, a processing module 530, and a determination module 540.

[0088] The data acquisition module 510 is used to obtain the object point cloud of the target object.

[0089] The filtering module 520 is used to determine edge point clouds from the object point cloud as point clouds to be processed by performing point cloud edge detection on the object point cloud.

[0090] The processing module 530 is used to obtain a target edge line by performing line fitting on the point cloud to be processed.

[0091] The determining module 540 is used to determine whether each three-dimensional point in the object point cloud is a straight weld point based on a first distance value between each three-dimensional point in the object point cloud and the target edge line.

[0092] Optionally, in this embodiment, the processing module is specifically used to: obtain an edge line and the edge line point cloud corresponding to the edge line by performing a first round of line fitting on the point cloud to be processed, wherein the edge line point cloud includes three-dimensional points in the point cloud to be processed whose second distance value from the edge line is less than a preset second distance threshold; and to obtain the target edge line by performing a second round of line fitting on the edge line point cloud.

[0093] Optionally, the above modules can be stored in the form of software or firmware. Figure 3 The memory 310 shown is either stored in or embedded in the operating system (OS) of the electronic device 300, and can be used by... Figure 3 The processor 320 executes the program. Meanwhile, the data and program code required to execute the above modules can be stored in the memory 310.

[0094] This application also provides a readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method for extracting point clouds of straight weld seams.

[0095] In summary, this application provides a method, apparatus, electronic device, and readable storage medium for extracting point clouds of straight weld seams. First, an object point cloud of the target object to be detected for straight weld seam inspection is obtained. Then, edge point clouds in the object point cloud are detected through point cloud edge detection processing as point clouds to be processed. Next, a target edge line is obtained based on the point cloud to be processed through line fitting. Finally, the three-dimensional points included in the straight weld seam point cloud are determined from the object point cloud based on the distance values ​​between each three-dimensional point in the object point cloud and the target edge line. Thus, even if some straight weld seam points are not detected during point cloud edge detection, the missing straight weld seam points can be supplemented by determining the straight weld seam points from the object point cloud through the target edge line fitted based on the edge points detected by point cloud edge detection, preventing the final obtained straight weld seam points from being incomplete.

[0096] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0097] In addition, the functional modules in the various embodiments of this 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.

[0098] If the aforementioned functions are implemented as software functional 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 this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0099] The above description is merely an optional embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for extracting point clouds of straight weld seams, characterized in that, The method includes: Obtain the object point cloud of the target object; By performing point cloud edge detection on the object point cloud, edge point clouds are determined from the object point cloud as point clouds to be processed; By performing straight line fitting on the point cloud to be processed, a target edge straight line is obtained; Based on the first distance value between each three-dimensional point in the object point cloud and the target edge line, determine whether each three-dimensional point in the object point cloud is a straight weld point; The step of obtaining a target edge line by performing line fitting on the point cloud to be processed includes: performing a first round of line fitting on the point cloud to be processed to obtain an edge line and an edge line point cloud corresponding to the edge line, wherein the edge line point cloud includes three-dimensional points in the point cloud to be processed whose second distance value from the edge line is less than a preset second distance threshold; and performing a second round of line fitting on the edge line point cloud to obtain the target edge line. The step of determining whether each three-dimensional point in the object point cloud is a straight weld point based on a first distance value between each three-dimensional point in the object point cloud and the target edge line includes: calculating a first distance value between each three-dimensional point in the object point cloud and the target edge line; and determining that the three-dimensional point is a straight weld point if the first distance value is less than a preset first distance threshold.

2. The method according to claim 1, characterized in that, The step of obtaining an edge line and the corresponding edge line point cloud by performing a first round of straight line fitting on the point cloud to be processed includes: Multiple line fitting operations are performed on the point cloud to be processed to obtain multiple initial edge lines and the initial edge line point cloud corresponding to each initial edge line. Among them, one line fitting operation yields one initial edge line. The initial edge line point cloud with the largest number of three-dimensional points is taken as the edge line point cloud, wherein the edge line is the initial edge line corresponding to the initial edge line point cloud with the largest number of three-dimensional points.

3. The method according to claim 2, characterized in that, The process of performing multiple line fitting operations on the point cloud to be processed to obtain multiple initial edge lines and the corresponding initial edge line point cloud includes: Determine whether the number of initial edge lines obtained has reached the preset number; If the number of initial edge lines obtained does not reach the preset number, two three-dimensional points are selected from the point cloud to be processed, and an initial edge line is determined based on the two selected three-dimensional points. The three-dimensional points in the point cloud to be processed are traversed. Based on the second distance value between the currently traversed three-dimensional point and the initial edge line, it is determined whether the currently traversed three-dimensional point is a three-dimensional point in the initial edge line point cloud corresponding to the initial edge line, so as to obtain the three-dimensional point in the initial edge line point cloud corresponding to the initial edge line when the traversal is completed. If the number of initial edge lines obtained reaches the preset number, it is determined that the multiple line fitting operations have been completed.

4. The method according to claim 1, characterized in that, The step of performing a second round of line fitting on the edge line point cloud to obtain the target edge line includes: The centroid of the point cloud of the edge line point cloud is calculated; The covariance matrix is ​​obtained based on the centroid of the point cloud and the point cloud of the edge line, and the singular value decomposition is performed on the covariance matrix to obtain the target direction vector, wherein the target edge line passes through the centroid of the point cloud and the direction vector is the target direction vector.

5. A device for extracting point clouds from straight weld seams, characterized in that, The device includes: The data acquisition module is used to obtain the point cloud of the target object; The filtering module is used to determine edge point clouds as point clouds to be processed from the object point cloud by performing point cloud edge detection on the object point cloud; The processing module is used to obtain a target edge line by performing line fitting on the point cloud to be processed; The determination module is used to determine whether each three-dimensional point in the object point cloud is a straight weld point based on a first distance value between each three-dimensional point in the object point cloud and the target edge line. Specifically, the processing module is used to: perform a first round of line fitting on the point cloud to be processed to obtain an edge line and the edge line point cloud corresponding to the edge line, wherein the edge line point cloud includes three-dimensional points in the point cloud to be processed whose second distance value from the edge line is less than a preset second distance threshold; and perform a second round of line fitting on the edge line point cloud to obtain the target edge line. The determining module is specifically used to: calculate a first distance value between each three-dimensional point in the object point cloud and the target edge line; and determine the three-dimensional point as a straight weld point if the first distance value is less than a preset first distance threshold.

6. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the point cloud extraction method for straight weld seams as described in any one of claims 1-4.

7. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the point cloud extraction method for straight weld seams as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Tower foot workpiece automatic welding system and method based on weld joint recognition

    CN114515924A

  • Weld joint identification method and device, computer readable medium and electronic equipment

    CN115409806A