Weld joint detection method and device supporting reuse of weld joint database, and electronic equipment

By extracting reference information and surface structure from the weld database and combining point cloud detection and filtering technology, the detection problem of existing weld positioning methods in scenarios with translation errors and repetitive straight welds is solved, realizing the reuse of the weld database and improving detection efficiency.

CN121935246APending Publication Date: 2026-04-28FAIR INNOVATION (SUZHOU) ROBOTIC SYSTEM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
FAIR INNOVATION (SUZHOU) ROBOTIC SYSTEM CO LTD
Filing Date
2026-01-14
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing weld positioning methods rely heavily on prior knowledge and cannot handle translational errors and parallel repeating straight welds during registration, resulting in high modeling costs and low inspection efficiency.

Method used

By extracting reference weld information and surface structure information from the weld database, obtaining the actual surface structure using point cloud detection, and combining the reference weld information for primary and secondary filtering, the weld with the longest length is selected as the detection result, supporting the reuse of the weld database.

Benefits of technology

Even when similar structures and repetitive straight welds that did not exist in the modeling process appear in the workpiece, it can still provide stable inspection results, reducing modeling costs and improving inspection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121935246A_ABST
    Figure CN121935246A_ABST
Patent Text Reader

Abstract

The invention provides a weld seam detection method and device supporting weld seam database multiplexing and electronic equipment, and the method comprises the steps: carrying out the surface detection of the point cloud of a target workpiece, and carrying out the combination to obtain an actual surface structure. And filtering the actual surface structure by using the reference surface structure information extracted from the welding seam database to obtain an actual surface structure list, and permutation and combination are performed on the actual surface structure lists corresponding to the end points of the reference welding seam to obtain an actual welding seam list corresponding to the reference welding seam. And performing primary filtering on the actual welding seam list by using the reference welding seam information, performing secondary filtering on the actual welding seam list based on the auxiliary welding seam of the reference welding seam, and selecting the longest welding seam in the filtered actual welding seam list as the welding seam corresponding to the reference welding seam. In the scheme, a stable detection result can be given by combining primary welding seam filtering based on reference welding seam information and secondary welding seam filtering based on auxiliary welding seams, so that reuse of a welding seam database is supported, and welding seam detection of workpieces in the same shape is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of three-dimensional point cloud processing technology, and more specifically, to a weld inspection method, apparatus, and electronic device that supports the reuse of weld databases. Background Technology

[0002] For the visual inspection of welds, existing systems typically employ weld location algorithms based on prior knowledge. These existing solutions are highly dependent on prior knowledge, particularly regarding weld length.

[0003] Existing positioning methods require multiple modeling steps for workpieces of the same shape. Specifically, the system typically selects the detection result whose weld length is closest to the reference weld length as the final detection result. This results in the algorithm needing to perform multiple modeling steps for workpieces of different sizes to ensure that the weld reference length in the weld database matches the actual workpiece.

[0004] Furthermore, existing positioning methods cannot handle translational errors during registration. Specifically, discrepancies between the modeled and actual workpiece placement necessitate registration to ensure overlap between the database and the actual workpiece, but registration introduces translational and rotational errors. When the actual workpiece contains parallel, repeating straight weld seams not present in the database, existing algorithms filter seams that are too far from the database by referencing the weld seam endpoints. However, this algorithm fails to function correctly when significant translational errors exist during registration.

[0005] Furthermore, existing positioning methods place high demands on the weld seam database and the image pose. Specifically, existing algorithms detect weld seams whose length is closest to the reference weld seam length in the database. Therefore, the algorithm requires the weld seam database to be as consistent as possible with the actual workpiece and to minimize repeated shooting. If the same weld seam is photographed multiple times, the system will output a detection result that is closer to the database length than the actual weld seam length, failing to represent the true weld seam length.

[0006] It is evident that existing positioning methods cannot reuse information from the database of similar workpieces for weld positioning when faced with scenarios such as collinear repeating straight welds or parallel repeating straight welds in actual workpieces that do not appear in the database. This results in drawbacks such as high modeling costs and low work efficiency. Summary of the Invention

[0007] The purpose of this invention is to provide a weld inspection method, apparatus, and electronic device that supports weld database reuse, so as to reduce modeling costs and improve inspection efficiency.

[0008] In a first aspect, the present invention provides a weld inspection method that supports the reuse of weld databases, the method comprising: Extract reference weld information and reference surface structure information of reference welds from the weld database; Obtain the point cloud of the target workpiece, perform surface detection on the point cloud of the target workpiece, and obtain the actual surface structure based on the detected surface combination; The actual surface structure is filtered using the reference surface structure information to obtain a list of actual surface structures, wherein each reference surface structure corresponds to one list of actual surface structures. Arrange and combine the list of actual surface structures corresponding to the endpoints of the reference weld to obtain the list of actual welds corresponding to the reference weld; The reference weld information is used to filter the actual weld list once to obtain the filtered actual weld list corresponding to the reference weld. The list of actual welds is filtered a second time based on the auxiliary welds of the reference weld. The weld with the longest length in the filtered list of actual welds is selected as the weld corresponding to the reference weld. The auxiliary weld is a weld that shares the same endpoint as the reference weld.

[0009] Secondly, the present invention provides a weld inspection device that supports weld database reuse, the device comprising: The extraction module is used to extract reference weld information and reference surface structure information of reference welds from the weld database. The detection module is used to acquire the point cloud of the target workpiece, perform surface detection on the point cloud of the target workpiece, and obtain the actual surface structure based on the detected surface combination; The surface structure filtering module is used to filter the actual surface structure using the reference surface structure information to obtain a list of actual surface structures, wherein each reference surface structure corresponds to one list of actual surface structures. The combination module is used to arrange and combine the list of actual surface structures corresponding to the endpoints of the reference weld to obtain the list of actual welds corresponding to the reference weld. A weld seam primary filtering module is used to filter the actual weld seam list using the reference weld seam information to obtain a filtered list of actual weld seams corresponding to the reference weld seam. The secondary weld filtering module is used to perform secondary filtering on the actual weld list based on the auxiliary weld of the reference weld, and select the weld with the longest length in the actual weld list after filtering as the weld corresponding to the reference weld. The auxiliary weld is a weld that shares the same endpoint as the reference weld.

