Pitting corrosion pit recognition method based on three-dimensional topographic datum correction and fusion domain splitting

By using a three-dimensional topography reference surface correction and fusion domain splitting method, the problems of low automation and insufficient accuracy in pitting pit identification in existing technologies are solved, achieving efficient and accurate pitting pit identification and parameter quantification, which is applicable to the inspection of metal components in aerospace, marine engineering and other fields.

CN122290097APending Publication Date: 2026-06-26TIANJIN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TIANJIN UNIV
Filing Date
2026-03-04
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing technologies for identifying pitting corrosion in metallic materials suffer from low automation, insufficient accuracy, and incomplete parameter characterization, making them unsuitable for large-scale testing needs. Furthermore, traditional methods are prone to misjudging substrate undulations and the intersection of adjacent pit expansions, resulting in large identification errors.

Method used

A method based on three-dimensional topographic reference surface correction and fusion domain splitting is adopted. The substrate interference is eliminated by Gaussian weighted median filtering. Combined with the improved Otsu algorithm and watershed algorithm, the accurate identification of erosion pits and multi-dimensional parameter quantification are achieved, including the calculation and classification of erosion pit geometric parameters.

Benefits of technology

It achieves full automation from data preprocessing to parameter output, with high recognition accuracy and high measurement precision. The depth error is ≤±5μm and the length/width error is ≤±2μm. It is adaptable to three-dimensional morphology data with different scanning resolutions and corrosion degrees, and is suitable for pitting corrosion detection of various metal materials.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122290097A_ABST
    Figure CN122290097A_ABST
Patent Text Reader

Abstract

This invention relates to the field of metal corrosion detection and three-dimensional morphology analysis technology, specifically disclosing a method for identifying pitting corrosion based on three-dimensional morphology reference surface correction and fusion domain segmentation. The method includes: S1: acquiring three-dimensional morphology data of the metal surface; S2: obtaining potential pitting regions based on the three-dimensional morphology data; S3: dividing the potential pitting regions into pitting and fusion pits based on their area and average area, and further subdividing fusion pits into multiple pitting pits using distance transformation and watershed algorithms to obtain a set of pitting pits; S4: calculating the geometric parameters of the pits based on the set of pitting pits; S5: generating a parameter table and a visualization annotation map based on the set of pitting pits and their geometric parameters. This invention can automatically identify all target defects, including shallow pits and fusion pits, improving detection efficiency while ensuring modeling accuracy. It is applicable to the detection of pitting defects and mechanical property analysis of metal components of different sizes and operating conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of metal corrosion detection and three-dimensional morphology analysis technology, and in particular to a method for identifying pitting corrosion based on three-dimensional morphology reference surface correction and fusion domain splitting. Background Technology

[0002] Pitting corrosion of metallic materials is a typical localized electrochemical corrosion behavior, widely present in key industrial fields such as marine engineering, petrochemicals, nuclear power, and rail transportation. Although pits initially have tiny sizes (micrometers), they are characterized by strong concealment, rapid expansion, and significant destructiveness. They easily form a closed-cell effect within the pit, accelerating the corrosion process and ultimately leading to stress concentration, a sharp drop in fatigue strength, and even sudden failures such as perforation and fracture. According to industrial corrosion statistics, approximately 35% of metal structural failures are directly or indirectly caused by pitting corrosion. Therefore, accurate identification and quantitative characterization of pits are a core prerequisite for assessing the service life of metallic materials and developing protection strategies. With the development of high-precision surface inspection technologies, equipment such as laser confocal microscopy (LCM) and white light interferometers have become mainstream tools for detecting pitting corrosion on metal surfaces. These instruments can acquire three-dimensional morphological data with micrometer-level resolution and nanometer-level depth accuracy, providing a data foundation for the quantitative analysis of pits. Compared to traditional methods such as metallographic microscopy and ultrasonic testing, laser confocal microscopy offers advantages such as "non-contact, full three-dimensional, and high resolution," enabling it to completely reconstruct the spatial morphological characteristics of pitting corrosion. It has gradually replaced crude inspection methods such as manual visual inspection and caliper measurement. However, in practical engineering applications, the identification and quantification of pitting corrosion based on laser confocal microscopy data still faces multi-dimensional technical bottlenecks, specifically in the following aspects: 1. Existing methods have low automation. From data preprocessing to parameter output, manual intervention is required to adjust thresholds, manually locate pits, and delineate boundaries. This is inefficient and highly subjective, and the processing time for a single data image is long, making it difficult to meet the needs of large-scale detection.

