Welding seam detection method and device and electronic equipment

By identifying the point cloud plane and intersection line of the workpiece to be detected, combined with the reference weld and the welded section, the problem that existing algorithms cannot detect welded welds is solved, and the accurate detection and combination of welded welds is achieved, and the detection capability of the intelligent welding system is improved.

CN120471886APending Publication Date: 2025-08-12FAIR INNOVATION (SUZHOU) ROBOTIC SYSTEM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510604680.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-12
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The existing point cloud-based visual detection algorithm cannot accurately detect the welds of welded workpieces, resulting in the robotic arm being unable to correctly detect the welding points when facing the welded workpieces, limiting the application of intelligent welding systems.

Method used

By determining multiple point clouds to be detected for the workpiece to be detected, the real intersection lines and welded segments of each plane are identified, and the starting point and end point of the weld is determined in combination with the reference weld and welded segments, and the welded segments are sorted to identify the real weld.

Benefits of technology

Accurate detection of welded welds is achieved, and the welded and unwelded weld sections can be combined, which improves the detection accuracy and efficiency of the intelligent welding system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120471886A_ABST
    Figure CN120471886A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a welding seam detection method and device and electronic equipment, and relates to the field of welding seam detection, and the method comprises the steps: determining a plurality of to-be-detected point clouds of a to-be-detected workpiece, determining each plane in the to-be-detected point clouds for each to-be-detected point clouds, determining a real intersecting line of each plane and a welded section in the real intersecting line, and determining the welded section in the welded section; determining a plane structure in the to-be-detected point cloud, determining a reference weld joint of the plane structure, determining a starting point and an end point of the weld joint corresponding to a real intersecting line based on the real intersecting line, the reference weld joint and the welded sections, sorting the welded sections corresponding to the weld joints aiming at each weld joint, and determining the welding point of the to-be-detected point cloud based on the sorted welded sections and non-welded sections corresponding to the real intersecting line. And determining a real welding seam corresponding to the real intersecting line. According to the welding seam detection method provided by the invention, the welded welding seam endpoints in the linear welding seam can be detected and combined into the welded welding seam section and the unwelded welding seam section in the welding seam.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] When batch welding is performed on the same type of workpieces, the current point cloud-based visual inspection algorithm will produce unpredictable results if a welded workpiece appears among the workpieces. Summary of the Invention

[0003] The object of the present invention is to provide a weld detection method, device and electronic equipment, which can detect welded welds and unwelded welds of a workpiece.

[0004] In order to achieve the above objectives, the technical solutions adopted in the embodiments of the present application are as follows:

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

[0006] Determine a plurality of point clouds to be inspected of the workpiece to be inspected;

[0007] For each point cloud to be detected, determining each plane in the point cloud to be detected;

[0008] determining a true intersection line of each of the planes and a welded segment in the true intersection line;

[0009] Determining a planar structure in the point cloud to be detected;

[0010] determining a reference weld of the planar structure;

[0011] Determining a start point and an end point of a weld corresponding to the true intersection line based on the true intersection line, a reference weld, and a welded segment;

[0012] For each weld, sorting the welded segments corresponding to the weld;

[0013] Based on the sorted welded segments and the unwelded segments corresponding to the real intersection lines, a real weld corresponding to the real intersection lines is determined.

[0014] In an optional embodiment, the step of determining the true intersection line of each of the planes includes:

[0015] Traversing a first plane and a second plane among the planes, wherein the first plane and the second plane are any two planes among the planes;

[0016] determining a first plane equation of the first plane and a second plane equation of the second plane;

[0017] determining an intersection line between the first plane and the second plane based on the first plane equation and the second plane equation;

[0018] determining first projection distances of a point on the first plane, a point on the second plane, and the intersection line;

[0019] comparing each of the first projection distances with a first intersection projection distance threshold and a second intersection projection distance threshold, wherein the first intersection projection distance threshold is greater than the second intersection projection distance threshold;

[0020] determining a first number of projection distances that are greater than the second intersection projection distance threshold and less than the first intersection projection distance threshold;

[0021] comparing the first number with a threshold number of intersection points;