[0010] Thirdly, the present invention provides an electronic device including a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the method described in any of the foregoing embodiments.

[0011] This invention provides a weld detection method, apparatus, and electronic device that supports weld database reuse. It involves surface detection of the point cloud of a target workpiece, followed by combination to obtain the actual surface structure. The actual surface structure is filtered using reference surface structure information extracted from the weld database, resulting in a list of actual surface structures. The actual surface structures corresponding to the endpoints of the reference weld are then arranged and combined to obtain a list of actual welds corresponding to the reference weld. The actual weld list is then filtered a first time using the reference weld information, resulting in a filtered list of actual welds corresponding to the reference weld. A second filtering is performed on the actual weld list based on auxiliary welds of the reference weld, selecting the longest weld in the filtered list as the weld corresponding to the reference weld. This solution, combining primary weld filtering based on reference weld information and secondary weld filtering based on auxiliary welds, can still provide stable detection results even when similar structures or repetitive straight welds not present in the modeling of the workpiece appear, thus supporting the reuse of the weld database and enabling weld detection of workpieces with similar shapes. Attached Figure Description

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

[0013] Figure 1 A flowchart of a weld inspection method supporting weld database reuse provided in an embodiment of the present invention; Figure 2 This is a schematic diagram showing the different relative positional relationships between welds; Figure 3 A schematic diagram to illustrate the auxiliary weld seam; Figure 4 This is a schematic diagram of the auxiliary weld information acquisition process in an embodiment of the present invention; Figure 5 for Figure 1 A flowchart of the sub-steps included in S15; Figure 6 This is a schematic diagram of the weld seam filtration process in an embodiment of the present invention; Figure 7 for Figure 5 A flowchart of the sub-steps included in S152; Figure 8 This is a schematic diagram of the straight weld seam filtration process in an embodiment of the present invention; Figure 9 This is a schematic diagram of the repeated straight weld seam filtering process in an embodiment of the present invention; Figure 10 for Figure 1 A flowchart of the sub-steps included in S16; Figure 11 This is a schematic diagram of the secondary filtration process for welds in an embodiment of the present invention; Figure 12 Example diagram of a collinear repeating straight weld; Figure 13 Example diagram showing an actual workpiece with an unknown weld seam; Figure 14 This is a functional block diagram of a weld inspection device that supports weld database reuse, provided in an embodiment of the present invention. Figure 15 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0014] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention.

[0015] Please see Figure 1 The following is a flowchart of a weld detection method supporting weld database reuse provided in an embodiment of the present invention. This weld detection method supporting weld database reuse can be executed by a weld detection device supporting weld database reuse. This weld detection device supporting weld database reuse can be implemented by software and / or hardware and can be configured in an electronic device, such as a computer device or a server. The detailed steps of the weld detection method supporting weld database reuse are described below.

[0016] S11, Extract reference weld information and reference surface structure information of the reference weld from the weld database; S12, acquire the target workpiece point cloud, perform surface detection on the target workpiece point cloud, and obtain the actual surface structure based on the detected surface combination; S13, use the reference surface structure information to filter the actual surface structure to obtain a list of actual surface structures, where each reference surface structure corresponds to one list of actual surface structures; S14, Arrange and combine the list of actual surface structures corresponding to the endpoints of the reference weld to obtain the list of actual welds corresponding to the reference weld. S15, use the reference weld information to filter the actual weld list once, and obtain the actual weld list corresponding to the filtered reference weld. S16, the list of actual welds is filtered a second time based on the auxiliary welds of the reference weld, and the weld with the longest length in the list of actual welds after filtering is selected as the weld corresponding to the reference weld. The auxiliary weld is the weld that shares the same endpoint as the reference weld.

[0017] The weld detection method based on weld database reuse provided in this embodiment performs surface detection on the point cloud of the target workpiece and then combines it to obtain the actual surface structure. The actual surface structure is filtered using reference surface structure information extracted from the weld database to obtain a list of actual surface structures. The actual surface structures corresponding to the endpoints of the reference weld are arranged and combined to obtain a list of actual welds corresponding to the reference weld. The actual weld list is then filtered once using the reference weld information to obtain a filtered list of actual welds corresponding to the reference weld. A second filtering is performed on the actual weld list based on auxiliary welds of the reference weld, selecting the longest weld in the filtered list as the weld corresponding to the reference weld. In this scheme, by combining the first filtering based on reference weld information and the second filtering based on auxiliary welds, stable detection results can still be given even when similar structures or repetitive straight welds not present in the workpiece are present during modeling. This supports the reuse of the weld database, enabling weld detection on workpieces with similar shapes, thereby reducing modeling costs and improving detection efficiency.

[0018] The specific implementation methods of each of the above steps will be explained in detail below.

[0019] First, some of the concepts involved in this embodiment will be explained: Surface structure: refers to a surface structure composed of the intersection of cylindrical surfaces and planes, and planes and planes.

[0020] Weld Types: Welds can be classified into three types: straight welds, full circular welds, and notched circular welds. Straight weld inspection requires examining the cylindrical or planar structures corresponding to the two endpoints of the weld. Full circular weld inspection requires examining any segment of the cylindrical structure on the entire circle. Notched circular weld inspection requires examining the two cylindrical structures corresponding to the endpoints of the notch. For planar structures, the plane to be inspected must have a sufficient area; for cylindrical structures, the cylinder must have a sufficiently large central angle.

[0021] Weld database and surface structure list: Results obtained from model-free algorithm construction. The weld database stores information on all reference welds to be inspected, including weld type (straight line, full circle, notched circle), start and end coordinates (approximate location, used only to indicate direction and relative position), and reference surface structures corresponding to the endpoints (including surface structure type, intersection direction, and plane normal, used as conditions for surface structure filtering).

[0022] Reference weld and actual weld: Reference weld refers to the weld in the database, that is, the weld that the user selects to weld on the workpiece after modeling without a model. Actual weld refers to the possible welds detected by the algorithm from the actual workpiece. These welds are obtained by arranging and combining the actual surface structures detected by the algorithm.

