A fine narrow weld seam identification method, computer equipment and readable storage medium
By performing planar detection and collinear voting on the point cloud data of the weldment surface, narrow weld seams are identified, solving the problem of insufficient accuracy in the identification of narrow weld seams in the existing technology and achieving high-precision identification of narrow weld seams.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- FAIR INNOVATION (SUZHOU) ROBOTIC SYSTEM CO LTD
- Filing Date
- 2025-12-04
- Publication Date
- 2026-04-17
AI Technical Summary
Existing technologies suffer from poor accuracy in identifying narrow welds. In particular, due to the narrow width of the planar structure, the planar detection algorithm cannot fully extract the planar features and cannot identify straight welds composed of narrow planes and other planes.
By acquiring the surface point cloud data of the weldment and performing planar detection, the planar set is divided into a narrow planar set and a reference planar set. Each planar in the narrow planar set is traversed to detect whether there are real intersection segments on the reference plane. The effective narrow planars are integrated by collinear voting of the intersection segments to identify the narrow weld of the target weldment.
It achieves high-precision identification of narrow weld seams in welded parts with narrow planar structures, and improves the overall identification and positioning effect of straight weld seams.
Smart Images

Figure CN121258989B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of welding control technology, and more specifically, to a method for identifying narrow weld seams, a computer device, and a readable storage medium. Background Technology
[0002] With the rapid development of welding automation technology, various industries (such as automotive, electronic assembly, metallurgy and chemical industries) have put forward higher requirements for welding precision, welding quality and welding safety. As the core link of automated welding system, weld seam identification and positioning directly affects the final welding quality and production efficiency.
[0003] Currently, mainstream straight weld seam recognition solutions in the industry are based on planar detection technology. This approach detects all planes using point cloud data of the weldment surface and then selects any two special planes (whose concavity / convexity characteristics meet preset criteria) that form a plane intersection line as potential straight weld seams. However, it is worth noting that in the practical application of the aforementioned straight weld seam recognition solutions, the weldment being inspected often has special narrow planar structures (with relatively long plane lengths but narrow plane widths, typically less than 12 mm). Due to physical size limitations, the corresponding point cloud data for these narrow planar structures often contains only a few discrete points. This leads to incomplete planar feature extraction by the planar detection algorithm when detecting narrow planes (i.e., a complete narrow plane is detected as multiple unrelated narrow planes). Consequently, the narrow weld seam that should exist, formed by the complete narrow plane and other ordinary planes (i.e., the straight weld seam formed between the complete narrow plane and other ordinary planes), cannot be identified, resulting in poor accuracy in narrow weld seam recognition. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a method, computer device and readable storage medium for identifying narrow weld seams, which can achieve high-precision identification of narrow weld seams for any weldment to be inspected with a narrow planar structure, so as to effectively improve the overall identification and positioning effect of straight weld seams of the weldment to be inspected.
[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:
[0006] In a first aspect, this application provides a method for identifying narrow weld seams, the method comprising:
[0007] Acquire surface point cloud data of the target weldment, and perform planar detection on the surface point cloud data to obtain the original planar set of the target weldment;
[0008] For each original plane in the original plane set, narrow plane identification is performed to obtain the original narrow plane set and the reference plane set;
[0009] Traverse each original narrow plane in the set of original narrow planes and detect whether each original reference plane in the set of reference planes has a real intersection line segment with the original narrow plane.
[0010] For each of the original narrow planes in the original narrow plane set, a collinearity voting process is performed on the actual intersection segments involved. Based on the collinearity voting results, all the original narrow planes are integrated into effective narrow planes to obtain at least one effective narrow plane.
[0011] Each effective narrow plane and its corresponding target reference plane are considered as a narrow weld seam of the target weldment, wherein the target reference plane is the original reference plane that has at least one real intersection line segment with the corresponding effective narrow plane.
[0012] In an optional implementation, the step of identifying narrow planes for each original plane in the original plane set to obtain an original narrow plane set and a reference plane set includes:
[0013] For each original plane, perform eigenvalue decomposition on the local point cloud covariance matrix corresponding to the original plane at the surface point cloud data to obtain the largest and second largest eigenvalues that match the original plane.
[0014] Detect whether the second largest feature value is less than a preset plane width threshold, and whether the actual ratio between the largest feature value and the second largest feature value is greater than or equal to a preset ratio threshold;
[0015] If the second largest feature value is detected to be less than the preset plane width threshold, and the actual ratio value is greater than or equal to the preset ratio threshold, then the original plane is added to the set of original narrow planes as an original narrow plane; otherwise, the original plane is added to the set of reference planes as an original reference plane.
[0016] In an optional implementation, the step of detecting whether each original reference plane in the reference plane set has a real intersection segment with the original narrow plane for any given original narrow plane includes:
[0017] Traverse each original reference plane in the set of reference planes and calculate the theoretical intersection line between the original reference plane and the original narrow plane.
[0018] Detect whether the theoretical angle between the direction vector of the theoretical intersection line and the feature vector of the plane width of the original narrow plane is greater than a first preset angle threshold;
[0019] If the theoretical angle is detected to be greater than the first preset angle threshold, it is determined that there is no real intersection line segment between the original reference plane and the original narrow plane; otherwise, it is detected whether there is target point cloud data on the original reference plane, wherein the actual distance from each plane point in the target point cloud to the theoretical intersection line is within a preset distance range.
[0020] If no target point cloud data is detected on the original reference plane, it is determined that there is no real intersection segment between the original reference plane and the original narrow plane; otherwise, it is determined that there is a real intersection segment between the original reference plane and the original narrow plane. In this case, the real intersection segment is a straight line segment fitted by the projection points of the target point cloud data on the original reference plane and all the plane points on the original narrow plane on the theoretical intersection line.
[0021] In an optional implementation, the step of voting on the collinearity of the actual intersection segments involved by each of the original narrow planes in the original narrow plane set includes:
[0022] Iterate through each real intersection segment and perform common intersection detection on all the intersection segments to be voted recorded by the collinear voting device with the real intersection segment respectively;
[0023] If any line segment to be voted is detected to intersect with the actual line segment, the vote count of the line segment to be voted at the collinear voting device is incremented by one, and the original narrow plane that forms the actual line segment is recorded in the narrow plane association set of the line segment to be voted.
[0024] If no line segment to be voted is detected to intersect with the actual line segment, the actual line segment is treated as a line segment to be voted at the collinear voting device. Then, the corresponding vote count is set to one, and the original narrow plane and the original reference plane that form the actual line segment are recorded one-to-one in the narrow plane association set and the reference plane association set of the line segment to be voted.
[0025] In an optional implementation, the step of performing common intersection detection between all the line segments to be voted recorded by the collinear voting device and the actual line segment includes:
[0026] For each line segment to be voted, it is detected whether the angle between the direction vectors of the line segment to be voted and the actual line segment is less than a second preset angle threshold, whether the maximum projection distance from the actual line segment to the line segment to be voted is less than a preset distance threshold, and whether the actual line segment and the line segment to be voted intersect.
[0027] If the angle between the corresponding direction vectors is less than the second preset angle threshold, the corresponding maximum projection distance is less than the preset distance threshold, and the actual intersection segment intersects with the intersection segment to be voted, then it is determined that the intersection segment to be voted and the actual intersection segment share a common intersection line; otherwise, it is determined that the intersection segment to be voted does not share a common intersection line with the actual intersection segment.
[0028] In an optional implementation, the collinear voting result of the intersecting line segments includes the voting count results of each of the intersecting line segments to be voted that have been recorded by the collinear voting device. Then, the step of integrating all the original narrow planes into effective narrow planes based on the collinear voting result to obtain at least one effective narrow plane includes:
[0029] For each line segment to be voted, check whether the vote count corresponding to that line segment is greater than or equal to 2;
[0030] If the vote count result corresponding to the line segment to be voted is greater than or equal to 2, all the original narrow planes recorded in the narrow plane association set of the line segment to be voted are merged, and the merged narrow plane is taken as a valid narrow plane. At this time, the original reference plane recorded in the reference plane association set of the line segment to be voted is taken as the target reference plane corresponding to the valid narrow plane.
[0031] In an optional implementation, the step of effectively integrating all the original narrow planes based on the collinearity voting results of the intersecting line segments to obtain at least one effective narrow plane further includes:
[0032] If the vote count result corresponding to the line segment to be voted is less than 2, the original narrow plane constituting the line segment to be voted is subjected to narrow reliability verification to obtain the corresponding narrow reliability verification result.
[0033] The test determines whether the narrow reliability verification result indicates that the original narrow plane has been successfully verified.
[0034] If the narrow reliability verification result indicates that the original narrow plane has been successfully verified, the original narrow plane constituting the intersection segment to be voted is directly regarded as a valid narrow plane. At this time, the original reference plane recorded in the reference plane association set of the intersection segment to be voted is regarded as the target reference plane corresponding to the valid narrow plane.
[0035] In an optional implementation, the step of performing narrow reliability verification on the original narrow plane constituting the intersection segment to be voted includes:
[0036] Detect whether the actual plane length of the original narrow plane is greater than or equal to a preset plane length threshold, and whether the actual number of point clouds on the original narrow plane is greater than or equal to a preset plane point count threshold;
[0037] If the actual plane length of the original narrow plane is greater than or equal to a preset plane length threshold, and the actual number of point clouds on the original narrow plane is greater than or equal to a preset plane point number threshold, then the verification of the original narrow plane is determined to be successful; otherwise, the verification of the original narrow plane is determined to be unsuccessful.
[0038] Secondly, this application provides a computer device including a processor and a memory, wherein the memory stores a computer program executable by the processor, and the processor can execute the computer program to implement the narrow weld seam identification method described in any of the foregoing embodiments.
[0039] Thirdly, this application provides a readable storage medium having a computer program stored thereon, which, when executed by a computer device, implements the narrow weld seam identification method described in any of the foregoing embodiments.
[0040] In this case, the beneficial effects of the embodiments of this application may include the following:
[0041] This application, based on the surface point cloud data of the target weldment, determines the original set of planes for the target weldment. Then, through a narrow plane identification operation, the original set of planes is divided into an original narrow plane set and a reference plane set. Next, each original narrow plane in the original narrow plane set is traversed, and it is detected whether each original reference plane in the reference plane set has a real intersection segment with that original narrow plane. This is achieved by performing a collinearity voting on the real intersection segments involved in each original narrow plane, and then effectively integrating all the original narrow planes based on the collinearity voting results to obtain at least one effective narrow plane that substantially exists in the target weldment. Each effective narrow plane and its corresponding target reference plane (which belongs to the original reference plane that has at least one real intersection line segment with the corresponding effective narrow plane; in other words, at least one original narrow plane involved in the effective narrow plane has a real intersection line segment with the target reference plane) is used as a narrow weld seam of the target weldment. This achieves a high-precision narrow weld seam recognition effect for any weldment to be inspected with a narrow plane structure, thereby effectively improving the overall recognition and positioning effect of straight weld seams of the weldment to be inspected.
[0042] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0043] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 A schematic diagram of the composition of a computer device provided in the embodiments of this application;
[0045] Figure 2 A flowchart illustrating the narrow weld seam identification method provided in this application embodiment;
[0046] Figure 3 for Figure 2 A flowchart illustrating the sub-steps included in step S220;
[0047] Figure 4 for Figure 2 A flowchart illustrating the sub-steps included in step S230;
[0048] Figure 5 for Figure 2 One of the flowcharts for the sub-steps included in step S240;
[0049] Figure 6 for Figure 2 The second flowchart illustrates the sub-steps included in step S240.
[0050] Icons: 10-Computer equipment; 11-Memory; 12-Processor; 13-Communication unit. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0052] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0053] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0054] In the description of this application, it should be understood that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product is in use, or the orientation or positional relationship commonly understood by those skilled in the art. They are used only for the convenience of describing this application and simplifying the description, and are not intended to indicate or imply that the equipment or component referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.
[0055] In the description of this application, it should also be noted that, unless otherwise expressly specified and limited, the terms "set up," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0056] Furthermore, it is understood in the description of this application that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. Those skilled in the art will understand the specific meaning of the above terms in this application based on the specific circumstances.
[0057] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0058] Please refer to Figure 1 , Figure 1This is a schematic diagram of the computer device 10 provided in this application embodiment. In this application embodiment, the computer device 10 can realize the straight weld seam recognition function for any weldment to be inspected (i.e., the target weldment) that needs to perform welding operations, and perform precise narrow weld seam recognition during the straight weld seam recognition process, so as to effectively improve the overall recognition and positioning effect of the straight weld seam of the weldment to be inspected. The computer device 10 can be a welding robot equipped with a vision perception system (which can be implemented using devices such as depth cameras and lidar), or it can be an independent electronic device communicatively connected to a welding robot equipped with a vision perception system. The independent electronic device can be, but is not limited to, a server, personal computer, laptop computer, etc.
[0059] In this embodiment, the computer device 10 may include a memory 11, a processor 12, and a communication unit 13. The memory 11, the processor 12, and the communication unit 13 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines.
[0060] In this embodiment, the memory 11 may 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. The memory 11 is used to store computer programs, and the processor 12 can execute the computer programs accordingly after receiving execution instructions.
[0061] In this embodiment, the processor 12 can be an integrated circuit chip with signal processing capabilities. The processor 12 can be a general-purpose processor, including at least one of a central processing unit (CPU), graphics processing unit (GPU), network processor (NP), digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0062] In this embodiment, the communication unit 13 is used to establish a communication connection between the computer device 10 and other electronic devices through a network, and to send and receive data through the network, wherein the network includes wired communication networks and wireless communication networks. For example, the computer device 10 can obtain surface point cloud data of the target weldment (i.e., the real point cloud data of the surface of the target weldment in three-dimensional space) from the visual perception system through the communication unit 13, and perform straight weld seam identification based on the surface point cloud data.
[0063] In this embodiment, the computer device 10 may pre-store a specific computer program related to the narrow weld seam recognition function in the memory 11, and by driving the processor 12 to execute the specific computer program, based on the surface point cloud data of the target weld with a narrow planar structure, achieve a high-precision narrow weld seam recognition effect for the target weld, so as to effectively improve the overall recognition and positioning effect of the straight weld seam of the target weld.
[0064] Understandable Figure 1 The block diagram shown is only a schematic diagram of one configuration of the computer device 10. The computer device 10 may also include components such as... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown. Figure 1 The components shown can be implemented using hardware, software, or a combination thereof.
[0065] In this application, to ensure that the computer device 10 can achieve a high-precision narrow weld seam recognition effect for any weldment to be inspected with a narrow planar structure, so as to improve the overall recognition and positioning effect of the straight weld seam of the weldment to be inspected, this application embodiment achieves the aforementioned objective by providing a narrow weld seam recognition method. The narrow weld seam recognition method provided by this application will be described in detail below.
[0066] Please refer to Figure 2 , Figure 2 This is a schematic flowchart of a narrow weld seam identification method provided in an embodiment of this application. In this embodiment, the narrow weld seam identification method may include steps S210 to S250.
[0067] Step S210: Obtain surface point cloud data of the target weldment, and perform planar detection on the surface point cloud data to obtain the original planar set of the target weldment.
[0068] In this embodiment, the target weldment is any weldment to be inspected that requires welding operations. The original plane set of the target weldment consists of multiple original planes of the target weldment. These multiple original planes are obtained by processing the surface point cloud data using traditional plane detection algorithms (e.g., region growing algorithm, RANSAC (Random Sample Consensus) algorithm, etc.). Each original plane in the original plane set can be assigned a unique initial number (which can be used to identify the original plane) to effectively distinguish between different original planes.
[0069] Step S220: Perform narrow plane identification on each original plane in the original plane set to obtain the original narrow plane set and the reference plane set.
[0070] In this embodiment, the original plane set can be directly divided into an original narrow plane set and a reference plane set by identifying narrow planes for each original plane in the original plane set. Each original narrow plane in the original narrow plane set is an original plane that initially possesses narrow plane characteristics. The original narrow plane set is effectively distinguished by recording the initial numbers of each original narrow plane. Each original reference plane in the reference plane set is an original plane that does not possess narrow plane characteristics. The reference plane set is effectively distinguished by recording the initial numbers of each original reference plane.
[0071] Alternatively, please refer to Figure 3 , Figure 3 yes Figure 2 A flowchart illustrating the sub-steps included in step S220 is provided. In this embodiment, step S220 may include sub-steps S221 to S224 to directly divide the original plane set into an original narrow plane set and a reference plane set.
[0072] Sub-step S221: For each original plane, perform eigenvalue decomposition on the local point cloud covariance matrix corresponding to the original plane at the surface point cloud data to obtain the largest and second largest eigenvalues that match the original plane.
[0073] In this embodiment, for any original plane, its corresponding local point cloud covariance matrix is calculated based on the relevant point cloud data of the original plane at the surface point cloud data (i.e., the point cloud data used to fit and construct the original plane). The local point cloud covariance matrix of any original plane can be decomposed into eigenvalues to obtain three eigenvalues related to the original plane. Among these three eigenvalues, the largest eigenvalue is used to represent the plane length of the corresponding original plane, the second largest eigenvalue is used to represent the plane width of the corresponding original plane, and the smallest eigenvalue is used to represent the plane thickness of the corresponding original plane.
[0074] Sub-step S222: Detect whether the second largest feature value is less than a preset plane width threshold, and whether the actual ratio between the largest feature value and the second largest feature value is greater than or equal to a preset ratio threshold.
[0075] In this embodiment, when the second largest feature value of any original plane is detected to be less than the preset plane width threshold (e.g., 12 mm), and the actual ratio between the largest feature value and the second largest feature value of the original plane is greater than or equal to the preset ratio threshold (e.g., 2.5), it indicates that the original plane initially possesses narrow plane characteristics, and sub-step S223 can be executed for the original plane at this time; while when the second largest feature value of the original plane is detected to be not less than the preset plane width threshold, and / or the actual ratio between the largest feature value and the second largest feature value of the original plane is less than the preset ratio threshold, it indicates that the original plane does not possess narrow plane characteristics, and sub-step S224 can be executed for the original plane at this time.
[0076] Sub-step S223: Add the original plane as an original narrow plane to the set of original narrow planes.
[0077] Sub-step S224: Add the original plane as an original reference plane to the reference plane set.
[0078] Therefore, by executing the above sub-steps S221 to S224, this application can directly divide the original plane set into the original narrow plane set and the reference plane set through the narrow plane recognition operation.
[0079] Step S230: Traverse each original narrow plane in the original narrow plane set and detect whether each original reference plane in the reference plane set has a real intersection line segment with the original narrow plane.
[0080] In this embodiment, for each original narrow plane of the target weldment, the possibility of the original narrow plane forming a narrow weld with other original reference planes can be determined by traversing all original reference planes in the reference plane set to see if there is a real intersection segment with the original narrow plane. Specifically, when a real intersection segment exists between an original narrow plane and an original reference plane, it indicates that the original narrow plane has the possibility of forming a narrow weld with that original reference plane.
[0081] Alternatively, please refer to Figure 4 , Figure 4 yes Figure 2 The flowchart of step S230 includes the sub-steps. In the embodiments of this application, step S230 may include sub-steps S231 to S235 to accurately detect whether any original narrow plane can form a narrow weld with other original reference planes.
[0082] Sub-step S231: Traverse each original reference plane in the reference plane set and calculate the theoretical intersection line between the original reference plane and the original narrow plane.
[0083] Sub-step S232: Detect whether the theoretical angle between the direction vector of the theoretical intersection line and the feature vector of the plane width of the original narrow plane is greater than the first preset angle threshold.
[0084] In this embodiment, for any original narrow plane, its corresponding plane width feature vector is the feature vector associated with the second largest feature value of the original narrow plane. When the theoretical angle between a certain original reference plane and a certain original narrow plane is greater than the first preset angle threshold (e.g., 60°), it indicates that the theoretical intersection line between the original reference plane and the corresponding original narrow plane is basically parallel to the plane length direction of the original narrow plane. The aforementioned theoretical intersection line does not have the possibility of being identified as a narrow weld. At this time, sub-step S235 will be executed. When the theoretical angle between a certain original reference plane and a certain original narrow plane is less than or equal to the first preset angle threshold, it indicates that the theoretical intersection line between the original reference plane and the corresponding original narrow plane is basically parallel to the plane width direction of the original narrow plane. The aforementioned theoretical intersection line has the possibility of being identified as a narrow weld. At this time, sub-step S233 will be executed.
[0085] Sub-step S233: Detect whether target point cloud data exists on the original reference plane.
[0086] In this embodiment, the target point cloud data consists of plane points (i.e., discrete points in the surface point cloud data located on the corresponding original reference plane) whose actual distance from the original reference plane to the corresponding theoretical intersection line is within a preset distance range (e.g., 0~24mm). When there is no target point cloud on a certain original reference plane, it indicates that the corresponding theoretical intersection line itself is not located near the original reference plane, and the corresponding theoretical intersection line is not actually generated on the target weldment. At this time, sub-step S235 will be executed. When there is target point cloud data (including at least one plane point) on a certain original reference plane, it indicates that the corresponding theoretical intersection line itself is actually generated on the target weldment and is located near the original reference plane. At this time, sub-step S234 will be executed.
[0087] Sub-step S234: Determine that there is a real intersection line segment between the original reference plane and the original narrow plane.
[0088] In this embodiment, when it is determined that the theoretical intersection line between a certain original reference plane and a certain original narrow plane is actually generated on the target weldment and is located near the original reference plane, it indicates that the actual intersection line segment between the original reference plane and the original narrow plane is located on the corresponding theoretical intersection line. This can be obtained by projecting all the plane points on the original narrow plane (i.e., the discrete points on the corresponding original narrow plane in the surface point cloud data) and the target point cloud data on the original reference plane onto the corresponding theoretical intersection line, and fitting a straight line segment according to each projection point on the corresponding theoretical intersection line. At this time, the actual intersection line segment is the straight line segment fitted by the projection points of the target point cloud data on the original reference plane and all the plane points on the original narrow plane on the theoretical intersection line.
[0089] Sub-step S235: Determine that there is no real intersection segment between the original reference plane and the original narrow plane.
[0090] Therefore, by executing the above sub-steps S231 to S235, this application can accurately detect whether any original narrow plane can form a narrow weld with other original reference planes.
[0091] Step S240: Perform collinearity voting on the actual intersection segments involved in each of the original narrow planes in the original narrow plane set, and integrate all the original narrow planes into effective narrow planes based on the collinearity voting results to obtain at least one effective narrow plane.
[0092] In this embodiment, when determining the actual intersection segments between each original narrow plane in the original narrow plane set and other original reference planes, or when determining the actual intersection segments between each of the original narrow planes and other original reference planes, a collinearity voting mechanism can be used to determine which actual intersection segments belong to the same narrow plane intersection line (wherein, multiple actual intersection segments belonging to the same narrow plane intersection line collectively represent a narrow weld), and which actual intersection segments each correspond to a separate narrow plane intersection line. This allows for effective narrow plane integration of the original narrow plane set based on the final collinearity voting results, resulting in at least one effective narrow plane on the target weld that can construct a narrow weld with other original reference planes.
[0093] Alternatively, please refer to Figure 5 , Figure 5 yes Figure 2 One of the flowcharts for the sub-steps included in step S240 is shown below. In this embodiment of the application, the step "voting for collinearity of intersection segments involving the actual intersection segments of all original narrow planes in the original narrow plane set" in step S240 may include sub-steps S241 to S243, so as to accurately identify the narrow plane intersection line assignment of all actual intersection segments actually existing on the target weldment, which facilitates further confirmation of the effective narrow planes that actually exist on the target weldment.
[0094] Sub-step S241: Traverse each real intersection segment and perform common intersection detection on all the intersection segments to be voted recorded by the collinear voting device with the real intersection segment.
[0095] In this embodiment, each intersection segment to be voted recorded at the collinear voter is used to represent a narrow plane intersection line. The collinear voter is configured with a narrow plane association set and a reference plane association set for each intersection segment to be voted. The narrow plane association set corresponding to each intersection segment to be voted is used to record the initial numbers of all original narrow planes involved in constructing the corresponding narrow plane intersection line. The reference plane association set corresponding to each intersection segment to be voted is used to record the initial numbers of the original reference planes involved in constructing the corresponding narrow plane intersection line.
[0096] For each identified true intersection segment, it can be determined whether the true intersection segment belongs to the same narrow plane intersection line as other true intersection segments at the collinear voting device by detecting whether the true intersection segment intersects with each of the intersection segments to be voted recorded by the collinear voting device.
[0097] In this embodiment, for each real intersection segment traversed, the step "performing common intersection detection between all the intersection segments to be voted recorded by the collinear voting device and the real intersection segment" in sub-step S241 above may include:
[0098] For each line segment to be voted, the following checks are performed: whether the angle between the direction vectors of the line segment to be voted and the actual line segment (i.e., the actual angle between the direction vectors of the line segment to be voted and the actual line segment) is less than a second preset angle threshold (e.g., 10°); whether the maximum projection distance from the actual line segment to the line segment to be voted (i.e., the maximum value among the effective projection distances from the two endpoints of the actual line segment to the line segment to be voted) is less than a preset distance threshold (e.g., 12mm); and whether the actual line segment intersects with the line segment to be voted.
[0099] If the angle between the corresponding direction vectors is less than the second preset angle threshold, the corresponding maximum projection distance is less than the preset distance threshold, and the actual intersection segment intersects with the intersection segment to be voted, then it is determined that the intersection segment to be voted and the actual intersection segment share a common intersection line; otherwise, it is determined that the intersection segment to be voted does not share a common intersection line with the actual intersection segment.
[0100] Sub-step S242: If any line segment to be voted is detected to intersect with the actual line segment, the vote count of the line segment to be voted at the collinear voting device is incremented by one, and the original narrow plane forming the actual line segment is recorded in the narrow plane association set of the line segment to be voted.
[0101] In this embodiment, when a line segment to be voted is detected to intersect with the actual line segment, it indicates that the actual line segment actually belongs to the narrow plane intersection represented by the line segment to be voted. The actual line segment will cooperate with other actual line segments to jointly represent a narrow weld. At this time, the vote count of the line segment to be voted can be incremented at the collinear voting device, and the initial number of the original narrow plane forming the actual line segment is recorded in the narrow plane association set of the line segment to be voted.
[0102] Sub-step S243: If no line segment to be voted is detected to intersect with the actual line segment, the actual line segment is treated as a line segment to be voted at the collinear voting device. Then, the corresponding vote count is set to one, and the original narrow plane and the original reference plane that form the actual line segment are recorded one-to-one in the narrow plane association set and the reference plane association set of the line segment to be voted.
[0103] In this embodiment, when it is detected that no line segment to be voted intersects with the actual line segment, it indicates that the actual line segment does not actually belong to the same narrow plane intersection line as any of the recorded line segments to be voted at the collinear voting device. At this time, the actual line segment needs to be recorded as a separate line segment to be voted at the collinear voting device, and the initial number of the original narrow plane forming the actual line segment is recorded in the narrow plane association set of the newly recorded line segments to be voted. At the same time, the initial number of the original reference plane forming the actual line segment is recorded in the reference plane association set of the newly recorded line segments to be voted.
[0104] Therefore, by executing the above sub-steps S241 to S243, this application can accurately identify the narrow plane intersection status of all real intersection segments actually existing on the target weldment by utilizing the collinear voting mechanism of intersection segments, which facilitates further confirmation of the effective narrow planes that actually exist on the target weldment.
[0105] Alternatively, please refer to Figure 6 , Figure 6 yes Figure 2 The flowchart of step S240 includes the second sub-step. In this embodiment, the collinearity voting result of the intersection segments includes the voting count result of each of the intersection segments to be voted when the collinearity voter has traversed all real intersection segments. The step "integrating all original narrow planes into effective narrow planes according to the collinearity voting result to obtain at least one effective narrow plane" in step S240 may include sub-steps S245 to S248 to accurately identify the effective narrow planes that exist on the target weldment and can cooperate with other original reference planes to construct narrow welds.
[0106] Sub-step S245: For each line segment to be voted, check whether the vote count result corresponding to the line segment to be voted is greater than or equal to 2.
[0107] In this embodiment, for any intersection segment to be voted at the collinear voter, when the vote count of the intersection segment to be voted is greater than or equal to 2, it indicates that the narrow plane intersection corresponding to the intersection segment to be voted requires multiple original narrow planes to be represented by real intersection segments between each original reference plane. At this time, sub-step S246 can be executed. When the vote count of the intersection segment to be voted is less than 2 (i.e., the vote count of the voting intersection segment is 1), it indicates that the real intersection segment of the intersection segment to be voted represents a narrow plane intersection line on its own. At this time, sub-step S247 needs to be executed to determine whether the original narrow plane constituting the real intersection segment can be used as a valid narrow plane at the target weldment.
[0108] Sub-step S246: Perform plane merging on all the original narrow planes of the narrow plane association set record of the line segment to be voted, and take the merged narrow plane as a valid narrow plane.
[0109] In this embodiment, once a valid narrow plane matching the intersection segment to be voted (whose vote count is greater than or equal to 2) is determined, the original reference plane recorded in the reference plane association set of the intersection segment to be voted can be directly used as the target reference plane corresponding to the valid narrow plane, so that the valid intersection segment between the target reference plane and the valid narrow plane (which is formed by fitting the real intersection segment between each of the original narrow planes recorded in the corresponding narrow plane association set and the aforementioned original reference plane) is used as a narrow weld of the target weldment.
[0110] Sub-step S247: Perform narrow reliability verification on the original narrow plane that constitutes the line segment to be voted, and obtain the corresponding narrow reliability verification result.
[0111] In this embodiment, for a line segment to be voted with a vote count of 1, it can be determined whether the original narrow plane itself belongs to a valid narrow plane that actually exists on the target weldment by detecting whether the narrow plane feature of the original narrow plane constituting the line segment to be voted is sufficiently significant.
[0112] In one embodiment of this example, the step of "performing narrow reliability verification on the original narrow plane constituting the intersection segment to be voted" may include:
[0113] Detect whether the actual plane length of the original narrow plane is greater than or equal to a preset plane length threshold, and whether the actual number of point clouds on the original narrow plane is greater than or equal to a preset plane point count threshold;
[0114] If the actual plane length of the original narrow plane is greater than or equal to a preset plane length threshold, and the actual number of point clouds on the original narrow plane is greater than or equal to a preset plane point number threshold, then the verification of the original narrow plane is determined to be successful; otherwise, the verification of the original narrow plane is determined to be unsuccessful.
[0115] Specifically, when the actual plane length of the original narrow plane constituting the intersection segment to be voted (whose vote count result is 1) is greater than or equal to the preset plane length threshold, and the corresponding actual point cloud number is greater than or equal to the preset plane point number threshold, it indicates that the narrow plane feature of the original narrow plane constituting the intersection segment to be voted is sufficiently significant, and the original narrow plane itself is a valid narrow plane that actually exists on the target weldment.
[0116] Sub-step S248: If the narrow reliability verification result shows that the original narrow plane has been successfully verified, the original narrow plane constituting the intersection segment to be voted is directly regarded as a valid narrow plane.
[0117] In this embodiment, once a valid narrow plane matching the intersection segment to be voted (whose vote count is equal to 1) is determined, the original reference plane recorded in the reference plane association set of the intersection segment to be voted can be directly used as the target reference plane corresponding to the valid narrow plane, so that the valid intersection segment between the target reference plane and the valid narrow plane (i.e., the real intersection segment between these two planes) can be used as a narrow weld of the target weldment.
[0118] Therefore, by executing the above sub-steps S245 to S248, this application can accurately identify the effective narrow plane that actually exists on the target weldment and can cooperate with other original reference planes to construct narrow welds.
[0119] Step S250: The effective intersection segment between each effective narrow plane and the corresponding target reference plane is taken as a narrow weld seam of the target weldment.
[0120] In this embodiment, for each effective narrow plane, its corresponding target reference plane is the original reference plane that has at least one real intersection segment with the effective narrow plane. After all the effective narrow planes of the target weldment are determined based on the set of original narrow planes, the numbers of all the effective narrow planes, the original narrow planes in the set of original narrow planes that have not been integrated into effective narrow planes, and all the original reference planes in the set of original planes can be readjusted so that the actual numbers of each plane obtained by the readjustment can be used to describe each narrow weld actually existing on the target weldment (wherein, any narrow weld can be characterized by combining the actual numbers of the corresponding effective narrow planes and the target reference planes).
[0121] Therefore, by executing the above steps S210 to S250, this application can achieve a high-precision narrow weld seam recognition effect for the target weld based on the surface point cloud data of the target weld with a narrow planar structure, so as to effectively improve the overall recognition and positioning effect of the straight weld seam of the target weld.
[0122] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0123] Furthermore, the functional modules in the various embodiments of this application 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. If the various functions provided in this application are implemented in the form of software functional modules and sold or used as independent products, they can be stored in a storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, including several instructions to cause a computer device (e.g., a laptop computer, a welding robot equipped with a visual perception system, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned readable storage medium includes: USB flash drives, mobile hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.
[0124] The above descriptions are merely various embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for identifying narrow weld seams, characterized in that, The method includes: Acquire surface point cloud data of the target weldment, and perform planar detection on the surface point cloud data to obtain the original planar set of the target weldment; For each original plane in the original plane set, narrow plane identification is performed to obtain the original narrow plane set and the reference plane set; Traverse each original narrow plane in the set of original narrow planes and detect whether each original reference plane in the set of reference planes has a real intersection line segment with the original narrow plane. For each of the original narrow planes in the original narrow plane set, a collinearity voting process is performed on the actual intersection segments involved. Based on the collinearity voting results, all the original narrow planes are integrated into effective narrow planes to obtain at least one effective narrow plane. Each effective narrow plane and its corresponding target reference plane are used as a narrow weld seam of the target weldment, wherein the target reference plane is the original reference plane that has at least one real intersection line segment with the corresponding effective narrow plane. The step of voting on the collinearity of the actual intersection segments involved in each of the original narrow planes in the original narrow plane set includes: Iterate through each real intersection segment and perform common intersection detection on all the intersection segments to be voted recorded by the collinear voting device with the real intersection segment respectively; If any line segment to be voted is detected to intersect with the actual line segment, the vote count of the line segment to be voted at the collinear voting device is incremented by one, and the original narrow plane that forms the actual line segment is recorded in the narrow plane association set of the line segment to be voted. If no line segment to be voted is detected to intersect with the actual line segment, the actual line segment is treated as a line segment to be voted at the collinear voting device. Then, the corresponding vote count is set to one, and the original narrow plane and the original reference plane that form the actual line segment are recorded one-to-one in the narrow plane association set and the reference plane association set of the line segment to be voted.
2. The method according to claim 1, characterized in that, The step of identifying narrow planes for each original plane in the original plane set to obtain the original narrow plane set and the reference plane set includes: For each original plane, perform eigenvalue decomposition on the local point cloud covariance matrix corresponding to the original plane at the surface point cloud data to obtain the largest and second largest eigenvalues that match the original plane. Detect whether the second largest feature value is less than a preset plane width threshold, and whether the actual ratio between the largest feature value and the second largest feature value is greater than or equal to a preset ratio threshold; If the second largest feature value is detected to be less than the preset plane width threshold, and the actual ratio value is greater than or equal to the preset ratio threshold, then the original plane is added to the set of original narrow planes as an original narrow plane; otherwise, the original plane is added to the set of reference planes as an original reference plane.
3. The method according to claim 1, characterized in that, For any given original narrow plane, the step of detecting whether each original reference plane in the set of reference planes has a real intersection segment with the original narrow plane includes: Traverse each original reference plane in the set of reference planes and calculate the theoretical intersection line between the original reference plane and the original narrow plane. Detect whether the theoretical angle between the direction vector of the theoretical intersection line and the feature vector of the plane width of the original narrow plane is greater than a first preset angle threshold; If the theoretical angle is detected to be greater than the first preset angle threshold, it is determined that there is no real intersection segment between the original reference plane and the original narrow plane; otherwise, it is detected whether there is target point cloud data on the original reference plane, wherein the actual distance from each plane point in the target point cloud to the theoretical intersection line is within a preset distance range. If no target point cloud data is detected on the original reference plane, it is determined that there is no real intersection segment between the original reference plane and the original narrow plane; otherwise, it is determined that there is a real intersection segment between the original reference plane and the original narrow plane. In this case, the real intersection segment is a straight line segment fitted by the projection points of the target point cloud data on the original reference plane and all the plane points on the original narrow plane on the theoretical intersection line.
4. The method according to any one of claims 1-3, characterized in that, The step of performing common intersection detection between all the line segments to be voted recorded by the collinear voting device and the actual line segment includes: For each line segment to be voted, it is detected whether the angle between the direction vectors of the line segment to be voted and the actual line segment is less than a second preset angle threshold, whether the maximum projection distance from the actual line segment to the line segment to be voted is less than a preset distance threshold, and whether the actual line segment and the line segment to be voted intersect. If the angle between the corresponding direction vectors is less than the second preset angle threshold, the corresponding maximum projection distance is less than the preset distance threshold, and the actual intersection segment intersects with the intersection segment to be voted, then it is determined that the intersection segment to be voted and the actual intersection segment share a common intersection line; otherwise, it is determined that the intersection segment to be voted does not share a common intersection line with the actual intersection segment.
5. The method according to any one of claims 1-3, characterized in that, The collinear voting result of the intersecting line segments includes the voting count results of each of the intersecting line segments to be voted that have been recorded by the collinear voting device. The step of integrating all the original narrow planes into effective narrow planes based on the collinear voting result to obtain at least one effective narrow plane includes: For each line segment to be voted, check whether the vote count corresponding to that line segment is greater than or equal to 2; If the vote count result corresponding to the line segment to be voted is greater than or equal to 2, all the original narrow planes recorded in the narrow plane association set of the line segment to be voted are merged, and the merged narrow plane is taken as a valid narrow plane. At this time, the original reference plane recorded in the reference plane association set of the line segment to be voted is taken as the target reference plane corresponding to the valid narrow plane.
6. The method according to claim 5, characterized in that, The step of integrating all the original narrow planes into effective narrow planes based on the collinearity voting results of the intersecting line segments to obtain at least one effective narrow plane further includes: If the vote count result corresponding to the line segment to be voted is less than 2, the original narrow plane constituting the line segment to be voted is subjected to narrow reliability verification to obtain the corresponding narrow reliability verification result. If the narrow reliability verification result is that the original narrow plane is successfully verified, the original narrow plane constituting the intersection segment to be voted is directly regarded as a valid narrow plane. At this time, the original reference plane recorded in the reference plane association set of the intersection segment to be voted is regarded as the target reference plane corresponding to the valid narrow plane.
7. The method according to claim 6, characterized in that, The step of performing narrow reliability verification on the original narrow plane constituting the intersection segment to be voted includes: Detect whether the actual plane length of the original narrow plane is greater than or equal to a preset plane length threshold, and whether the actual number of point clouds on the original narrow plane is greater than or equal to a preset plane point count threshold; If the actual plane length of the original narrow plane is greater than or equal to a preset plane length threshold, and the actual number of point clouds on the original narrow plane is greater than or equal to a preset plane point number threshold, then the verification of the original narrow plane is determined to be successful; otherwise, the verification of the original narrow plane is determined to be unsuccessful.
8. A computer device, characterized in that, It includes a processor and a memory, the memory storing a computer program that can be executed by the processor to implement the narrow weld seam identification method according to any one of claims 1-7.
9. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a computer device, it implements the narrow weld seam identification method according to any one of claims 1-7.
Citation Information
Patent Citations
Method and device for extracting plane features of multi-line LiDAR point cloud data
CN112232248A
Linear welding seam extraction method and device and electronic equipment
CN119180796A