[0003] 2. Most studies focus only on single depth threshold segmentation, ignoring the overlapping interference of the micro-roughness of the metal surface substrate and the characteristics of shallow pits. Traditional fixed threshold methods are prone to misjudging shallow pits as substrate undulations, resulting in a high false negative rate. Meanwhile, simple plane fitting methods fail to distinguish between the effective substrate and pit areas, leading to a shift in the reference plane and further amplifying the identification error.

[0004] 3. Traditional methods lack an effective mechanism for handling fused pits. Composite defects formed by the intersection of adjacent pits are easily misjudged as single pits. Existing watershed algorithms are prone to over- or under-splitting due to inaccurate seed point extraction, leading to errors in the statistical count of pit numbers.

[0005] Therefore, there is an urgent need for an automated, high-precision, and multi-dimensional method for identifying pitting corrosion and quantifying its parameters to solve the technical problems of low efficiency, insufficient accuracy, and incomplete parameter characterization in manual measurement. Summary of the Invention

[0006] This invention aims to solve the aforementioned problems. To this end, this invention provides a pitting pit identification method based on three-dimensional topographic reference surface correction and fusion domain decomposition, achieving accurate identification, efficient quantification, and full-dimensional verification of pitting pits. This method is applicable to the accurate detection, reliability assessment, and optimized design of corrosion defects in metal components in aerospace, marine engineering, petrochemical, and other fields.

[0007] This invention provides a method for identifying pitting corrosion based on three-dimensional topographic reference surface correction and fusion domain segmentation. The technical solution adopted is as follows: S1: Acquire three-dimensional morphological data of the metal surface; S2: Based on the three-dimensional topography data, the potential pitting area is obtained; S3: Based on the area and average area of ​​the potential pitting region, the potential pitting region is divided into pitting pits and fused pits. Combining distance transformation and watershed algorithm, the fused pits are split into multiple pitting pits to obtain the set of pitting pits. S4: Calculate the geometric parameters of the pits based on the set of pitting pits; S5: Generate a parameter table and a visual annotation map based on the pitting pit set and pit geometry parameters.

[0008] Furthermore, based on the area, potential pitting areas were initially screened to obtain preliminary single pitting and suspected fused pitting. Calculate the average area of ​​a preliminary single erosion pit; If the area of ​​a suspected fusion pit is greater than the product of the fusion determination coefficient and the average area of ​​the initial single pit, then the suspected fusion pit is a fusion pit; otherwise, it is a pitting pit.

[0009] Furthermore, the fusion determination coefficient is .

[0010] Furthermore, a distance transformation is performed on the fused pits to calculate the distance from each pixel to the nearest background pixel; local maximum suppression is applied to the distance, and the local maximum points are retained as seed points for the fused pits; using the seed points as markers, the watershed algorithm is used to split the fused pits into multiple point pits.

[0011] Furthermore, the depth data matrix in the three-dimensional topography data is subjected to Gaussian weighted median filtering, and the base region is screened by percentile method and fitted to the reference surface to generate a pure pit depth matrix.

[0012] Furthermore, the 90%-99% quantile was used to screen the substrate region, and the reference surface was fitted using the least squares method. This effectively eliminated the interference of metal surface micro-roughness on the identification of shallow pits.

[0013] Furthermore, based on the three-dimensional topographic data, an improved Otsu algorithm is used to determine the segmentation threshold, generate a binary matrix, and filter out small-noise connected regions to obtain the potential pitting region.

[0014] Furthermore, the improved Otsu algorithm adjusts the segmentation threshold by 0.5-0.7 times the weight to adapt to the segmentation requirements of shallow pits; the small noise filtering threshold is set to 5-10 pixels to retain small areas of shallow pits.