[0023] Main surface structure and auxiliary surface structure: The main surface structure refers to the primary form of the surface structure corresponding to the weld endpoint, including three-plane structures, three-cylinder structures, etc. The auxiliary surface structure refers to the surface structure that may correspond to the weld endpoint; the intersection line of the auxiliary surface structures should include the weld. Generally, auxiliary surface structures exist only when the main surface structure is a three-plane structure, and the auxiliary surface structure is a two-plane structure derived from the three-plane structure. Two-plane structures do not have corresponding auxiliary structures.

[0024] Repeating lines: For a given line, a repeating line is one that meets the following conditions: ① The main / auxiliary surface structure corresponding to its starting and ending points is the same as the main surface structure corresponding to the starting and ending points of the line; ② It is parallel / collinear to the line (considering engineering applications, a difference of 5-10° is also considered parallel or collinear). These repeating lines can only be distinguished from the given line by their relative positional relationship.

[0025] Relative positional relationship: refers to the positional relationship between two straight lines in the same direction from the perspective of photographing the weld. This relationship is independent of the length of the lines and the distance between them. Relative positional relationships can be categorized as follows: independent or self (-1), upper (0), lower (1), left (2), right (3), covered (4), covered (5), overlapping with the forward extension line (6), overlapping with the reverse extension line (7), far (8), near (9), etc. Figure 2 As shown.

[0026] The eleven relative positional relationships mentioned above can be simply divided into three categories: irrelevant (including: irrelevant or self (-1)), parallel (including: upper side (0), lower side (1), far side (8), near side (9)), collinear (including: left side (2), right side (3), covered (4), covered (5), overlapping on the forward extension line (6), overlapping on the reverse extension line (7)).

[0027] The relative positional relationship is represented by the relative positional relationship between the current line and all lines (in order) (-1 represents itself, 0 represents the top, and 1 represents the bottom). This property ensures that no matter how many overlapping lines exist, the relative positional relationship of each line is unique and does not repeat with other lines. For example, if there are two straight weld seams, line one is "top" of line two, and line two is "bottom" of line one, the relative positional relationship of line one is represented as "-1, 0" (line one is independent of line one, and line one is top of line two), and the relative positional relationship of line two is "1, -1" (line two is bottom of line one, and line two is independent of line two).

[0028] Relative position relationship group: This is formed by combining the relative position relationships of multiple straight lines, with the number of rows and columns equal to the number of lines. Each row represents the relative position relationship between one line and all other lines, and each column represents the relative position relationship between all other lines and one line. The order of rows and columns is not fixed; for ease of calculation, the nth row and nth column generally correspond to the nth line. For example: Given three coplanar parallel lines, where line one is above line two, and line two is above line three, the relative position relationship group for these three lines is as follows: the first row represents the relative position relationship of line one as "-1, 0, 0"; the second row represents the relative position relationship of line two as "1, -1, 0"; and the third row represents the relative position relationship of line three as "1, 1, -1".

[0029] Auxiliary welds: For a given weld, other welds sharing the same endpoint are considered auxiliary welds (multiple welds may share an endpoint; these are all auxiliary welds). When storing auxiliary weld information, it's necessary to distinguish whether the shared endpoint is the start or end point of the reference weld, and record whether the reference weld endpoint shares a start or end point with the auxiliary weld. For example... Figure 3 As shown, for weld one, weld two, weld three, and weld four are all auxiliary welds of weld one, and are recorded as: "a-2-b", "a-3-a", "b-4-b" (the first "a\b" represents the start or end point of the reference weld, the second is the weld number, and the third "a\b" represents the start or end point of the auxiliary weld).

[0030] In this embodiment, the initialization process is executed first. The main purpose of the initialization process is to obtain prior knowledge from the database. Prior knowledge includes (1) reference weld information: the center coordinates and radius of the reference circular arc weld, the normal vector of the plane where the reference straight weld is located, the relative positional relationship of the repeated straight welds, and auxiliary weld information (the number of the auxiliary weld and the shared endpoints); (2) reference surface structure: one reference weld corresponds to two endpoints, and one endpoint corresponds to one or two reference surface structures (the main reference surface structure and the possible auxiliary reference surface structures). When multiple welds share one endpoint, these endpoints correspond to the same reference surface structure. Reference surface structure information includes: the type of surface structure, the plane normal, and the direction of intersection.

[0031] In this embodiment, the concept of auxiliary welds has been added. Please refer to the relevant documentation. Figure 4The weld inspection method provided in this application further includes a step of obtaining auxiliary weld information. The step of obtaining auxiliary weld information includes: for each reference weld in the reference weld list, determining whether the endpoints of the reference weld and each remaining reference weld share a common endpoint (if the distance between the start and / or end point of the reference weld and the start and / or end point of each remaining reference weld is less than a threshold, then there is a common endpoint). If so, the endpoint of the remaining reference weld is added to the auxiliary weld list of the reference weld.

[0032] Specifically, the process for obtaining auxiliary weld information is as follows: Step 1: Traverse the list of reference welds (containing all reference welds), i = 1, the i-th reference weld, j = 1, the j-th reference weld.

[0033] Step 2: Determine if the reference weld list has been traversed completely, i <= number of reference welds. If yes, proceed to step 3; otherwise, proceed to step 10.

[0034] Step 3: Determine if the reference weld list has been completely traversed, where j <= the number of reference welds. If yes, proceed to step 4; otherwise, proceed to step 9.

[0035] Step 4: Determine if the distance between the starting points of the i-th and j-th reference welds is less than a threshold (this threshold depends on the workpiece; it requires that the distance between the endpoints be less than this threshold in actual workpieces of different sizes). If yes, add the starting point of the j-th weld to the auxiliary weld list of the starting point of the i-th reference weld; otherwise, proceed to step 5.

[0036] Step 5: Determine if the distance between the start point of the i-th reference weld and the end point of the j-th reference weld is less than a threshold. If yes, add the start point of the i-th reference weld to the end point of the j-th weld in the auxiliary weld list; otherwise, proceed to step 6.

