Cylindrical surface linear welding seam detection method and electronic equipment

By conducting cylinder and plane detection on the point cloud of the target workpiece, the cylinder structure is constructed and screened, and the precise detection of cylinder linear seams is achieved in combination with weld information, the problem of complexity of cylinder linear weld detection is solved, and the accuracy and stability of detection is improved.

CN120031853APending Publication Date: 2025-05-23FAIR INNOVATION (SUZHOU) ROBOTIC SYSTEM CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510177028.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-18
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

In workpieces containing cylindrical structures, the detection of cylinder linear welds is complex, and it is necessary to accurately detect planes and cylinders, and to build an accurate cylinder structure based on this information to achieve accurate detection.

Method used

By obtaining the weld information of the weld to be tested in the pre-stored target workpiece, the cylinder surface detection and plane detection of the point cloud to be detected of the target workpiece is carried out, the cylinder structure is constructed based on the detection results, and the weld information is used to screen the constructed cylinder structure. Finally, the weld obtained is screened based on the reference direction of the weld to be tested to obtain the cylinder linear weld corresponding to the weld to be tested.

Benefits of technology

It improves the accuracy of cylindrical linear weld positioning, enhances stability in complex application scenarios, and ensures the accuracy and reliability of weld detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120031853A_ABST
    Figure CN120031853A_ABST
Patent Text Reader

Abstract

The invention provides a cylindrical surface linear welding seam detection method and electronic equipment, and the method comprises the steps: obtaining the welding seam information of a to-be-detected welding seam in a pre-stored target workpiece, carrying out the cylindrical surface detection and plane detection of a to-be-detected point cloud of the target workpiece obtained through shooting, constructing a cylindrical surface structure based on the plane and the cylindrical surface obtained through detection, and carrying out the detection of the to-be-detected welding seam. And screening the constructed cylindrical surface structure based on the welding seam information. And constructing a corresponding welding seam by using the cylindrical surface structure obtained by screening, and screening the constructed welding seam based on the reference direction of the to-be-detected welding seam so as to obtain a cylindrical surface linear welding seam corresponding to the to-be-detected welding seam. According to the scheme, the found cylindrical surface structure is screened by using the pre-marked welding seam information, and the constructed welding seam is screened, so that the positioning accuracy of the cylindrical surface linear welding seam is improved, and the method has relatively high stability in a complex application scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of weld detection, and in particular to a cylindrical linear weld detection method and electronic equipment. Background Art

[0002] The current intelligent welding system usually consists of two parts: a robotic arm and a camera. The camera is responsible for collecting images of the workpiece to detect the weld position based on the image, while the robotic arm is used to adjust the position of the camera and perform the actual welding operation. This technology is of great significance in industrial manufacturing, mainly reflected in the efficiency, safety and flexibility of the entire system. First, the robotic arm can work continuously, thereby shortening the production cycle and significantly improving the welding speed and efficiency. Secondly, the welding process of the robotic arm is easy to standardize, which can ensure high precision and consistency, and significantly reduce the impact of human factors on welding quality. In addition, the robotic arm can operate in dangerous environments, effectively reducing the safety risks that may be caused by manual operations. Combined with the corresponding visual system, the robotic arm can identify welds of complex shapes and positions, flexibly respond to various complex welding tasks, and further expand the scope of application of the system.

[0003] For workpieces with cylindrical structures, the detection of linear welds formed between the cylinder and the plane is relatively complex. It is necessary to accurately detect the plane and cylinder, and build an accurate cylindrical structure based on the accurate plane and cylinder, so as to achieve accurate detection of cylindrical linear welds. It can be seen that the detection of cylindrical linear welds in cylindrical structures involves multiple links, and the accuracy of the detection results of each link must be guaranteed. Therefore, how to realize the detection of cylindrical linear welds in cylindrical structures is particularly important in the field of welding technology. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a cylindrical linear weld detection method and electronic equipment to improve the accuracy of cylindrical linear weld positioning and the stability in complex application scenarios.

[0005] In a first aspect, the present invention provides a cylindrical linear weld detection method, the method comprising:

[0006] Acquire the weld information of the weld to be tested in the pre-stored target workpiece;

[0007] Performing cylinder detection and plane detection on the point cloud to be detected of the target workpiece obtained by shooting, and constructing a cylinder structure based on the plane and cylinder obtained by the detection;

[0008] screening the constructed cylindrical structure based on the weld information;

[0009] The corresponding weld is constructed using the cylindrical structure obtained by screening;

[0010] The constructed welds are screened based on the reference direction of the weld to be measured to obtain a cylindrical straight weld corresponding to the weld to be measured.

[0011] In an optional embodiment, the step of constructing a cylindrical structure based on the plane and cylinder obtained by detection includes:

[0012] For each plane and each cylinder obtained by detection, the angle between the normal vector of each plane and the axis vector of each cylinder is obtained to screen out planes and cylinders that meet the conditions;

[0013] Detect the planes and cylinders with real intersection lines among the screened planes and cylinders;

[0014] The cylindrical structure is constructed based on the plane and cylinder with real intersection lines.

[0015] In an optional embodiment, the step of detecting the planes and cylinders having real intersection lines among the screened planes and cylinders includes:

[0016] Obtain the plane equation of each screened plane and the cylinder equation of each cylinder;

[0017] The plane equation is combined with the cylinder equation to determine the corresponding intersection line;

[0018] Projecting each point in the point cloud to be detected onto the intersection line and obtaining a projection distance;

[0019] When the number of points whose projection distance is less than the preset distance is greater than or equal to the preset number, it is determined that there is a real intersection line between the corresponding plane and the cylinder.

[0020] In an optional embodiment, the step of screening the constructed cylindrical structure based on the weld information includes at least one of the following:

[0021] In the case where there are bilaterally symmetrical cylindrical structures among the constructed cylindrical structures, a cylindrical structure that meets the set position requirement is selected from the bilaterally symmetrical cylindrical structures based on the weld information; and / or

[0022] Obtaining the axial vector of the cylinder in each constructed cylindrical structure, and screening out the cylindrical structure that meets the set axial requirements based on the weld information and the axial vector of each cylindrical structure; and / or

[0023] For three cylindrical structures among the constructed cylindrical structures, the cylindrical structures that meet the set three-side requirements are screened out based on the weld information; and / or

[0024] For the two-sided cylindrical structures in the constructed cylindrical structures, the cylindrical structures that meet the set two-sided requirements in the two-sided cylindrical structures are screened out based on the weld information.

[0025] In an optional embodiment, the weld information includes a normal vector of a reference plane of the weld to be measured and a midpoint of the weld to be measured;

[0026] The step of selecting a cylindrical structure that meets the set position requirement from bilaterally symmetrical cylindrical structures based on the weld information includes:

[0027] For each bilaterally symmetrical cylindrical structure, obtaining a first centroid of the cylinder and a second centroid of the plane in the cylindrical structure;

[0028] Calculating a vector formed by the first mass center and the tool center point, and constructing a reference plane based on the vector and a normal vector of the reference plane;

[0029] It is detected whether the midpoint of the weld to be tested and the second centroid are on the same side of the reference surface, and the cylindrical structures that are not on the same side are filtered out.

[0030] In an optional embodiment, the weld information includes a normal vector of a reference plane of the weld to be measured;

[0031] The step of screening out the cylindrical structures that meet the set axial requirements based on the weld information and the axial vectors of each cylindrical structure comprises:

[0032] Calculating the angle between the normal vector of the reference plane and the axis vector of the cylinder in each of the cylindrical structures;

[0033] It is detected whether the angle is greater than a preset angle. If it is greater than the preset angle, the corresponding cylindrical structure is filtered out.

[0034] In an optional embodiment, the weld information includes the endpoints of the weld to be measured;

[0035] The step of selecting the cylindrical structure that meets the set three-side requirements among the three-side cylindrical structures based on the weld information includes:

[0036] Obtaining an auxiliary weld having a common endpoint with the weld to be tested in a preset database;

[0037] Obtaining a first intersection line between a cylinder and a plane and a second intersection line between planes in the three-cylindrical structure;

[0038] Obtaining a first angle between the weld to be measured and the first intersection line, and a second angle between the auxiliary weld and the second intersection line;

[0039] The three-sided cylindrical structures whose first angle and / or the second angle is greater than a preset angle are filtered out.

[0040] In an optional embodiment, the weld information includes a reference plane of the weld to be measured;

[0041] The step of selecting the cylindrical structure that meets the set two-side requirements from the two-side cylindrical structure based on the weld information includes:

[0042] Determine the straight line intersection between the cylinder and the plane in the two-sided cylinder structure, and calculate the angle between the straight line intersection and the weld to be measured;

[0043] Calculating the distance between the endpoint of the straight line intersection and the reference plane;

[0044] The two-sided cylindrical structure whose angle between the straight line intersection and the weld to be measured is greater than a preset angle and / or the two-sided cylindrical structure whose distance is greater than a preset distance are filtered out.

[0045] In an optional implementation, the point cloud to be detected includes a first point cloud and a second point cloud obtained by photographing the target workpiece at different postures;

[0046] The step of constructing a corresponding weld using the cylindrical structure obtained by screening includes:

[0047] Determine a first endpoint of a straight line intersection between a cylinder and a plane in a cylinder structure obtained based on the first point cloud screening, and determine a second endpoint of a straight line intersection between a cylinder and a plane in a cylinder structure obtained based on the second point cloud screening;

[0048] A corresponding weld is constructed based on the first endpoint and the second endpoint.

[0049] In a second aspect, the present invention provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the method described in any one of the aforementioned implementation modes are implemented.

[0050] The present invention provides a method for detecting a cylindrical straight weld seam and an electronic device. By obtaining the weld seam information of the weld seam to be detected in the target workpiece stored in advance, performing cylindrical detection and planar detection on the point cloud to be detected of the target workpiece obtained by shooting, constructing a cylindrical structure based on the detected plane and cylinder, and screening the constructed cylindrical structure based on the weld seam information. Using the screened cylindrical structure to construct the corresponding weld seam, and screening the constructed weld seam based on the reference direction of the weld seam to be detected, so as to obtain the cylindrical straight weld seam corresponding to the weld seam to be detected. In this solution, the found cylindrical structure is screened using the pre-labeled weld seam information, and the constructed weld seam is screened, which improves the accuracy of the positioning of the cylindrical straight weld seam and has high stability in complex application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required to be used in the embodiments of the present invention. It should be understood that the following drawings only show some embodiments of the present invention, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0052] Figure 1 It is a flowchart of the method for detecting a cylindrical straight weld seam provided by an embodiment of the present invention;

[0053] Figure 2 It is a schematic diagram of various types of cylindrical structures in an embodiment of the present invention;

[0054] Figure 3 For Figure 1 It is a flowchart of the sub-steps included in S12;

[0055] Figure 4 For Figure 3 It is a flowchart of the sub-steps included in S122;

[0056] Figure 5 It is a schematic diagram of a cylindrically symmetric structure on two sides in an embodiment of the present invention;

[0057] Figure 6 For Figure 1 It is one of the flowcharts of the sub-steps included in S13;

[0058] Figure 7 It is a schematic diagram of a cylindrical structure, a reference plane, and a reference surface in an embodiment of the present invention;

[0059] Figure 8 For Figure 1 It is the second flowchart of the sub-steps included in S13;

[0060] Fig. 9 For Figure 1The third flowchart of the sub-steps included in S13;