[0015] Furthermore, the geometric parameters of the erosion pit include maximum depth, maximum length, maximum width, and cross-sectional shape.

[0016] Furthermore, the major and minor axes of the equivalent ellipse are calculated based on the zeroth, first, and second order geometric moments, with the major axis as the maximum length and the minor axis as the maximum width. The cross-sectional shape was determined by the goodness of Gaussian and parabolic fitting, and was classified into Gaussian, parabolic and irregular types. The goodness of fit threshold was set to 0.6-0.8.

[0017] The above-described one or more technical solutions in the embodiments of the present invention have at least one of the following technical effects: 1. Substrate interference elimination: Gaussian weighted median filtering is used to preserve the edge features of the pits. The effective substrate area is selected by percentile method. The reference surface is generated by least squares plane fitting to accurately separate the depth information of pure pits.

[0018] 2. Precise segmentation of fusion pits: Merged erosion pits are identified through connected domain area analysis, core seed points are extracted based on distance transformation, and the watershed algorithm is used to achieve adaptive segmentation of the fusion domain, ensuring that each erosion pit is represented independently.

[0019] 3. Multi-dimensional parameter quantification: Based on the principle of geometric moments, an equivalent elliptical model is constructed to achieve accurate calculation of the length and width of the pit. Combining Gaussian fitting and parabolic fitting, the cross-sectional shape is classified to form a complete parameter system.

[0020] 4. High degree of automation: It realizes full automation from data preprocessing to parameter output, without the need for manual intervention, and the processing efficiency is more than 300 times higher than manual measurement.

[0021] 5. High recognition accuracy: By eliminating substrate roughness interference through reference surface correction and combining adaptive threshold segmentation and fusion anti-splitting algorithm, the recognition accuracy of pits is high, and the false negative rate of shallow pits and small-sized pits is low.

[0022] 6. High measurement accuracy: Based on a mathematical model of geometric moments and curve fitting, the depth measurement error is ≤ ±5μm, the length / width measurement error is ≤ ±2μm, and the parameter characterization is objective and quantified.

[0023] 7. Comprehensive functions: It covers pit identification, pit splitting, multi-dimensional parameter measurement, and cross-sectional shape classification to meet the diverse needs of corrosion assessment.

[0024] 8. Strong compatibility: It can adapt to three-dimensional morphology data with different scanning resolutions and different corrosion levels, and can be widely used in pitting corrosion detection of various metal materials.

[0025] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is the overall flowchart of the method provided by the present invention.

[0028] Figure 2 This is a schematic diagram of the preprocessing effect of three-dimensional topography data provided by the present invention.

[0029] Figure 3 This is a schematic diagram illustrating the pitting and fusion pit splitting effects provided by the present invention.

[0030] Figure 4 This is a schematic diagram of the visualization output results provided by the present invention. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention. The following embodiments are used to illustrate this invention but should not be used to limit the scope of this invention.

[0032] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0033] The following is combined with Figures 1 to 4 The present invention will be further described in detail below, which describes a method for identifying pitting erosion based on three-dimensional topographic reference surface correction and fusion domain splitting: In this embodiment, as Figure 1 As shown, a method for identifying pitting corrosion based on three-dimensional topographic reference surface correction and fusion domain segmentation is provided, including the following steps: S1: Acquire three-dimensional morphological data of the metal surface and perform preprocessing.

[0034] The preprocessing involves performing Gaussian-weighted median filtering on the depth data matrix in the 3D topography data, then filtering the base region using the percentile method and fitting a reference surface to generate a pure pit depth matrix. Preferably, the base region is filtered using the 90%-99% percentile, and the reference surface is fitted using the least squares method, effectively eliminating the interference of metal surface micro-roughness on the identification of shallow pits.