[0037] Step 6: Determine if the distance between the end point of the i-th reference weld and the start point of the j-th reference weld is less than a threshold. If yes, add the start point of the j-th weld to the auxiliary weld list at the end point of the i-th reference weld; otherwise, proceed to step 7.

[0038] Step 7: Determine whether the distance between the endpoint of the i-th reference weld and the endpoint of the j-th reference weld is less than a threshold. If yes, add the endpoint of the j-th reference weld to the auxiliary weld list; otherwise, proceed to step 8.

[0039] Step 8, j++, execute step 3.

[0040] Step 9, i++, execute step 2.

[0041] Step 10: Complete the acquisition of auxiliary weld information for all reference welds.

[0042] After the above initialization process, reference weld information, reference surface structure information, and auxiliary weld information of the reference weld can be obtained.

[0043] For the target workpiece to be inspected, an image of the workpiece is captured, and point cloud extraction is performed based on the captured image to obtain the target workpiece point cloud. Then, surface detection, including planar detection and cylindrical surface detection, is performed on the target workpiece point cloud. Based on the detected surface combinations, the actual surface structure, including planar structure and cylindrical structure, is obtained. Then, the actual surface structure is filtered using reference surface structure information to obtain a list of actual surface structures. Surface detection, surface structure search, and surface structure filtering can be implemented using existing traditional methods, which will not be elaborated on in this embodiment.

[0044] After performing surface structure filtering, each reference surface structure corresponds to a list of actual surface structures. Based on this, the lists of actual surface structures corresponding to the endpoints of the reference weld are arranged and combined to obtain the list of actual welds corresponding to the welds.

[0045] Then, the actual weld list is filtered using the reference weld information. Since the filtering method differs for different weld types, please refer to [link / reference needed]. Figure 5 This step can be achieved in the following way: S151, Obtain the weld type of the reference weld; S152, filter the actual weld list once based on weld type and reference weld information.

[0046] Please refer to the following: Figure 6 The main purpose of weld filtering is to obtain the list of actual welds corresponding to each reference weld from the list of actual surface structures (obtained by arranging and combining the lists of actual surface structures corresponding to the two endpoints of the reference weld), and to filter out actual welds that do not match the reference welds using the reference weld information, such as... Figure 6 As shown. Weld filtering can be roughly divided into two steps: ① Obtain the actual weld list from the actual surface structure list; ② Filter the actual weld list according to different weld types (straight weld type, full circle weld type, notched circle weld type).

[0047] The process related to weld length and weld endpoint position mainly involves filtering for straight welds, including repeated filtering of straight welds. Therefore, this embodiment mainly describes the weld processing for straight weld types.

[0048] Specifically, please refer to Figure 7 The step of filtering the actual weld list based on weld type and reference weld information can be achieved in the following way: S1521, when the weld type is a straight weld type, the actual weld is filtered by the projection distance filtering method, the included angle filtering method, and the three-sided structure cutoff filtering method in sequence. S1522, when there is a duplicate reference weld in the reference weld, obtain the reference relative position relationship between the reference weld and the duplicate reference weld, and obtain the actual relative position relationship between different actual welds after filtering, and filter the actual welds based on the reference relative position relationship and the actual relative position relationship.

[0049] Please refer to the following: Figure 8 This is a logical diagram of a straight weld seam filtering algorithm. The surface structures at the weld seam endpoints may have completely identical features in the workpiece, causing the algorithm to be unable to distinguish the corresponding relationships. Therefore, it is necessary to combine the surface structures corresponding to the two endpoints into the actual weld seam, and then filter it using the weld seam information to obtain the actual weld seam.

[0050] like Figure 8 As shown, in the straight weld filtering process, the input is a reference straight weld and its corresponding list of actual welds, and the output is a list of actual welds that match the reference weld (which may not be unique).

[0051] The above steps for filtering actual weld seams using projection distance filtering, included angle filtering, and three-sided structural cutoff filtering can be implemented in the following ways: Traverse the list of actual welds, project the endpoint of each actual weld onto its extension line, and calculate the projection distance. Retain actual welds whose projection distance is less than a preset distance. Cluster all endpoints of actual welds, merging surface structure points belonging to the same category into a single point. The surface structure point is the endpoint of the intersection line of the actual surface structure corresponding to the endpoint of the reference weld in the actual surface structure list. Calculate the angle between the reference weld and each merged actual weld, and filter actual welds with angles greater than a preset angle. Traverse each actual weld, and determine whether there are three-plane structures in the target workpiece point cloud that overlap with each actual weld. If so, filter out the overlapping actual welds.

[0052] Combination Figure 8 As shown, the main process for filtering straight weld seams is as follows: ① Input the list of actual surface structures corresponding to the two endpoints of the reference straight weld. Use the weld direction to identify the endpoints of the intersection lines of the actual surface structures corresponding to the weld endpoints (hereinafter referred to as surface structure points). Arrange and combine the list of actual surface structures corresponding to the start and end points of the reference weld. Each pair of start and end surface structures constitutes an actual weld. The surface structure point of the start surface structure is the start point of the actual weld, and the surface structure point of the end surface structure is the end point of the actual weld.

[0053] ② Weld projection filtering (projection filtering method): Traverse the list of actual welds, project the endpoint of the actual weld onto the extension line of the actual weld, calculate the projection distance, and retain all actual welds whose projection distance is less than the threshold.

[0054] ③ Merging of Near Endpoints: Due to slight errors when the welding system photographs the same weld endpoint from different angles, clustering is needed to eliminate interfering detection points and improve detection accuracy. All actual weld endpoints are clustered according to detection accuracy, and surface structure points belonging to the same cluster are merged into a single point (two methods exist: averaging the coordinates of all points (suitable for high-precision applications); finding the point located in the middle of all points (suitable for applications with accuracy errors)).

[0055] ④ Weld angle filtering (angle filtering method): Traverse all actual welds, calculate the angle between the reference weld direction and the actual weld direction, and filter out actual welds with an angle greater than a threshold (this threshold depends on the registration angle error).