[0061] Fig.10 for Figure 1 Flowchart 4 of the sub-steps included in S13;

[0062] Fig.11 for Figure 1 A flowchart of the sub-steps included in S14;

[0063] Fig.12 A functional module block diagram of a cylindrical linear weld detection device provided by an embodiment of the present invention;

[0064] Fig.13 This is a structural block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0065] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0066] See also Figure 1 , is a flow chart of a cylindrical straight line weld detection method provided by an embodiment of the present invention, the cylindrical straight line weld detection method can be performed by a cylindrical straight line weld detection device, the cylindrical straight line weld detection device can be implemented by software and / or hardware, and can be configured in an electronic device, the electronic device can be a computer device, or a controller, processor, etc. in a robot. The detailed steps of the cylindrical straight line weld detection method are described as follows.

[0067] S11, obtaining pre-stored weld information of the weld to be measured in the target workpiece.

[0068] S12, performing cylinder detection and plane detection on the to-be-detected point cloud of the target workpiece obtained by shooting, and constructing a cylinder structure based on the planes and cylinders obtained by the detection.

[0069] S13, screening the constructed cylindrical structure based on the weld information.

[0070] S14, constructing a corresponding weld using the cylindrical structure obtained by screening.

[0071] S15, screening the constructed welds based on the reference direction of the weld to be measured to obtain a cylindrical straight weld corresponding to the weld to be measured.

[0072] There are many types of cylindrical structures in actual application scenarios, such as Figure 2 As shown in , the cylindrical structure includes a two-sided cylindrical structure and a three-sided cylindrical structure. Figure 2 The first one is a two-sided cylindrical structure, which is composed of a cylinder and a plane ①, and the intersection line of the two is a circular arc. Figure 2The second one is a two-sided cylindrical structure, which is composed of a cylinder and a plane ②, and the intersection of the two is a straight line, which is the cylindrical straight line weld to be detected in this embodiment.

[0073] Figure 2 The third to fifth cylindrical structures are three-sided cylindrical structures, in which the concavity and convexity can be determined based on the relative positions between the cylinder, the plane and the tool center point TCP. In the three-sided cylindrical structure, the plane ① and the cylinder form an arc intersection, and the plane ② and the cylinder form a cylinder straight line intersection.

[0074] In this embodiment, for the target workpiece, the weld database stores weld information of the weld to be measured in the target workpiece, and the weld information includes the starting point coordinates, the end point coordinates, the cylindrical structure type to which the starting point belongs, the cylindrical structure type to which the end point belongs, etc. The cylindrical structure type includes a two-sided cylindrical structure and a three-sided cylindrical structure.

[0075] When photographing the target workpiece using a photographing device, due to the limitation of the photographing field of view, the starting point and the end point of the weld to be tested may be photographed at the same time in one shot, or only the starting point or the end point of the weld to be tested may be photographed. Therefore, in this embodiment, if the point cloud to be tested obtained by one shot contains both the end point and the starting point, the detection is performed based on the point cloud to be tested obtained by one shot. If the point cloud to be tested obtained by one shot only contains the starting point or the end point, the detection can be performed based on the point clouds to be tested obtained by two shots, and finally the detection results of the two point clouds to be tested are combined to determine the weld.

[0076] The pre-stored weld information includes the cylindrical structure type to which the starting point belongs and the cylindrical structure type to which the end point belongs. Since the stability of the three-sided cylindrical structure detection is higher than that of the two-sided cylindrical structure, when performing the detection, if one of the starting point and the end point belongs to a two-sided cylindrical structure and the other belongs to a three-sided cylindrical structure, the detection of the three-sided cylindrical structure can be performed first, and then the detection of the two-sided cylindrical structure can be performed.

[0077] First, cylinder detection and plane detection are performed on the obtained point cloud to be detected. The detected planes and cylinders may include multiple ones respectively, and the cylinder structure is constructed based on the multiple planes and cylinders.

[0078] There may be multiple cylindrical structures constructed in the point cloud to be detected, some of which may not meet the basic requirements of the cylindrical structure, and some may not meet the conditions of the cylindrical structure to which the weld to be detected belongs. Therefore, the constructed cylindrical structures can be screened.

[0079] The selected cylindrical structure may be the cylindrical structure to which the starting point of the weld to be measured belongs, or the cylindrical structure to which the end point of the weld to be measured belongs. Based on the selected cylindrical structure, a weld can be constructed. There may be multiple welds constructed, and only one of the welds actually matches the weld to be measured. Therefore, the constructed welds can be screened based on the reference direction of the weld to be measured, so as to obtain the final required cylindrical straight weld. Among them, the reference direction of the weld to be measured can be obtained from the weld database.

[0080] The cylindrical linear weld detection method provided in this embodiment uses pre-marked weld information to screen the found cylindrical structures and the constructed welds, thereby improving the accuracy of cylindrical linear weld positioning and having higher stability in complex application scenarios.

[0081] In this embodiment, the cylindrical detection of the point cloud to be detected can be achieved in the following ways:

[0082] The weld information includes the plane equation of the reference plane of the weld to be measured, where the reference plane generally refers to the plane in the cylindrical structure whose normal vector is consistent with the axial direction of the cylinder, such as Figure 2 The plane in ①.

[0083] Each point in the point cloud to be detected is projected onto the reference plane, and the gradient of the projection points on the reference plane is calculated to obtain the gradient direction and amplitude corresponding to each projection point.

[0084] In addition, the weld information also includes the arc radius r, and the search radius can be set based on the arc radius. For example, the search radius is a certain range above and below the arc radius.