[0035] Specifically, the following steps are included: S1.1: Acquire three-dimensional morphological data of the metal surface obtained by laser microscopy scanning. The data format is a discrete matrix, such as... Figure 2 Middle (a): Two-dimensional coordinate matrix: , ,in, This is the X-axis coordinate matrix. Let be the x-coordinate of the pixel in the i-th row and j-th column, M be the number of pixels in the first scan, and N be the number of pixels in the second scan. The Y-axis coordinate matrix Let be the ordinate of the pixel in the i-th row and j-th column.

[0036] Deep data matrix : , The depth value is the pixel in the i-th row and j-th column. A negative value indicates a depression (pitted area).

[0037] Scanning parameters: scan step size Scan range ,in, The range is in the X direction. The range is in the Y direction.

[0038] S1.2: For the depth data matrix Adaptive noise reduction is performed using a Gaussian weighted median filter algorithm with a filter window size of [size missing]. , Given the half-width of the filter window, the filtering formula is: in, Let be the depth value of the pixel in the i-th row and j-th column after denoising. These are Gaussian weighting coefficients. , The standard deviation is Gaussian. This is a median operation used to suppress spike noise and preserve pit edge features. Let be the depth value of the pixel in the (i+m)th row and (j+n)th column, where m is the offset in the row direction and n is the offset in the column direction. For example... Figure 2 (b)

[0039] S1.3: The substrate region is screened using the percentile method and a reference surface is fitted to eliminate interference from the substrate's micro-roughness, such as... Figure 2 (c)

[0040] Take the denoised depth matrix of Quantiles Screening non-pitted substrate areas : .

[0041] The base reference surface was fitted using the least squares method. The equation of the datum plane is: in, To fit the obtained base reference surface depth value, The first fitting coefficient, The second fitting coefficient, The third fitting coefficient satisfies the least squares optimization objective: .

[0042] Calculate the depth matrix of pure erosion pits : , The area is the effective area of ​​pitting corrosion. The depth of the etch pit is the value of the pixel in the i-th row and j-th column.

[0043] S2: Based on the three-dimensional topographic data, the potential pitting area is obtained.

[0044] Based on the 3D topographic data, an improved Otsu algorithm is used to determine the segmentation threshold, generate a binary matrix, and filter out small-noise connected components to obtain potential pit regions. Preferably, the improved Otsu algorithm adjusts the segmentation threshold by a weight of 0.5-0.7 times to adapt to the segmentation requirements of shallow and small pits; the small-noise filtering threshold is set to 5-10 pixels to retain small-area shallow pits.

[0045] Specifically, the following steps are included: S2.1: Adaptive segmentation of pitting pit regions.

[0046] The Otus algorithm is used to automatically determine the pit segmentation threshold. Achieving pixel-level separation between etch pits and the substrate: Pure erosion pit depth matrix All pixels are divided into two categories: pitted pixels. : and base class : ;in, for The elements in.

[0047] Calculate the proportion and mean of the two types of pixels: proportion of pitted pixels The proportion of base-type pixels Mean value of pitted pixels and the mean of the base class pixels Then calculate the inter-class variance. : .

[0048] Take Maximize As the optimal segmentation threshold, a binary matrix is ​​generated. : in, Let be the element in the i-th row and j-th column of the binary matrix, such as... Figure 3 As shown in (a).

[0049] S2.2: For binary matrices Perform low-noise filtering, removing areas smaller than Connected components, To minimize the equivalent area of ​​the pitting, the potential pitting area is preserved.

[0050] S3: Based on the area and average area of ​​the potential pitting region, the potential pitting region is divided into pitting pits and fused pits. Combining distance transformation and watershed algorithm, the fused pits are split into multiple pitting pits to obtain the set of pitting pits.

[0051] Merged pits are determined by a ratio of 1.5 to 2.5 times the average area of ​​individual pits. This range is based on engineering experience in metal pitting detection. Specifically, if the area of ​​a suspected merged pit is greater than the product of the merging determination coefficient and the average area of ​​the initial individual pits, then the suspected merged pit is considered a merged pit; otherwise, it is considered a pitting pit. Preferably, the merging determination coefficient is... For metal surfaces with moderate corrosion (moderate pit density, without extreme density / sparseness), the fusion decision coefficient is 2.0.