[0056] ⑤ Weld three-sided structure cutoff (three-sided structure cutoff filtering method): Traverse all actual welds and determine whether there is a three-sided planar structure in the current workpiece that overlaps with the actual weld. If there is a three-sided structure in the middle of the actual weld, the current weld is cut off by the three-sided structure, and the corresponding actual weld is filtered out.

[0057] ⑥ Repeated Straight Weld Filtering: When a reference weld has repeated straight welds, and the number of welds in the actual weld list is greater than 1, the relative positional relationship between the actual welds is determined. The matching relationship between the actual welds and the reference welds is determined by using the relative positional relationship between the reference weld and its repeated welds. The specific process will be explained in detail later.

[0058] ⑦ Save a list of actual welds that match the reference weld.

[0059] The aforementioned step of filtering repetitive straight welds involves obtaining the reference relative positional relationship between the reference weld and the repetitive reference weld, and obtaining the actual relative positional relationship between different actual welds after filtering. The step of filtering actual welds based on the reference relative positional relationship and the actual relative positional relationship can be achieved in the following way: A reference weld group is constructed based on the reference weld and the repeated reference weld. An actual weld group is constructed based on the filtered actual weld. The corresponding reference weld group and actual weld group are determined by the consistency detection of relative position relationship. The reference weld group to which the reference weld belongs is determined, and the actual weld group corresponding to the reference weld group is determined. Based on the determined reference weld group, the actual welds in the corresponding actual weld group are searched to locate the actual welds that match the reference welds.

[0060] The steps of constructing a reference weld group based on reference welds and repeated reference welds, constructing an actual weld group based on filtered actual welds, and determining the corresponding reference weld group and actual weld group through relative positional relationship consistency detection can be implemented in the following way: The system checks whether the reference welds and all repeated reference welds are collinear. If so, the collinear welds are included in the same reference weld group, and the relative positional relationship between all reference weld groups is calculated. It also checks whether all filtered actual welds are collinear. If so, the collinear actual welds are included in the same actual weld group, and the actual relative positional relationship between all actual weld groups is calculated. Through consistency checks between the reference relative positional relationship group and the actual positional relationship group, the corresponding reference weld group and actual weld group are determined.

[0061] The step of locating the actual weld that matches the reference weld by searching for the actual weld in the corresponding actual weld group based on the identified reference weld group can be achieved in the following way: If collinearity exists in the determined reference weld group, arrange and combine all actual welds in the corresponding actual weld group to obtain the actual weld combination. The number of actual welds in the actual weld combination is consistent with the number of welds in the reference weld group. Obtain the intra-group relative positional relationship of each actual weld combination and the intra-group relative positional relationship of the reference weld group, and filter out the actual weld combinations with the intra-group relative positional relationship consistent with the reference weld group. Extract the actual weld combination with the longest total length from the filtered actual weld combinations, and determine the actual welds in the extracted actual weld combinations that match the reference welds based on the intra-group relative positional relationship. If no collinearity exists in the determined reference weld group, traverse all actual welds in the corresponding actual weld group and select the actual weld with the longest length as the actual weld that matches the reference weld.

[0062] Combination Figure 9 As shown, in the filtering of duplicate straight weld seams, when multiple duplicate reference straight weld seams exist in the database, the surface structure filtering and other filtering modules for straight weld seams cannot distinguish between them. The algorithm needs to use the relative positional relationship of the current reference straight lines to find actual weld seams with the same relative positional relationship from the list of actual weld seams. The specific process is as follows: Figure 9 As shown.

[0063] Input: A reference weld (target line), other reference welds that overlap with the target line (other overlapping reference lines), the relative positional relationship of all actual welds (input straight welds), and a list of actual welds corresponding to the target line.

[0064] Output: The actual welds that match the target line (if filtering is not possible, output a list of actual welds).

[0065] The main process for filtering repeated straight weld seams is as follows: Step 1: Determine whether any of the repeated reference lines of the reference straight weld are collinear. Group the repeated reference straight welds that are collinear into a reference straight line group. Calculate the relative positional relationships between all reference straight line groups (there are only parallel relative positional relationships between straight line groups).

[0066] Step 2: Process the input actual lines. Calculate the relative positional relationships between the actual lines. Group collinear actual lines into a single actual line group, and calculate the relative positional relationships between the actual lines within that group (only parallel lines are considered relative to each other within a line group).

[0067] Step 3: Determine if the number of actual straight line groups and reference straight line groups are consistent. If they are inconsistent, filtering for repeated straight line welds cannot be performed using the relative positions of the target straight lines, so no filtering is performed, and proceed to Step 8. If they are consistent, since the straight line groups only have a parallel relationship, when the number of straight lines is consistent, the relative position relationship between the two straight line groups must be consistent. That is, each reference straight line group can find an actual straight line group, and the relative position relationship between the two straight line groups is consistent. Based on the relative position relationship between the groups, achieve a one-to-one correspondence between the reference straight line group and the actual straight line group, and proceed to Step 4.

[0068] Step 4: Traverse all actual line groups, select the reference line group containing the target line and the corresponding actual line group.

[0069] Step 5: Determine whether there are collinear reference lines in the reference line group. If there are collinear reference lines, proceed to step 6; otherwise, proceed to step 7.

[0070] Step 6: Arrange and combine all actual lines in the actual line group to obtain all possible combinations of actual lines whose number matches the number of lines in the reference line group. Obtain the relative positional relationship groups within the reference line group and all actual line combinations, and filter out possible actual line combinations whose relative positional relationship groups match the reference line group. If the number of filtered combinations is greater than or equal to 1, select the actual line combination with the longest total length, and use the relative positional relationship to match the actual line with the target line, then proceed to Step 8. Otherwise, if there is no actual line matching the target line, no duplicate line filtering is performed, and Step 8 is executed.

[0071] Step 7: In the reference line group where there are no collinear reference lines, there is only one reference line. Traverse all the actual lines in the corresponding actual line group, select the longest actual line as the matching object of the reference line, and proceed to step 8.

[0072] Step 8: Filter out all actual lines that do not meet the conditions, and output the actual lines or a list of actual lines.