[0022] When the first number is greater than the intersection point number threshold, the intersection line is determined to be a true intersection line between the first plane and the second plane.

[0023] In an optional embodiment, the step of determining the welded segment in the real intersection line includes:

[0024] Determine a second projected distance between a point on the first plane and a point on the second plane where the real intersection line exists and the real intersection line;

[0025] determining a second number of second projected distances that is greater than zero and less than the second intersection projected distance threshold;

[0026] comparing the second number with the unwelded point count threshold;

[0027] When the second number is greater than the unwelded point number threshold, determining the point as an unwelded point;

[0028] determining whether the unwelded points are continuous and the unwelded length of the unwelded points;

[0029] After determining that the unwelded points are continuous and the unwelded length is greater than a preset length, determining an unwelded segment of the true intersection line and an endpoint corresponding to the unwelded segment;

[0030] Based on the unwelded segment, a welded segment on the true intersection line and an endpoint of the welded segment are determined.

[0031] In an optional embodiment, the step of determining the start point and end point of the weld corresponding to the true intersection line based on the true intersection line, the reference weld and the welded segment includes:

[0032] Determining the starting point and the end point of the true intersection line;

[0033] determining endpoints of the welded segments;

[0034] determining a reference direction of the reference weld;

[0035] sorting the start and end points of the true intersection line and the end points of the welded segments based on the reference direction;

[0036] Based on the reference direction and the sorted start point, end point and endpoint, the start point and end point of the weld corresponding to the true intersection line are determined.

[0037] In an optional embodiment, the step of determining the start point and end point of the weld corresponding to the true intersection line based on the reference direction and the sorted start point, end point, and endpoint includes:

[0038] Based on the sorted starting points, ending points, and endpoints, a first endpoint set is formed;

[0039] Traversing each first endpoint in the first endpoint set, and determining each vector formed by the first endpoint and other first endpoints except the first endpoint;

[0040] When the directions of the vectors are consistent with the reference direction, the first endpoint is determined to be the starting point of the weld;

[0041] When the direction of each of the vectors is opposite to the reference direction, the first endpoint is determined to be the end point of the weld.

[0042] In an optional embodiment, the step of sorting the welded segments corresponding to each weld includes:

[0043] For each weld, adjusting the order of each welded segment to obtain a first order of each welded segment, so that the directions of the starting endpoint and the ending endpoint of the welded segment are the same as the direction of the weld;

[0044] Determining first distances between the starting point endpoints of each welded segment in the first sequence and the starting point of the weld;

[0045] The first distances are sorted in ascending order to obtain a second order.

[0046] In an optional embodiment, the step of determining the real weld corresponding to the real intersection line based on the sorted welded segments and the unwelded segments corresponding to the real intersection line includes:

[0047] determining an unwelded segment corresponding to the true intersection line according to the end point of the weld, the starting point of the weld, and the second sequence;

[0048] Based on the sorted welded segments and the unwelded segments corresponding to the real intersection lines, a real weld corresponding to the real intersection lines is determined.

[0049] In an optional embodiment, the method further comprises:

[0050] Determining a first direction of a starting endpoint and an ending endpoint of each of the unwelded segments;

[0051] When the first direction is opposite to the reference direction of the reference weld, the unwelded segment is filtered;

[0052] determining the length of each of the unwelded segments;

[0053] comparing the length of each of the unwelded segments with a preset length;

[0054] When the length of the unwelded section is less than the preset length, filtering the unwelded section;

[0055] The filtered unwelded segments are used as unwelded segments corresponding to the true intersection lines.

[0056] In a second aspect, an embodiment of the present application provides a weld detection device, the device comprising:

[0057] a determination module configured to determine a plurality of to-be-detected point clouds of a workpiece to be inspected; for each to-be-detected point cloud, determine each plane in the to-be-detected point cloud; determine a true intersection line of each of the planes and a welded segment in the true intersection line; determine a planar structure in the to-be-detected point cloud; determine a reference weld of the planar structure; and determine a start point and an end point of a weld corresponding to the true intersection line based on the true intersection line, the reference weld line, and the welded segment;

[0058] a sorting module, configured to sort the welded segments corresponding to each weld;