[0052] Distance transformation is applied to the fused pits to calculate the distance from each pixel to the nearest background pixel; local maximum suppression is applied to the distance, and the local maximum points are retained as seed points for the fused pits; using the seed points as markers, the watershed algorithm is used to split the fused pits into multiple point pits.

[0053] Specifically, the following steps are included: S3.1: Perform 8-connected-part analysis on the potential pitting region (filtered binary matrix), and label each connected part as... ,like Figure 3 As shown in (b), the area of ​​each connected component is extracted. .

[0054] Based on the area, potential pitting regions are initially screened to obtain preliminary single pits and suspected fused pits. Since the area distribution of single pits is highly concentrated while fused pits are significant outliers, the preferred preliminary screening method is as follows: (1) Sort the area set of connected regions of potential pits in ascending order and calculate the median; (2) Set the preliminary screening threshold for single pits to be a multiple of the median, for example, twice the median. If the area of ​​the connected region is less than or equal to the preliminary screening threshold for single pits, it is determined to be a preliminary single pit; otherwise, it is determined to be a suspected fused pit.

[0055] Calculate the average area of ​​a preliminary single erosion pit , , This represents the preliminary total number of individual corrosion pits. Let be the area of ​​the i-th initial single erosion pit. For suspected merged erosion pits, determine the area of ​​their connected regions. If so, it is determined to be a fusion erosion pit. The fusion determination coefficient; if If so, it is determined to be a pitting pit.