[0073] When the actual workpiece contains a weld seam not found in the database (hereinafter referred to as an unknown weld seam), and the unknown weld seam is parallel to a reference weld seam in the database (hereinafter referred to as a target weld seam) (the endpoint surfaces have the same structure, and the included angle is less than the parallel angle threshold), the algorithm can use the auxiliary weld seam to match the actual weld seam with the target weld seam, provided the target weld seam has an auxiliary weld seam. Thus, by utilizing the shared endpoint relationship between weld seams, secondary weld seam filtering is achieved, filling in any gaps in the weld seam filtering and enhancing the algorithm's detection stability.

[0074] Specifically, please refer to Figure 10 In this embodiment, the actual weld list is filtered a second time based on the auxiliary welds of the reference weld. This step can be achieved in the following way: S161, If ​​there is more than one actual weld in the actual weld list that corresponds to the reference weld, traverse all auxiliary welds of the reference weld and obtain the endpoints corresponding to the endpoints of the reference weld in the traversed auxiliary welds. Among them, the endpoints corresponding to the endpoints of the reference weld in the auxiliary weld include the endpoints corresponding to the start point of the reference weld and the endpoints corresponding to the end point of the reference weld.

[0075] S162, if the distance between the acquired endpoints is within a preset distance range, calculate the average value of the acquired endpoints to obtain the auxiliary endpoint; The auxiliary endpoints include the auxiliary start point (the average coordinate of the endpoints corresponding to the start point of the reference weld) and the auxiliary end point (the average coordinate of the endpoints corresponding to the end point of the reference weld).

[0076] S163, traverse the actual welds corresponding to the reference welds, calculate the distance between the endpoints of the actual welds and the auxiliary endpoints, and filter out the actual welds with the shortest distance.

[0077] Please refer to the following: Figure 11 When performing secondary filtering of weld seams, the inputs are: the endpoint coordinates of all reference weld seams, auxiliary weld seam information, and the corresponding list of actual weld seams. The output is: the filtered list of actual weld seams (corresponding one-to-one with the reference weld seams).

[0078] The main process is as follows: Step 1: Traverse all reference welds, i=1, the i-th reference weld.

[0079] Step 2: Determine if the traversal is complete, i <= the reference number of welds. If the traversal is complete, proceed to step 13. Otherwise, proceed to step 3.

[0080] Step 3: Determine whether the i-th reference weld corresponds to more than one actual weld. If yes, proceed to step 4. Otherwise, proceed to step 12.

[0081] Step 4: Determine if there is an auxiliary weld with a shared endpoint at the starting point of the i-th reference weld. If yes, proceed to step 5. Otherwise, proceed to step 9.

[0082] Step 5: Traverse all auxiliary welds corresponding to the reference weld start point and filter out the completed auxiliary welds (corresponding to only one actual weld). Obtain the endpoints of the filtered auxiliary welds that correspond to the reference weld start point. These endpoints are theoretically the same point, but there may be slight differences due to factors such as detection accuracy and workpiece passing through weld holes.

[0083] Step 6: Determine if the distance difference between the endpoints is within the distance threshold range. If so, these endpoints can be used for auxiliary weld filtering; proceed to Step 7. Otherwise, the distance between the endpoints is too large and inconsistent with the weld database; proceed to Step 8.

[0084] Step 7: Calculate the average of all endpoint coordinates to obtain the auxiliary starting point. Iterate through the actual welds corresponding to the i-th reference weld, calculate the distance from the starting point of the actual weld to the auxiliary starting point, and select the unique actual weld with the closest distance. Repeat the above steps for all reference welds.

[0085] Step 8: Determine if there is an auxiliary weld with a shared endpoint at the end point of the i-th reference weld. If yes, proceed to step 9. Otherwise, proceed to step 12.

[0086] Step 9: Iterate through all auxiliary welds corresponding to the endpoint of the reference weld and filter out the auxiliary welds that have been inspected (each corresponding to only one actual weld). Obtain the endpoints of the filtered auxiliary welds that correspond to the endpoint of the reference weld. These endpoints are theoretically the same point, but there may be slight differences due to factors such as inspection accuracy and the workpiece passing through weld holes.

[0087] Step 10: Determine if the distance difference between the endpoints is within the distance threshold range. If so, these endpoints can be used for auxiliary weld filtering; proceed to Step 11. Otherwise, if the distance between the endpoints is too large and inconsistent with the weld database, proceed to Step 12.

[0088] Step 11: Calculate the average of all endpoint coordinates to obtain the auxiliary endpoint. Iterate through the actual welds corresponding to the i-th reference weld, calculate the distance from the actual weld endpoint to the auxiliary endpoint, and select the unique actual weld with the closest distance. Repeat the above steps for all reference welds.

[0089] Step 12, i++, execute step 2.

[0090] Step 13: Determine whether all reference welds correspond one-to-one with the actual welds, and whether the relationship of the common endpoints of all actual welds is consistent with that of the reference welds. If not, proceed to step 14; otherwise, proceed to step 15.

[0091] Step 14, Error message: There may be incorrect detection results; the endpoint sharing relationship is inconsistent with the database.

[0092] Step 15: Output the actual weld after auxiliary weld filtering, which corresponds one-to-one with the reference weld.

[0093] Based on the weld inspection method provided in this embodiment, accurate inspection results can be output smoothly when faced with collinear repeating straight welds or parallel repeating straight welds in the actual workpiece that do not appear in the database.

[0094] For example, there exists such as Figure 12 In the example of collinear repeating straight welds, weld one, weld two, and weld three are collinear repeating straight welds. The reference surface structures corresponding to the starting points are all repeating three-plane structures, and the reference surface structures corresponding to the ending points are all repeating two-plane structures. Based on the weld detection method provided in this embodiment, the unique actual straight weld can be screened by relying on the three-plane structure cutoff filtering method and the repeating weld filtering method in weld filtering.

[0095] The processing flow is as follows: ① The algorithm detects three point clouds and obtains four repeated three-sided structures and five repeated two-sided structures. These repeated structures cannot be filtered using the information from the reference surface structure.