[0059] The determining module is further configured to determine a real weld corresponding to the real intersection line based on the sorted welded segments and the unwelded segments corresponding to the real intersection line.

[0060] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the weld detection method when executing the computer program.

[0061] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the weld detection method when executed by a processor.

[0062] This application has the following beneficial effects:

[0063] The present application determines multiple point clouds to be inspected for a workpiece to be inspected, and for each point cloud to be inspected, determines each plane in the point cloud to be inspected, determines the true intersection line of each plane and the welded segment in the true intersection line, determines the planar structure in the point cloud to be inspected, determines the reference weld of the planar structure, determines the start and end points of the weld corresponding to the true intersection line based on the true intersection line, the reference weld line, and the welded segment, and for each weld, sorts the welded segment corresponding to the weld, and determines the true weld corresponding to the true intersection line based on the sorted welded segments and the unwelded segment corresponding to the true intersection line. The weld detection method provided by the present application can detect the endpoints of welded welds in a straight weld and combine them into welded weld segments and unwelded weld segments in the weld. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0065] Figure 1 A block diagram of an electronic device provided by an embodiment of the present invention;

[0066] Figure 2 One of the flow diagrams of a weld detection method provided by an embodiment of the present invention;

[0067] Figure 3 Schematic diagrams of various planar structures provided by embodiments of the present invention;

[0068] Figure 4 A second flow chart of a weld detection method provided by an embodiment of the present invention;

[0069] Figure 5 A third flow chart of a weld detection method provided by an embodiment of the present invention;

[0070] Figure 6 A schematic diagram of the welded section detection principle provided by an embodiment of the present invention;

[0071] Figure 7 A fourth flow chart of a weld detection method provided in an embodiment of the present invention;

[0072] Figure 8 A schematic diagram of a shooting point cloud provided by an embodiment of the present invention;

[0073] Figure 9 A fifth flow chart of a weld detection method provided by an embodiment of the present invention;

[0074] Figure 10 A sixth flow chart of a weld detection method provided in an embodiment of the present invention;

[0075] Figure 11 This is a structural block diagram of a weld detection device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0076] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.

[0077] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but rather merely represents selected embodiments of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort shall fall within the scope of protection of the present invention.

[0078] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.

[0079] In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. appear, the orientation or position relationship indicated is based on the orientation or position relationship shown in the accompanying drawings, or is the orientation or position relationship in which the product of the invention is usually placed when in use. It is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be understood as a limitation on the present invention.

[0080] In addition, the terms "first", "second", etc., if used, are merely used to distinguish and describe, and should not be understood as indicating or implying relative importance.

[0081] It should also be noted that, in the description of this application, unless otherwise expressly specified or limited, the terms "disposed," "installed," "connected," and "connected" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to internal connections between two components. Those skilled in the art will understand the specific meanings of the above terms in this application based on the specific circumstances.

[0082] After extensive research, the inventors discovered that intelligent welding systems typically consist of two core components: a robotic arm and a camera. The camera is responsible for accurately locating the weld seam on the workpiece, while the robotic arm adjusts the camera's position and performs precise welding operations. This technology plays a vital role in industrial manufacturing, and its value lies primarily in the system's efficiency, safety, and flexibility. Combined with advanced vision systems, the robotic arm can identify welds of complex shapes and positions, allowing it to flexibly handle a variety of complex welding tasks.

[0083] The current point cloud-based visual inspection algorithm cannot process straight welds that have already been welded, resulting in the robotic arm being unable to correctly detect the welding points when facing workpieces that have been manually welded, limiting the application of intelligent welding systems in real-world scenarios.

[0084] Objective shortcomings of existing technologies:

[0085] (1) Unable to process welded workpieces: When batch welding is performed on the same type of workpieces, if there is a welded workpiece among the workpieces, the existing algorithm will produce unpredictable results.

[0086] (2) Inaccurate endpoints of welded seams: When there are welded parts in the weld, the existing detection algorithm cannot accurately detect the unwelded parts.

[0087] In view of the discovery of the above problems, the present embodiment provides a weld detection method, device and electronic equipment, which can detect the end points of the welded seams in a straight weld and combine them into welded weld segments and unwelded weld segments in the weld. The solution provided by this embodiment is described in detail below.

