Workpiece weld seam recognition method, device, computer readable medium and electronic equipment
By using point cloud data processing to identify weld seams, the problem of unstable weld seam recognition in poor lighting conditions has been solved, achieving accurate weld seam recognition under different lighting conditions and adaptability of robotic welding.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 深圳前海瑞集科技有限公司
- Filing Date
- 2022-08-31
- Publication Date
- 2026-07-24
Smart Images

Figure CN115409805B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of welding technology, and specifically relates to a method, apparatus, computer-readable medium, and electronic device for identifying weld seams on workpieces. Background Technology
[0002] Currently, vision-guided welding technology is developing rapidly. This involves capturing images of the workpiece with a camera, then identifying weld seams through image processing, and finally performing the welding operation. Common weld seam recognition methods typically involve defining a Region of Interest (ROI) in the image and using opening and closing operations to obtain corner points or contours. However, this approach requires clear images of the workpiece, making it highly sensitive to lighting conditions. In complex field environments, poor lighting is unavoidable, making it difficult to reliably achieve weld seam recognition.
[0003] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0004] The purpose of this application is to provide a method, apparatus, computer-readable medium, and electronic device for identifying weld seams in workpieces, so as to optimize the problem of poor weld seam identification stability in related technologies.
[0005] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0006] According to one aspect of the embodiments of this application, a method for identifying weld seams in a workpiece is provided, comprising:
[0007] Acquire point cloud data of the target welding workpiece;
[0008] The point cloud data is segmented into point cloud surfaces to obtain multiple point cloud patches, and each point cloud patch corresponds to one surface of the target welding workpiece.
[0009] Extract at least one point cloud patch pair composed of intersecting point cloud patches from the plurality of point cloud patches, wherein a point cloud patch pair includes two intersecting target point cloud patches;
[0010] Calculate the intersection line between the intersecting target point cloud patches in the at least one point cloud patch pair, and generate the weld seam of the target welding workpiece based on the intersection line.
[0011] According to one aspect of the embodiments of this application, a workpiece weld identification device is provided, comprising:
[0012] The data acquisition module is used to acquire point cloud data of the target welding workpiece;
[0013] The point cloud surface segmentation module is used to perform point cloud surface segmentation processing on the point cloud data to obtain multiple point cloud surface patches, and one point cloud surface patch corresponds to one surface of the target welding workpiece.
[0014] The target point cloud extraction module is used to extract at least one pair of point cloud patches composed of intersecting point cloud patches from the plurality of point cloud patches. A pair of point cloud patches includes two intersecting target point cloud patches.
[0015] The weld seam recognition module is used to calculate the intersection line between the intersecting target point cloud patches in the at least one point cloud patch pair, and generate the weld seam of the target welding workpiece based on the intersection line.
[0016] In one embodiment of this application, the point cloud surface segmentation module includes:
[0017] A point cloud surface fitting unit is used to perform point cloud surface fitting on the point cloud data according to preset fitting parameters to obtain point cloud surface patches.
[0018] An iterative unit is used to delete the point data corresponding to the point cloud patch from the point cloud data, and then return to the step of fitting the point cloud surface to the point cloud data according to the preset point cloud surface parameters, until the first iteration stop condition is reached, and multiple point cloud patches are obtained.
[0019] In one embodiment of this application, the preset fitting parameters include: the number of sampling points, a distance threshold, and a preset number of iterations; the point cloud surface fitting unit is specifically used for:
[0020] A fitted point cloud surface is formed by randomly selecting the same number of point data points as the number of sampling points from the point cloud data.
[0021] Based on the relationship between the distance between each point data in the point cloud data and the fitted point cloud surface and the distance threshold, the point data in the fitted point cloud surface are obtained;
[0022] The amount of data corresponding to the point data in the fitted point cloud is counted.
[0023] Return to the step of randomly selecting a number of point data points from the point cloud data that are the same as the number of sampling points to form a fitted point cloud surface, until the second iteration stopping condition is reached;
[0024] From the data volume corresponding to each fitted point cloud surface, the fitted point cloud surface with the largest data volume is selected as the point cloud surface patch.
[0025] In one embodiment of this application, the point cloud surface fitting unit is further configured to:
[0026] When the distance between the point data and the fitted point cloud surface is less than the distance threshold, the corresponding point data is used as the point cloud data in the fitted point cloud surface.
[0027] When the distance between the point data and the fitted point cloud surface is less than the distance threshold, the corresponding point data is used as point cloud data outside the fitted point cloud surface.
[0028] In one embodiment of this application, the apparatus further includes:
[0029] The point cloud patch deduplication module is used to determine whether there are at least two point cloud patches belonging to the same point cloud surface among the multiple point cloud patches based on the distance and angle between each pair of point cloud patches; if there are at least two point cloud patches belonging to the same point cloud surface among the multiple point cloud patches, then among the at least two point cloud patches belonging to the same point cloud surface, the point cloud patch with the largest amount of data is retained, and the other point cloud patches are deleted.
[0030] In one embodiment of this application, the weld seam recognition module is specifically used for:
[0031] For any intersection line, obtain multiple target point data that are within a preset distance range from the target point cloud patch corresponding to the intersection line;
[0032] The data of the multiple target points are projected onto the intersection line to form multiple weld points on the intersection line;
[0033] The weld seam of the target welded workpiece is generated based on the plurality of weld seams.
[0034] In one embodiment of this application, the apparatus further includes:
[0035] The filtering module is used to filter the point cloud data to remove noise points from the point cloud data.
[0036] According to one aspect of the embodiments of this application, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the workpiece weld identification method as described in the above technical solutions.
[0037] According to one aspect of the embodiments of this application, an electronic device is provided, the electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor executes the executable instructions to cause the electronic device to perform the workpiece weld identification method as described in the above technical solutions.
[0038] According to one aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the workpiece weld identification method as described in the above technical solutions.
[0039] In the technical solution provided in this application embodiment, the weld seam of the target welding work is identified by performing point cloud surface segmentation, target point cloud surface extraction, and intersection line calculation on the point cloud data of the target welding work. This eliminates the need to rely on a camera to capture a clear image of the target welding workpiece. Even under conditions of excessively bright or dim lighting, the weld seam of the workpiece can be accurately identified, improving the stability of weld seam identification. At the same time, it also improves the environmental adaptability of robot welding, which is beneficial to the development of automatic welding technology.
[0040] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0041] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0042] Figure 1 An exemplary system architecture block diagram illustrating the application of the technical solution of this application is shown schematically.
[0043] Figure 2 An exemplary system architecture block diagram illustrating the application of the technical solution of this application is shown schematically.
[0044] Figure 3 A flowchart illustrating a method for identifying workpiece welds according to an embodiment of this application is shown schematically.
[0045] Figure 4 A flowchart illustrating a method for identifying workpiece welds according to an embodiment of this application is shown schematically.
[0046] Figure 5 A schematic diagram of two intersecting target point cloud patches is shown.
[0047] Figure 6 A schematic diagram illustrating the distribution of target point data provided in one embodiment of this application is shown.
[0048] Figure 7 A schematic block diagram of the workpiece weld identification device provided in the embodiments of this application is shown.
[0049] Figure 8 A schematic diagram of a computer system architecture suitable for implementing the embodiments of this application is shown. Detailed Implementation
[0050] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.
[0051] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0052] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0053] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0054] Figure 1 An exemplary system architecture block diagram illustrating the application of the technical solution of this application is shown schematically.
[0055] like Figure 1As shown, the system architecture 100 may include terminal devices 110, a network 120, and a server 130. Terminal devices 110 may include smartphones, tablets, laptops, smart voice interaction devices, smart home appliances, in-vehicle terminals, mobile robots, etc. Server 130 may be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Network 120 may be a communication medium of various connection types capable of providing a communication link between terminal devices 110 and server 130, such as a wired communication link or a wireless communication link.
[0056] Depending on the implementation requirements, the system architecture in this application embodiment can have any number of terminal devices, networks, and servers. For example, server 130 can be a server group composed of multiple server devices. In addition, the technical solutions provided in this application embodiment can be applied to terminal device 110, or to server 130, or can be implemented jointly by terminal device 110 and server 130. This application does not impose any special limitations on this.
[0057] For example, the workpiece weld identification method provided in this application embodiment is implemented by a terminal device 110. The terminal device 110 acquires point cloud data of the target welded workpiece. Then, the terminal device 110 performs point cloud surface segmentation processing on the point cloud data to obtain multiple point cloud patches, each point cloud patch corresponding to a surface in the target welded workpiece. Next, the terminal device 110 extracts at least one pair of point cloud patches composed of intersecting point cloud patches from the multiple point cloud patches, each point cloud patch pair including two intersecting target point cloud patches. Finally, the terminal device 110 calculates the intersection line between the intersecting target point cloud patches in the at least one point cloud patch pair and generates the weld of the target welded workpiece based on the intersection line. After identifying the weld in the target welded workpiece, the terminal device 110 can send the weld identification result to the welding equipment performing the welding operation, for example, sending the weld identification result to a welding robot, which then performs the welding operation at the weld in the target welded workpiece.
[0058] In one embodiment of this application, the workpiece weld seam identification method provided in this application embodiment can also be implemented by server 130. That is, after server 130 obtains the point cloud data of the target welding workpiece, it identifies the weld seam in the target welding workpiece after steps such as point cloud surface segmentation, target point cloud surface extraction, and intersection calculation. Server 130 can send the weld seam identification result to the welding equipment, and then the welding equipment performs welding operation at the weld seam in the target welding workpiece.
[0059] For example, Figure 2 An exemplary system architecture block diagram illustrating the application of the technical solutions of this application is shown schematically. Figure 2As shown in the diagram, the system architecture includes a welding robot 210 and a template welding workpiece 220. The welding robot is equipped with a point cloud camera 211 and a welding torch 212. The welding robot 210 controls the point cloud camera 211 to capture images of the target welding workpiece 220, obtaining point cloud data of the surface of the target welding workpiece 220. The point cloud data is a collection of the position coordinate data of each point on the surface of the target welding workpiece 220 in three-dimensional space.
[0060] Next, the welding robot 210 performs point cloud surface segmentation processing on the acquired point cloud data to obtain multiple point cloud patches. Each point cloud patch includes multiple point data corresponding to one surface of the target welding workpiece 220. For example... Figure 2 As shown, the template welding workpiece 220 includes two point cloud surfaces: a first point cloud surface 221 and a second point cloud surface 222. The point data constituting the first point cloud surface 221 in the point cloud data corresponds to the first point cloud surface patch, and the point data constituting the second point cloud surface 222 corresponds to the second point cloud surface patch.
[0061] Then, the welding robot 210 extracts at least one pair of point cloud patches composed of intersecting point cloud patches from multiple point cloud patches, wherein a pair of point cloud patches includes two intersecting target point cloud patches. Figure 2 In the system architecture shown, only the target welding workpiece 220 composed of two intersecting surfaces is illustrated. Therefore, the two point cloud patches obtained in the previous step are the target point cloud patches, and these two target point cloud patches form a point cloud patch pair. In other application scenarios, those skilled in the art will understand that the target welding workpiece 220 can be composed of more surfaces, and there may be non-intersecting surfaces among these multiple surfaces. Since there is no need to weld between non-intersecting surfaces, it is necessary to extract point cloud patch pairs composed of intersecting point cloud patches from these multiple surfaces.
[0062] Finally, the welding robot 210 calculates the intersection line between the two target point cloud patches. This intersection line is actually the intersection line 223 between the first surface 221 and the second surface 222 of the target welding workpiece 220. The intersection line 223 is the weld seam in the target welding workpiece 220.
[0063] After identifying the weld seam in the target welding workpiece 220, the welding robot 210 controls the welding torch 212 to move to the weld seam (i.e., the intersection line 223) to perform the welding operation, thereby welding the first surface 221 and the second surface 222 of the target welding workpiece 220 together.
[0064] As can be seen, the technical solution of this application can identify the weld seam in the target welding workpiece by analyzing the point cloud data of the target welding workpiece, without relying on a camera to take a clear image of the target welding workpiece. Even under conditions of excessively bright or dim light, the workpiece weld seam can be accurately identified, which improves the stability of weld seam identification and enhances the environmental adaptability of robot welding, which is conducive to the development of automatic welding technology.
[0065] The method for identifying workpiece welds provided in this application will be described in detail below with reference to specific embodiments.
[0066] Figure 3 A flowchart illustrating a method for identifying workpiece welds according to an embodiment of this application is shown schematically. Figure 3 As shown, the method includes steps 310 to 340, as detailed below:
[0067] Step 310: Obtain point cloud data of the target welding workpiece.
[0068] Specifically, the target welding workpiece is the workpiece that needs to be welded. It can be preset by the operator or it can be the workpiece located by the welding equipment through target recognition processing. For example, the welding equipment takes an environmental image and performs target recognition processing on the environmental image to identify the target welding workpiece.
[0069] Point cloud data is a collection of point data. In the embodiments of this application, the point cloud data of the target welding workpiece refers to the collection of position coordinate data of each point on the surface of the target welding workpiece in three-dimensional space. That is to say, a point data in the point cloud data represents the position coordinate of a point on the surface of the target welding workpiece in three-dimensional space. If necessary, a point data may also include information such as the color, category, intensity, and data acquisition time of a point on the surface of the target welding workpiece.
[0070] Step 320: Perform point cloud surface segmentation on the point cloud data to obtain multiple point cloud patches, with each point cloud patch corresponding to one surface of the target welding workpiece.
[0071] Specifically, the surface of the target welding workpiece is composed of multiple surfaces. Point cloud surface segmentation is to separate the point cloud data corresponding to each surface of the target welding workpiece in the point cloud data. Then, a set of point cloud data after point cloud surface segmentation actually constitutes a surface, which is called a point cloud surface patch.
[0072] In one embodiment of this application, the point cloud surface segmentation process includes: performing point cloud surface fitting on the point cloud data according to preset fitting parameters to obtain point cloud patches; deleting the point data corresponding to the point cloud patches from the point cloud data, and then returning to the step of performing point cloud surface fitting on the point cloud data according to preset point cloud surface parameters, until the first iteration stopping condition is reached, resulting in multiple point cloud patches.
[0073] Specifically, a single point cloud surface fitting yields a point cloud patch. First, a point cloud surface fitting is performed on the point cloud data to obtain a point cloud patch. Then, the point data corresponding to the obtained patch is removed from the point cloud set. Next, point cloud surface fitting is performed again on the remaining point cloud data to obtain new patch sizes. This process is iterated repeatedly, performing multiple point cloud surface fittings to obtain multiple point cloud patches.
[0074] In the embodiments of this application, the first iteration stopping condition can be a limitation on the number of iterations, a limitation on the number of point cloud patches, or a limitation on the number of point data that make up the point cloud patches. For example, iteration can stop when the number of iterations reaches a set number. Another example is that iteration can stop when the point cloud patch fitting no longer generates new point cloud patches. Yet another example is that iteration can stop when the number of point data that make up the point cloud patches reaches a set number. Here, the set number of iterations, the set number, etc., are all preset fitting parameters.
[0075] In one embodiment of this application, point cloud surface fitting can be achieved through clustering of point cloud data. For example, point data in point cloud data represents three-dimensional spatial coordinates. A point data has values in three coordinate axes. The points in the point cloud data can be clustered by the distances between them in a certain coordinate axis direction. For example, a three-dimensional spatial coordinate system includes an x-axis, a y-axis, and a z-axis. Clustering by x-axis distance yields point cloud patches corresponding to the yOz surface; clustering by y-axis distance yields point cloud patches corresponding to the xOz surface; and clustering by z-axis distance yields point cloud patches corresponding to the xOy surface.
[0076] Step 330: Extract at least one point cloud patch pair composed of intersecting point cloud patches from multiple point cloud patches. A point cloud patch pair includes two intersecting target point cloud patches.
[0077] Specifically, intersecting point cloud patches are denoted as target point cloud patches, and a point cloud patch pair includes two target point cloud patches. Since a weld is a feature formed by two intersecting surfaces of the target welded workpiece, non-intersecting point cloud patches are obviously not point cloud patches that form welds. Therefore, when identifying welds, it is necessary to exclude non-intersecting point cloud patches and extract only the intersecting point cloud patches for weld identification.
[0078] In one embodiment of this application, determining whether two point cloud patches intersect can be done by examining the normal vectors of the two point cloud patches. If there is an angle between the normal vectors of the two point cloud patches, and the angle is not equal to 0 degrees or 180 degrees, then the two point cloud patches can be confirmed to intersect. Alternatively, it can be determined by judging whether the two point cloud patches are parallel, which in turn determines whether the two patches intersect. Specifically, if the two point cloud patches are parallel, then they do not intersect; if the two point cloud patches are not parallel, then they intersect.
[0079] Step 340: Calculate the intersection line between at least one point cloud patch pair of intersecting target point cloud patches, and generate the weld seam of the target welding workpiece based on the intersection line.
[0080] Specifically, the intersection line between two target point cloud patches in a point cloud patch pair is the location of the weld in the target welded workpiece. Therefore, by obtaining the intersection line corresponding to each point cloud patch pair, the weld in the target welded workpiece can be identified.
[0081] In the technical solution provided in this application embodiment, the weld seam of the target welding work is identified by performing point cloud surface segmentation, target point cloud surface extraction, and intersection line calculation on the point cloud data of the target welding work. This eliminates the need to rely on a camera to capture a clear image of the target welding workpiece. Even under conditions of excessively bright or dim lighting, the weld seam of the workpiece can be accurately identified, improving the stability of weld seam identification. At the same time, it also improves the environmental adaptability of robot welding, which is beneficial to the development of automatic welding technology.
[0082] Figure 4 A flowchart illustrating a method for identifying workpiece welds according to an embodiment of this application is shown. This embodiment is a further optimization of the above embodiment. Figure 4 As shown, the workpiece weld identification method provided in this application embodiment includes steps 401 to 410, as detailed below:
[0083] Step 401: Obtain point cloud data of the target welding workpiece.
[0084] Step 402: Filter the point cloud data to remove noisy point data.
[0085] Specifically, noisy data points in point cloud data refer to outlier data points, such as those that are significantly too far away from other data points. Filtering not only removes noisy data points but also reduces the density of the point cloud data, which helps improve the accuracy and efficiency of weld seam identification.
[0086] Step 403: Fit the point cloud data to the point cloud surface according to the preset fitting parameters to obtain point cloud patches.
[0087] Specifically, the preset fitting parameters include the number of sampling points, the distance threshold, and the preset number of iterations. The number of sampling points refers to the minimum number of point data required to form a point cloud patch. Since a point cloud patch corresponds to a surface, and a surface consists of at least 3 points, the number of sampling points must be at least 3.
[0088] In this embodiment, the specific process of point cloud surface fitting is as follows: randomly select a number of point data points from the point cloud data that are the same as the number of sampling points to form a fitted point cloud surface; obtain the point data in the fitted point cloud surface based on the relationship between the distance between each point data point in the point cloud data and the distance threshold; count the amount of data corresponding to the point data points in the fitted point cloud surface; return to the step of randomly selecting a number of point data points from the point cloud data that are the same as the number of sampling points to form a fitted point cloud surface, until the second iteration stopping condition is reached; select the fitted point cloud surface with the largest amount of data from the data amounts corresponding to each fitted point cloud surface as the point cloud patch.
[0089] The first step is to randomly select a certain number of point data points from the point cloud data. This number is determined by the number of sampling points in the preset fitting parameters. Based on these point data points, a fitted point cloud surface is constructed, which involves calculating the point cloud surface equation of the area containing these point data points.
[0090] The second step is to calculate the distance between each point in the point cloud data and the point cloud surface equation, which is equivalent to calculating the distance from each point to the fitted point cloud surface. If the distance between a point and the fitted point cloud surface is less than a distance threshold, then the point is considered to be on the same point cloud surface as the fitted point cloud surface, and thus the corresponding point is included in the fitted point cloud surface. If the distance between a point and the fitted point cloud surface is less than the distance threshold, then the point is considered to be far from the fitted point cloud surface, and the two do not belong to the same point cloud surface; therefore, the corresponding point is included in the fitted point cloud surface.
[0091] The third step involves dividing the point cloud data into those belonging to the fitted point cloud surface and those not belonging to it. Then, the first data quantity belonging to the fitted point cloud surface and the second data quantity belonging to the non-fitted point cloud surface are calculated. These first and second data quantities represent the data quantities corresponding to the current fitted point cloud surface.
[0092] Fourth, repeat steps one through three until the second iteration stopping condition is met, at which point the iteration stops, and the point cloud fitting process is complete. The second iteration stopping condition can be set when the number of iterations reaches a set value, or it can be set based on the amount of data corresponding to the fitted point cloud. For example, when the proportion of the first data corresponding to the fitted point cloud in the total data reaches a threshold in a certain iteration, the iteration stops.
[0093] Fifth, after the iteration is complete, select the fitted point cloud surface with the largest data volume from all the fitted point cloud surfaces obtained in the iteration process as the point cloud surface obtained in this fitting. The data volume of the fitted point cloud surface refers to the amount of point data contained in the fitted point cloud surface, which is the first data volume in the third step.
[0094] Step 404: After deleting the point data corresponding to the point cloud patch from the point cloud data, return to the step of fitting the point cloud surface to the point cloud data according to the preset point cloud surface parameters until the first iteration stopping condition is reached, and obtain multiple point cloud patches.
[0095] Specifically, a point cloud patch can be obtained by repeating the above five subdivision steps in step 403. Multiple point cloud patches can be obtained by repeating the above five subdivision steps in the point cloud data that does not constitute a point cloud patch.
[0096] Step 405: Based on the distance and angle between each pair of point cloud patches, determine whether there are at least two point cloud patches that belong to the same point cloud patch.
[0097] Specifically, when performing point cloud surface segmentation, there may be a situation where the point cloud data corresponding to one point cloud surface of the target welding workpiece is divided into two point cloud surface patches. In this case, it is necessary to delete the redundant point cloud surface patches to avoid misidentification of the weld in subsequent processes.
[0098] Whether two point cloud patches belong to the same point cloud surface can be determined by the distance and angle between them. If the distance between any two point cloud patches is less than a first threshold and the angle between them is less than a second threshold, then the two point cloud patches are considered to belong to the same point cloud surface; otherwise, if the distance between two point cloud patches is greater than the first threshold or the angle between them is greater than the second threshold, then the two point cloud patches are considered not to belong to the same point cloud surface.
[0099] Step 406: If there are at least two point cloud patches that belong to the same point cloud surface, then among the at least two point cloud patches that belong to the same point cloud surface, retain the point cloud patch with the largest amount of data and delete the other point cloud patches.
[0100] Specifically, when multiple point cloud patches belong to the same point cloud surface, one patch can be retained and the others deleted. Generally, the point cloud patch with the largest amount of data can be retained, and the others deleted. When two point cloud patches do not belong to the same point cloud surface, both can be retained without deletion.
[0101] Step 407: Extract at least one point cloud patch pair composed of intersecting point cloud patches from multiple point cloud patches. A point cloud patch pair includes two intersecting target point cloud patches.
[0102] Step 408: Calculate the intersection line between at least one point cloud patch pair and the intersecting target point cloud patches.
[0103] Specifically, first, the target point cloud surface equation of the target point cloud patch is calculated, and then the intersection line is obtained based on the two target point cloud surface equations.
[0104] Step 409: For any intersection line, obtain data of multiple target points whose distance from the intersection line is within a preset distance range from the target point cloud patch corresponding to the intersection line.
[0105] Specifically, the intersection line obtained from the target point cloud equation is a straight line without endpoints, while the weld of the target welded workpiece is a line segment with endpoints. Therefore, the intersection line needs to be processed to extract the weld. In the target point cloud patch, the points farther away from the intersection line corresponding to the target point cloud patch are less likely to be points on the weld. Therefore, when extracting the weld, only multiple target point data within a preset distance range from the intersection line need to be considered.
[0106] For example, Figure 5 A schematic diagram of two intersecting target point cloud patches is shown. The first target point cloud patch 510 includes multiple first target points 511, and the second target point cloud patch 520 includes multiple second target points 521. The first target point cloud patch 510 and the second target point cloud patch 520 form an intersection line 530. It is understood that in this embodiment, point cloud data and point data have the same meaning.
[0107] like Figure 5 As shown, in the first target point cloud patch 510, the distance between the first target point A and the intersection line 530 is within the preset distance range. Therefore, the first target point A can be considered a point that forms a weld, and its data is extracted as target point data. The distance between the first target point B and the intersection line 530 is significantly larger and not within the preset distance range. Therefore, the first target point B does not belong to the point that forms a weld.
[0108] Step 410: Project multiple target point data onto the intersection line to form multiple weld points on the intersection line.
[0109] Step 411: Generate the weld seam of the target welded workpiece based on multiple weld seam points.
[0110] Specifically, the target point data is still a certain distance from the intersection line. Projecting the target point data onto the intersection line, the projection point of the target point data is the weld point. The projection point or weld point is also the foot of the perpendicular of the target point data on the intersection line. The projection points of multiple target point data on the intersection line form a series of weld points. The line segment formed by these weld points is the weld of the target welded workpiece.
[0111] In one embodiment of this application, the weld points can be sorted according to the direction of the intersection line extension, and then the first weld point and the last weld point are used as two target weld points. Connecting the two target weld points yields the weld of the target welded workpiece.
[0112] For example, Figure 6 A schematic diagram illustrating the distribution of target point data provided in one embodiment of this application is shown. Figure 6 As shown, target point data 610 are distributed at both ends of the intersection line 620. Projecting each target point data 610 onto the intersection line 620 forms multiple weld points 630, which constitute the weld of the target welded workpiece. Optionally, based on the arrangement order of the multiple weld points 630, the first weld point C and the last weld point D are selected, and the first weld point C and the last weld point D are connected to obtain the weld of the target welded workpiece.
[0113] In this embodiment, there is no need to rely on a camera to capture a clear image of the target welding workpiece. Even under conditions of excessively bright or dim light, the weld seam of the workpiece can be accurately identified, which improves the stability of weld seam identification and enhances the environmental adaptability of robot welding, thus benefiting the development of automated welding technology.
[0114] It should be noted that although the steps of the method in this application are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0115] The following describes an embodiment of the apparatus of this application, which can be used to perform the workpiece weld identification method in the above embodiments of this application. Figure 7 A schematic block diagram of the workpiece weld identification device provided in an embodiment of this application is shown. Figure 7 As shown, the identification device for the weld seam of the workpiece includes:
[0116] The data acquisition module 710 is used to acquire point cloud data of the target welding workpiece;
[0117] The point cloud surface segmentation module 720 is used to perform point cloud surface segmentation processing on the point cloud data to obtain multiple point cloud surface patches, and one point cloud surface patch corresponds to one surface of the target welding workpiece.
[0118] The target point cloud extraction module 730 is used to extract at least one pair of point cloud patches composed of intersecting point cloud patches from the plurality of point cloud patches. A pair of point cloud patches includes two intersecting target point cloud patches.
[0119] The weld seam recognition module 740 is used to calculate the intersection line between the intersecting target point cloud patches in the at least one point cloud patch pair, and generate the weld seam of the target welding workpiece based on the intersection line.
[0120] In one embodiment of this application, the point cloud surface segmentation module 720 includes:
[0121] A point cloud surface fitting unit is used to perform point cloud surface fitting on the point cloud data according to preset fitting parameters to obtain point cloud surface patches.
[0122] An iterative unit is used to delete the point data corresponding to the point cloud patch from the point cloud data, and then return to the step of fitting the point cloud surface to the point cloud data according to the preset point cloud surface parameters, until the first iteration stop condition is reached, and multiple point cloud patches are obtained.
[0123] In one embodiment of this application, the preset fitting parameters include: the number of sampling points, a distance threshold, and a preset number of iterations; the point cloud surface fitting unit is specifically used for:
[0124] A fitted point cloud surface is formed by randomly selecting the same number of point data points as the number of sampling points from the point cloud data.
[0125] Based on the relationship between the distance between each point data in the point cloud data and the fitted point cloud surface and the distance threshold, the point data in the fitted point cloud surface are obtained;
[0126] The amount of data corresponding to the point data in the fitted point cloud is counted.
[0127] Return to the step of randomly selecting a number of point data points from the point cloud data that are the same as the number of sampling points to form a fitted point cloud surface, until the second iteration stopping condition is reached;
[0128] From the data volume corresponding to each fitted point cloud surface, the fitted point cloud surface with the largest data volume is selected as the point cloud surface patch.
[0129] In one embodiment of this application, the point cloud surface fitting unit is further configured to:
[0130] When the distance between the point data and the fitted point cloud surface is less than the distance threshold, the corresponding point data is used as the point cloud data in the fitted point cloud surface.
[0131] When the distance between the point data and the fitted point cloud surface is less than the distance threshold, the corresponding point data is used as point cloud data outside the fitted point cloud surface.
[0132] In one embodiment of this application, the apparatus further includes:
[0133] The point cloud patch deduplication module is used to determine whether there are at least two point cloud patches belonging to the same point cloud surface among the multiple point cloud patches based on the distance and angle between each pair of point cloud patches; if there are at least two point cloud patches belonging to the same point cloud surface among the multiple point cloud patches, then among the at least two point cloud patches belonging to the same point cloud surface, the point cloud patch with the largest amount of data is retained, and the other point cloud patches are deleted.
[0134] In one embodiment of this application, the weld seam recognition module 740 is specifically used for:
[0135] For any intersection line, obtain multiple target point data that are within a preset distance range from the target point cloud patch corresponding to the intersection line;
[0136] The data of the multiple target points are projected onto the intersection line to form multiple weld points on the intersection line;
[0137] The weld seam of the target welded workpiece is generated based on the plurality of weld seams.
[0138] In one embodiment of this application, the apparatus further includes:
[0139] The filtering module is used to filter the point cloud data to remove noise points from the point cloud data.
[0140] The specific details of the workpiece weld identification device provided in the various embodiments of this application have been described in detail in the corresponding method embodiments, and will not be repeated here.
[0141] Figure 8 A schematic block diagram of a computer system architecture for implementing an electronic device according to embodiments of the present application is shown.
[0142] It should be noted that, Figure 8 The computer system 800 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0143] like Figure 8As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 802 or programs loaded from storage section 808 into random access memory (RAM). The random access memory 803 also stores various programs and data required for system operation. The CPU 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output interface 805 (I / O interface) is also connected to the bus 804.
[0144] The following components are connected to the input / output interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a local area network card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.
[0145] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by central processing unit 801, it performs various functions defined in the system of this application.
[0146] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0147] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, 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 indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated 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 or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0148] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0149] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this application.
[0150] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0151] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for identifying weld seams in a workpiece, characterized in that, include: Acquire point cloud data of the target welding workpiece; The point cloud data is segmented into point cloud surfaces to obtain multiple point cloud patches, and each point cloud patch corresponds to one surface of the target welding workpiece. Based on the distance and angle between each pair of point cloud patches, determine whether there are at least two point cloud patches belonging to the same point cloud surface among the plurality of point cloud patches; If there are at least two point cloud patches belonging to the same point cloud surface among the multiple point cloud patches, then among the at least two point cloud patches belonging to the same point cloud surface, the point cloud patch with the largest amount of data is retained, and the other point cloud patches are deleted. Calculate the angle between the normal vectors of each point cloud patch. If the angle is not a set value, then the two point cloud patches corresponding to the angle are considered as a pair of point cloud patches. Calculate the intersection line between at least one of the target point cloud patches in the point cloud patch pair, and generate the weld seam of the target welded workpiece based on the intersection line.
2. The method for identifying workpiece welds according to claim 1, characterized in that, The point cloud data is segmented into point cloud surfaces to obtain multiple point cloud patches, including: The point cloud data is fitted with a point cloud surface according to preset fitting parameters to obtain a point cloud patch. After deleting the point data corresponding to the point cloud patch from the point cloud data, return to the step of fitting the point cloud data to the point cloud surface according to the preset fitting parameters, until the first iteration stopping condition is reached, and obtain multiple point cloud patches.
3. The method for identifying workpiece welds according to claim 2, characterized in that, The preset fitting parameters include: the number of sampling points, a distance threshold, and a preset number of iterations; point cloud surface fitting is performed on the point cloud data according to the preset fitting parameters to obtain point cloud patches, including: A fitted point cloud surface is formed by randomly selecting the same number of point data points as the number of sampling points from the point cloud data. Based on the relationship between the distance between each point data in the point cloud data and the fitted point cloud surface and the distance threshold, the point data in the fitted point cloud surface are obtained; The amount of data corresponding to the point data in the fitted point cloud is counted. Return to the step of randomly selecting a number of point data points from the point cloud data that are the same as the number of sampling points to form a fitted point cloud surface, until the second iteration stopping condition is reached; From the data volume corresponding to each fitted point cloud surface, the fitted point cloud surface with the largest data volume is selected as the point cloud surface patch.
4. The method for identifying workpiece welds according to claim 3, characterized in that, Based on the relationship between the distance between each point data in the point cloud data and the fitted point cloud surface and the distance threshold, the point cloud data in the fitted point cloud surface is obtained, including: When the distance between the point data and the fitted point cloud surface is less than the distance threshold, the corresponding point data is used as the point cloud data in the fitted point cloud surface. When the distance between the point data and the fitted point cloud surface is greater than the distance threshold, the corresponding point data is used as point cloud data outside the fitted point cloud surface.
5. The method for identifying workpiece welds according to claim 1, characterized in that, Generating the weld seam of the target welded workpiece based on the intersection line includes: For any intersection line, obtain multiple target point data that are within a preset distance range from the target point cloud patch corresponding to the intersection line; The data of the multiple target points are projected onto the intersection line to form multiple weld points on the intersection line; The weld seam of the target welded workpiece is generated based on the plurality of weld seams.
6. The method for identifying workpiece welds according to any one of claims 1-5, characterized in that, Before performing point cloud surface segmentation on the point cloud data to obtain multiple point cloud patches, the method further includes: The point cloud data is filtered to remove noise points.
7. A device for identifying weld seams on workpieces, characterized in that, include: The data acquisition module is used to acquire point cloud data of the target welding workpiece; The point cloud surface segmentation module is used to perform point cloud surface segmentation processing on the point cloud data to obtain multiple point cloud surface patches, and one point cloud surface patch corresponds to one surface of the target welding workpiece. The target point cloud extraction module is used to determine whether there are at least two point cloud patches belonging to the same point cloud surface among the multiple point cloud patches based on the distance and angle between each pair of point cloud patches; if there are at least two point cloud patches belonging to the same point cloud surface among the multiple point cloud patches, then among the at least two point cloud patches belonging to the same point cloud surface, the point cloud patch with the largest amount of data is retained and other point cloud patches are deleted; calculate the angle between the normal vectors of each point cloud patch, and if the angle is not a set value, then the two point cloud patches corresponding to the angle are regarded as a point cloud patch pair. The weld seam recognition module is used to calculate the intersection line between at least one of the intersecting target point cloud patches in the point cloud patch pair, and generate the weld seam of the target welded workpiece based on the intersection line.
8. A computer-readable medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the workpiece weld identification method according to any one of claims 1 to 6.
9. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor executes the executable instructions to cause the electronic device to perform the workpiece weld identification method according to any one of claims 1 to 6.