[0096] ② When performing weld seam filtering, taking weld seam one as an example, these repeating structures can be arranged and combined to produce 20 possible actual straight weld seams. When performing three-sided structure cutoff filtering, actual straight weld seams with three-sided structures in the middle can be cut off, leaving 5 actual straight weld seams. When performing repeating straight weld seam filtering, the 5 actual straight weld seams can be arranged and combined, resulting in 4 combinations of straight weld seams that satisfy the relative positional relationship. After selecting the combination with the longest total length, the unique actual straight weld seam that satisfies the condition is obtained based on the relative positional relationship.

[0097] Furthermore, when parallel, repeating straight welds that do not appear in the database exist in the actual workpiece, Figure 13 In this case, weld one is the target weld, and welds two and four are auxiliary welds to weld one. The endpoint of weld two shares an endpoint with the starting point of weld one, and the starting point of weld four also shares an endpoint with the starting point of weld one. In this situation, due to the lack of relative position information between the target weld and the unknown weld in the weld database, and the detection of multiple repeating surface structures consistent with the endpoint surface structure of the target weld, (…). Figure 13Since surface structure one and surface structure two are identical, and surface structure three and surface structure four are identical, weld one still corresponds to two actual straight welds after weld filtering. The algorithm uses secondary filtering to select a unique actual straight weld.

[0098] Based on the weld inspection method provided in this embodiment, the processing flow is as follows: ① After weld seam filtering, the algorithm detects the two actual straight weld seams corresponding to weld seam one. Figure 13 Weld 1 and unknown welds are present, while welds 2 and 4 have only one actual straight weld.

[0099] ② In the secondary filtering process, the starting point of weld seam 1 corresponds to two auxiliary straight weld seams (weld seam 2 and weld seam 4). Using the detected actual straight weld seam endpoint of weld seam 2 and actual straight weld seam starting point of weld seam 4, the algorithm filters out unknown weld seams from the two actual straight weld seams corresponding to weld seam 1.

[0100] The weld detection method supporting weld database reuse provided in this embodiment combines primary weld filtering based on reference weld information and secondary weld filtering based on auxiliary welds. This eliminates the limitations imposed by weld length and endpoint positions in the database, enabling a single modeling process to detect welds on multiple identical workpieces of different sizes. This significantly reduces the modeling cost in application scenarios and improves work efficiency. The method utilizes shared relationships between weld endpoints in the database to achieve secondary verification of the detection results. When processing workpieces that differ from the model, the algorithm provides more reliable detection results, broadening its application scenarios.

[0101] This scheme is applicable to weld inspection of workpieces of different sizes and shapes. It eliminates the cost of repetitive modeling of similar workpieces, significantly improving the efficiency of the entire vision inspection system. By employing a straight weld identification method independent of length and endpoint position, it fully utilizes prior knowledge of straight welds and achieves identification of straight welds even when the weld length and position are unknown, through different filtering conditions. Furthermore, this method leverages the shared endpoint relationships between straight welds in the database to further filter and confirm the detection results. Even when similar structures not present in the workpiece during modeling appear, the algorithm still provides stable detection results. This broadens the application range of the model and further improves the stability of the inspection.

[0102] Based on the same inventive concept, please refer to Figure 14This invention also provides a weld detection device that supports weld database reuse. The weld detection device that supports weld database reuse may include an extraction module, a detection module, a surface structure filtering module, a combination module, a primary weld filtering module, and a secondary weld filtering module. The functions of each functional module of the weld detection device that supports weld database reuse will be described in detail below.

[0103] The extraction module is used to extract reference weld information and reference surface structure information of reference welds from the weld database. The detection module is used to acquire the point cloud of the target workpiece, perform surface detection on the point cloud of the target workpiece, and obtain the actual surface structure based on the detected surface combination; The surface structure filtering module is used to filter the actual surface structure using reference surface structure information to obtain a list of actual surface structures, where each reference surface structure corresponds to one list of actual surface structures. The combination module is used to arrange and combine the list of actual surface structures corresponding to the endpoints of the reference weld to obtain the list of actual welds corresponding to the reference weld. The weld seam primary filtering module is used to filter the actual weld seam list using reference weld seam information to obtain the actual weld seam list corresponding to the filtered reference weld seam. The secondary weld filtering module is used to perform secondary filtering on the actual weld list based on the auxiliary welds of the reference weld. The longest weld in the filtered actual weld list is selected as the weld corresponding to the reference weld. The auxiliary weld is the weld that shares the same endpoint as the reference weld.

[0104] The weld detection device supporting weld database reuse provided in this embodiment can be used to execute the weld detection method supporting weld database reuse under any of the above embodiments. For details not covered in this embodiment, please refer to the corresponding descriptions in the above embodiments. This embodiment will not elaborate further here.

[0105] Please see Figure 15 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. The electronic device can be, for example, a computer device or a server. The electronic device includes a memory, a processor, and a communication module. The memory, processor, and communication module are electrically connected directly or indirectly to each other to achieve data transmission or interaction.

[0106] The memory is used to store computer programs or data. The processor is used to read / write the data or programs stored in the memory and execute the weld inspection method supporting weld database reuse provided in any embodiment of the present invention.

[0107] The communication module is used to establish communication connections between electronic devices and other communication terminals via a network, and to send and receive data via the network.

[0108] It should be understood that, Figure 15 The structure shown is only a schematic diagram of an electronic device; the electronic device may also include components that are larger than those shown. Figure 15 The more or fewer components shown, or having the same Figure 15 The different configurations shown.

[0109] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A weld inspection method supporting weld database reuse, characterized in that, The method includes: Extract reference weld information and reference surface structure information of reference welds from the weld database; Obtain the point cloud of the target workpiece, perform surface detection on the point cloud of the target workpiece, and obtain the actual surface structure based on the detected surface combination; The actual surface structure is filtered using the reference surface structure information to obtain a list of actual surface structures, wherein each reference surface structure corresponds to one list of actual surface structures. Arrange and combine the list of actual surface structures corresponding to the endpoints of the reference weld to obtain the list of actual welds corresponding to the reference weld; The reference weld information is used to filter the actual weld list once to obtain the filtered actual weld list corresponding to the reference weld. The list of actual welds is filtered a second time based on the auxiliary welds of the reference weld. The weld with the longest length in the filtered list of actual welds is selected as the weld corresponding to the reference weld. The auxiliary weld is a weld that shares the same endpoint as the reference weld.