[0085] For each projection point on the reference plane, the corresponding search radius is extended along the gradient direction corresponding to each projection point to search for possible center coordinates. That is, the point located by extending the corresponding search radius of the projection point is taken as a possible center point. In this way, the same process is performed on each projection point, and if each possible center point located is located again, the number of votes is increased by 1. Finally, if the number of votes for a possible center point located exceeds the preset number, it can be determined as the center point. In addition, the arc equation is constructed based on the coordinates of the center point and the arc radius. Based on the arc equation, all projection points on the reference plane that meet the arc equation are determined.

[0086] By restoring the projection points detected on the reference plane to the three-dimensional space, each point on the cylinder in the point cloud to be detected can be determined, thus realizing cylinder detection.

[0087] In this embodiment, plane detection of the point cloud to be detected can be achieved in the following ways:

[0088] In order to avoid detecting a cylinder in the point cloud to be detected as a plane, the points on the cylinder that have been detected can be first removed from the point cloud, and then the plane detection is performed.

[0089] For each point in the point cloud to be detected, a set of plane parameters (a, b, c, d) is determined based on the normal vector of each point and its coordinates, where (a, b, c) can be determined by the normal vector of the point, and d can be determined by (a, b, c) and the coordinates of the point.

[0090] For each point in the point cloud, the plane parameters corresponding to each point are determined. If the number of votes for a set of plane parameters exceeds the preset number, it can be determined that the plane corresponding to the set of plane parameters exists in the point cloud. In this way, all planes in the point cloud to be detected are determined.

[0091] After detecting all cylinders and planes in the point cloud, build a cylinder structure based on the detected cylinders and planes. Figure 3 In this embodiment, this step can be implemented by:

[0092] S121, for each plane and each cylinder obtained by detection, obtain the angle between the normal vector of each plane and the axis vector of each cylinder, so as to screen out the planes and cylinders that meet the conditions.

[0093] S122, detecting the planes and cylinders with real intersection lines among the screened planes and cylinders.

[0094] S123, constructing a cylindrical structure based on the plane and cylinder with real intersection lines.

[0095] Combination Figure 2 As shown in , there is a relatively clear relationship between the cylinder and the plane, and between the planes in the cylindrical structure, that is, the angle between the normal vectors of the planes should be around 90 degrees, and the angle between the normal vector of the plane and the cylinder axis vector should be around 90 degrees or 0 degrees.

[0096] Therefore, according to the above requirements, the planes and cylinders that meet the conditions among the detected planes and cylinders can be screened out first, so as to exclude some cylinders and planes that cannot be in the cylindrical structure.

[0097] For the selected planes and cylinders, only the cylinders and planes with real intersection lines can form a cylindrical structure. Therefore, please refer to Figure 4 , it is also necessary to detect planes and cylinders with real intersection lines.

[0098] In this embodiment, the plane and cylinder with real intersection lines can be detected by the following method:

[0099] S1221, obtaining the plane equation of each screened plane and the cylinder equation of each cylinder.

[0100] S1222: Combine the plane equation and the cylinder equation to determine the corresponding intersection line.

[0101] S1223, projecting each point in the to-be-detected point cloud onto the intersection line, and obtaining a projection distance.

[0102] S1224: When the number of points whose projection distance is less than the preset distance is greater than or equal to the preset number, determine that there is a real intersection line between the corresponding plane and the cylinder.

[0103] In this embodiment, the equation of the intersection line between the plane and the cylinder is determined by combining the plane equation with the cylinder equation.

[0104] Traverse each point in the point cloud to be detected, project each point to the intersection line, and obtain the projection distance between the point and the projection point. Compare the projection distance of each point with the preset distance. When the number of points whose projection distance is less than the preset distance is greater than or equal to the preset number, it means that the intersection line really exists, that is, there is a real intersection line between the corresponding cylinder and the plane.

[0105] In addition, the projection points at both ends of the intersection line can be determined by projecting the projection points onto the intersection line. The projection points at both ends are the starting point and the end point of the real intersection line.

[0106] After the cylindrical structure is constructed in the above manner, some of the constructed cylindrical structures may not meet the requirements, so the constructed cylindrical structures need to be screened. There are multiple ways to screen the cylindrical structure. During implementation, any one or a combination of the multiple ways can be used to screen the cylindrical structure.

[0107] When screening the constructed cylindrical structures, as a possible implementation method, when there are bilaterally symmetrical cylindrical structures in the constructed cylindrical structures, the cylindrical structures that meet the set position requirements are screened out from the bilaterally symmetrical cylindrical structures based on the weld information.

[0108] The constructed cylindrical structure may contain bilaterally symmetrical cylindrical structures, such as Figure 5 As shown in , it is necessary to determine which side of the cylindrical structure is the required cylindrical structure from these bilaterally symmetrical cylindrical structures.

[0109] In this embodiment, the weld information includes the normal vector of the reference plane of the weld to be measured and the midpoint of the weld to be measured. Figure 6 , the step of selecting a cylindrical structure that meets the set position requirement from the bilaterally symmetrical cylindrical structures can be achieved by:

[0110] S131A, for each bilaterally symmetric cylindrical structure, obtain a first centroid of the cylinder and a second centroid of the plane in the cylindrical structure.

[0111] S132A, calculate the vector formed by the first center of mass and the tool center point, and construct a reference plane based on the vector and the normal vector of the reference plane.

[0112] S133A, detecting whether the midpoint of the weld to be tested and the second centroid are on the same side of the reference surface, and filtering out cylindrical structures that are not on the same side.

[0113] In this embodiment, according to the relative position of the cylinder and the plane, it is determined whether the cylinder structure to be searched is the cylinder structure on the left or the cylinder structure on the right. Figure 7 As shown in , for each cylindrical structure to be screened, the centroid of the cylinder in the cylindrical structure (named as the first centroid) and the centroid of plane ② (named as the second centroid) are determined.

[0114] Calculate the vector formed by the first centroid and the tool center point TCP of the camera, and obtain the normal vector of the reference plane. Construct the reference surface based on the calculated vector and the normal vector of the reference plane.