[0088] This embodiment provides an electronic device capable of detecting welds. In one possible implementation, the electronic device may be a user terminal, such as, but not limited to, a server, a smartphone, a personal computer (PC), a tablet computer, a personal digital assistant (PDA), a mobile internet device (MID), etc.

[0089] Please refer to Figure 1 , Figure 1 The electronic device 100 provided in the embodiment of the present application is shown in FIG. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown. Figure 1 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0090] The electronic device 100 includes a weld detection device 110 , a memory 120 , and a processor 130 .

[0091] The memory 120 and the processor 130 are electrically connected to each other directly or indirectly to enable data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines. The weld detection device 110 includes at least one software function module that can be stored in the memory 120 in the form of software or firmware or embedded in the operating system (OS) of the electronic device 100. The processor 130 is used to execute the executable modules stored in the memory 120, such as the software function modules and computer programs included in the weld detection device 110.

[0092] The memory 120 may be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The memory 120 is used to store a program, and the processor 130 executes the program after receiving an execution instruction.

[0093] Please refer to Figure 2 , Figure 2 For application Figure 1 A flow chart of a weld detection method for an electronic device 100 is shown, and the method including each step is described in detail below.

[0094] S201: Determine a plurality of point clouds to be inspected of a workpiece to be inspected.

[0095] S202: For each point cloud to be detected, determine each plane in the point cloud to be detected.

[0096] S203: Determine the true intersection lines of the planes and the welded segments in the true intersection lines.

[0097] S204: Determine the planar structure in the point cloud to be detected.

[0098] S205: Determine the reference weld of the planar structure.

[0099] S206: Based on the real intersection line, the reference weld and the welded segment, determine the start point and end point of the weld corresponding to the real intersection line.

[0100] S207: For each weld, sort the welded segments corresponding to the weld.

[0101] S208: Determine a real weld corresponding to the real intersection line based on the sorted welded segments and the unwelded segments corresponding to the real intersection line.

[0102] The workpiece to be inspected is photographed to obtain multiple point clouds containing straight welds to be inspected.

[0103] For each point cloud to be detected, the RANSAC algorithm can be used to detect the planes in the point cloud to be detected, the planes in the point cloud to be detected can be detected based on the octree method, the planes in the point cloud to be detected can be fitted based on the least squares method, and the planes in the point cloud to be detected can be detected based on the Hough plane detection algorithm.

[0104] Determine the intersection lines of the planes, determine whether the intersection lines are true intersection lines, and determine the welded segments in the true intersection lines.

[0105] There are many ways to determine the intersection lines between planes. In one implementation:

[0106] The plane equations of two planes can be determined and the intersection line can be calculated using analytical geometry methods.

[0107] For example, suppose the equations of the two planes are:

[0108] A1x+B1y+C1z+D1=0A2x+B2y+C2z+D2=0;

[0109] The direction vector of the intersection line can be calculated by taking the cross product of the two plane normal vectors:

[0110] v = n1 × n2 where n1 = [A1, B1, C1] and n2 = [A2, B2, C2].

[0111] Determine the intersection line between two planes by solving a system of equations to find a point on the intersection line.

[0112] Another implementation method defines multiple tangent planes in the point cloud and calculates the intersection points between these planes and the point cloud to generate an intersection point cloud. This method involves: using the pcnormals function to calculate the point cloud normal vector. Based on the point cloud normal vector and the selected points, a tangent plane is constructed. Using the pcintersect function, the intersection points between the tangent plane and the point cloud are calculated. Points whose distance from the tangent plane is less than a certain threshold are selected; these points are considered points on the intersection line.

[0113] Determine whether the detected intersection is a true intersection and identify the welded segment in the true intersection. A welded segment in a true intersection is a completed straight weld segment with two welded endpoints, one starting endpoint and one ending endpoint.

[0114] The plane structure in the point cloud to be detected may be determined by filtering the plane structure using the concavity and convexity of the plane structure, the direction of the intersection line, the plane normal, etc., to obtain the plane structure of the point cloud to be detected.