2. The weld inspection method supporting weld database reuse according to claim 1, characterized in that, The step of filtering the actual weld list using the reference weld information includes: Obtain the weld type of the reference weld; The actual weld list is filtered once based on the weld type and the reference weld information.

3. The weld inspection method supporting weld database reuse according to claim 2, characterized in that, The weld type includes straight weld type; The step of filtering the actual weld list based on the weld type and the reference weld information includes: When the weld type is a straight weld type, the actual weld is filtered by the projection distance filtering method, the included angle filtering method, and the three-sided structure cutoff filtering method in sequence. In the case where there are duplicate reference welds, the reference relative position relationship between the reference weld and the duplicate reference weld is obtained, and the actual relative position relationship between different actual welds after filtering is obtained. The actual welds are filtered based on the reference relative position relationship and the actual relative position relationship.

4. The weld inspection method supporting weld database reuse according to claim 3, characterized in that, The steps of filtering the actual weld seam by sequentially employing projection distance filtering, included angle filtering, and three-sided structural cutoff filtering include: Traverse the list of actual welds, project the endpoint of the traversed actual weld onto the extension line of the actual weld, calculate the projection distance, and retain the actual welds whose projection distance is less than a preset distance. Cluster all actual weld endpoints and merge surface structure points belonging to the same category into a single point. The surface structure point is the intersection point of the actual surface structure in the actual surface structure list that corresponds to the endpoint of the reference weld. Calculate the angle between the reference weld and each of the merged actual welds, and filter out the actual welds whose angle is greater than a preset angle; Traverse each actual weld seam and determine whether there is a three-plane structure in the target workpiece point cloud that overlaps with each actual weld seam. If so, filter out the overlapping actual weld seams.

5. The weld inspection method supporting weld database reuse according to claim 3, characterized in that, The step of obtaining the reference relative position relationship between the reference weld and the repeated reference weld, and obtaining the actual relative position relationship between different actual welds after filtering, and filtering the actual welds based on the reference relative position relationship and the actual relative position relationship, includes: A reference weld group is constructed based on the reference weld and the repeated reference weld, and an actual weld group is constructed based on the filtered actual weld. The corresponding reference weld group and actual weld group are determined by the consistency detection of relative position relationship. Determine the reference weld group to which the reference weld belongs, and determine the actual weld group corresponding to the reference weld group; Based on the identified reference weld group, the actual welds in the corresponding actual weld group are searched to locate the actual welds that match the reference welds.

6. The weld inspection method supporting weld database reuse according to claim 5, characterized in that, The steps of constructing a reference weld group based on the reference weld and the repeated reference weld, constructing an actual weld group based on the filtered actual weld, and determining the corresponding reference weld group and actual weld group through relative positional relationship consistency detection include: Detect whether the reference weld and all repeated reference welds are collinear. If so, include the collinear welds in the same reference weld group and calculate the reference relative position relationship group between all reference weld groups. After filtering, check whether there are collinearities among all actual welds. If so, include the collinear actual welds in the same actual weld group and calculate the actual relative positional relationship group among all actual weld groups. By checking the consistency between the reference relative position relationship group and the actual position relationship group, the corresponding reference weld group and actual weld group are determined.

7. The weld inspection method supporting weld database reuse according to claim 5, characterized in that, The step of searching for actual welds in the corresponding actual weld groups based on the determined reference weld groups to locate the actual welds that match the reference welds includes: If collinearity exists in the determined reference weld group, the actual welds in the corresponding actual weld group are arranged and combined to obtain the actual weld combination. The number of actual welds in the actual weld combination is the same as the number of welds in the reference weld group. Obtain the intra-group relative positional relationship of each actual weld combination and the intra-group relative positional relationship of the reference weld group, and filter out the actual weld combinations that are consistent with the intra-group relative positional relationship of the reference weld group. Extract the actual weld combination with the longest total length from the selected actual weld combinations, and determine the actual weld that matches the reference weld from the extracted actual weld combinations based on the relative positional relationship within the group; If there are no collinearities in the determined reference weld group, traverse all actual welds in the corresponding actual weld group and select the actual weld with the longest length as the actual weld that matches the reference weld.

8. The weld inspection method supporting weld database reuse according to claim 1, characterized in that, The step of performing secondary filtering of the actual weld list based on the auxiliary welds of the reference weld includes: If there is more than one actual weld in the actual weld list that corresponds to the reference weld, traverse all auxiliary welds of the reference weld and obtain the endpoints corresponding to the endpoints of the reference weld in the traversed auxiliary welds; If the distance between the acquired endpoints is within a preset distance range, the average value of the acquired endpoints is calculated to obtain the auxiliary endpoint; Traverse the actual welds corresponding to the reference welds, calculate the distance between the endpoints of the actual welds and the auxiliary endpoints, and select the actual welds with the shortest distance.

9. A weld inspection device that supports the reuse of weld databases, characterized in that, The device includes: The extraction module is used to extract reference weld information and reference surface structure information of reference welds from the weld database. The detection module is used to acquire the point cloud of the target workpiece, perform surface detection on the point cloud of the target workpiece, and obtain the actual surface structure based on the detected surface combination; The surface structure filtering module is used to filter the actual surface structure using the reference surface structure information to obtain a list of actual surface structures, wherein each reference surface structure corresponds to one list of actual surface structures. The combination module is used to arrange and combine the list of actual surface structures corresponding to the endpoints of the reference weld to obtain the list of actual welds corresponding to the reference weld. A weld seam primary filtering module is used to filter the actual weld seam list using the reference weld seam information to obtain a filtered list of actual weld seams corresponding to the reference weld seam. The weld secondary filtering module is used to perform secondary filtering on the actual weld list based on the auxiliary weld of the reference weld, and select the weld with the longest length in the actual weld list after filtering as the weld corresponding to the reference weld. The auxiliary weld is a weld that shares the same endpoint as the reference weld.

10. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the method of any one of claims 1 to 8.