[0115] The midpoint of the weld to be measured is determined based on the weld information of the weld to be measured, and then the second centroid and the midpoint of the weld to be measured are detected to see whether they are on the same side of the reference surface. If they are on the same side, the cylindrical structure may be the cylindrical structure to be detected. If they are not on the same side, the cylindrical structure cannot be the cylindrical structure to which the starting point or end point of the weld to be measured belongs.

[0116] In this embodiment, the above method can be used to screen out the cylindrical structure that meets the position requirements of the weld to be measured based on the relative position relationship between the plane and the cylinder, thereby ensuring the accuracy of the final weld identification.

[0117] In addition, when screening the constructed cylindrical structures, as another possible implementation method, the axial vector of the cylinder in each constructed cylindrical structure is obtained, and based on the weld information and the axial vector of each cylindrical structure, the cylindrical structures that meet the set axial requirements are screened out.

[0118] See also Figure 8 In this embodiment, the weld information includes the normal vector of the reference plane of the weld to be measured. When screening the cylindrical structure that meets the set axial requirements, it can be achieved in the following way:

[0119] S131B, calculating the angle between the normal vector of the reference plane and the axis vector of the cylinder in each of the cylindrical structures.

[0120] S132B, detecting whether the included angle is greater than a preset angle, and if so, filtering out the corresponding cylindrical structure.

[0121] For a cylindrical structure that meets the requirements, the axis vector of the cylinder in the cylindrical structure should be basically parallel to the normal vector of the reference plane. Therefore, the angle between the normal vector of the reference plane and the axis vector of the cylinder can be calculated. In addition, considering that the direction of the axis vector of the cylinder is not necessarily consistent with the direction of the normal vector of the reference plane, if the angle between the normal vector of the reference plane and the axis vector of the cylinder is greater than 90 degrees, the angle can be converted to between 0 and 90 degrees. Then, check whether the angle between the normal vector of the reference plane and the axis vector of the cylinder is greater than the preset angle. If it is greater than the preset angle, it indicates that the normal vector of the reference plane is not parallel to the axis vector of the cylinder, that is, the cylindrical structure does not meet the set axial requirements, and the cylindrical structure is filtered out.

[0122] The constructed cylindrical structures include three-sided cylindrical structures and two-sided cylindrical structures, wherein the three-sided cylindrical structures are screened based on the relevant requirements of the three-sided cylindrical structures, and the two-sided cylindrical structures are screened based on the relevant requirements of the two-sided cylindrical structures. When screening the constructed cylindrical structures, as another possible implementation method, the cylindrical structures that meet the set three-sided requirements in the three-sided cylindrical structures can be screened based on the weld information. For details, please refer to Fig. 9 , this step can be achieved by:

[0123] S131C, obtaining an auxiliary weld in a preset database that has a common endpoint with the weld to be measured.

[0124] S132C, obtaining a first intersection line between a cylinder and a plane, and a second intersection line between planes in the three-cylindrical structure.

[0125] S133C, obtaining a first angle between the weld to be measured and the first intersection line, and a second angle between the auxiliary weld and the second intersection line.

[0126] S134C: filter out the three-sided cylindrical structures whose first angle and / or the second angle is greater than a preset angle.

[0127] by Figure 2 Take the fourth cylindrical structure in the figure as an example, where the weld to be measured should be the straight weld between plane ② and the cylinder, and the auxiliary weld having a common endpoint with the weld to be measured is the weld between plane ① and plane ②.

[0128] For the constructed three-sided cylindrical structure, Figure 2Taking the fourth cylindrical structure in the figure as an example, the first intersection line between the cylinder and the plane in the three-sided cylindrical structure is the straight line intersection line between the cylinder and plane ②, and the second intersection line between the planes is the straight line intersection line between plane ① and plane ②.

[0129] If the cylindrical straight weld in the constructed three-sided cylindrical structure is the weld to be tested, the weld to be tested should be consistent with the first intersection line, and the auxiliary weld should be consistent with the second intersection line.

[0130] Based on this, the first angle between the weld to be tested and the first intersection line, and the second angle between the auxiliary weld and the second intersection line are calculated respectively. The first angle and the second angle should both be very small angles. Therefore, if any one of the first angle and the second angle is greater than the preset angle, it indicates that the three-sided cylindrical structure is inconsistent with the three-sided cylindrical structure to which the weld to be tested belongs, and the three-sided cylindrical structure is filtered out.

[0131] In addition, the weld information includes the plane equation of the reference plane of the weld to be measured. For a certain three-sided cylindrical structure constructed, if the three-sided cylindrical structure is the three-sided cylindrical structure to which the weld to be measured belongs, then plane ① in the three-sided cylindrical structure (the plane whose normal vector is parallel to the axis vector of the cylinder) should be consistent with the reference plane. Therefore, the distance between plane ① and the reference plane can be calculated, and the three-sided cylindrical structures whose distance is greater than the preset distance can be filtered out.

[0132] In addition, the constructed cylindrical structure may also include a two-sided cylindrical structure. When screening the constructed cylindrical structure, as a possible implementation method, please refer to Fig.10 For the two-sided cylindrical structure in the constructed cylindrical structure, the cylindrical structure that meets the set two-sided requirements is selected based on the weld information. This step can be achieved in the following ways:

[0133] S131D, determining the straight line intersection between the cylinder and the plane in the two-sided cylindrical structure, and calculating the angle between the straight line intersection and the weld to be measured.

[0134] S132D: Calculate the distance between the endpoint of the straight line intersection and the reference plane.

[0135] S133D, filtering out the two-sided cylindrical structure whose angle between the straight line intersection and the weld to be measured is greater than a preset angle and / or the two-sided cylindrical structure whose distance is greater than a preset distance.