[0115] A planar structure refers to a planar structure composed of two or three planes. Common planar structures can be divided into two-sided concave planar structure, two-sided convex planar structure, three-sided concave planar structure, three-sided two concave and one convex planar structure, and three-sided two convex and one concave planar structure.

[0116] like Figure 3 , is a schematic diagram of each plane structure, Figure 3 The arrow in is the plane normal, pointing to the image acquisition device.

[0117] When determining the planar structure in the point cloud to be inspected, if the surface structure corresponding to the reference weld in the weld database is a three-sided structure, a three-sided plane search and filtering is performed. If the type is a two-sided structure, a two-sided plane structure search and filtering is performed. The relationship between planes is used to search for three-sided or two-sided planar structures in the point cloud to be inspected, and the planar structures of the point cloud to be inspected are filtered out.

[0118] In the case where the weld database indicates a three-sided structure, but the part to be welded is a two-sided structure, if the correct structure is not found after filtering the three-sided planar structure, a two-sided planar structure search and filtering will be performed.

[0119] The reference weld of the plane structure of the point cloud to be detected is determined from the weld database, and the weld database contains the surface structure type of the starting point and the end point of the reference weld, and the coordinates of the starting point and the end point.

[0120] The real weld of the real intersection line is identified based on the real intersection line, the reference weld and the welded segment.

[0121] There are many ways to determine the true intersection of each plane. In one implementation, for example, Figure 4 As shown, the following steps are included:

[0122] S301: Traverse the first plane and the second plane in each plane.

[0123] The first plane and the second plane are any two planes among the planes.

[0124] S302: Determine a first plane equation of the first plane and a second plane equation of the second plane.

[0125] S303: Determine an intersection line between the first plane and the second plane based on the first plane equation and the second plane equation.

[0126] S304: Determine first projection distances between a point on the first plane and a point on the second plane and the intersection line.

[0127] S305: Compare each first projection distance with a first intersection projection distance threshold and a second intersection projection distance threshold.

[0128] The first intersection projection distance threshold is greater than the second intersection projection distance threshold.

[0129] S306: Determine a first number of projection distances that are greater than the second intersection projection distance threshold and less than the first intersection projection distance threshold.

[0130] S307: Compare the first number with the intersection point threshold.

[0131] S308: When the first number is greater than the intersection point number threshold, determine that the intersection line is a true intersection line between the first plane and the second plane.

[0132] The plane equations of all planes in the point cloud to be detected are obtained using the plane detection results. The plane equations corresponding to all planes are traversed and the plane equations are combined to obtain the intersection line between the first plane and the second plane. Based on the intersection line between the two planes, it is determined whether the intersection line is a true intersection line.

[0133] Specifically, the first plane and the second plane in each plane are traversed, and based on the first plane equation of the first plane and the second plane equation of the second plane, it is determined whether there is an intersection line between the first plane and the second plane. If there is an intersection line between the first plane and the second plane, the points on the first plane and the second plane are traversed, and the first projection distances of the points on the first plane and the second plane to the intersection line of the first plane and the second plane are determined, and each first projection distance is determined to be within the first intersection projection distance threshold and the second intersection projection distance threshold, and the first number of points whose first projection distances between the points of the first plane and the second plane and the intersection line are within the first intersection projection distance threshold and the second intersection projection distance threshold are determined. When the first number of points within the threshold exceeds the intersection point number threshold, it is determined that the corresponding intersection line of the first plane and the second plane is a true intersection line, and the endpoints of the true intersection line are obtained.

[0134] If the first number of points within the threshold does not exceed the intersection point number threshold, a new first plane and a new second plane with intersection lines are reacquired until all planes are traversed.

[0135] There are many ways to determine the welded segments in the true intersection line. In one implementation, for example, Figure 5 As shown, the following steps are included:

[0136] S401: Determine a second projection distance between a point on the first plane and a point on the second plane where the real intersection line exists and the real intersection line.

[0137] S402: Determine a second number of second projection distances that is greater than zero and less than a second intersection projection distance threshold.

[0138] S403: Compare the second number with a threshold value of the number of unwelded points.

[0139] S404: When the second number is greater than the un-welded point number threshold, determine that the point is an un-welded point.

