System and method for phased detection and quantitative measurement of weld defect morphology
By employing phased adaptive dimensionality processing and adaptive order polynomial fitting, the problems of low detection accuracy and low computational efficiency in 3D laser point cloud weld inspection are solved, enabling high-precision quantitative measurement and real-time detection of weld defects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUZHOU UNIV OF SCI & TECH
- Filing Date
- 2026-05-21
- Publication Date
- 2026-06-23
AI Technical Summary
Existing 3D laser point cloud weld inspection technology suffers from low detection accuracy, poor anti-interference ability, and low computational efficiency, and cannot meet the needs of industrial sites for graded control of welding quality and guidance on defect repair.
A phased adaptive dimension processing strategy is adopted, and the weld region is quickly extracted by mapping the Z component of the normal vector. Combined with the hump defect detection module and the porosity and bulge defect detection module, defect detection is performed by using the weld centerline height curve and curvature-driven region growth respectively. An ideal reference surface with adaptive order polynomial fitting is constructed for quantitative evaluation.
It achieves high-precision quantitative measurement of weld defects, reduces false detection rate, improves detection accuracy and calculation efficiency, and meets the real-time requirements of industrial sites.
Smart Images

Figure CN122265274A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a system and method for staged detection and quantitative measurement of weld defects based on three-dimensional laser point clouds, which is used for the detection of surface defects and quantitative measurement of geometric morphology of welds, and belongs to the field of intelligent detection technology for industrial welding quality. Background Technology
[0002] In recent years, the requirements for the service safety of welded structures in high-end equipment manufacturing, rail transportation, pressure vessels, and shipbuilding have been continuously increasing. Accurate identification and quantitative assessment of weld defects are core aspects of welding quality control. Traditional methods such as manual visual inspection and contact micrometer measurement suffer from drawbacks such as low efficiency, high subjectivity, and inability to fully characterize the three-dimensional spatial features of defects, making them insufficient to meet the automated inspection needs of modern industrial production lines. Non-contact inspection technology based on machine vision has become the mainstream development direction in the industry. Among these, three-dimensional laser point cloud technology can directly acquire the full-space morphological information of the weld, effectively overcoming the shortcomings of two-dimensional visual inspection in losing depth information, and is currently a core research hotspot in the field of intelligent weld inspection.
[0003] Currently, weld defect detection technology based on 3D laser point clouds mainly falls into two mainstream technical routes:
[0004] Dimensionality reduction mapping detection converts a 3D point cloud into a 2D height map, grayscale map, or depth map, and then uses mature 2D image processing algorithms (such as threshold segmentation, edge detection, and deep learning object detection) to achieve defect identification. Its advantages lie in low computational complexity and fast processing speed, making it suitable for the real-time requirements of industrial environments. However, this method has inherent technical drawbacks: the 3D-to-2D dimensionality reduction process irreversibly loses the depth geometric details of minute defects, making it easy to miss sub-millimeter-level defects such as porosity and microcracks; simultaneously, the projection process can confuse features at different heights, making it impossible to distinguish between normal surface undulations and actual defects in welds, resulting in a high false detection rate.
[0005] Direct 3D analytical detection directly segments and identifies defects in 3D point cloud space based on geometric features such as the normal vector, curvature, and density of the point cloud, avoiding information loss caused by dimensionality reduction. However, this method also has significant shortcomings: it has extremely poor resistance to interference from noise commonly found on weld surfaces, such as fish-scale patterns, welding spatter, and surface roughness. These normal surface undulations can produce geometric feature responses similar to real defects, leading to a large number of false detections. In addition, the inherent "short-range redundancy and long-range sparsity" characteristics of laser point clouds can lead to an imbalance between positive and negative samples in the detection model, further reducing detection accuracy. Moreover, the high complexity of pure 3D computation makes it difficult to meet the cycle time requirements of industrial production lines.
[0006] In addition to the individual shortcomings of the two types of technologies mentioned above, existing technologies share a common weakness: the vast majority of research focuses only on the qualitative identification of defects (i.e., determining "the presence or absence of defects" and "the type of defects"), with a serious lack of research on high-precision quantitative measurement of weld defect geometric parameters. Existing quantitative measurement methods mostly employ simple global reference surface fitting, which cannot accurately construct a defect-free ideal reference surface for the defect region. This results in large measurement errors for key quantitative parameters such as the maximum height deviation, projected area, and volume of defects, failing to meet the quantitative assessment needs of industrial sites for welding quality grading and control, defect repair guidance, and product traceability.
[0007] Therefore, there is a need to develop a laser weld seam three-dimensional point cloud detection method that can simultaneously take into account detection accuracy, anti-interference ability, and computational efficiency, and can achieve quantitative measurement of defects at the industrial level. Summary of the Invention
[0008] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a system and method for staged detection and quantitative measurement of weld defects based on three-dimensional laser point clouds.
[0009] The objective of this invention is achieved through the following technical solution:
[0010] The system for phased detection and quantitative measurement of weld defects is characterized by including a weld area extraction module, a hump defect detection module, a porosity and bulge defect detection module, and a defect quantitative assessment module.
[0011] The weld seam region extraction module is used to receive the original scanned point cloud, calculate the normal vector and curvature features of the point cloud, and perform accurate separation of the weld seam and the substrate background based on the normal vector Z component mapping to obtain the three-dimensional point cloud of the weld seam region, the corresponding two-dimensional mask and the curvature information of each point.
[0012] The hump defect detection module is used to receive the point cloud and two-dimensional mask of the weld area, and to accurately locate and segment the hump defects that are continuously distributed along the weld in one dimension, based on the weld centerline height curve and joint evaluation index.
[0013] The porosity and bulge defect detection module is used to receive point cloud and curvature information of the weld area. For porosity and bulge defects with local three-dimensional discrete distribution, curvature-driven region growth combined with height feature filtering is used to detect defects and determine their types.
[0014] The defect quantitative assessment module is used to summarize the point cloud of all defect areas, reconstruct the defect-free ideal reference surface through adaptive order polynomial cross-section fitting, and calculate the three core geometric parameters of the defect: maximum height deviation, projected area, and volume.
[0015] Furthermore, in the aforementioned phased detection and quantitative morphology measurement system for weld defects, the weld region extraction module constructs a K-dimensional tree index, searches for the k nearest neighbor set of each point in the original point cloud, and calculates the normal vector and surface curvature of each point through eigenvalue decomposition of the neighborhood covariance matrix. Then, a sensor viewpoint constraint is introduced to unify the direction of all normal vectors to point towards the sensor side. The Z-component of the normal vector of the 3D point cloud is further mapped to a 2D grayscale image, where the grayscale value of each pixel is the scaling result of the Z-component of the normal vector of the corresponding point. Threshold segmentation is performed on the 2D grayscale image to initially separate the weld region from the substrate background. Morphological optimization of the segmentation results is performed sequentially using erosion, dilation, opening, and closing operations to remove discrete noise and improve boundary continuity, resulting in a 2D mask of the weld region. Through coordinate inverse mapping, the 2D mask of the weld region is mapped back to the original 3D point cloud space, and the 3D point cloud of the weld region is extracted.
[0016] Furthermore, in the aforementioned phased detection and quantitative morphology measurement system for weld defects, the hump defect detection module extracts the weld region skeleton using a morphological refinement algorithm on a two-dimensional mask of the weld region, and performs pruning to remove short burr branches at the ends, obtaining a single-pixel continuous weld centerline; then, through coordinate inverse mapping, the two-dimensional weld centerline is projected onto a three-dimensional point cloud space to obtain a three-dimensional coordinate sequence of the centerline; further, a height distribution curve along the welding direction is constructed using the cumulative horizontal projection distance of adjacent points on the centerline as the horizontal axis and the height value of the corresponding point as the vertical axis; the RANSAC algorithm is used to fit the ideal height baseline of the height distribution curve, the local height deviation of each point is calculated, and the local arc of each point is fitted to obtain the corresponding radius of curvature; the height deviation and radius of curvature are fused to construct a joint evaluation index, the calculation formula of which is:
[0017]
[0018] in, For nodes Height deviation at the location, Let be the radius of curvature at that point. and The weighting coefficients for the two features are defined; a joint evaluation index threshold is set, and all nodes are traversed along the center line. Intervals that are continuously higher than the threshold are identified as hump defect regions, and the corresponding hump defect point cloud is extracted through coordinate mapping.
[0019] Furthermore, in the aforementioned phased detection and quantitative measurement system for weld defects, the porosity and bulge defect detection module preprocesses the point cloud of the weld region, removing discrete noise points and downsampling to simplify the data. Then, based on the curvature information generated by the weld region extraction module, all points are sorted in ascending order of curvature value, and the point with the smallest curvature is selected as the initial growth seed. A region growth algorithm is further executed with dual constraints of normal vector angle and curvature: if the normal vector angle between a candidate point and the current seed point is less than a smoothness threshold, the candidate point is merged into the current region; if the merged candidate point... If the curvature of a point is less than the curvature threshold, it is added to the seed set and expanded outward. For all candidate abnormal regions obtained by segmentation, the local reference plane of its neighborhood is fitted, and the signed distance from each point in the region to the plane is calculated to obtain the maximum height difference of the region. A height difference threshold is set, and pseudo-defect regions with a maximum height difference less than the threshold are eliminated. The type is determined according to the concavity and convexity relationship of the point cloud in the remaining defect region relative to the local reference plane. If the overall appearance is positively convex, it is determined to be a bulge defect, and if the overall appearance is negatively concave, it is determined to be a porosity defect. The corresponding defect point cloud and type information are obtained.
[0020] Furthermore, in the aforementioned phased detection and quantitative morphology measurement system for weld defects, the defect quantitative assessment module locates the start and end positions of each defect region along the weld centerline, and selects five equally spaced healthy cross-sectional point cloud slices at each end of the defect region; then, a local two-dimensional coordinate system is established with the intersection of the centerline and each cross-section as the origin, converting the three-dimensional cross-sectional point cloud into two-dimensional contour data; further, an adaptive order polynomial is used to fit the contour of each healthy cross-section: a second-order polynomial is used for fitting, and the fitting residual is calculated; if the residual is greater than the accuracy threshold, the polynomial order is gradually increased until the lowest order fitting result that meets the accuracy requirements is obtained; Then, using the centerline height information of the normal regions on both sides of the defect, interpolation fitting is performed to obtain the theoretical centerline height corresponding to each longitudinal position within the defect region. Subsequently, combining the fitted profile of each cross-section with the theoretical centerline height, the defect-free ideal reference surface of the defect region is reconstructed. The spatial positional relationship between the real defect point cloud and the ideal reference surface is compared to finally confirm the defect type, and the following three core geometric parameters are calculated: maximum height deviation, which is the maximum difference between the theoretical height and the real height within the defect region; projected area, which is the number of point clouds within the defect region multiplied by the area of a single sampling grid; and volume, which is obtained by discrete integration of the height difference between the theoretical surface and the real surface.
[0021] This invention provides a method for phased detection and quantitative measurement of weld defects. Using the original scanned point cloud as input, a weld region extraction module precisely separates the weld from the substrate background. Utilizing the difference in the Z-axis component of the surface normal vector between the weld protrusion area and the flat substrate, the normal vector and curvature features of the point cloud are first calculated. Then, the Z-axis component of the normal vector is mapped into a two-dimensional grayscale image. After threshold segmentation and morphological optimization of the generated two-dimensional grayscale image, a three-dimensional point cloud of the weld region, the corresponding two-dimensional mask, and the curvature information of each point are obtained.
[0022] The hump defect detection module and the porosity and bulge defect detection module utilize the different feature information obtained above for targeted detection. For hump defects that exhibit drastic fluctuations in height and width along the weld direction, the hump defect detection module extracts the weld centerline based on a two-dimensional mask and constructs a height curve along the welding direction by combining the weld point cloud height information. A robust ideal height baseline is fitted using the RANSAC algorithm, and a joint evaluation index is constructed by fusing height deviation and local curvature radius to achieve accurate positioning of the hump region. For porosity and bulge defects that exhibit significant three-dimensional curvature anomalies, the porosity and bulge defect detection module reuses the curvature information output by the weld region extraction module, uses high curvature points as seeds for region growth, and initially segments candidate abnormal regions. The normal fish scale pattern undulation interference on the weld surface is removed by height feature filtering, and the defect type is determined based on the concavity and convexity relationship of the defect region relative to the local fitted plane.
[0023] The defect quantitative assessment module summarizes the point clouds of all defect regions output by the hump defect detection module and the pore and bulge defect detection module. Several healthy cross sections are selected from both ends of the defect for adaptive polynomial fitting to reconstruct the defect-free ideal reference surface of the defect region. By calculating the area difference, volume difference and maximum height deviation between the actual surface and the theoretical surface, the type and core geometric parameters of each defect are finally obtained, realizing the quantitative characterization of the defect severity.
[0024] Furthermore, in the aforementioned method for phased detection and quantitative measurement of weld defects, the hump defect detection module integrates a joint evaluation index of height deviation and local curvature radius construction, specifically as follows:
[0025] Constructing a joint evaluation index for hump defects The calculation formula is as follows:
[0026]
[0027] in, The first on the center line of the weld Local height deviation at each node Let be the local radius of curvature of the height distribution curve at this node. and These are the weighting coefficients for the height deviation term and the curvature term, respectively;
[0028] Based on the normal fluctuation range of the joint indicators in the defect-free weld samples, a defect segmentation threshold is set. ; Traverse all nodes along the weld centerline, when The time markers are used as candidate defect points, and the intervals that are continuously higher than the threshold are identified as hump defect areas;
[0029] The weighting coefficients are taken as the optimal values verified by industrial sample experiments: , .
[0030] Furthermore, the aforementioned method for phased detection and quantitative measurement of weld defects includes a defect quantitative assessment module that selects several healthy cross-sections from both ends of the defect for adaptive polynomial fitting to reconstruct a defect-free ideal reference surface and calculate core geometric parameters. Specifically, this includes the following steps:
[0031] S1 Locate the start and end positions of each defect area along the weld centerline, and select 5 equally spaced healthy cross-sectional point cloud slices at each end of the defect area.
[0032] S2 establishes a local two-dimensional coordinate system with the intersection of the centerline and each cross-section as the origin, and converts the three-dimensional cross-sectional point cloud into two-dimensional contour data;
[0033] S3 uses an adaptive order polynomial to fit the contour of each healthy cross section. It first performs an initial fitting with a second-order polynomial and calculates the residual between the fitted curve and the actual cross section points. If the residual is greater than the accuracy threshold, the order of the polynomial is gradually increased until the lowest order fitting result that meets the accuracy requirements is obtained.
[0034] S4 uses the centerline height information of the normal areas on both sides of the defect to perform linear interpolation, obtaining the theoretical centerline height corresponding to each longitudinal position within the defect area. ;
[0035] S5 combines the fitted profiles of each cross section with the theoretical height of the centerline to reconstruct the defect-free ideal reference surface of the defect region. The formula for calculating the theoretical height of any point is as follows:
[0036]
[0037] in, The signified lateral distance from this point to the center line. This is the polynomial fitting function for the corresponding cross section;
[0038] S6 calculates the three core geometric parameters of the defect:
[0039] Maximum height deviation: ,in This is the actual height of that point;
[0040] Projected area: ,in The actual area corresponding to the unit sampling grid. This represents the total number of pixels in the defective area.
[0041] volume: ,in This represents the total number of point clouds within the defective region.
[0042] Furthermore, in the aforementioned method for staged detection and quantitative measurement of weld defects, the calculation of the normal vector and curvature characteristics of the point cloud specifically involves:
[0043] Construct a Kd-tree index to search the set of k nearest neighbors for each point in the original point cloud, and solve the normal vector and surface curvature by eigenvalue decomposition of the neighborhood covariance matrix.
[0044] Neighborhood covariance matrix The calculation formula is:
[0045]
[0046] For covariance matrix Eigenvalue decomposition yields three eigenvalues. and its corresponding eigenvectors Take the eigenvector corresponding to the smallest eigenvalue. As a point initial normal vector ;
[0047] Surface curvature Calculated using the ratio of eigenvalues:
[0048]
[0049] Introducing a unified normal vector direction for sensor viewpoint constraints, let the sensor viewpoint coordinates be... ,
[0050] like Then invert the normal vector to This ensures that all normal vectors point to the same side of the sensor.
[0051] Furthermore, in the aforementioned method for staged detection and quantitative measurement of weld defects, the normal vector Z component is mapped to a two-dimensional grayscale image, and the generated two-dimensional grayscale image is subjected to threshold segmentation and morphological optimization, specifically as follows:
[0052] For any point in a 3D point cloud According to its , Calculate the corresponding pixel index for coordinates and The calculation formula is:
[0053] ,
[0054] in, and These represent the point cloud sequences in direction and Minimum coordinate value in the direction, and This refers to the physical sampling interval of the line laser scanner in the corresponding direction;
[0055] grayscale value of this pixel position Assigned as normal vector Component scaling results:
[0056]
[0057] in, For point The component of the normal vector in the Z direction;
[0058] Morphological processing, including threshold segmentation, erosion, dilation, opening, and closing operations, is performed sequentially on the generated two-dimensional grayscale image to remove discrete noise and improve boundary continuity, thereby obtaining a two-dimensional mask of the weld area.
[0059] Furthermore, the aforementioned method for phased detection and quantitative measurement of weld defects, specifically employing high-curvature points as seeds for region growth, involves:
[0060] Based on the curvature information output by the weld area extraction module, all points in the weld area are sorted in ascending order of curvature value, and the point with the smallest curvature is taken as the initial growth seed.
[0061] The region growing algorithm is executed under the dual constraints of the angle between the normal vectors and the curvature.
[0062] 1) If the angle between the normal vector of the candidate point and the current seed point is less than the smoothness threshold That is, satisfying If so, then the candidate point will be merged into the current region;
[0063] 2) If the curvature of the candidate points to be incorporated is less than the curvature threshold That is, satisfying If it is, then add it to the seed set as a new growth point to expand outward;
[0064] 3) Once all points in the seed set have completed neighborhood testing, select the point with the smallest curvature from the remaining unclassified points as a new seed, and repeat the above process until all points have been classified.
[0065] Furthermore, in the above-mentioned method for phased detection and quantitative measurement of weld defects, the normal fish-scale pattern undulation interference on the weld surface is eliminated by height feature filtering, and the local reference plane of its neighborhood is fitted by least squares method for each candidate abnormal region obtained by region growth segmentation.
[0066] Calculate the signed distance from each point within the candidate region to the plane, and define the maximum height difference within the region. for:
[0067]
[0068] in, and These are the maximum and minimum signed distances from all points within the region to the local reference plane, respectively.
[0069] Set height difference threshold Remove The low-ripple pseudo-defect region;
[0070] The type of the retained defect area is determined as follows: if the signed distance of most points in the area is positive and the whole area is above the reference plane, it is determined to be a bulge defect; if the signed distance of most points is negative and the whole area is below the reference plane, it is determined to be a porosity defect.
[0071] Compared with the prior art, the present invention has significant advantages and beneficial effects, specifically reflected in the following aspects:
[0072] ① This invention adopts a phased adaptive dimensional processing strategy. First, it quickly extracts the weld area and removes more than 90% of the substrate background interference through two-dimensional mapping of the Z component of the normal vector. Then, it adopts one-dimensional curve analysis (hump) and three-dimensional geometric analysis (porosity, bulge) respectively for the spatial distribution characteristics of different defects, fundamentally solving the contradiction of "loss of details in dimensional reduction and low efficiency in three dimensions", and achieving simultaneous improvement of detection accuracy and calculation efficiency.
[0073] ② The differentiated detection architecture based on defect geometric features breaks through the limitations of a single general detection strategy: For hump defects that are continuously distributed in one dimension along the weld, a detection method of centerline height curve + joint evaluation index is adopted; for porosity and bulge defects that are locally distributed in three dimensions, a detection method of curvature-driven region growth + height feature filtering is adopted, which significantly improves the comprehensive detection accuracy and anti-interference ability of multiple types of defects.
[0074] ③ Construct an ideal reference surface reconstruction method based on adaptive order polynomial cross-section fitting. Utilize the local cross-sectional profile of the normal weld at both ends of the defect, and construct a defect-free theoretical reference surface through adaptive order fitting and spatial interpolation to replace the traditional global reference surface fitting. This solves the problem of large quantitative measurement error caused by local morphological changes in the weld and achieves industrial-grade high-precision quantification of the maximum height deviation, projected area, and volume of the defect.
[0075] ④ By switching dimensions in stages, the problem of losing sub-millimeter-level defect depth information in the dimensionality reduction mapping method is avoided, and the scope of pure three-dimensional calculation is reduced to only the weld area, reducing the amount of calculation by about 60% compared with the traditional direct three-dimensional analytical method; for the noise such as fish scale pattern, micro spatter, and surface roughness that are common on the weld surface, the false detection rate is reduced to 8.6% through the dual mechanism of "geometric feature initial screening + height feature secondary verification"; and the local section fitting method can accurately restore the local morphological changes of the weld.
[0076] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing specific embodiments of the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings. Attached Figure Description
[0077] To more clearly illustrate the technical solutions of the embodiments of the present invention, 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 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.
[0078] Figure 1 : Module architecture diagram of the present invention;
[0079] Figure 2 : Schematic diagram of the weld seam area extraction module;
[0080] Figure 3 : Flowchart of the hump defect detection module;
[0081] Figure 4 : Flowchart of the porosity and bulge defect detection module;
[0082] Figure 5 : Flowchart of the defect quantitative assessment module;
[0083] Figure 6 : Rendering of the extracted weld area;
[0084] Figure 7 : Result of extracting the centerline of the weld;
[0085] Figure 8 : Fitting effect diagram of the cross-section of the defect area;
[0086] Figure 9 Comparison of 3D surface reconstruction of defect areas;
[0087] Figure 10 : 3D visualization of multi-type defect detection results; Detailed Implementation
[0088] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0089] It should be noted that similar reference numerals 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. Furthermore, in the description of this invention, directional and ordinal terms are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0090] like Figure 1 As shown, the phased detection and quantitative measurement system for weld defects includes a weld area extraction module 1, a hump defect detection module 2, a porosity and bulge defect detection module 3, and a defect quantitative assessment module 4.
[0091] The weld seam region extraction module 1 is used to receive the original scanned point cloud, construct a Kd tree index to calculate the normal vector and surface curvature of each point, introduce sensor viewpoint constraints to unify the normal vector direction, map the Z component of the normal vector into a two-dimensional grayscale image, obtain a two-dimensional mask of the weld seam region through threshold segmentation and morphological optimization, and extract the three-dimensional point cloud of the weld seam region through coordinate inverse mapping.
[0092] The hump defect detection module 2 receives the point cloud and two-dimensional mask of the weld area, performs morphological refinement and pruning on the two-dimensional mask to obtain a single-pixel continuous weld centerline, and generates a three-dimensional centerline coordinate sequence through inverse mapping; constructs a height distribution curve along the welding direction, uses the RANSAC algorithm to fit the ideal height baseline, and integrates the height deviation and curvature radius to construct a joint evaluation index to achieve accurate positioning and segmentation of hump defects.
[0093] The porosity and bulge defect detection module 3 is used to receive point cloud and curvature information of the weld area. It uses the minimum curvature point as the initial seed and adopts a region growth algorithm with dual constraints of normal vector angle and curvature to segment the high curvature abnormal area. It removes fish scale pattern and spatter pseudo-defects by fitting the local reference plane and filtering the height feature. It distinguishes porosity and bulge defects according to the concave-convex relationship between the point cloud and the reference plane.
[0094] The defect quantitative assessment module 4 is used to summarize the point cloud of all defect areas, select 5 equally spaced healthy cross sections at each end of the defect, and use an adaptive order polynomial to fit the cross section profile; combined with centerline height interpolation, it reconstructs the defect-free ideal reference surface and calculates the three core geometric parameters of the defect: maximum height deviation, projected area, and volume.
[0095] like Figure 2 As shown, the weld region extraction module 1 first constructs a K-dimensional tree index to search the k nearest neighbor set of each point in the original point cloud. It then calculates the normal vector and surface curvature of each point through eigenvalue decomposition of the neighborhood covariance matrix. Next, it introduces sensor viewpoint constraints to unify the direction of all normal vectors towards the sensor side. Further, it maps the Z-component of the normal vector of the 3D point cloud to a 2D grayscale image, where the grayscale value of each pixel is the scaling result of the Z-component of the normal vector of the corresponding point. Threshold segmentation is performed on the 2D grayscale image to initially separate the weld region from the substrate background. Morphological optimization of the segmentation results is then performed sequentially using erosion, dilation, opening, and closing operations to remove discrete noise and improve boundary continuity, resulting in a 2D mask of the weld region. Through coordinate inverse mapping, the 2D mask of the weld region is mapped back to the original 3D point cloud space, extracting the 3D point cloud of the weld region. The effect of weld region extraction is shown in the figure. Figure 6 As shown.
[0096] like Figure 3 The hump defect detection module 2 first uses a morphological refinement algorithm to extract the weld region skeleton from the two-dimensional mask of the weld region, and then performs pruning to remove short burr branches at the ends, resulting in a single-pixel continuous weld centerline. Next, through coordinate inverse mapping, the two-dimensional weld centerline is projected onto a three-dimensional point cloud space to obtain a three-dimensional coordinate sequence of the centerline. Further, a height distribution curve along the welding direction is constructed using the cumulative horizontal projection distance between adjacent points on the centerline as the horizontal axis and the height of the corresponding point as the vertical axis. The RANSAC algorithm is used to fit the ideal height baseline of the height distribution curve, calculate the local height deviation at each point, and fit the local arc at each point to obtain the corresponding radius of curvature. Finally, the height deviation and radius of curvature are fused to construct a joint evaluation index, the calculation formula of which is:
[0097]
[0098] in, For nodes Height deviation at the location, Let be the radius of curvature at that point. and The weighting coefficients for the two features are defined; a joint evaluation index threshold is set, and all nodes are traversed along the center line. Intervals that are continuously higher than the threshold are identified as hump defect regions, and the corresponding hump defect point cloud is extracted through coordinate mapping.
[0099] like Figure 4 The porosity and bulge defect detection module 3 first preprocesses the point cloud of the weld area, removing discrete noise points and downsampling to simplify the data. Then, based on the curvature information output by the weld area extraction module, all points are sorted in ascending order of curvature value, and the point with the smallest curvature is taken as the initial growth seed. Further, a region growth algorithm is executed with the normal vector angle and curvature as dual constraints: if the normal vector angle between the candidate point and the current seed point is less than the smoothness threshold, the candidate point is merged into the current region; if the curvature of the merged candidate point is less than the curvature threshold, it is added to the seed set and continues to expand outward. For all the segmented candidate abnormal regions, the local reference plane of its neighborhood is fitted, and the signed distance from each point in the region to the plane is calculated to obtain the maximum height difference of the region. A height difference threshold is set, and pseudo-defect regions with a maximum height difference less than the threshold are eliminated. The type is determined according to the concavity and convexity relationship of the point cloud in the remaining defect region relative to the local reference plane. The overall appearance is positively convex and determined as a bulge defect, and the overall appearance is negatively concave and determined as a porosity defect, thus obtaining the corresponding defect point cloud and type information.
[0100] like Figure 5 The defect quantitative assessment module 4 first locates the start and end positions of each defect region along the weld centerline, and selects five equally spaced healthy cross-sectional point cloud slices at each end of the defect region. Then, a local two-dimensional coordinate system is established with the intersection of the centerline and each cross-section as the origin, converting the three-dimensional cross-sectional point cloud into two-dimensional contour data. Further, an adaptive order polynomial is used to fit the contour of each healthy cross-section: a second-order polynomial is used for fitting, and the fitting residual is calculated. If the residual is greater than the accuracy threshold, the polynomial order is gradually increased until the lowest order fitting result that meets the accuracy requirements is obtained. Then, the centerline height information of the normal regions on both sides of the defect is used for interpolation fitting to obtain the theoretical height of the centerline corresponding to each longitudinal position in the defect region. Subsequently, the fitted contour of each cross-section and the theoretical height of the centerline are combined to reconstruct the defect-free ideal reference surface of the defect region. The spatial positional relationship between the real defect point cloud and the ideal reference surface is compared to finally confirm the defect type and calculate the following three core geometric parameters: maximum height deviation, i.e., the maximum difference between the theoretical height and the real height in the defect region; projected area, i.e., the number of point clouds in the defect region multiplied by the area of a single sampling grid; and volume, i.e., obtained by discrete integration of the height difference between the theoretical surface and the real surface.
[0101] On the one hand, it solves the technical contradiction in current three-dimensional laser weld inspection technology, where the dimension reduction mapping method easily loses the geometric details of the depth of tiny defects, resulting in a high rate of missed detection, while the direct three-dimensional analysis method has poor resistance to fish scale patterns and spatter noise and high computational complexity, and cannot simultaneously take into account the technical contradictions of detection accuracy, anti-interference ability and industrial real-time requirements.
[0102] On the other hand, it solves the technical problem that the existing technology adopts a single general detection strategy and fails to distinguish the geometric feature differences of the three types of defects, namely hump, porosity and bulge (one-dimensional continuous distribution along the weld vs. local three-dimensional discrete distribution), which leads to low comprehensive detection accuracy of multiple types of defects and uneven false detection and missed detection.
[0103] It also addresses the technical problem that existing quantitative defect measurement methods rely on fitting a global reference surface, which cannot accurately construct a defect-free ideal reference surface for the defect area. This results in large measurement errors for the three core quantitative parameters of maximum defect height deviation, projected area, and volume, failing to meet the needs of industrial on-site welding quality grading control and defect repair guidance.
[0104] The original scanned point cloud is preprocessed to calculate the normal vector and curvature features. Based on the Z-component mapping of the normal vector, the weld area and the substrate background are accurately separated. The two-dimensional skeleton of the weld area is extracted and pruned for optimization to generate a continuous and smooth three-dimensional weld centerline. The defect area is located along the weld centerline, and five equally spaced healthy cross-sectional point cloud slices are selected at each end of the defect. The three-dimensional cross-sectional point cloud is converted into contour data in a local two-dimensional coordinate system, and the normal weld cross-sectional shape is fitted using an adaptive order polynomial. Interpolation is performed using the centerline height information of the normal areas on both sides of the defect, and the defect-free ideal reference surface of the defect area is reconstructed by combining the cross-sectional fitting results. The spatial positional relationship between the actual point cloud and the ideal reference surface is compared, and the maximum height deviation, projected area, and volume of the defect are calculated. The type information and geometric parameters of all defects are obtained, and the quantitative assessment of weld quality is completed.
[0105] In practical applications, the original scanned point cloud is used as input. The weld seam extraction module 1 performs precise separation between the weld seam and the substrate background. By utilizing the difference between the weld seam protrusion area and the flat substrate on the Z-axis component of the surface normal vector, the normal vector and curvature of the point cloud are first calculated, and then the Z-component of the normal vector is mapped into a two-dimensional grayscale image. After threshold segmentation and morphological optimization, the three-dimensional point cloud of the weld seam area, the corresponding two-dimensional mask, and the curvature information of each point are output.
[0106] The hump defect detection module 2 and the porosity and bulge defect detection module 3 utilize the different feature information obtained above for targeted detection. For hump defects that exhibit drastic fluctuations in height and width along the weld direction, the hump defect detection module 2 extracts the weld centerline based on a two-dimensional mask and constructs a height curve along the welding direction by combining the weld point cloud height information. It uses the RANSAC algorithm to fit a robust ideal height baseline and integrates height deviation and local curvature radius to construct a joint evaluation index, thereby achieving accurate positioning of the hump region. For porosity and bulge defects that exhibit significant three-dimensional curvature anomalies locally, the porosity and bulge defect detection module 3 reuses the curvature information output by the weld region extraction module 1, uses high curvature points as seeds for region growth, and initially segments candidate abnormal regions. It removes interference from normal fish scale texture undulations on the weld surface through height feature filtering and completes the defect type determination based on the concave-convex relationship of the defect region relative to the local fitting plane.
[0107] Finally, the defect quantitative assessment module 4 summarizes the point clouds of all defect regions output by the hump defect detection module 2 and the pore and bulge defect detection module 3, selects several healthy cross sections from both ends of the defect for adaptive polynomial fitting, and reconstructs the defect-free ideal reference surface of the defect region accordingly; by calculating the area difference, volume difference and maximum height deviation between the actual surface and the theoretical surface, the type and core geometric parameters of each defect are finally obtained, realizing the quantitative characterization of the severity of the defect.
[0108] Example
[0109] Using laser-filled wire welding weld samples collected from actual industrial sites, this paper details the process of quantitative defect assessment and processing.
[0110] The experimental platform used is as follows: the welding execution unit is a Fanuc M-20iD / 25 six-axis industrial robot, and the 3D scanning and detection unit is a SICK Ruler XR100 line laser 3D camera with a Z-axis resolution of 40μm and an X-axis resolution of 5μm. The welding process parameters are: laser power 12.5kW, welding speed 3.5m / min, filler wire speed 0.232m / min, forging pressure 0.133kPa, and the workpiece to be welded is a 3.5mm thick butt-welded steel plate with a plate width of 1665mm.
[0111] Step 1: Extraction of weld area
[0112] First, the original scanned point cloud is preprocessed to separate the weld seam area from the substrate background:
[0113] A Kd-tree index is constructed to search for the 15 nearest neighbors of each point. The normal vector and surface curvature of each point are calculated by eigenvalue decomposition of the neighborhood covariance matrix. Sensor viewpoint constraints are introduced to unify the direction of all normal vectors to point to the sensor side.
[0114] The normal vector Z component of the 3D point cloud is mapped to a 2D grayscale image with a grayscale value range of 0~255;
[0115] The Otsu adaptive thresholding method is used to perform preliminary segmentation of the two-dimensional grayscale image. Morphological optimization is then performed sequentially by erosion, dilation, opening and closing operations to remove discrete noise and improve boundary continuity, thus obtaining a two-dimensional mask of the weld area.
[0116] By inversely mapping coordinates, the two-dimensional mask of the weld area is mapped back to the original three-dimensional point cloud space, and the three-dimensional point cloud of the weld area is extracted.
[0117] The extraction effect of the weld area is shown in Figure 6.
[0118] Step 2: Generation of weld centerline
[0119] Based on the two-dimensional mask of the weld area obtained above, the three-dimensional centerline of the weld is generated:
[0120] A fast parallel morphological thinning algorithm is used to extract the skeleton of the weld region;
[0121] Three iterations of pruning were performed to remove short, burr branches with a length of less than 5 pixels at the ends, resulting in a single-pixel continuous two-dimensional weld centerline.
[0122] By inversely mapping coordinates, the two-dimensional centerline is projected onto the three-dimensional point cloud space to obtain the three-dimensional coordinate sequence of the centerline.
[0123] The effect of generating the weld centerline is shown in Figure 7.
[0124] A typical continuous hump defect and a typical discrete porosity defect were selected as demonstration objects. Both defects were manually labeled and verified, and can represent the two most common defect types in industrial production.
[0125] Step 3: Defect region localization and healthy cross-section extraction
[0126] First, locate the precise start and end coordinates of the two defect areas along the extracted weld centerline:
[0127] Continuous hump defect: located in the longitudinal direction of the weld between 142.5mm and 145.0mm, with a longitudinal length of approximately 2.5mm and a maximum width of approximately 1.8mm;
[0128] Discrete porosity defects: located in the longitudinal direction of the weld between 150.0 mm and 151.2 mm, with a longitudinal length of about 1.2 mm and a maximum width of about 0.9 mm.
[0129] Five healthy cross-sectional point cloud slices were selected at equal intervals at both ends of each defect region, with a slice spacing of 0.2 mm. All slices were located at least 0.5 mm outside the defect, unaffected by the defect morphology, and could accurately represent the cross-sectional profile characteristics of a normal weld at that location.
[0130] Step 4: Cross-sectional coordinate transformation and adaptive order polynomial fitting
[0131] A local two-dimensional coordinate system is established with the intersection of the centerline and each cross-section as the origin. The three-dimensional cross-section point cloud is converted into two-dimensional contour data, so that the horizontal axis represents the lateral signed distance from the cross-section point to the centerline, and the vertical axis represents the height offset relative to the intersection point of the centerline.
[0132] Adaptive order polynomial fitting is used to fit the transformed two-dimensional contour data:
[0133] Initially, a second-order polynomial is used for fitting, and the residual between the fitted curve and the actual cross-section points is calculated.
[0134] For the healthy cross section of the hump defect, the second-order fitting residual is 0.018mm, which is less than the preset accuracy threshold of 0.02mm, so the second-order model is directly adopted;
[0135] For a healthy cross-section with pore defects, the second-order fitting residual is 0.035 mm, which exceeds the accuracy threshold. The fitting is then upgraded to a third-order polynomial, and the residual is reduced to 0.012 mm, which meets the accuracy requirements.
[0136] The fitting effect of the cross section of the defect area is as follows Figure 8 .
[0137] Step 5: Reconstruction of a Defect-Free Ideal Reference Surface
[0138] By using the centerline height information of the normal regions on both sides of the defect, linear interpolation is performed to obtain the theoretical centerline height corresponding to each longitudinal position within the defect region. Combined with the polynomial fitting function of each cross-section, the theoretical height of any point within the defect region under a defect-free state is calculated, thereby constructing a complete defect-free ideal reference surface.
[0139] The effect of 3D surface reconstruction of the defect area is as follows Figure 9 .
[0140] Step 6: Calculation and accuracy verification of defect geometric parameters
[0141] Based on the reconstructed ideal reference surface, three core geometric parameters of the defect are calculated and compared with actual manual measurements. In actual measurements:
[0142] The maximum height deviation was measured using a digital vernier caliper with an accuracy of 0.01 mm.
[0143] The defect area was calculated by outlining the boundary using ImageJ software.
[0144] The defect volume is approximated using the multi-section trapezoidal integral method;
[0145] All measurements were taken independently by two inspectors and the average value was calculated.
[0146] Calculation results of continuous hump defect parameters:
[0147] Maximum height deviation: algorithm value 0.52mm, measured value 0.50mm, relative error 4.0%;
[0148] Projected area: Algorithm value 2.83 mm², measured value 2.68 mm², relative error 5.6%;
[0149] Volume: Algorithm value 0.74 mm³, measured value 0.69 mm³, relative error 7.2%.
[0150] Calculation results of discrete porosity defect parameters:
[0151] Maximum height deviation: algorithm value 0.21mm, measured value 0.20mm, relative error 5.0%;
[0152] Projected area: Algorithm value 0.86 mm², measured value 0.79 mm², relative error 8.9%;
[0153] Volume: Algorithm value 0.09 mm³, measured value 0.08 mm³, relative error 12.5%.
[0154] Step 7: Verification of overall testing results
[0155] A comprehensive test was conducted on four groups of industrial weld samples (a total of 59 manually annotated defects). The test accurately identified weld defects of different types and scales, with most defect areas highly overlapping with the manually annotated areas. Statistical results show:
[0156] Overall precision was 91.4%, recall was 89.8%, and F1 score was 90.6%.
[0157] The F1 value for hump defects was 91.2%, for porosity defects it was 91.3%, and for bulge defects it was 85.7%.
[0158] The average processing time for a single 1665mm weld segment is 10.40 seconds, which is far lower than the welding cycle time of 28.6 seconds.
[0159] The overall detection results of multiple types of defects are shown in Figure 10.
[0160] The results of the above embodiments show that the method of the present invention can accurately separate the weld from the substrate background and generate a continuous and smooth three-dimensional centerline, providing a reliable benchmark for subsequent defect detection and quantitative assessment. The adaptive order polynomial section fitting method can accurately fit weld sections of different shapes, with the fitting residual controlled within 0.02 mm. The reconstructed ideal reference surface can accurately restore the three-dimensional morphology of the defect-free weld, and the defect deviation area corresponds completely to the actual defect. The measurement errors of the three core geometric parameters are all within the industrially acceptable range, with the average relative error of the maximum height deviation being 5.2%, area 7.5%, and volume 9.7%, which fully meet the accuracy requirements for weld defect size measurement in the "Standard for Acceptance of Construction Quality of Steel Structures" (GB 50205-2020). For sub-millimeter-level micro-porosity defects, the method of the present invention can still achieve high-precision quantitative measurement, solving the technical problem that traditional dimensionality reduction mapping methods easily lose the depth information of micro-defects. Compared with the traditional global reference surface fitting method, the quantitative measurement error of the method of the present invention is reduced by more than 40%, especially for weld areas with large local morphological changes, the accuracy improvement is more significant.
[0161] In summary, this invention adopts a phased adaptive dimensionality processing strategy. First, it quickly extracts the weld area and removes more than 90% of the substrate background interference through two-dimensional mapping of the Z component of the normal vector. Then, it adopts one-dimensional curve analysis (hump) and three-dimensional geometric analysis (porosity, bulge) respectively for the spatial distribution characteristics of different defects, fundamentally solving the contradiction of "loss of details in dimensionality reduction and low efficiency in three-dimensional analysis", and achieving simultaneous improvement in detection accuracy and computational efficiency.
[0162] The differentiated detection architecture based on defect geometry features breaks through the limitations of a single general detection strategy: for hump defects that are continuously distributed in one dimension along the weld, a detection method of centerline height curve + joint evaluation index is adopted; for porosity and bulge defects that are locally distributed in three dimensions, a detection method of curvature-driven region growth + height feature filtering is adopted, which significantly improves the comprehensive detection accuracy and anti-interference ability of multiple types of defects.
[0163] An ideal reference surface reconstruction method based on adaptive order polynomial cross-section fitting is constructed. By utilizing the local cross-sectional profile of the normal weld at both ends of the defect, a defect-free theoretical reference surface is constructed through adaptive order fitting and spatial interpolation to replace the traditional global reference surface fitting. This solves the problem of large quantitative measurement errors caused by local morphological changes in the weld and achieves industrial-grade high-precision quantification of the maximum height deviation, projected area, and volume of the defect.
[0164] This invention, through phased dimension switching, avoids the problem of losing sub-millimeter-level defect depth information in dimensionality reduction mapping methods, and narrows the scope of pure three-dimensional calculation to only the weld area, reducing the computational load by approximately 60% compared to traditional direct three-dimensional analytical methods. Experimental results show that the overall F1 value for detecting three types of defects reaches 90.6%, and the average processing time for a single 1665mm weld segment is only 10.40s, achieving high-precision three-dimensional defect detection within the industrial welding cycle for the first time.
[0165] To address the common noise issues on weld surfaces such as fish-scale patterns, micro-splashes, and surface roughness, this invention employs a dual mechanism of "geometric feature initial screening + height feature secondary verification" to reduce the false detection rate from 15%–20% in existing technologies to 8.6%. It eliminates the need for additional complex point cloud denoising preprocessing steps and can be directly applied to the inspection of unpolished raw weld surfaces.
[0166] The local cross-section fitting method of this invention can accurately reproduce the local morphological changes of the weld. Compared with the existing global reference surface fitting method, the quantitative measurement error is reduced by more than 40%. Experimental results show that the average relative errors of the maximum height deviation, projected area, and volume of the defect are 5.2%, 7.5%, and 9.7%, respectively, which fully meet the accuracy requirements for weld defect size measurement in the "Standard for Acceptance of Construction Quality of Steel Structures" (GB50205-2020).
[0167] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the scope of protection of the invention. It should be noted that similar reference numerals and letters in the following figures denote similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0168] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
[0169] It should be noted that, in this document, relational terms such as "first" and "second" are used only 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. Furthermore, 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.
Claims
1. A system for staged detection and quantitative measurement of weld defects, characterized in that: It includes a weld area extraction module (1), a hump defect detection module (2), a porosity and bulge defect detection module (3), and a defect quantitative assessment module (4). The weld seam region extraction module (1) is used to receive the original scanned point cloud, calculate the normal vector and curvature features of the point cloud, and perform accurate separation of the weld seam and the substrate background based on the normal vector Z component mapping to obtain the three-dimensional point cloud of the weld seam region, the corresponding two-dimensional mask and the curvature information of each point. The hump defect detection module (2) is used to receive the point cloud and two-dimensional mask of the weld area, and to accurately locate and segment the hump defects that are continuously distributed along the weld in one dimension based on the height curve of the weld centerline and the joint evaluation index. The porosity and bulge defect detection module (3) is used to receive point cloud and curvature information of the weld area. For porosity and bulge defects with local three-dimensional discrete distribution, curvature-driven region growth combined with height feature filtering is used to detect defects and determine their types. The defect quantitative assessment module (4) is used to summarize the point cloud of all defect areas, reconstruct the defect-free ideal reference surface through adaptive order polynomial cross-section fitting, and calculate the three core geometric parameters of the defect: maximum height deviation, projected area, and volume.
2. The staged detection and quantitative measurement system for weld defects according to claim 1, characterized in that: The weld seam region extraction module (1) constructs a K-dimensional tree index, searches for the k nearest neighbor set of each point in the original point cloud, and calculates the normal vector and surface curvature of each point through the eigenvalue decomposition of the neighborhood covariance matrix. Then, it introduces sensor viewpoint constraints to unify the direction of all normal vectors to the sensor side. Further, it maps the Z component of the normal vector of the three-dimensional point cloud to a two-dimensional grayscale image, where the grayscale value of each pixel is the scaling result of the Z component of the normal vector of the corresponding point. It performs threshold segmentation on the two-dimensional grayscale image to initially separate the weld seam region from the substrate background. It performs morphological optimization of the segmentation results by erosion, dilation, opening and closing operations in sequence to remove discrete noise and improve boundary continuity, and obtains a two-dimensional mask of the weld seam region. Through coordinate inverse mapping, it maps the two-dimensional mask of the weld seam region back to the original three-dimensional point cloud space and extracts the three-dimensional point cloud of the weld seam region.
3. The staged detection and quantitative measurement system for weld defects according to claim 1, characterized in that: The hump defect detection module (2) extracts the weld area skeleton by performing a morphological refinement algorithm on the two-dimensional mask of the weld area, and performs pruning to remove short burr branches at the ends, resulting in a single-pixel continuous weld centerline; then, through coordinate inverse mapping, the two-dimensional weld centerline is projected onto the three-dimensional point cloud space to obtain the three-dimensional coordinate sequence of the centerline; further, the cumulative horizontal projection distance of adjacent points on the centerline is used as the horizontal axis, and the height of the corresponding point is used as the vertical axis to construct a height distribution curve along the welding direction; the RANSAC algorithm is used to fit the ideal height baseline of the height distribution curve, calculate the local height deviation of each point, and fit the local arc of each point to obtain the corresponding radius of curvature; the height deviation and radius of curvature are fused to construct a joint evaluation index, the calculation formula of which is: in, For nodes Height deviation at that location Let be the radius of curvature at that point. and The weighting coefficients for the two features are defined; a threshold for the joint evaluation index is set, and all nodes are traversed along the center line. Intervals that are continuously higher than the threshold are identified as hump defect regions, and the corresponding hump defect point cloud is extracted through coordinate mapping.
4. The staged detection and quantitative measurement system for weld defects according to claim 1, characterized in that: The porosity and bulge defect detection module (3) preprocesses the point cloud of the weld area, removes discrete noise points and downsamples and simplifies the data; then, based on the curvature information generated by the weld area extraction module, all points are arranged in ascending order of curvature value, and the point with the smallest curvature is taken as the initial growth seed; further, the region growth algorithm is executed with the normal vector angle and curvature as double constraints: if the normal vector angle between the candidate point and the current seed point is less than the smoothness threshold, the candidate point is merged into the current region; if the curvature of the merged candidate point is less than the curvature threshold, it is added to the seed set and continues to expand outward; for all the segmented candidate abnormal regions, the local reference plane of its neighborhood is fitted respectively, the signed distance from each point in the region to the plane is calculated, and the maximum height difference of the region is obtained; a height difference threshold is set, and pseudo-defect regions with a maximum height difference less than the threshold are eliminated; the type is determined according to the concavity and convexity relationship of the point cloud in the remaining defect region relative to the local reference plane, and the overall appearance is positively convex and determined as bulge defect, and the overall appearance is negatively concave and determined as porosity defect, and the corresponding defect point cloud and type information are obtained.
5. The staged detection and quantitative measurement system for weld defects according to claim 1, characterized in that: The defect quantitative assessment module (4) locates the start and end positions of each defect region along the weld centerline, and selects 5 equally spaced healthy cross-sectional point cloud slices at each end of the defect region; then, a local two-dimensional coordinate system is established with the intersection of the centerline and each cross-section as the origin, and the three-dimensional cross-sectional point cloud is converted into two-dimensional contour data; further, an adaptive order polynomial is used to fit the contour of each healthy cross-section: a second-order polynomial is used for fitting, and the fitting residual is calculated; if the residual is greater than the accuracy threshold, the polynomial order is gradually increased until the lowest order fitting result that meets the accuracy requirements is obtained; then, the centerline height information of the normal regions on both sides of the defect is used for interpolation fitting to obtain the theoretical height of the centerline corresponding to each longitudinal position in the defect region; then, the fitting contour of each cross-section and the theoretical height of the centerline are combined to reconstruct the defect-free ideal reference surface of the defect region; the spatial position relationship between the real defect point cloud and the ideal reference surface is compared, and the defect type is finally confirmed, and the following three core geometric parameters are calculated: maximum height deviation, that is, the maximum difference between the theoretical height and the real height in the defect region; projected area, that is, the number of point clouds in the defect region multiplied by the area of a single sampling grid; volume, that is, the height difference between the theoretical surface and the real surface is obtained by discrete integration.
6. A method for staged detection and quantitative measurement of weld defects, characterized in that: Using the original scanned point cloud as the processing object, the weld seam extraction module (1) performs precise separation between the weld seam and the substrate background. By utilizing the difference between the weld seam protrusion area and the flat substrate on the surface normal vector Z-axis component, the normal vector and curvature features of the point cloud are calculated first, and then the normal vector Z component is mapped into a two-dimensional grayscale image. After threshold segmentation and morphological optimization of the generated two-dimensional grayscale image, the three-dimensional point cloud of the weld seam area, the corresponding two-dimensional mask and the curvature information of each point are obtained. The hump defect detection module (2) and the porosity and bulge defect detection module (3) respectively use the different feature information obtained above to perform targeted detection. For the hump defect that shows drastic fluctuations in height and width along the weld direction, the hump defect detection module (2) extracts the weld center line based on a two-dimensional mask and constructs a height curve along the welding direction by combining the height information of the weld point cloud. The RANSAC algorithm is used to fit a robust ideal height baseline, and the height deviation and local curvature radius are fused to construct a joint evaluation index to achieve accurate positioning of the hump area. For porosity and bulge defects that show significant three-dimensional curvature anomalies locally, the porosity and bulge defect detection module (3) reuses the curvature information generated by the weld area extraction module (1), uses high curvature points as seeds to grow the region, and initially segments out candidate abnormal areas. The normal fish scale pattern undulation interference on the weld surface is removed by height feature filtering, and the defect type is determined according to the concave-convex relationship of the defect area relative to the local fitting plane. The defect quantitative assessment module (4) summarizes all the defect area point clouds generated by the hump defect detection module (2) and the pore and bulge defect detection module (3). Several healthy cross sections are selected from both ends of the defect for adaptive polynomial fitting to reconstruct the defect-free ideal reference surface of the defect area. By calculating the area difference, volume difference and maximum height deviation between the actual surface and the theoretical surface, the type and core geometric parameters of each defect are finally obtained, and the severity of the defect is quantitatively characterized.
7. The method for staged detection and quantitative measurement of weld defects according to claim 6, characterized in that: The hump defect detection module (2) integrates the height deviation and local curvature radius construction joint evaluation index, specifically: Constructing a joint evaluation index for hump defects The calculation formula is as follows: in, For the first on the center line of the weld Local height deviation at each node Let be the local radius of curvature of the height distribution curve at this node. and These are the weighting coefficients for the height deviation term and the curvature term, respectively; Based on the normal fluctuation range of the joint indicators in the defect-free weld samples, a defect segmentation threshold is set. ; Traverse all nodes along the weld centerline, when The time markers are used as candidate defect points, and the intervals that are continuously higher than the threshold are identified as hump defect areas; The weighting coefficients are taken as the optimal values verified by industrial sample experiments: , .
8. The method for staged detection and quantitative measurement of weld defects according to claim 6, characterized in that: The defect quantitative assessment module (4) selects several healthy cross sections from both ends of the defect and performs adaptive polynomial fitting to reconstruct a defect-free ideal reference surface and calculate the core geometric parameters. Specifically, it includes the following steps: S1 Locate the start and end positions of each defect area along the weld centerline, and select 5 equally spaced healthy cross-sectional point cloud slices at each end of the defect area. S2 establishes a local two-dimensional coordinate system with the intersection of the centerline and each cross-section as the origin, and converts the three-dimensional cross-sectional point cloud into two-dimensional contour data; S3 uses an adaptive order polynomial to fit the contour of each healthy cross section. It first performs an initial fitting with a second-order polynomial and calculates the residual between the fitted curve and the actual cross section points. If the residual is greater than the accuracy threshold, the order of the polynomial is gradually increased until the lowest order fitting result that meets the accuracy requirements is obtained. S4 uses the centerline height information of the normal areas on both sides of the defect to perform linear interpolation, obtaining the theoretical centerline height corresponding to each longitudinal position within the defect area. ; S5 combines the fitted profiles of each cross section with the theoretical height of the centerline to reconstruct the defect-free ideal reference surface of the defect region. The formula for calculating the theoretical height of any point is as follows: in, The signified lateral distance from this point to the center line. This is the polynomial fitting function for the corresponding cross section; S6 calculates the three core geometric parameters of the defect: Maximum height deviation: ,in This is the actual height of that point; Projected area: ,in The actual area corresponding to the unit sampling grid. This represents the total number of pixels in the defective area. volume: ,in This represents the total number of point clouds within the defective region.
9. The method for staged detection and quantitative measurement of weld defects according to claim 6, characterized in that: The calculation of the normal vector and curvature features of the point cloud is as follows: Construct a Kd-tree index to search the set of k nearest neighbors for each point in the original point cloud, and solve the normal vector and surface curvature by eigenvalue decomposition of the neighborhood covariance matrix. Neighborhood covariance matrix The calculation formula is: For covariance matrix Eigenvalue decomposition yields three eigenvalues. and its corresponding eigenvectors Take the eigenvector corresponding to the smallest eigenvalue. As a point initial normal vector ; Surface curvature Calculated using the ratio of eigenvalues: Introducing a unified normal vector direction for sensor viewpoint constraints, let the sensor viewpoint coordinates be... , like Then invert the normal vector to This ensures that all normal vectors point to the same side of the sensor.
10. The method for staged detection and quantitative measurement of weld defects according to claim 6, characterized in that: The Z-component of the normal vector is mapped to a two-dimensional grayscale image. Thresholding segmentation and morphological optimization are then performed on the generated two-dimensional grayscale image, specifically as follows: For any point in a 3D point cloud According to its , Calculate the corresponding pixel index for coordinates and The calculation formula is: , in, and These represent the point cloud sequences in direction and Minimum coordinate value in the direction, and This refers to the physical sampling interval of the line laser scanner in the corresponding direction; grayscale value of this pixel location Assigned as normal vector Component scaling results: in, For point The component of the normal vector in the Z direction; Morphological processing, including threshold segmentation, erosion, dilation, opening, and closing operations, is performed sequentially on the generated two-dimensional grayscale image to remove discrete noise and improve boundary continuity, thereby obtaining a two-dimensional mask of the weld area.
11. The method for staged detection and quantitative measurement of weld defects according to claim 6, characterized in that: Regional growth is carried out using high curvature points as seeds, specifically: Based on the curvature information generated by the weld area extraction module, all points in the weld area are sorted in ascending order of curvature value, and the point with the smallest curvature is taken as the initial growth seed. The region growing algorithm is executed under the dual constraints of the angle between the normal vectors and the curvature. 1) If the angle between the normal vector of the candidate point and the current seed point is less than the smoothness threshold That is, satisfying If so, then the candidate point will be merged into the current region; 2) If the curvature of the candidate points to be incorporated is less than the curvature threshold That is, satisfying If it is, then add it to the seed set as a new growth point to expand outward; 3) Once all points in the seed set have completed neighborhood testing, select the point with the smallest curvature from the remaining unclassified points as a new seed, and repeat the above process until all points have been classified.
12. The method for staged detection and quantitative measurement of weld defects according to claim 6, characterized in that: By filtering out the interference of normal fish scale pattern undulations on the weld surface through height feature filtering, for each candidate abnormal region obtained by region growth segmentation, the least squares method is used to fit the local reference plane of its neighborhood. Calculate the signed distance from each point within the candidate region to the plane, and define the maximum height difference within the region. for: in, and These are the maximum and minimum signed distances from all points within the region to the local reference plane, respectively. Set height difference threshold Remove The low-ripple pseudo-defect region; The type of the retained defect area is determined as follows: if the signed distance of most points in the area is positive and the whole area is above the reference plane, it is determined to be a bulge defect; if the signed distance of most points is negative and the whole area is below the reference plane, it is determined to be a porosity defect.