[0136] by Figure 2For example, the second cylindrical structure in is a two-sided cylindrical structure, where the intersection line between plane ② and the cylinder is a straight line intersection line. If the cylindrical structure is the cylindrical structure to which the weld to be tested belongs, then the straight line intersection line should be the weld to be tested. Therefore, the angle between the straight line intersection line and the weld to be tested should be close to 0 degrees. Based on this, if the angle between the straight line intersection line and the weld to be tested is greater than the preset angle, it indicates that the two-sided cylindrical structure is not the cylindrical structure to which the weld to be tested belongs, and the two-sided cylindrical structure can be filtered out.

[0137] In addition, based on the intersection between the straight line intersection and the cylinder, the endpoints of the straight line intersection can be determined, and the endpoints include two endpoints. The weld information includes a reference plane of the weld to be measured. If the two-sided cylindrical structure is the cylindrical structure to which the weld to be measured belongs, the distances between the two endpoints and the reference plane should be basically consistent with the distances between the two endpoints of the weld to be measured and the reference plane.

[0138] Therefore, the preset distance can be set based on the distance between the two endpoints of the weld to be tested and the reference plane, and then the distance between the endpoints of the straight line intersection and the reference plane is detected to see if it is greater than the preset distance, and the two-sided cylindrical structure with a distance greater than the preset distance is filtered out.

[0139] Through the above methods, the cylindrical structure is screened from multiple dimensions such as the position requirements, axial requirements, three-side requirements, and two-side requirements of the cylindrical structure to ensure that the screened cylindrical structure meets the basic requirements of the cylindrical structure and is consistent with the cylindrical structure to which the weld to be tested belongs.

[0140] On this basis, the corresponding weld is constructed based on the screened cylindrical structure. As can be seen from the above, the screened cylindrical structure may only include the starting point or end point of the weld, or may include both the starting point and end point of the weld. If the screened cylindrical structure only includes the starting point or end point of the weld, correspondingly, the point cloud to be detected includes the first point cloud and the second point cloud obtained by photographing the target workpiece at different postures.

[0141] See also Fig.11 In this case, the step of constructing the corresponding weld using the screened cylindrical structure can be achieved in the following way:

[0142] S141, determining a first endpoint of a straight line intersection between a cylinder and a plane in a cylindrical structure obtained based on screening of the first point cloud, and determining a second endpoint of a straight line intersection between a cylinder and a plane in a cylindrical structure obtained based on screening of the second point cloud.

[0143] S142, constructing a corresponding weld based on the first endpoint and the second endpoint.

[0144] When the cylindrical structures are screened based on the two point clouds, the cylindrical structures to which the starting point belongs and the cylindrical structures to which the end point belongs can be screened out respectively. That is, the first endpoint can be determined based on the first point cloud and the second endpoint can be determined based on the second point cloud. The first endpoint can be the starting point and the second endpoint can be the end point, or the first endpoint can be the end point and the second endpoint can be the starting point.

[0145] Then, a weld between the first end point and the second end point is constructed by splicing the two ends.

[0146] Since the detection structure of the two cylindrical straight lines is not necessarily unique, the constructed weld may include multiple ones. Therefore, the constructed weld can be further screened based on the weld information. In this embodiment, based on the reference direction of the weld to be measured, the angle between the constructed weld and the weld to be measured is calculated. When the angle is greater than 90 degrees, the angle is converted to between 0 and 90 degrees. Then, it is determined whether the angle is less than the angle threshold, which is a very small angle value. If the detected angle is less than the angle threshold, it indicates that the weld is consistent with the weld to be measured, and it can be determined as the cylindrical straight line weld that is finally detected and consistent with the weld to be measured.

[0147] The cylindrical straight weld detection method provided in this embodiment uses a voting mechanism to detect cylinders and planes, which can effectively filter out interference in the point cloud, and effectively filter out environmental noise and sensor errors, ensuring the stability and accuracy of the plane and cylindrical detection results. In terms of robustness and accuracy, it can obtain good cylinder and plane detection results, laying the foundation for subsequent algorithm steps and ensuring that the algorithm can accurately identify the cylindrical structure in the point cloud.

[0148] In addition, this solution makes full use of the weld information in the weld database and carefully screens the constructed cylindrical structure. When there are unavoidable interference results in the cylindrical and plane detection results, multiple filtering conditions such as weld reference direction, cylindrical structure orientation, and intersection angle can be used to achieve effective interference item filtering. This avoids the impact of workpiece size changes and improves weld positioning accuracy.

[0149] This solution does not rely on distance as a screening condition and can adapt to workpieces with certain size, rotation and translation errors to ensure the accuracy of weld positioning. In addition, in this solution, the cylindrical structure filtering logic is selected according to the weld annotation data to adapt to different types of cylindrical linear welds, ensuring that the algorithm is suitable for different application scenarios.

[0150] Based on the same inventive concept, please refer to Fig.12, an embodiment of the present invention further provides a functional module schematic diagram of a cylindrical linear weld detection device. This embodiment can divide the functional modules of the cylindrical linear weld detection device according to the above method embodiment. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0151] For example, when each functional module is divided into corresponding functional modules, Fig.12 The cylindrical straight weld detection device shown is only a schematic diagram of the device. The cylindrical straight weld detection device may include an acquisition module, a detection module, a first construction module, a first screening module, a second construction module and a second screening module. The functions of each functional module of the cylindrical straight weld detection device are described in detail below.

[0152] An acquisition module is used to acquire weld information of a weld to be tested in a pre-stored target workpiece;

[0153] A detection module, used for performing cylindrical detection and plane detection on the point cloud to be detected of the target workpiece obtained by shooting;

[0154] A first construction module is used to construct a cylindrical structure based on the plane and cylinder obtained by detection;

[0155] A first screening module, used for screening the constructed cylindrical structure based on the weld information;