[0140] S405: Determine whether the unwelded points are continuous and the unwelded length of the unwelded points.

[0141] S406: After determining that the unwelded points are continuous and the unwelded length is greater than a preset length, determining an unwelded segment of the true intersection line and an endpoint corresponding to the unwelded segment.

[0142] S407: Determine the welded segment on the real intersection line and the endpoints of the welded segment based on the unwelded segment.

[0143] Traversing the points on the two intersecting planes, for example, when a true intersection line exists between the first and second planes, a determination is made as to whether a second projection distance from the points on the first and second planes to the true intersection line is within a second intersection projection distance threshold. When the second number of points within the threshold exceeds a threshold for the number of unwelded segments, the corresponding position of the straight weld is determined to be unwelded. If a continuous segment of the straight weld is unwelded, and the unwelded length exceeds a certain threshold, an unwelded segment is determined to exist on the straight line. Within the straight weld, the unwelded segment is removed to obtain a welded segment, and the two endpoints of the welded segment are determined.

[0144] like Figure 6 The figure shows the principle diagram of the welded section detection.

[0145] There are many ways to determine the start and end points of the weld corresponding to the real intersection line based on the real intersection line, the reference weld and the welded segment. In one implementation, Figure 7 As shown, the following steps are included:

[0146] S501: Determine the starting point and end point of the true intersection line, determine the end point of the welded segment, and determine the reference direction of the reference weld.

[0147] S502: Sort the start and end points of the real intersection line and the endpoints of the welded segments based on the reference direction.

[0148] S503: Based on the reference direction and the sorted start point, end point, and endpoint, determine the start point and end point of the weld corresponding to the true intersection line.

[0149] The method for determining the start and end points of the weld corresponding to the true intersection line based on the reference direction and the sorted start and end points is as follows: the endpoints of the welded segments and the start and end points of the true intersection line are sorted using the reference direction of the reference weld, and the start and end points of the true weld are detected based on the sorted endpoints of the welded segments and the start and end points of the true intersection line.

[0150] Specifically: based on the reference direction corresponding to the reference weld, the endpoints of the welded segment and the starting and ending points of the true intersection line are sorted to obtain a first endpoint set, each first endpoint in the first endpoint set is traversed, and each vector composed of the first endpoint and other first endpoints except the first endpoint is determined; when the direction of each vector is consistent with the reference direction, the first endpoint is determined to be the starting point of the weld; when the direction of each vector is opposite to the reference direction, the first endpoint is determined to be the end point of the weld.

[0151] Since there may be long straight welds in the workpiece to be inspected, the two point clouds may not be able to capture the entire straight weld. Figure 8 As shown, the starting point and end point of the actual weld are determined using the above method.

[0152] The reference direction of the reference weld is obtained using the start and end points of the reference weld. The endpoints of the welded segment and the start and end points of the true intersection line are sorted based on the reference direction to obtain a first endpoint set. Each first endpoint in the first endpoint set is traversed to determine the direction of the vector formed by the first endpoint and the other first endpoints. If the directions of all vectors are the same as the reference direction, the first endpoint is the detected weld start point. If the directions of all vectors are opposite to the reference direction, the endpoint is the detected weld end point.

[0153] For each weld, there are multiple ways to sort the welded segments corresponding to the weld. In one implementation, for example, Figure 9 As shown, the following steps are included:

[0154] S601: For each weld, adjust the order of each welded segment to obtain a first order of each welded segment, so that the directions of the start endpoint and the end endpoint of the welded segment are the same as the direction of the weld.

[0155] S602: Determine first distances between the starting point endpoints of each welded segment in each first sequence and the starting point of the weld.

[0156] S603: Sort the first distances in ascending order to obtain a second order.

[0157] Based on the sorted welded segments and the unwelded segments corresponding to the true intersection line, the specific method for determining the true weld corresponding to the true intersection line is as follows: the unwelded segments corresponding to the true intersection line are determined according to the end point and the starting point of the weld line and the second order. Based on the sorted welded segments and the unwelded segments corresponding to the true intersection line, the true weld corresponding to the true intersection line is determined.

