A method and apparatus for point ordering in weld detection
By sorting the topological relationships of the two-sided structures in weld inspection, a sequence of feature points conforming to the natural extension direction of the weld is generated, which solves the problem of disordered sorting of weld feature points and realizes precise movement of the welding torch and smooth continuity of the welding trajectory.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FAIR INNOVATION (SUZHOU) ROBOTIC SYSTEM CO LTD
- Filing Date
- 2026-04-29
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, the sorting of weld feature points is prone to confusion and insufficient closing accuracy, which leads to disordered welding torch movement and the inability to generate a smooth and continuous welding trajectory, especially in welds with complex geometric topology.
By performing two-sided structure detection on the workpiece point cloud, and utilizing the intersection direction of the two-sided structure and the spatial extension characteristics of the weld curve, a spatial topological relationship is established to achieve the ordered sorting of the two-sided structure and generate a feature point sequence that conforms to the natural extension direction of the weld.
It significantly improves the accuracy and reliability of feature point sorting, ensuring that the welding torch moves precisely along the weld seam, generating a smooth and continuous welding trajectory, adapting to complex geometric weld seams, and improving welding quality and efficiency.
Smart Images

Figure CN122312604A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of point cloud processing technology, and more specifically, to a method and apparatus for sorting points in weld inspection. Background Technology
[0002] In the field of automated welding technology, the accurate generation of weld seam trajectories is a core prerequisite for ensuring welding quality and efficiency. Due to the complex shape of weld seams on welded workpieces (such as straight lines, curves, broken lines, etc.), and the fact that the collected weld seam feature points are often presented in a discrete and disordered state, these point cloud data only contain the spatial coordinate information of the weld seam and do not carry any positional sequence association, so they cannot be directly used for path execution of welding robots.
[0003] In welding, it is often necessary to arrange disordered weld feature points into one or more ordered paths to provide a basis for subsequent welding path planning and interpolation, generating a smooth and continuous welding trajectory that can be executed. If such disordered feature points are directly used for welding path planning and execution, it will cause serious disorder in the movement of the welding torch: the welding torch cannot recognize the natural extension direction, start and end points of the weld, and can only make irregular random jumps between various feature points instead of moving smoothly along the contour of the weld, resulting in a large number of meaningless back-and-forth swings, cross-shuttles and other invalid movements; for weld trajectories with complex geometric topology, such as circumferential welds and curved welds, disordered feature points will cause the welding torch to completely lose its ability to perceive the weld contour, not only failing to conform to the arc or curve of the weld to form a continuous welding trajectory, but also causing the welding torch to deviate from the weld area, directly leading to the failure of the welding operation.
[0004] Therefore, the technical process must include the crucial step of "weld feature point sorting" to provide a structured data foundation for subsequent welding path planning and motion interpolation calculations, ultimately generating an executable smooth trajectory that meets welding process requirements and ensuring that the welding torch can move precisely along the weld. However, existing sorting methods typically sort the extracted weld feature points directly. Due to limitations such as the discreteness of feature point distribution and weak spatial correlation, this can easily lead to technical problems such as sorting disorder and insufficient accuracy in the connection of the beginning and end of closed welds. Summary of the Invention
[0005] The purpose of this invention is to provide a method and apparatus for sorting feature points in weld inspection, so as to improve the accuracy and reliability of feature point sorting.
[0006] In a first aspect, the present invention provides a method for sorting points in weld inspection, the method comprising: Perform biplane structure detection on the point cloud of the workpiece to be processed to obtain an original set containing multiple biplane structures; In the initial sorting operation, any two-sided structure is selected from the original set, the selected two-sided structure is stored in the constructed empty sorting set, and the growth direction is determined based on the intersection direction of the two-sided structure and the spatial extension characteristics of the weld curve. In non-first sorting operations, other two-sided structures in the original set are traversed, and the traversed two-sided structures are checked based on the growth direction to see if they satisfy the spatial topological relationship that conforms to the spatial extension characteristics of the weld curve. If the conditions are met, the bifacial structures are stored in the sorted set in order, and the growth direction is updated based on the intersection direction of the bifacial structures. The process continues until all bifacial structures in the original set are stored in the sorted set. Based on the endpoints of the sorted bifacial structures in the sorted set, key feature points characterizing the core contour of the weld are obtained.
[0007] In an optional implementation, the step of detecting whether the traversed two-sided structures based on the growth direction satisfy the spatial topological relationship that conforms to the spatial extension characteristics of the weld curve includes: The system detects whether the traversed two-sided structures meet the set conditions. The set conditions are that the two-sided structure is located within the spatial coverage of the growth direction, and the distance between it and the first or last two-sided structure in the current sorted set meets the set distance requirements. If the two-sided structure meets the set conditions, then the two-sided structure is determined to satisfy the spatial topological relationship that conforms to the spatial extension characteristics of the weld curve.
[0008] In an optional embodiment, the growth direction includes a first growth direction and a second growth direction that are respectively directed toward both ends along the spatial extension characteristics of the weld curve, with the intersection direction of the two-sided structure as a reference. The step of detecting whether the traversed two-sided structure meets the set conditions includes: Detect whether the traversed two-sided structure is within the spatial coverage of the first growth direction; If it is within the spatial coverage of the first growth direction, then check whether the first distance between the two-sided structure and the first two-sided structure in the current sorted set is the closest distance among all candidate two-sided structures in the first growth direction. If the first distance is the closest distance, then the two-sided structure is determined to meet the set conditions.
[0009] In an optional embodiment, the growth direction includes a first growth direction and a second growth direction that are respectively directed toward both ends along the spatial extension characteristics of the weld curve, with the intersection direction of the two-sided structure as a reference. The step of detecting whether the traversed two-sided structure meets the set conditions includes: Detect whether the traversed two-sided structure is within the spatial coverage of the second growth direction; If it is within the spatial coverage of the second growth direction, then check whether the second distance between the two-sided structure and the tail two-sided structure in the current sorting set is the closest distance among all candidate two-sided structures in the second growth direction; If the second distance is the closest distance, then the two-sided structure is determined to meet the set conditions.
[0010] In an optional implementation, the step of obtaining key feature points characterizing the core contour of the weld seam based on the endpoints of the sorted two-sided structures in the sorted set includes: Detect whether the two-sided structure in the sorted set needs to be segmented. If it needs to be segmented, then the sorted set is segmented, and overlap and closure checks are performed on the segmented sorted set. The key feature points characterizing the core contour of the weld are obtained from the endpoints of the two-sided structure in the sorted set after verification.
[0011] In an optional implementation, the step of detecting whether the two-sided structures in the sorted set need to be segmented, and if so, segmenting the sorted set, includes: Detect whether there is an angle abrupt change between any two dihedral structures in the sorted set; If there is an angle mutation, the sorted set is split between the two dihedral structures with the angle mutation.
[0012] In an optional implementation, the step of performing overlap verification on the sorted set after segmentation includes: Detect whether there is a spatial overlap between any two sorted sets after segmentation; If there are overlapping spatial regions, the sorted sets with overlapping spatial regions are merged, and a sorting operation is performed on the merged sorted sets.
[0013] In an optional implementation, the step of performing a closure check on the sorted set after segmentation includes: Check whether the first two-sided structure and the last two-sided structure in each sorted set after the sorting operation have a spatial intersection relationship and form a closed loop; If there is a spatial intersection relationship and a closed loop is formed, the tail two-sided structure in the sorted set is optimized and adjusted so that the spatial overlap rate between the tail two-sided structure and the head two-sided structure is lower than the preset overlap rate.
[0014] In an optional implementation, the step of obtaining key feature points characterizing the core contour of the weld seam based on the endpoints of the bifacial structures in the sorted set after verification processing includes: A list of feature points is obtained based on the endpoints of the two-sided structure in the sorted set after verification. Traverse the list of feature points, calculate the spatial distance between adjacent feature points, and if the spatial distance is less than a set distance, perform deduplication processing on the adjacent feature points; An adaptive interpolation strategy is applied to the feature point list to perform interpolation between adjacent feature points; The key feature points characterizing the core contour of the weld are obtained from the feature point list based on interpolation processing.
[0015] Secondly, the present invention provides a point sorting device for weld inspection, the device comprising: The detection module is used to perform two-sided structure detection on the point cloud of the workpiece to be processed, and obtain the original set containing multiple two-sided structures. The sorting operation module is used to select any two-sided structure from the original set in the first sorting operation, store the selected two-sided structure into the constructed empty sorting set, and determine the growth direction based on the intersection direction of the two-sided structure and the spatial extension characteristics of the weld curve. The sorting operation module is also used to traverse other two-sided structures in the original set during non-first sorting operations, and detect whether the traversed two-sided structures satisfy the spatial topological relationship that conforms to the spatial extension characteristics of the weld curve based on the growth direction. The storage module is used to store the two-sided structures in the sorted set in sequence when the two-sided structures satisfy the spatial topological relationship that conforms to the spatial extension characteristics of the weld curve, and update the growth direction based on the intersection direction of the two-sided structures. The module is used to obtain key feature points characterizing the core contour of the weld seam based on the endpoints of the sorted two-sided structures in the original set until all the two-sided structures in the original set are stored in the sorted set.
[0016] Compared to existing technologies, this invention provides a method and apparatus for sorting points in weld inspection. It performs two-sided structure detection on the point cloud of the workpiece to be processed, obtaining an original set containing multiple two-sided structures. In the initial sorting operation, any two-sided structure is selected from the original set and stored in a constructed empty sorted set. The growth direction is determined based on the intersection direction of the two-sided structures and the spatial extension characteristics of the weld curve. In subsequent sorting operations, other two-sided structures in the original set are traversed. Based on the growth direction, it is detected whether the traversed two-sided structures satisfy the spatial topological relationship that conforms to the spatial extension characteristics of the weld curve. If so, the two-sided structures are stored sequentially in the sorted set, and the growth direction is updated based on the intersection direction of the two-sided structures. This process continues until all two-sided structures in the original set are stored in the sorted set. Key feature points characterizing the core contour of the weld are obtained based on the endpoints of the sorted two-sided structures in the sorted set.
[0017] In this scheme, based on the spatial topological relationship of the two-sided structure set and combined with the extension characteristics of the weld, the accurate transformation from disordered two-sided structure to ordered weld feature points can be achieved, which significantly improves the accuracy and reliability of feature point sorting. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments 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.
[0019] Figure 1 A flowchart of a point sorting method in weld inspection provided by an embodiment of the present invention; Figure 2 This is a schematic diagram of surface segmentation in an embodiment of the present invention; Figure 3 This is a logical diagram illustrating the sorting of the two-sided structure in an embodiment of the present invention; Figure 4 for Figure 1 A flowchart of the sub-steps included in S13; Figure 5 for Figure 1 A flowchart of the sub-steps included in S15; Figure 6 This is a schematic diagram of the overall logic for point sorting in an embodiment of the present invention; Figure 7 A functional block diagram of a point sorting device in weld inspection provided in an embodiment of the present invention; Figure 8This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0020] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention.
[0021] Please see Figure 1 The above is a flowchart of a point sorting method in weld inspection provided by an embodiment of the present invention. The point sorting method in weld inspection can be executed by a point sorting device in weld inspection. The point sorting device in weld inspection can be implemented by software and / or hardware and can be configured in an electronic device, such as a computer device, a controller in a robot, etc. The detailed steps of the point sorting method in weld inspection are described below.
[0022] S11, Perform two-sided structure detection on the point cloud of the workpiece to be processed to obtain the original set containing multiple two-sided structures; S12, In the first sorting operation, select any two-sided structure from the original set, store the selected two-sided structure into the constructed empty sorting set, and determine the growth direction based on the intersection direction of the two-sided structure and the spatial extension characteristics of the weld curve. S13, In non-first sorting operations, traverse other two-sided structures in the original set, and detect whether the traversed two-sided structures satisfy the spatial topological relationship that conforms to the spatial extension characteristics of the weld curve based on the growth direction. S14, if satisfied, store the two-sided structures in the sorted set in order, and update the growth direction based on the intersection direction of the two-sided structures; S15, until all the two-sided structures in the original set are stored in the sorted set, and the key feature points characterizing the core contour of the weld are obtained based on the endpoints of the sorted two-sided structures in the sorted set.
[0023] The point sorting method provided in this embodiment innovatively changes the technical path compared with the prior art. It prioritizes the ordered processing of the detected two-sided structure and uses the spatial topological association constraint sorting logic between the two-sided structure to generate an ordered feature point sequence that fits the extended trajectory of the ship spline curve, which significantly improves the accuracy and reliability of feature point sorting.
[0024] The specific implementation methods of each of the above steps will be explained in detail below.
[0025] Combination Figure 2As shown, in this embodiment, the core idea of differential geometry is introduced for the workpiece point cloud to be processed. By discretizing the continuous surface in the workpiece point cloud into a series of highly accurate detected micro-planar units, a piecewise approximation method is used to achieve accurate fitting of complex surface morphology. These discretized micro-planar units are combined in pairs with a pre-set reference large plane at the bottom to form a two-sided structure with clear geometric characteristics. A two-sided structure is usually defined as a combination of two planes that have a specific included angle and form a common intersection line. Based on this, the key geometric parameters of each two-sided structure (such as the dihedral angle, the direction of the plane normal vector, the endpoints of the two-sided structure, etc.) are further extracted.
[0026] However, since the two-sided structure itself is a discrete set without spatial order constraints and does not follow the natural extension topological relationship of the weld, its corresponding endpoint feature points also form a scattered set of points lacking spatial sequence logic and geometric topological relationships. These disordered feature points cannot be directly used for welding path planning, which will lead to problems such as disordered welding torch movement trajectory and deterioration of weld formation quality.
[0027] Therefore, in this embodiment, by establishing a spatial topological association between the two structures, the orderly reconstruction of their endpoint feature points is achieved, and finally an ordered feature point sequence that conforms to the natural extension direction of the weld is generated, providing reliable data support for subsequent welding path planning and high-precision welding execution.
[0028] In this embodiment, the detected two-sided structures are stored in an original set, which can be in list form, represented as a list of two-sided structure clusters called `before_list`. This list contains all two-sided structures to be sorted. Simultaneously, an empty sorted set is created, which can also be in list form, represented as a list of two-sided structure clusters called `after_list`. Its core purpose is to store the sorted two-sided structures, providing structured input for subsequent weld point extraction and welding path planning.
[0029] Please refer to the following: Figure 3 During the sorting process, it is determined whether there is valid two-dimensional structure data in the sorting set after_list: if after_list is an empty set, then this sorting is determined to be the first sorting operation.
[0030] In the initial sorting operation, any two-sided structure can be arbitrarily selected from the original set `before_list` as the initial sorting structure and stored in the sorting set `after_list`. Simultaneously, based on the intersection direction of this initial two-sided structure and considering the spatial extension characteristics of the weld curve, the growth direction of subsequent two-sided structures is determined. The growth direction is defined as the natural extension direction along the weld curve structure, and its direction directly determines the sorting order and spatial arrangement logic of subsequent two-sided structures.
[0031] In subsequent non-first sorting operations, the two-sided structures in the original set are traversed. Based on the growth direction, it is determined whether the traversed two-sided structures satisfy the spatial topological relationship that conforms to the spatial extension characteristics of the weld curve. For details, please refer to [link to relevant documentation]. Figure 4 This step can be achieved in the following way: S131, detect whether the traversed two-sided structure meets the set conditions. The set conditions are that the two-sided structure is located within the spatial coverage of the growth direction, and the distance between it and the first or last two-sided structure in the current sorted set meets the set distance requirement. If the two-sided structure meets the set conditions, execute S132. If the two-sided structure does not meet the set conditions, execute S133.
[0032] S132, determine that the two-sided structure satisfies the spatial topological relationship that conforms to the spatial extension characteristics of the weld curve.
[0033] S133, determine that the two-sided structure satisfies the spatial topological relationship that does not conform to the spatial extension characteristics of the weld curve.
[0034] In this embodiment, specifically, the growth direction determined based on the initial two-sided structure includes a first growth direction and a second growth direction that are respectively directed towards both ends along the spatial extension characteristics of the weld curve with the intersection direction of the two-sided structure as a reference, and are respectively denoted as direction_1 and direction_2.
[0035] When checking whether the traversed two-sided structure meets the set conditions, the following two aspects can be used for detection and judgment: On one hand, it detects whether the traversed two-sided structure is within the spatial coverage of the first growth direction; if it is within the spatial coverage of the first growth direction, it further detects whether the first distance between the two-sided structure and the first two-sided structure in the current sorted set is the closest distance among all candidate two-sided structures in the first growth direction; if the first distance is the closest distance, it determines that the two-sided structure meets the set conditions.
[0036] Specifically, if the two-sided structure is within the spatial coverage of the preset growth direction direction_1, and after spatial distance calculation, its spatial distance with the first two-sided structure of after_list (i.e., after_list[0]) is the closest value among all candidate two-sided structures in the direction of direction_1, then this two-sided structure is stored in the first part of after_list, and the direction of direction_1 is updated in real time based on the intersection position of the newly stored two-sided structure to adapt to the sorting requirements of subsequent structures.
[0037] On the other hand, it is detected whether the traversed two-sided structure is within the spatial coverage of the second growth direction; if it is within the spatial coverage of the second growth direction, it is then detected whether the second distance between the two-sided structure and the tail two-sided structure in the current sorted set is the closest distance among all candidate two-sided structures in the second growth direction; if the second distance is the closest distance, it is determined that the two-sided structure meets the set conditions.
[0038] Specifically, if the two-sided structure is within the spatial coverage of the preset growth direction direction_2, and after spatial distance calculation, its spatial distance with the tail two-sided structure of after_list (i.e., after_list[end]) is the closest value among all candidate two-sided structures in the direction of direction_2, then this two-sided structure is stored at the tail of after_list, and the dynamic update of direction_2 is completed based on the intersection orientation of the newly stored two-sided structure.
[0039] The iterative filtering and list updating operations are performed repeatedly according to the above rules until the number of two-sided structures in `after_list` is exactly equal to the number of two-sided structures in `before_list`. This means that all two-sided structures in the original list `before_list` have been sorted and completely stored in the target list `after_list`. At this point, the iteration process terminates. Finally, `after_list` is an ordered list of two-sided structures that conforms to the weld curve extension pattern.
[0040] To further improve the accuracy of the determined key feature points characterizing the weld core contour, in this embodiment, the step of obtaining the key feature points characterizing the core contour based on the endpoints of the sorted bifacial structures in the sorted set can be implemented in the following way, please refer to [link to relevant documentation]. Figure 5 : S151, detect whether the two-sided structure in the sorted set needs to be divided. If it needs to be divided, perform the division process on the sorted set, and perform overlap verification and closure verification on the sorted set after the division process. S152, based on the endpoints of the two-sided structure in the sorted set after verification processing, the key feature points characterizing the core contour of the weld are obtained.
[0041] Please refer to the following: Figure 6 In this embodiment, it is detected whether the two-sided structure in the sorted set needs to be segmented. If segmentation is required, the sorted set is segmented. This step can be implemented in the following way: Detect whether there is an angle abrupt change between any two two-sided structures in the sorted set; if there is an angle abrupt change, then split the sorted set between the two two-sided structures with the angle abrupt change.
[0042] In this embodiment, the sorted list of two-sided structure clusters, i.e., the sorted set, is subjected to a directional consistency check of adjacent two-sided structures. If an angle abrupt change is detected between two adjacent two-sided structures, for example, if the difference between their angles exceeds a preset threshold, it is determined that the weld direction at the corresponding position has deviated sharply, and the weld in this area no longer meets the continuous extension characteristic of the same spline weld. Therefore, the original list of two-sided structure clusters needs to be split into two independent lists using this abrupt change position as the dividing point.
[0043] Based on this, the step of performing overlap verification on the sorted set after segmentation can be implemented in the following way: Detect whether there is a spatial overlap between any two sorted sets after the split; if there is a spatial overlap, merge the sorted sets with the spatial overlap and perform a sorting operation on the merged sorted set.
[0044] In this embodiment, the spatial overlap of the multiple lists of bifacial structure clusters obtained after segmentation, i.e., the sorted sets, is checked. If the check results show that there is a spatial overlap between any two sorted sets, it is determined that the bifacial structures in the two sorted sets correspond to different segments of the same weld and meet the merging conditions. Therefore, the two sorted sets can be integrated into a unified list of bifacial structure clusters. Then, according to the iterative sorting method described above, the merged list of bifacial structure clusters is sorted a second time to ensure the continuity of its spatial sequence.
[0045] Furthermore, the step of performing a closure check on the sorted set after partitioning can be implemented in the following way: After the sorting operation, check whether the first two-sided structure and the last two-sided structure in each sorted set have a spatial intersection relationship and form a closed loop; if they do, optimize and adjust the last two-sided structure in the sorted set so that the spatial overlap rate between the last two-sided structure and the first two-sided structure is lower than the preset overlap rate.
[0046] In this embodiment, a closure determination is performed on each two-sided structure after the merging operation and secondary sorting. Each sorted set is checked one by one to determine whether the first and last two-sided structures after sorting have a spatial intersection relationship and form a closed loop. If the detection result shows that the two-sided structure in the sorted set has a closure property, the last two-sided structure in the sorted set is optimized and adjusted to control the spatial overlap range between the last and first two-sided structures. For example, the spatial overlap rate between the two is limited to be lower than a preset overlap rate, thus avoiding the problem of excessive overlap.
[0047] After completing the above processing steps, the key feature points characterizing the core contour of the weld are obtained based on the endpoints of the two-sided structure in the sorted set after verification. Specifically, this step can be achieved in the following way: A feature point list is obtained based on the endpoints of the two-sided structure in the sorted set after verification processing; the feature point list is traversed, and the spatial distance between adjacent feature points is calculated. If the spatial distance is less than a set distance, the adjacent feature points are deduplicated; an adaptive interpolation strategy is applied to the feature point list to perform interpolation processing between adjacent feature points; the key feature points characterizing the core contour of the weld are obtained based on the interpolated feature point list.
[0048] In this embodiment, feature point optimization is performed on the ordered two-sided structures in the sorted sets. First, a list of feature points formed by the two endpoints of the two-sided structures in each sorted set is extracted to generate an initial feature point list. Then, based on a preset spatial distance judgment standard, the feature points in the list are deduplicated. Specifically, the feature point list is traversed, and the spatial distance between adjacent feature points is calculated. If the spatial distance is less than a set distance, it is determined to be a redundant point and deduplicated to ensure that the final retained feature points are appropriately spaced and not excessively dense, thus avoiding interference with subsequent curve fitting.
[0049] After deduplication, an upsampling operation is performed on the feature point list. An adaptive interpolation strategy is used to interpolate between adjacent feature points to supplement an appropriate number of feature points. The core purpose is to uniformly adjust the spacing between adjacent feature points to a preset reasonable range, eliminate the problem of discontinuous weld trajectory representation caused by excessive spacing, improve the fit of spline curves to the actual weld shape, and ensure the accuracy and reliability of weld detection.
[0050] After completing the above processing, the ordered feature points in the feature point list are the key feature points that can characterize the core contour of the weld.
[0051] In summary, the point sorting method for weld inspection provided in this embodiment adopts a dual-growth-direction iterative sorting technique. Based on the intersection direction of the initial two-sided structure, the dual growth directions are established. By traversing and matching the nearest neighbor relationship between the two-sided structure to be sorted and the first and last ends of the list, and dynamically updating the growth direction, the disordered two-sided structure clusters are reconstructed in an orderly manner, ensuring that the sorting result conforms to the natural extension trajectory of the weld.
[0052] Furthermore, a direction change verification and dynamic segmentation / merging mechanism are adopted. By verifying the consistency of the structural directions of adjacent two surfaces, the location of the weld angle change is automatically identified and segmented, accurately distinguishing discontinuous welds. Simultaneously, spatial overlap (or intersection line coincidence) verification is combined to merge the segmented structures of the same weld, eliminating redundant overlap and ensuring the integrity and continuity of the weld structure.
[0053] Furthermore, a precise feature point optimization technique is adopted, employing deduplication and upsampling strategies. By setting a spatial distance threshold, redundant and dense points are eliminated, and interpolation algorithms are used to fill in the gaps in the points. At the same time, threshold adaptation rules can be linked to ensure that the feature points are evenly distributed and the trajectories are coherent, providing high-precision data for spline curve fitting.
[0054] Based on the same inventive concept, please refer to Figure 7 This invention also provides a functional module diagram of a point sorting device in weld inspection. This embodiment can divide the point sorting device in weld inspection into functional modules based on the above method embodiment. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this embodiment is illustrative and only represents a logical functional division; other division methods may be used in actual implementation.
[0055] The point sorting device in weld inspection can include a detection module, a sorting operation module, a storage module, and an acquisition module. The functions of each functional module of the point sorting device in weld inspection are described in detail below.
[0056] The detection module is used to perform two-sided structure detection on the point cloud of the workpiece to be processed, and obtain the original set containing multiple two-sided structures. The sorting operation module is used to select any two-sided structure from the original set in the first sorting operation, store the selected two-sided structure into the constructed empty sorting set, and determine the growth direction based on the intersection direction of the two-sided structure and the spatial extension characteristics of the weld curve. The sorting operation module is also used to traverse other two-sided structures in the original set during non-first sorting operations, and detect whether the traversed two-sided structures satisfy the spatial topological relationship that conforms to the spatial extension characteristics of the weld curve based on the growth direction. The storage module is used to store the two-sided structures in the sorted set in sequence when the two-sided structures satisfy the spatial topological relationship that conforms to the spatial extension characteristics of the weld curve, and update the growth direction based on the intersection direction of the two-sided structures. The module is used to obtain key feature points characterizing the core contour of the weld seam based on the endpoints of the sorted two-sided structures in the original set until all the two-sided structures in the original set are stored in the sorted set.
[0057] The point sorting device for weld inspection provided in this embodiment can be used to execute the point sorting method for weld inspection 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.
[0058] Please see Figure 8 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 controller. 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. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.
[0059] The memory is used to store computer programs or data. Memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc.
[0060] The processor is used to read / write data or programs stored in the memory and execute the point sorting method in weld inspection provided in any embodiment of the present invention.
[0061] 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.
[0062] It should be understood that, Figure 8 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 8 The more or fewer components shown, or having the same Figure 8 The different configurations shown.
[0063] Furthermore, embodiments of the present invention also provide a computer-readable storage medium storing machine-executable instructions, which, when executed, implement the point sorting method in weld inspection provided in the above embodiments.
[0064] Specifically, the computer-readable storage medium can be a general-purpose storage medium, such as a removable disk or hard disk. When the computer program on the computer-readable storage medium is executed, it can perform the point sorting method in the weld inspection described above. The processes involved in the execution of the executable instructions on the computer-readable storage medium can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.
[0065] In summary, the point sorting method and apparatus for weld inspection provided in this embodiment achieves an efficient and stable transformation from a chaotic original two-sided structure to high-precision weld feature points by sequentially performing a series of processes such as ordered reconstruction, segmented optimization, merging verification, and feature point refinement on the two-sided structure.
[0066] This scheme adopts an iterative sorting strategy based on dual growth directions to reconstruct the initially chaotic two-sided structure in an orderly manner. Simultaneously, it combines the direction change verification of adjacent two-sided structures with the dynamic merging and segmentation mechanism of two-sided structures. This can accurately distinguish different continuous weld segments and automatically eliminate redundant and overlapping structures, ensuring that the output weld feature point spatial sequence is highly consistent with the actual weld extension trajectory, thus guaranteeing the continuity and consistency of the point sequence.
[0067] Through a three-round progressive verification process involving directional consistency verification, spatial overlap verification, and closure characteristic verification, coupled with targeted optimization operations such as feature point deduplication, interpolation upsampling, and nearest neighbor matching, common technical pain points in industrial scenarios, such as disordered arrangement of original two-sided structures, dense redundancy of weld feature points, missing data in the intersection area, and feature point positions deviating from the effective range of the point cloud, are effectively solved.
[0068] Compared to traditional weld inspection algorithms, this solution significantly improves adaptability to complex geometric regions, providing efficient, accurate, and reliable technical support for industrial scenarios such as automated welding path planning, online weld quality assessment, and intelligent welding robot operations. It has strong industrial applicability and promotional value.
[0069] In the embodiments provided by this invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0070] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0071] Furthermore, in the various embodiments of the present invention, the functional modules can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0072] It should be noted that if the functionality is implemented as a software 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 this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0073] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.
[0074] The above description is merely an embodiment of the present invention and is not intended to limit the scope of protection of the present invention. For those skilled in the art, the present invention can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for sorting points in weld inspection, characterized in that, The method includes: Perform biplane structure detection on the point cloud of the workpiece to be processed to obtain an original set containing multiple biplane structures; In the initial sorting operation, any two-sided structure is selected from the original set, the selected two-sided structure is stored in the constructed empty sorting set, and the growth direction is determined based on the intersection direction of the two-sided structure and the spatial extension characteristics of the weld curve. In non-first sorting operations, other two-sided structures in the original set are traversed, and the traversed two-sided structures are checked based on the growth direction to see if they satisfy the spatial topological relationship that conforms to the spatial extension characteristics of the weld curve. If the conditions are met, the bifacial structures are stored in the sorted set in order, and the growth direction is updated based on the intersection direction of the bifacial structures. The process continues until all bifacial structures in the original set are stored in the sorted set. Based on the endpoints of the sorted bifacial structures in the sorted set, key feature points characterizing the core contour of the weld are obtained.
2. The point sorting method for weld inspection according to claim 1, characterized in that, The step of detecting whether the traversed two-sided structure based on the growth direction satisfies the spatial topological relationship that conforms to the spatial extension characteristics of the weld curve includes: The system detects whether the traversed two-sided structures meet the set conditions. The set conditions are that the two-sided structure is located within the spatial coverage of the growth direction, and the distance between it and the first or last two-sided structure in the current sorted set meets the set distance requirements. If the two-sided structure meets the set conditions, then the two-sided structure is determined to satisfy the spatial topological relationship that conforms to the spatial extension characteristics of the weld curve.
3. The point sorting method in weld inspection according to claim 2, characterized in that, The growth direction includes a first growth direction and a second growth direction, respectively, which are based on the intersection direction of the two-sided structure and the spatial extension characteristics of the weld curve, and respectively towards both ends. The step of detecting whether the traversed two-sided structure meets the set conditions includes: Detect whether the traversed two-sided structure is within the spatial coverage of the first growth direction; If it is within the spatial coverage of the first growth direction, then check whether the first distance between the two-sided structure and the first two-sided structure in the current sorted set is the closest distance among all candidate two-sided structures in the first growth direction. If the first distance is the closest distance, then the two-sided structure is determined to meet the set conditions.
4. The method for sorting points in weld inspection according to claim 2, characterized in that, The growth direction includes a first growth direction and a second growth direction, respectively, which are based on the intersection direction of the two-sided structure and the spatial extension characteristics of the weld curve, and respectively towards both ends. The step of detecting whether the traversed two-sided structure meets the set conditions includes: Detect whether the traversed two-sided structure is within the spatial coverage of the second growth direction; If it is within the spatial coverage of the second growth direction, then check whether the second distance between the two-sided structure and the tail two-sided structure in the current sorting set is the closest distance among all candidate two-sided structures in the second growth direction; If the second distance is the closest distance, then the two-sided structure is determined to meet the set conditions.
5. The method for sorting points in weld inspection according to claim 1, characterized in that, The step of obtaining key feature points characterizing the core contour of the weld seam based on the endpoints of the sorted two-sided structures in the sorted set includes: Detect whether the two-sided structure in the sorted set needs to be segmented. If it needs to be segmented, then the sorted set is segmented, and overlap and closure checks are performed on the segmented sorted set. The key feature points characterizing the core contour of the weld are obtained from the endpoints of the two-sided structure in the sorted set after verification.
6. The method for sorting points in weld inspection according to claim 5, characterized in that, The step of detecting whether the two-sided structure in the sorted set needs to be segmented, and if so, segmenting the sorted set, includes: Detect whether there is an angle abrupt change between any two dihedral structures in the sorted set; If there is an angle mutation, the sorted set is split between the two dihedral structures with the angle mutation.
7. The method for sorting points in weld inspection according to claim 5, characterized in that, The steps for performing overlap verification on the sorted set after segmentation include: Detect whether there is a spatial overlap between any two sorted sets after segmentation; If there are overlapping spatial regions, the sorted sets with overlapping spatial regions are merged, and a sorting operation is performed on the merged sorted sets.
8. The method for sorting points in weld inspection according to claim 5, characterized in that, The steps for performing a closure check on the sorted set after partitioning include: Check whether the first two-sided structure and the last two-sided structure in each sorted set after the sorting operation have a spatial intersection relationship and form a closed loop; If there is a spatial intersection relationship and a closed loop is formed, the tail two-sided structure in the sorted set is optimized and adjusted so that the spatial overlap rate between the tail two-sided structure and the head two-sided structure is lower than the preset overlap rate.
9. The method for sorting points in weld inspection according to claim 5, characterized in that, The step of obtaining key feature points characterizing the core contour of the weld seam based on the endpoints of the bifacial structures in the sorted set after verification processing includes: A list of feature points is obtained based on the endpoints of the two-sided structure in the sorted set after verification. Traverse the list of feature points, calculate the spatial distance between adjacent feature points, and if the spatial distance is less than a set distance, perform deduplication processing on the adjacent feature points; An adaptive interpolation strategy is applied to the feature point list to perform interpolation between adjacent feature points; The key feature points characterizing the core contour of the weld are obtained from the feature point list based on interpolation processing.
10. A point sorting device for weld inspection, characterized in that, The device includes: The detection module is used to perform two-sided structure detection on the point cloud of the workpiece to be processed, and obtain the original set containing multiple two-sided structures. The sorting operation module is used to select any two-sided structure from the original set in the first sorting operation, store the selected two-sided structure into the constructed empty sorting set, and determine the growth direction based on the intersection direction of the two-sided structure and the spatial extension characteristics of the weld curve. The sorting operation module is also used to traverse other two-sided structures in the original set during non-first sorting operations, and detect whether the traversed two-sided structures satisfy the spatial topological relationship that conforms to the spatial extension characteristics of the weld curve based on the growth direction. The storage module is used to store the two-sided structures in the sorted set in sequence when the two-sided structures satisfy the spatial topological relationship that conforms to the spatial extension characteristics of the weld curve, and update the growth direction based on the intersection direction of the two-sided structures. The module is used to obtain key feature points characterizing the core contour of the weld seam based on the endpoints of the sorted two-sided structures in the original set until all the two-sided structures in the original set are stored in the sorted set.