[0056] S3.2: For fusion erosion pits Perform a distance transformation and calculate the distance from each pixel to the nearest background pixel. : in, To merge the boundary pixel set of the etch pits, Let be the two-dimensional coordinates of the boundary pixels, ( () represents the two-dimensional coordinates of the pixels that have been fused together with the erosion pits. It is the minimum value.

[0057] S3.3: Perform maximum suppression on the distance transformation result, retaining the local maximum points as the core seed points for fusion pits. The number of seed points corresponds to the number of original independent point pits.

[0058] S3.4: Using seed points as markers, the watershed algorithm is used to split the fused erosion pits: in, Here, D is the watershed algorithm function, and D is the distance matrix obtained by the distance transformation. A seed point label matrix, The result of the splitting process is that multiple independent pitting pit regions are obtained after the splitting, such as... Figure 3 As shown in (c).

[0059] S3.4: Merge all pitting pits, including the initial single pits selected in step S3.1, the pitting pits determined by the criteria, and the pitting pits obtained by splitting in step S3.4, to obtain a set of pitting pits.

[0060] S4: Calculate the geometric parameters of the pits based on the set of pitting pits.

[0061] The geometric parameters of the erosion pits include maximum depth, maximum length, maximum width, and cross-sectional shape. The major and minor axes of the equivalent ellipse are calculated based on the zeroth, first, and second order geometric moments, with the major axis representing the maximum length and the minor axis representing the maximum width. The cross-sectional shape is classified into Gaussian, parabolic, and irregular types based on the goodness of fit of Gaussian and parabolic fitting, with the goodness of fit threshold set at 0.6-0.8.

[0062] Specifically, the following steps are included: S4.1: For each pitting erosion, extract its pixel set. Calculate the following geometric parameters: Maximum depth The maximum pit depth is the absolute value of the minimum pure pit depth within that area. .

[0063] S4.2: Maximum Length With maximum width Based on the principle of geometric moments, an equivalent ellipse is fitted to characterize the length and width of the erosion pit.

[0064] Extracting the boundary contour of the erosion pit Calculate the geometric moments of the profile: Zeroth moment: (Outline pixel count); First moment: , Second moment: , , ; Calculate the major axis (maximum length) and minor axis (maximum width) of the equivalent ellipse: Ellipse direction angle: ; Long half-shaft: ; Short half-shaft: ; Physical size conversion: , ,in, This is the scan step size.

[0065] S4.3: Classification of cross-sectional shapes.

[0066] Extracting the geometric center of pitting corrosion Obtain each Cross-sectional curves in the direction and Cross-sectional curves in the direction Classify cross-sectional shapes by goodness-of-fit: (1) Gaussian fitting model: ,in, The first Gaussian fitting parameters are... The second Gaussian fitting parameter, The third Gaussian fitting parameter, The fourth Gaussian fitting parameter; (2) Parabolic fitting model: ,in, The parameters are the first parabolic fit parameters. The parameters are the second parabolic fit parameters. The parameters are the fitting parameters for the third parabola; (3) Goodness-of-fit calculation: in, The average depth of the cross section. The closer the result is to 1, the better the fit.

[0067] (4) Shape classification rules: Gaussian type: ,Right now Goodness of fit of Gaussian direction and Goodness of fit of Gaussian direction All ≥0.7; Parabolic: ,Right now Goodness of fit of directional parabolic curve and Goodness of fit of directional parabolic curve All ≥0.7; Irregular type: The goodness of fit is less than 0.7, which means that it does not belong to Gaussian or parabolic pitting.

[0068] S5: Based on the pitting pit set and pit geometry parameters, generate a parameter table and a visual annotation map. The parameter table and visual annotation map facilitate intuitive verification, identification, and measurement results.

[0069] Output a structured parameter table, including pit number, center coordinates, maximum depth, maximum length, maximum width, and cross-sectional shape type; annotate the pit boundaries, center positions, and key parameters on the 3D topography map, generating a visual annotation map, such as... Figure 4 As shown, this facilitates intuitive verification, identification, and measurement results.

[0070] The following concrete example illustrates the implementation process of this method: The input data in this embodiment is the three-dimensional morphology data of a metal surface scanned by a laser confocal microscope. The scanning range is 1mm × 1mm (1000μm × 1000μm), the scanning step size is 2μm, the resolution is 500 × 500 pixels, and the depth data range is -150μm to 50μm. The implementation steps are as follows: Step S1: Obtain the three-dimensional morphology data of the metal surface and perform preprocessing.

[0071] 1. Data Reading and Format Conversion: Reads the ASCII format three-dimensional topographic data output by the laser microscope and generates a two-dimensional coordinate matrix X, Y and a depth matrix Z. ; The range of values ​​for the Z matrix is: .

[0072] 2. Gaussian weighted median filtering for noise reduction: (1) Set the filter half-width The filter window size is 5×5; (2) Calculate the Gaussian weighting coefficients ,in, ,like , , And so on, and normalize the weight coefficients ( ); (3) Calculate the depth matrix after noise reduction according to the filtering formula. ,like The noise reduction effect is as follows Figure 2 As shown in (b).

[0073] 3. Reference plane calibration: (1) Take quantiles ,calculate 95th percentile Filtering basal regions ; (2) Fit the reference surface using the least squares method to obtain the fitting coefficients. , , The equation of the datum surface is ; (3) Calculate the depth matrix of pure erosion pits The correction effect is as follows Figure 2 As shown in (c).

[0074] S2: Based on the three-dimensional topographic data, the potential pitting area is obtained.

[0075] 1. Otsu threshold calculation: (1) Extraction Effective pixels (non- There are a total of 250,000 data points. The inter-class variance is calculated using the formula of this method to obtain the optimal segmentation threshold. ; This is an image thresholding function; (2) Generate a binary matrix : hour (Pit pixels), otherwise The binary matrix contains 62,864 pitted pixels, and the segmentation effect is as follows: Figure 3 As shown in (a).

[0076] 2. Low noise filtering: Set the minimum equivalent area of ​​the erosion pits. Pixel (corresponding physical area) After removing connected components with an area of ​​less than 10 pixels, 62,864 pitted pixels were retained after filtering.

[0077] S3: Based on the area and average area of ​​the potential pitting region, the potential pitting region is divided into pitting pits and fused pits. Combining distance transformation and watershed algorithm, the fused pits are split into multiple pitting pits to obtain the set of pitting pits.

[0078] 1.8 Connected Component Analysis: Connected component labeling is performed on the filtered binary matrix to obtain 6 initial connected components with areas of 2532, 6463, 6426, 6457, 26430 and 14556 pixels, respectively.

[0079] 2. Fusion determination: Calculate the median of all potential pits. The initial screening threshold for single erosion pits was determined to be... The initial connected region areas of the single erosion pits are 2532, 6463, 6426, and 6457 pixels, respectively, while the connected region areas of the suspected fused erosion pits are 26430 and 14556 pixels; the average area of ​​the single erosion pits is calculated. Pixels, set the blending decision coefficient ,because , The two connected domains are determined to be fused pits.

[0080] 3. Merging and splitting erosion pits: (1) For fusion erosion pits Perform a distance transformation and calculate the distance matrix. The maximum value is 12 pixels (corresponding to a physical distance of 12×2=24μm). (2) Extract 4 core seed points for the fusion pit of 26430 pixels; extract 2 core seed points for the fusion pit of 14556 pixels; (3) Using the seed point as a marker, the 8-connected watershed algorithm is used to split the fused pits. The fused pit of 26430 pixels is divided into 4 independent pit regions, and the fused pit of 14556 pixels is divided into 2 independent pit regions. Final pit set: The final number of pits obtained after merging. The splitting effect is as follows Figure 3 As shown in (c).

[0081] S4: Calculate the geometric parameters of the pits based on the set of pitting pits.

[0082] The geometric parameters of each of the 10 independent pits (numbered 1 to 10) are calculated. The calculation process is illustrated using pit number 1 as an example. The calculation logic for the remaining pits is the same: 1. Maximum Depth: Extract the pixel set of pit number 1. The minimum value is -97.76 μm, calculated according to the formula. .

[0083] 2. Maximum length and width: (1) Extract the boundary contour of pit No. 1 It contains 184 pixels in total. Calculate the geometric moments: , , , , , ; (2) Calculate the ellipse direction angle: ; (3) Major half-axis: Pixel; (4) Short half-shaft: Pixel; (5) Physical size conversion: , .

[0084] 3. Classification by cross-sectional shape: (1) The center coordinates of pit No. 1 are (94.2um, 783.6um). The cross-sectional data in the X direction were extracted, with a total of 500 data points (center coordinate X=94.2um). (2) Gaussian fitting: to obtain parameters , , , goodness of fit ; (3) Parabolic fitting: Obtaining parameters , , goodness of fit ; (4) Classification results: because , The cross-sectional shape of pit No. 1 is determined to be irregular.

[0085] 4. The full set of pitting parameters are shown in Table 1.

[0086] Table 1

[0087] S5: Generate a parameter table and a visual annotation map based on the pitting pit set and pit geometry parameters.

[0088] 1. Structured parameter output: Export the above parameter table in Excel format, which includes six fields: pit number, center coordinates, depth, length, width, and cross-sectional shape. 2. Visual generation: (1) Mark the boundary of each erosion pit with a red outline on the three-dimensional topography map; (2) Mark the number and key parameters at the center of the erosion pit; (3) Generate a 3D model with parameter annotations (based on the specified pit number), such as Figure 4 As shown.

[0089] Parameter Adjustment Instructions: This embodiment can be adapted to different scenarios by adjusting the following parameters. The adjustment rules and effects are as follows: 1. Filter window half-width When noise intensity > 10%, Setting it to 3 (7x7 windows) can improve noise reduction, but it will increase processing time. 2. Substrate screening quantile P: When the corrosion degree is relatively mild (crater depth <50μm), P can be adjusted to 90 to reduce the false negative rate of shallow crater pits; 3. Fusion decision coefficient Pit density > 5 / mm 2 hour, Adjusted to 1.5 to improve the sensitivity of fusion pit identification; 4. Fitting goodness threshold: For high-precision detection scenarios (error requirement ≤1%), the threshold can be adjusted to 0.8 to improve the accuracy of shape classification.

[0090] This invention can automatically identify all target defects, including shallow pits and fused pits, significantly reducing computational complexity and improving detection efficiency while ensuring modeling accuracy. It is applicable to the detection of pitting defects and mechanical property analysis of metal components of different sizes and working conditions.

[0091] This method does not rely on specific software or computing platforms. It is based on geometric theory and digital image processing principles and is applicable to three-dimensional morphology data with different scanning resolutions and different degrees of corrosion, thus having broad applicability.

[0092] The defect detection parameters of this method can be flexibly adjusted, including the filter window size, reference plane quantile, fusion decision coefficient, and goodness-of-fit threshold, to adapt to different metal materials and corrosion conditions.

[0093] This method identifies fused erosion pits through connected component analysis and combines distance transformation and watershed algorithm to achieve accurate fused domain splitting, with a fused erosion pit splitting accuracy of ≥95%.

[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for identifying pitting corrosion pits based on three-dimensional topographic reference surface correction and fusion domain splitting, characterized in that, The method comprises the following steps: S1: obtaining three-dimensional topographic data of a metal surface; S2: obtaining potential pitting areas according to the three-dimensional topographic data; S3: dividing the potential pitting areas into point pits and fusion pits according to the area and average area of the potential pitting areas, and splitting the fusion pits into multiple point pits by combining distance transformation and watershed algorithm to obtain a point pit set; S4: calculating pitting geometric parameters according to the point pit set; S5: generating a parameter table and a visualized labeling map according to the point pit set and the pitting geometric parameters.

2. The point pit identification method based on three-dimensional topographic datum correction and fusion domain splitting according to claim 1, wherein: the potential pitting areas are preliminarily screened based on the area to obtain preliminary single pits and suspected fusion pits; the average area of the preliminary single pits is calculated; if the area of the suspected fusion pit is greater than the product of the fusion determination coefficient and the average area of the preliminary single pit, the suspected fusion pit is a fusion pit, otherwise, it is a point pit.

3. The method of claim 2, wherein the method is based on a three-dimensional topographic reference surface for correction and fusion domain splitting of pitting corrosion pits. The fusion determination coefficient is .

4. The method of pit recognition based on three-dimensional topographic reference surface correction and fusion domain splitting according to claim 1, 2 or 3, characterized in that, distance transformation is performed on the fusion pit to calculate the distance of each pixel to the nearest background pixel, maximum value suppression is performed on the distance to retain local maximum points as seed points of the fusion pit, and the seed points are taken as markers to split the fusion pit by using the watershed algorithm to obtain multiple point pits.

5. The method of claim 1, wherein the method is based on a three-dimensional topographic reference surface for correction and fusion domain splitting of pitting corrosion pits. Gaussian weighted median filtering is performed on the depth data matrix in the three-dimensional topographic data, the base area is screened by the percentile method, and the datum is fitted to generate a pure pitting depth matrix.

6. The method of claim 5, wherein the method is based on a three-dimensional topographic reference surface for correction and fusion domain splitting of pitting corrosion pits. The base area is screened by 90%-99% percentile, and the datum is fitted by least squares method.

7. The method of claim 1, wherein the method is based on a three-dimensional topographic reference surface for correction and fusion domain splitting of pitting corrosion pits. According to the three-dimensional topographic data, the improved Otsu algorithm is used to determine the segmentation threshold, a binary matrix is generated, and small noise connected domains are filtered to obtain potential pitting areas.

8. The method of claim 7, wherein the method is based on a three-dimensional topographic reference surface correction and fusion domain splitting for pit recognition. The improved Otsu algorithm adjusts the segmentation threshold by 0.5-0.7 times weight; The small noise filtering threshold is set to 5-10 pixels.

9. The method of claim 1, wherein the method is based on a three-dimensional topographic reference surface for correction and fusion domain splitting of pitting corrosion pits. The pitting geometric parameters include maximum depth, maximum length, maximum width and cross-sectional shape.

10. The method of claim 9, wherein the method is based on a three-dimensional topographic reference surface correction and fusion domain splitting for pit recognition. Based on the zeroth, first and second order geometric moments, the major axis and minor axis of the equivalent ellipse are calculated, the major axis is taken as the maximum length, and the minor axis is taken as the maximum width; The cross-sectional shape is divided into Gaussian type, parabolic type and irregular type by the goodness of Gaussian fitting and parabolic fitting, and the fitting goodness threshold is set to 0.6-0.8.