[0158] The method for sorting the welded segments of the weld corresponding to the true intersection line may specifically include: selecting the i-th welded segment, obtaining the direction of the welded segment, determining whether the direction of the first welded segment is consistent with the reference direction of the reference weld, and if so, determining a first distance between the starting point endpoint of the welded segment and the starting point of the weld, sorting the endpoints of the welded segments according to the first distances to obtain a second sort. If not, adjusting the order of the starting point and end point of the weld.

[0159] Create a point set and sequentially insert the weld start point, the start and end endpoints of the sorted welded segments, and the weld end point into the point set. Combine each endpoint in the point set in pairs to obtain the start and end points of the unwelded segments, forming all detected unwelded segments.

[0160] Considering that there may be multiple point clouds capturing different parts of the same welded segment, it is necessary to filter the detected unwelded segments, such as Figure 10 As shown, the following steps are included:

[0161] S701: Determine the first directions of the start endpoint and the end endpoint of each unwelded segment.

[0162] S702: When the first direction is opposite to the reference direction of the reference weld, the unwelded segment is filtered.

[0163] S703: Determine the length of each unwelded segment.

[0164] S704: Compare the length of each unwelded segment with a preset length.

[0165] S705: When the length of the first unwelded segment is less than a preset length, filter the unwelded segment.

[0166] S706: The filtered unwelded segments are used as unwelded segments corresponding to the true intersection lines.

[0167] Based on the weld reference direction, filter out unwelded segments whose start and end points are in the opposite direction to the reference direction. Calculate the lengths of all unwelded segments and filter out those whose lengths are less than the shortest weld distance.

[0168] Please refer to Figure 11 The present application also provides an embodiment of a method for Figure 1The weld detection device 110 of the electronic device 100 includes:

[0169] The determination module 111 is configured to determine a plurality of to-be-detected point clouds of a workpiece to be inspected; for each to-be-detected point cloud, determine each plane in the to-be-detected point cloud; determine a true intersection line of each plane and a welded segment in the true intersection line; determine a plane structure in the to-be-detected point cloud; determine a reference weld of the to-be-detected workpiece; and determine a start point and an end point of a weld corresponding to the true intersection line based on the plane structure, the true intersection line, the reference weld line, and the welded segment.

[0170] A sorting module 112 is configured to sort the welded segments corresponding to each weld;

[0171] The determining module 111 is further configured to determine a real weld corresponding to the real intersection line based on the sorted welded segments and the unwelded segments corresponding to the real intersection line.

[0172] The present application further provides an electronic device 100, which includes a processor 130 and a memory 120. The memory 120 stores computer-executable instructions, which, when executed by the processor 130, implement the weld detection method.

[0173] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by the processor 130, the weld detection method is implemented.

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

[0175] In addition, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part. If the function is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling 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 method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

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

[0177] The above descriptions are merely examples of various embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any modifications or substitutions that can be readily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included within the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A weld detection method, characterized in that: The method comprises: Determine a plurality of point clouds to be inspected of the workpiece to be inspected; For each point cloud to be detected, determining each plane in the point cloud to be detected; determining a true intersection line of each of the planes and a welded segment in the true intersection line; Determining a planar structure in the point cloud to be detected; determining a reference weld of the planar structure; Determining a start point and an end point of a weld corresponding to the true intersection line based on the true intersection line, a reference weld, and a welded segment; For each weld, sorting the welded segments corresponding to the weld; Based on the sorted welded segments and the unwelded segments corresponding to the real intersection lines, a real weld corresponding to the real intersection lines is determined.

2. The method according to claim 1, characterized in that The step of determining the true intersection line of each of the planes comprises: Traversing a first plane and a second plane among the planes, wherein the first plane and the second plane are any two planes among the planes; determining a first plane equation of the first plane and a second plane equation of the second plane; determining an intersection line between the first plane and the second plane based on the first plane equation and the second plane equation; determining first projection distances of a point on the first plane, a point on the second plane, and the intersection line; comparing each of the first projection distances with a first intersection projection distance threshold and a second intersection projection distance threshold, wherein the first intersection projection distance threshold is greater than the second intersection projection distance threshold; determining a first number of projection distances that are greater than the second intersection projection distance threshold and less than the first intersection projection distance threshold; comparing the first number with a threshold number of intersection points; When the first number is greater than the intersection point number threshold, the intersection line is determined to be a true intersection line between the first plane and the second plane.