[0156] The second construction module is used to construct the corresponding weld using the cylindrical structure obtained by screening;

[0157] The second screening module is used to screen the constructed welds based on the reference direction of the weld to be tested to obtain a cylindrical straight line weld corresponding to the weld to be tested.

[0158] In a possible implementation, the first building block is used to:

[0159] For each plane and each cylinder obtained by detection, the angle between the normal vector of each plane and the axis vector of each cylinder is obtained to screen out planes and cylinders that meet the conditions;

[0160] Detect the planes and cylinders with real intersection lines among the screened planes and cylinders;

[0161] The cylindrical structure is constructed based on the plane and cylinder with real intersection lines.

[0162] In a possible implementation, the first building block may be specifically used for:

[0163] Obtain the plane equation of each screened plane and the cylinder equation of each cylinder;

[0164] The plane equation is combined with the cylinder equation to determine the corresponding intersection line;

[0165] Projecting each point in the point cloud to be detected onto the intersection line and obtaining a projection distance;

[0166] When the number of points whose projection distance is less than the preset distance is greater than or equal to the preset number, it is determined that there is a real intersection line between the corresponding plane and the cylinder.

[0167] In a possible implementation, the first screening module may be used to:

[0168] In the case where there are bilaterally symmetrical cylindrical structures among the constructed cylindrical structures, a cylindrical structure that meets the set position requirement is selected from the bilaterally symmetrical cylindrical structures based on the weld information; and / or

[0169] Obtaining the axial vector of the cylinder in each constructed cylindrical structure, and screening out the cylindrical structure that meets the set axial requirements based on the weld information and the axial vector of each cylindrical structure; and / or

[0170] For three cylindrical structures among the constructed cylindrical structures, the cylindrical structures that meet the set three-side requirements are screened out based on the weld information; and / or

[0171] For the two-sided cylindrical structures in the constructed cylindrical structures, the cylindrical structures that meet the set two-sided requirements in the two-sided cylindrical structures are screened out based on the weld information.

[0172] In a possible implementation, the first screening module may be specifically used to:

[0173] For each bilaterally symmetrical cylindrical structure, obtaining a first centroid of the cylinder and a second centroid of the plane in the cylindrical structure;

[0174] Calculating a vector formed by the first mass center and the tool center point, and constructing a reference plane based on the vector and a normal vector of the reference plane;

[0175] It is detected whether the midpoint of the weld to be tested and the second centroid are on the same side of the reference surface, and the cylindrical structures that are not on the same side are filtered out.

[0176] In a possible implementation, the first screening module may be specifically used to:

[0177] Calculating the angle between the normal vector of the reference plane and the axis vector of the cylinder in each of the cylindrical structures;

[0178] It is detected whether the angle is greater than a preset angle. If it is greater than the preset angle, the corresponding cylindrical structure is filtered out.

[0179] In a possible implementation, the first screening module may be specifically used to:

[0180] Obtaining an auxiliary weld having a common endpoint with the weld to be tested in a preset database;

[0181] Obtaining a first intersection line between a cylinder and a plane and a second intersection line between planes in the three-cylindrical structure;

[0182] Obtaining a first angle between the weld to be measured and the first intersection line, and a second angle between the auxiliary weld and the second intersection line;

[0183] The three-sided cylindrical structures whose first angle and / or the second angle is greater than a preset angle are filtered out.

[0184] In a possible implementation, the first screening module may be specifically used to:

[0185] Determine the straight line intersection between the cylinder and the plane in the two-sided cylinder structure, and calculate the angle between the straight line intersection and the weld to be measured;

[0186] Calculating the distance between the endpoint of the straight line intersection and the reference plane;

[0187] The two-sided cylindrical structure whose angle between the straight line intersection and the weld to be measured is greater than a preset angle and / or the two-sided cylindrical structure whose distance is greater than a preset distance are filtered out.

[0188] In a possible implementation, the second building block may be used to:

[0189] Determine a first endpoint of a straight line intersection between a cylinder and a plane in a cylinder structure obtained based on the first point cloud screening, and determine a second endpoint of a straight line intersection between a cylinder and a plane in a cylinder structure obtained based on the second point cloud screening;

[0190] A corresponding weld is constructed based on the first endpoint and the second endpoint.

[0191] See also Fig.13, is a block diagram of an electronic device provided in an embodiment of the present invention, and the electronic device may be a computer device communicating with a robot, or a controller, a processor, etc. in a robot. The electronic device includes a memory, a processor, and a communication module. The memory, the processor, and the communication module are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components may be electrically connected to each other via one or more communication buses or signal lines.

[0192] The memory is used to store computer programs or data. The memory can 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.

[0193] The processor is used to read / write data or programs stored in the memory and execute the cylindrical linear weld detection method provided by any embodiment of the present invention.

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

[0195] It should be understood that Fig.13 The structure shown is only a schematic diagram of the structure of the electronic device. The electronic device may also include Fig.13 More or fewer components as shown, or with Fig.13 Different configurations are shown.

[0196] Furthermore, an embodiment of the present invention also provides a computer-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are executed, the cylindrical linear weld detection method provided in the above embodiment is implemented.

[0197] Specifically, the computer-readable storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the computer-readable storage medium is executed, the above cylindrical linear weld detection method can be executed. Regarding the process involved when the computer-readable storage medium and its executable instructions are executed, reference can be made to the relevant description in the above method embodiment, which will not be described in detail here.

[0198] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the couplings or direct couplings or communication connections shown or discussed among each other can be through some communication interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical or other forms.

[0199] In addition, the units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0200] Furthermore, in each embodiment of the present invention, the functional modules can be integrated together to form an independent part, or each module can exist alone, or two or more modules can be integrated to form an independent part.

[0201] It should be noted that if the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this 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 for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs and other various media that can store program codes.

[0202] In this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.

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

Claims