3. The method according to claim 2, characterized in that The step of determining the welded segment in the real intersection line comprises: Determine a second projected distance between a point on the first plane and a point on the second plane where the real intersection line exists and the real intersection line; determining a second number of second projected distances that is greater than zero and less than the second intersection projected distance threshold; comparing the second number with the unwelded point count threshold; When the second number is greater than the unwelded point number threshold, determining the point as an unwelded point; determining whether the unwelded points are continuous and the unwelded length of the unwelded points; After determining that the unwelded points are continuous and the unwelded length is greater than a preset length, determining an unwelded segment of the true intersection line and an endpoint corresponding to the unwelded segment; Based on the unwelded segment, a welded segment on the true intersection line and an endpoint of the welded segment are determined.

4. The method according to claim 1, wherein The step of determining the start point and end point of the weld corresponding to the true intersection line based on the true intersection line, the reference weld and the welded segment comprises: Determining the starting point and the end point of the true intersection line; determining endpoints of the welded segments; determining a reference direction of the reference weld; sorting the start and end points of the true intersection line and the end points of the welded segments based on the reference direction; Based on the reference direction and the sorted start point, end point and endpoint, the start point and end point of the weld corresponding to the true intersection line are determined.

5. The method according to claim 4, characterized in that The step of determining the start point and end point of the weld corresponding to the true intersection line based on the reference direction and the sorted start point, end point, and endpoint comprises: Based on the sorted starting points, ending points, and endpoints, a first endpoint set is formed; Traversing each first endpoint in the first endpoint set, and determining each vector formed by the first endpoint and other first endpoints except the first endpoint; When the directions of the vectors are consistent with the reference direction, the first endpoint is determined to be the starting point of the weld; When the direction of each of the vectors is opposite to the reference direction, the first endpoint is determined to be the end point of the weld.

6. The method according to claim 1, characterized in that The step of sorting the welded segments corresponding to each weld includes: For each weld, adjusting the order of each welded segment to obtain a first order of each welded segment, so that the directions of the starting endpoint and the ending endpoint of the welded segment are the same as the direction of the weld; Determining first distances between the starting point endpoints of each welded segment in the first sequence and the starting point of the weld; The first distances are sorted in ascending order to obtain a second order.

7. The method according to claim 6, characterized in that The step of determining the real weld corresponding to the real intersection line based on the sorted welded segments and the unwelded segments corresponding to the real intersection line comprises: determining an unwelded segment corresponding to the true intersection line according to the end point of the weld, the starting point of the weld, and the second sequence; Based on the sorted welded segments and the unwelded segments corresponding to the real intersection lines, a real weld corresponding to the real intersection lines is determined.

8. The method according to claim 7, characterized in that The method further comprises: Determining a first direction of a starting endpoint and an ending endpoint of each of the unwelded segments; When the first direction is opposite to the reference direction of the reference weld, the unwelded segment is filtered; determining the length of each of the unwelded segments; comparing the length of each of the unwelded segments with a preset length; When the length of the unwelded section is less than the preset length, filtering the unwelded section; The filtered unwelded segments are used as unwelded segments corresponding to the true intersection lines.

9. A weld detection device, characterized in that: The device comprises: a determination module configured to determine a plurality of to-be-detected point clouds of a workpiece to be inspected; for each to-be-detected point cloud, determine each plane in the to-be-detected point cloud; determine a true intersection line of each of the planes and a welded segment in the true intersection line; determine a planar structure in the to-be-detected point cloud; determine a reference weld of the planar structure; and determine a start point and an end point of a weld corresponding to the true intersection line based on the true intersection line, the reference weld line, and the welded segment; a sorting module, configured to sort, for each weld, the first welded segment corresponding to the weld; The determining module is further configured to determine a real weld corresponding to the real intersection line based on the sorted welded segments and the unwelded segments corresponding to the real intersection line.

10. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method according to any one of claims 1 to 8 when executing the computer program.