1. A cylindrical linear weld detection method, characterized in that: The method comprises: Acquire the weld information of the weld to be tested in the pre-stored target workpiece; Performing cylinder detection and plane detection on the point cloud to be detected of the target workpiece obtained by shooting, and constructing a cylinder structure based on the plane and cylinder obtained by the detection; screening the constructed cylindrical structure based on the weld information; The corresponding weld is constructed using the cylindrical structure obtained by screening; The constructed welds are screened based on the reference direction of the weld to be measured to obtain a cylindrical straight weld corresponding to the weld to be measured.

2. The cylindrical linear weld detection method according to claim 1, characterized in that: The step of constructing a cylindrical structure based on the plane and cylinder obtained by detection includes: For each plane and each cylinder obtained by detection, the angle between the normal vector of each plane and the axis vector of each cylinder is obtained to screen out planes and cylinders that meet the conditions; Detect the planes and cylinders with real intersection lines among the screened planes and cylinders; The cylindrical structure is constructed based on the plane and cylinder with real intersection lines.

3. The cylindrical linear weld detection method according to claim 2, characterized in that: The step of detecting the planes and cylinders having real intersection lines among the screened planes and cylinders comprises: Obtain the plane equation of each screened plane and the cylinder equation of each cylinder; The plane equation is combined with the cylinder equation to determine the corresponding intersection line; Projecting each point in the point cloud to be detected onto the intersection line and obtaining a projection distance; When the number of points whose projection distance is less than the preset distance is greater than or equal to the preset number, it is determined that there is a real intersection line between the corresponding plane and the cylinder.

4. The cylindrical linear weld detection method according to claim 1, characterized in that: The step of screening the constructed cylindrical structure based on the weld information comprises at least one of the following: In the case where there are bilaterally symmetrical cylindrical structures among the constructed cylindrical structures, a cylindrical structure that meets the set position requirement is selected from the bilaterally symmetrical cylindrical structures based on the weld information; and / or Obtaining the axial vector of the cylinder in each constructed cylindrical structure, and screening out the cylindrical structure that meets the set axial requirements based on the weld information and the axial vector of each cylindrical structure; and / or For three cylindrical structures among the constructed cylindrical structures, a cylindrical structure that meets the set three-side requirements is selected based on the weld information; and / or For the two-sided cylindrical structures in the constructed cylindrical structures, the cylindrical structures that meet the set two-sided requirements in the two-sided cylindrical structures are screened out based on the weld information.

5. The cylindrical linear weld detection method according to claim 4, characterized in that: The weld information includes a normal vector of a reference plane of the weld to be measured and a midpoint of the weld to be measured; The step of selecting a cylindrical structure that meets the set position requirement from bilaterally symmetrical cylindrical structures based on the weld information includes: For each bilaterally symmetrical cylindrical structure, obtaining a first centroid of the cylinder and a second centroid of the plane in the cylindrical structure; Calculating a vector formed by the first mass center and the tool center point, and constructing a reference plane based on the vector and a normal vector of the reference plane; It is detected whether the midpoint of the weld to be tested and the second centroid are on the same side of the reference surface, and the cylindrical structures that are not on the same side are filtered out.

6. The cylindrical linear weld detection method according to claim 4, characterized in that: The weld information includes a normal vector of a reference plane of the weld to be measured; The step of screening out the cylindrical structures that meet the set axial requirements based on the weld information and the axial vectors of each cylindrical structure comprises: Calculating the angle between the normal vector of the reference plane and the axis vector of the cylinder in each of the cylindrical structures; It is detected whether the angle is greater than a preset angle. If it is greater than the preset angle, the corresponding cylindrical structure is filtered out.

7. The cylindrical linear weld detection method according to claim 4, characterized in that: The weld information includes the endpoints of the weld to be measured; The step of selecting the cylindrical structure that meets the set three-side requirements among the three-side cylindrical structures based on the weld information includes: Obtaining an auxiliary weld having a common endpoint with the weld to be tested in a preset database; Obtaining a first intersection line between a cylinder and a plane and a second intersection line between planes in the three-cylindrical structure; Obtaining a first angle between the weld to be measured and the first intersection line, and a second angle between the auxiliary weld and the second intersection line; The three-sided cylindrical structures whose first angle and / or the second angle is greater than a preset angle are filtered out.

8. The cylindrical linear weld detection method according to claim 4, characterized in that: The weld information includes a reference plane of the weld to be measured; The step of selecting the cylindrical structure that meets the set two-side requirements from the two-side cylindrical structure based on the weld information includes: Determine the straight line intersection between the cylinder and the plane in the two-sided cylinder structure, and calculate the angle between the straight line intersection and the weld to be measured; Calculating the distance between the endpoint of the straight line intersection and the reference plane; The two-sided cylindrical structure whose angle between the straight line intersection and the weld to be measured is greater than a preset angle and / or the two-sided cylindrical structure whose distance is greater than a preset distance are filtered out.

9. The cylindrical linear weld detection method according to claim 1, characterized in that: The point cloud to be detected includes a first point cloud and a second point cloud obtained by photographing the target workpiece at different positions; The step of constructing a corresponding weld using the cylindrical structure obtained by screening includes: Determine a first endpoint of a straight line intersection between a cylinder and a plane in a cylinder structure obtained based on the first point cloud screening, and determine a second endpoint of a straight line intersection between a cylinder and a plane in a cylinder structure obtained based on the second point cloud screening; A corresponding weld is constructed based on the first endpoint and the second endpoint.

10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Cited By

  • AOI (automatic optical inspection) device and method for reflow soldering seam of SMT (surface mount technology) circuit board

    CN120628997A

  • An AOI inspection device and method for reflow solder joints of SMT surface mount circuit boards.

    CN120628997B

  • Welding pose acquisition method and related equipment

    CN122480576A