Erosion pit identification method based on morphological processing method and storage medium
Through the morphological treatment method, the data processing is performed using a three-dimensional morphological scanner and MATLAB software, the problem of insufficient standardization and automation of corrosion pit identification in the prior art is solved, and more accurate and standardized corrosion pit identification is achieved.
Patent Information
- Application Number
- CN202411888251.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-15
AI Technical Summary
The prior art has problems of insufficient standardization and automation in the identification process of corrosion pits, especially in the extraction of geometric parameters of corrosion pits in complex shapes, which can easily lead to data loss or large errors.
The etching pit identification method based on morphological treatment methods is adopted, corrosion data is obtained through a three-dimensional morphology scanner, and data preprocessing and analysis is performed using MATLAB software, including depth matrix blocking, etching pit expansion point determination and equivalent radius calculation to achieve automated identification.
This method improves the accuracy and standardization of pit identification, solves the problems of traditional methods with strong subjectivity and incomplete data, and provides more accurate geometric data to support mechanical analysis.
Smart Images

Figure CN119830371A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of steel structure corrosion pit recognition, and in particular to a corrosion pit recognition method and a storage medium based on a morphological processing method. Background Art
[0002] Corrosion in the natural environment can cause changes in the mechanical behavior of many components, and even lead to premature end of the life cycle. The pits generated by corrosion on the surface of components will cause stress concentration, which can easily form fatigue cracks under reciprocating loads such as vehicles and wind. Fatigue failure is a brittle failure with no obvious signs before failure, which will lead to greater safety hazards in the structure.
[0003] At present, the research on corrosion pits (for example: CN118351990A, CN115937217A) is still mostly in the manual and semi-automated stage, especially in the extraction of geometric parameters of complex-shaped pits, there are problems of insufficient standardization and automation. Many studies rely on three-dimensional morphology scanners to collect corrosion surface data, but two-dimensional cross-sectional data is often used to extract pit features during the analysis process. This method has limitations in capturing the geometry of pits, especially in pits with complex shapes, where data may be lost or produce large errors. In addition, corrosion pits are usually ellipsoidal, and it is difficult to accurately obtain the true radius and depth of all pits on the same cross section, which may cause the extracted cross section to be inconsistent with the plane where the true pit depth is located.
[0004] In view of the above problems, it is necessary to find a new method for pit identification. Summary of the invention
[0005] The purpose of the present invention is to provide a method for identifying etch pits based on a morphological processing method, so as to overcome the deficiencies of the prior art.
[0006] Another object of the present application is to provide a storage medium.
[0007] The scheme of this application is as follows:
[0008] A method for identifying erosion pits based on a morphological processing method comprises the following steps:
[0009] S100, corrosion data preprocessing: determining the corrosion pit expansion point;
[0010] S200, determining the equivalent radius of the etch pit at each etch pit expansion point.
[0011] Further, the step S100 includes the following sub-steps:
[0012] S101, obtaining corrosion information: first, obtaining a three-dimensional corrosion image of the component at any time, and then obtaining a depth matrix X;
[0013] S102, the component depth matrix X is divided into N Q-order sub-matrices, and the central elements of the first to Nth Q-order sub-matrices are all used as etch pit candidate points to generate an etch pit candidate point sequence {P 1 ,P 2 ,P 3 ......P N}At the same time, record any j-th pit candidate point P j The number of columns in the X matrix Number of lines Calculate the average value PJ of the first to Nth Q-order submatrix elements 1 ~PJ N ;
[0014] S103, calculate the sub-matrix index sequence: {E1, E2, E3, ..., E M}.
[0015] Further, the method of forming the depth matrix X in S101 is: importing the three-dimensional erosion image into the VK-X Series software for processing to obtain a height value matrix H;
[0016] The height value matrix H is processed to form the depth matrix X: the minimum value of the elements in the H matrix is recorded as h min ; Each element of the H matrix is related to |h min |The matrix obtained by adding is the depth matrix X.
[0017] Further, the value of Q in step S102 is 5.
[0018] Further, step S103 includes the following sub-steps:
[0019] S103-1, setting depth threshold D H With the circumference threshold D C ;
[0020] S103-2, initialization setting: parameter n is assigned to 1, parameter M is assigned to 1;
[0021] S103-3, determine the size of n and N:
[0022] If n is greater than N, execute step S200;
[0023] If n is less than or equal to N, execute step S103-4;
[0024] S103-4, determine P n With D H Size:
[0025] If P n Greater than or equal to D H , E M= n, increment the assignment of M by 1 and increment the assignment of n by 1; return to step S103-3 (i.e., repeat steps S103-3 to S103-4);
[0026] If P n is less than D H , increment the assignment of n by 1, and return to step S103-3 (i.e., repeat steps S103-3 to S103-4).
[0027] Furthermore, D in step S103-1 H takes the standard deviation of all elements of the depth matrix X; D c takes the average value of all elements of the depth matrix X.
[0028] Furthermore, the step 200 includes the following sub-steps:
[0029] S201, set the etch pit expansion point counter m = 1;
[0030] S202, initialize the setting parameters: the radius iteration counter i = 1, the starting radius r 1 = Q / 2, the radius iteration increment Δr = 1;
[0031] S203, when m = 1, go to step S204; when m > 1, go to step S205;
[0032] S204, the first interruption determination of the first etch pit point;
[0033] S205, the first interruption determination of other etch pit points;
[0034] S206, the second interruption determination, determine the equivalent radius r of the m-th etch pit expansion point Em ;
[0035] S207, logical judgment:
[0036] If m = M, output the result: the output result is the equivalent radius r of the M etch pit expansion points E1 ~r EM ;
[0037] If m < M, then assign m + 1 to m and return to Step5.
[0038] Furthermore, step S204 includes the following sub-steps:
[0039] S204-1, solve the circumferential mean A of the lower etch pit boundary at the current radius r i ; ri ;
[0040] S204-2, logical judgment:
[0041] (1) If r i Assign values to pit expansion points The first interruption radius r I , and let I = i; then make the following logical judgment:
[0042] (1.1) If I>1, go to step S206;
[0043] (1.2) If I=1, Assign a value of 0 and proceed to step S207;
[0044] (2) If Greater than D C , i+1 is assigned to i, r i-1 +Δr is assigned to r i ; Return to step S204-1.
[0045] Further, step S205 includes the following sub-steps:
[0046] S205-1, calculate D1 sequence, D2 i Sequence, D3 i sequence, current radius r i The circumferential mean of the lower pit boundary
[0047] S205-2, initialize the first interrupt counter w=0;
[0048] S205-3, w+1 is assigned to w;
[0049] S205-4, logical reasoning:
[0050] (1) If w = m, then and D C Make the following judgment:
[0051] (1.1) If r i Assign values to pit expansion points The first interruption radius r I , and let I = i, and then continue the following logical judgment: if I>1, go to step S206; if I = 1, Assign a value of 0 and go to Step 10;
[0052] (1.2) If i+1 is assigned to i, r i-1 +Δr is assigned to r i ; Return to step S205-1;
[0053] (2) If w is not equal to m, make the following judgment:
[0054] (2.1) If: If the pits intersect, the expansion point of the pits is The first interruption radius r I =r i -Δr, and set I=i, and go to step S206;
[0055] (2.2) If: Determine the content of the pit. Assign a value of 0 and go to Step 10;
[0056] (2.3) If: Return to step S205-3.
[0057] Further, step S206 includes the following sub-steps:
[0058] S206-1, calculate the expansion point of the erosion pit The average value of the circumference of the lower pit boundary The absolute rate of change sequence of :
[0059] in, j is any natural number from 1 to I-1.
[0060] S206-2, calculate the transition radius r T sequence:
[0061] First, find |υ(A r )|The k largest values of a sequence: in,
[0062] Secondly, find the r )|The k largest values of the sequence The corresponding rate radius is taken as the transition radius r T sequence: Among them, with any The corresponding velocity radius is r j+1 ;
[0063] S206-3, calculate the equivalent radius r of the mth pit expansion point Em ;
[0064]
[0065] Furthermore, the output result in step S207 also includes: the column number and row number of the 1st to Mth etch pit expansion points in the X matrix.
[0066] Furthermore, the circumferential mean The calculation method includes the following steps:
[0067] Step a, calculate the pit expansion point The Euclidean distance to all elements in the X matrix; among them, the erosion pit expansion point Euclidean distance to any element in X matrix The calculation is done using the following formula:
[0068]
[0069] in, Represented as pit expansion points x, y are the number of columns and rows of any element of the X matrix;
[0070] Step b, the X matrix satisfies The elements of the circle are called circular elements, and then the average value of the circular elements obtained above is the circular mean.
[0071] Further, the D1 sequence and D2 sequence in step S205-1 i Sequence, D3 i The sequence is explained as follows:
[0072] D1 sequence: {R 1 ,R 2 ,R 3 C m-1}; {R 1 ,R 2 ,R 3 ...R m-1} indicates the current pit expansion point and distance; Any pit expansion point The distance is Represented as pit expansion points The number of columns and rows in the X matrix; for The number of columns and rows in the X matrix;
[0073] D2 i sequence:
[0074] D3 i sequence:
[0075] A storage medium, characterized in that it stores a computer program, wherein the computer program is used to execute the aforementioned pit identification method.
[0076] The physical meaning of the parameters in this application:
[0077] H: height value matrix;
[0078] h min : The minimum value of the height value matrix;
[0079] X: depth matrix;
[0080] Q: The order of the submatrix, usually 5;
[0081] N: the total number of sub-matrices;
[0082] M: the total number of erosion pit expansion points;
[0083] D H : depth threshold;
[0084] D C : Circumference threshold;
[0085] C Index : Circumference index
[0086] n: pit candidate point counter;
[0087] m: pit expansion point counter;
[0088] i: erosion radius iteration counter;
[0089] Δr: iterative increment of pit radius;
[0090] w: first interrupt counter;
[0091] P 1 ,P 2 ,P 3 ......P N : The 1st, 2nd, ... Nth pit candidate points;
[0092] PJ 1 ~PJ N : The average value of the first to Nth Q-order submatrix elements;
[0093] E 1 ,E 2 ,E 3 ......E M : indexes of the 1st, 2nd, ...Mth erosion pit expansion points;
[0094] R 1 ,R 2 ,R 3 ,……R (m-1) : The distance between the center of the pit being identified and the 1st, 2nd…(m-1)th identified pits;
[0095] A ri : At radius r i The average circumference of the pit under
[0096] I: number of iterations of the first interruption radius;
[0097] r i : Iteration radius
[0098] r I : The first interruption radius;
[0099] r T : transition radius;
[0100] r E : equivalent radius;
[0101] k: number of transition radii;
[0102] The radius and value of the pit being identified and the 1st, 2nd, ... (m-1)th identified pits;
[0103] The absolute value of the difference in radius between the pit being identified and the 1st, 2nd, ... (m-1)th identified pits.
[0104] Beneficial effects of the present invention:
[0105] First, this application combines a three-dimensional topography scanner with MATLAB software, uses image acquisition technology to achieve numerical processing of the corroded surface, sets rules in MATLAB for data analysis, and automatically and uniformly identifies pits. This method provides standardized geometric data support for subsequent mechanical analysis, solves the problems of strong subjectivity and incomplete data in traditional methods, and makes pit identification more accurate and standardized.
[0106] Second, the input of this application. BRIEF DESCRIPTION OF THE DRAWINGS
[0107] The present application is further described in detail below in conjunction with the embodiments in the accompanying drawings, but does not constitute any limitation to the present application.
[0108] Figure 1 It is a schematic diagram of the corrosion data preprocessing process of this application.
[0109] Figure 2 It is a schematic diagram of the process of the pit expansion process of the present application.
[0110] Figure 3 It is an explanatory diagram of the absolute rate of change of this application.
[0111] Figure 4This is the D1 sequence calculation diagram of this application (the blue circle is the pit that has been identified, and the red circle is the pit that is expanding).
[0112] Figure 5 This is D2 of this application i With D3 i Sequence calculation diagram (blue circles are identified pits, and red circles are expanding pits).
[0113] Figure 6 This is the result diagram of this application. DETAILED DESCRIPTION
[0114] <Example 1: A method for identifying pits based on morphological processing method>
[0115] like Figure 1 As shown, a pit recognition method based on morphological processing method is divided into two steps: I. corrosion data preprocessing, II. pit boundary expansion.
[0116] I. Corrosion data preprocessing:
[0117] Step 1, obtain the basic corrosion information and calculate the depth matrix X.
[0118] A three-dimensional corrosion map of a steel component at any corrosion time is obtained by scanning with a three-dimensional morphology scanner, and the three-dimensional corrosion map is imported into the VK-X Series software for processing, and a csv file of a three-dimensional morphology height value matrix can be exported, which is then imported into the MATLAB software for processing to form a depth matrix X;
[0119] The function of MATLAB processing is: find the minimum value of the matrix in the CSV file (the minimum value is usually a negative value); then add the absolute value of the minimum value to each value in the matrix so that each value in the matrix is greater than or equal to 0;
[0120] Step 2, block the depth matrix X into N Q-order sub-matrices (the edges of the X matrix that cannot be blocked can be directly discarded; for example, if the X matrix is 10001×10002, when blocking, the data of the 10001th row and the 10001th to 10002th columns are discarded);
[0121] The central elements of the first to Nth Q-order submatrices are all used as candidate etch points to generate a candidate etch point sequence {P 1 ,P 2 ,P 3 ......P N}At the same time, record any j-th pit candidate point P j The number of columns in the X matrix Number of lines In addition, the average value PJ of the first to Nth Q-order submatrix elements is calculated 1 ,PJ 2 ,PJ 3 ,......,PJ N ;
[0122] By calculating the mean of each submatrix, these candidate points represent possible pit expansion points:
[0123] The block rules are as follows:
[0124] (1) The order Q of the submatrix is generally chosen to be an odd number (such as 1, 3, 5, etc.), which can simplify the block process of the deep matrix X. If an even number is chosen as the order, the block rule will become more complicated.
[0125] (2) Starting from Q = 1, select in sequence until the predetermined time complexity and space complexity requirements are met. In general, selecting Q = 5 can reasonably balance the computational cost while ensuring computational accuracy.
[0126] The code for step 2 is as follows:
[0127] ##
[0128] % Define the effective area according to the specimen size, for example, the sub-matrix of the block is 5-order, and the order of the block is generally an odd number
[0129] Q = 5;
[0130] %For example Figure 3 , Q is 5, that is, the block is a 5-order submatrix (that is, a Q×Q matrix), and the starting point needs to be determined as (5+1) / 2=3, so that the index will not have traversal errors, and (3,3) is the center of the submatrix.
[0131] start=(Q+1) / 2;
[0132] space=floor(Q / 2); %space is the integer of Q / 2 rounded down
[0133] %The following codes are areas that need to be segmented
[0134] effect_Hup=start;% Upper starting point
[0135] effect_Hdown = N0-space; % lower end point
[0136] effect_Hleft=start; %Left starting point
[0137] effect_Hright=M0-space;%right end point
[0138] ##.
[0139] Step 3, calculate the sub-matrix index sequence (E1, E2, E3, ..., E M )(M is less than or equal to N; the specific value of M is obtained by calculation through sub-steps), which includes the following sub-steps;
[0140] Step 3-1, set the depth threshold D H With the circumference threshold D C ;
[0141] Among them, the depth threshold D H The condition used to determine whether a candidate point can be used as a pit expansion point; usually D H Selecting the standard deviation std(X) of X can effectively reflect the volatility of the corrosion surface;
[0142] Among them, the circumference threshold D C It is used to judge whether the pit has reached its expansion limit, thus deciding the end of pit identification; D C Selecting the mean value of X, mean(X), can better reflect the boundary state of the pit, especially for areas with deeper corrosion;
[0143] Among them, the two thresholds can be appropriately adjusted according to the corrosion morphology observed in the test or simulation;
[0144] Step 3-2, initialization setting: parameter n is assigned to 1, parameter M is assigned to 1;
[0145] Step 3-3, determine the size of n and N:
[0146] If n is greater than N, execute Step 4;
[0147] If n is less than or equal to N, execute Step 3-4;
[0148] Step 3-4, determine PJ n With D H Size:
[0149] If PJ n Greater than or equal to D H , E M =n, the value of M increases by 1, and the value of n increases by 1; return to step Step3-3 (i.e., repeat steps Step3-3 and Step3-4);
[0150] If PJ n Less than D H , the value of n is increased by 1, and the process returns to Step 3-3 (i.e., repeating Step 3-3 and Step 3-4).
[0151] II. Pit boundary expansion
[0152] Step 4, set the pit expansion point counter m = 1;
[0153] Step 5, initialize the setting parameters: radius iteration counter i = 1, starting radius r 1 =Q / 2, radius iteration increment Δr=1;
[0154] Step 6, when m=1, go to Step 7; when m>1, go to Step 8;
[0155] Step 7, first interruption determination of the first pit point, which includes the following sub-steps:
[0156] Step 7-1, solve the current radius r i The circumferential mean of the lower pit boundary Among them, the circumferential mean The calculation method is as follows:
[0157] Step a, calculate the pit expansion point The Euclidean distance to all elements in the X matrix;
[0158] Among them, the pit expansion point Euclidean distance to any element in X matrix The calculation is done using the following formula:
[0159]
[0160] in, Represented as pit expansion points The number of columns and rows ( It can be known from step 2); x, y are the number of columns and rows of any element of the X matrix.
[0161] For example, Indicates the expansion point of the erosion pit In the X matrix, it is at column 901 and row 136.
[0162] Step b, the X matrix satisfies ([r i ] indicates r i The elements obtained by rounding are called circular elements, and then the average value of the circular elements obtained above is the circular mean.
[0163] Step 7-2, logical judgment:
[0164] (1) If (That is, whether the mean of the X matrix where the pit boundary is located is less than the threshold D C ), it is determined that the erosion pit has reached its expansion limit, and r i Assign values to pit expansion points The first interruption radius r I , and let I = i; make the following logical judgment:
[0165] (1.1) If I>1, go to Step 9;
[0166] (1.2) If I=1, Assign a value of 0 (essentially deleting the pit point), and go to Step 10;
[0167] (2) If Greater than D C , i+1 is assigned to i, r i-1 +Δr is assigned to r i (i.e., the superposition radius r i Increase Δr) (For example, the above process: r 2 =r 1 +Δr); return to step Step7-1 (i.e., repeat steps Step7-1 to Step7-2);
[0168] Step 8, the first interruption determination of other pit points (used to resolve pit conflicts (intersection and inclusion) and maximum boundaries (A ri ≤D C )question):
[0169] Step8-1, calculate the D1 sequence, D2 i Sequence, D3 i sequence, current radius r i The circumferential mean of the lower pit boundary;
[0170] D1 sequence: {R 1 ,R 2 ,R 3 μR m-1};
[0171] {R 1 ,R 2 ,R 3 μR m-1} indicates the current pit expansion point and distance;
[0172] Any pit expansion point The distance is
[0173] in, Represented as pit expansion points The number of columns and rows in the X matrix; for The number of columns and rows in the X matrix;
[0174] D2 i sequence: (For example: when m=10, D2 i The sequence has 9 data; when m=20, D2 i The sequence has 19 data)
[0175] D3 i sequence:
[0176] Current radius r i The circumferential mean of the lower pit boundary The calculation method is as follows:
[0177] Step a, calculate the pit expansion point The Euclidean distance to all elements in the X matrix;
[0178] Among them, the pit expansion point Euclidean distance to any element in X matrix The calculation is done using the following formula:
[0179]
[0180] in, Represented as pit expansion points The number of columns and rows ( It can be known from step 2); x, y are the number of columns and rows of any element of the X matrix.
[0181] For example, Indicates the expansion point of the erosion pit In the X matrix, it is at column 901 and row 136.
[0182] Step b, the X matrix satisfies ([r i ] indicates r i The elements obtained by rounding are called circular elements, and then the average value of the circular elements obtained above is the circular mean.
[0183] Step 8-2, initialize the first interrupt counter w=0;
[0184] Step 8-3, w+1 is assigned to w (i.e. w=w+1);
[0185] Step8-4, logical judgment:
[0186] (1) If w = m, then for A ri and D C Make the following judgment:
[0187] (1.1) If A ri ≤D C , it is determined that the erosion pit has reached its expansion limit, and r i Assign values to pit expansion points The first interruption radius r I , and let I = i, and then continue with the following logical judgment:
[0188] (1.1.1) If I>1, go to Step 9;
[0189] (1.1.2) If I=1, Assign a value of 0 (essentially deleting the pit point), and go to Step 10;
[0190] (1.2) If A ri >D C , i+1 is assigned to i, r i-1 +Δr is assigned to r i (i.e., the superposition radius r i Increase Δr); return to step Step8-1 (i.e., repeat steps Step8-1 to Step8-4);
[0191] (2) If w is not equal to m, make the following judgment:
[0192] (2.1) If: If the pits intersect, the expansion point of the pits is The first interruption radius r I =r i -Δr, and let I=i, and go to Step 9;
[0193] (2.2) If: If the pit inclusion occurs, Assign a value of 0 (essentially deleting the pit point), and go to Step 10;
[0194] (2.3) If: Return to step Step8-3 (i.e., repeat steps Step8-3 to Step8-4);
[0195] Step 9, second interruption judgment (used to optimize the boundary conditions of the pit, that is, after the first interruption judgment, the identified circumference still cannot accurately reflect the characteristics of the pit, so the pit boundary needs to be further optimized):
[0196] When pits or secondary pits are found, the curvature of the corrosion plane usually changes rapidly. By calculating the rate of change of the mean value of the pit boundary circle to capture each level of pits, the influence of the actual morphology of the pits on the mechanical properties of the components can be more accurately characterized.
[0197] The specific steps of the second interruption determination are:
[0198] Step 9-1, calculate the expansion point of the erosion pit The average value of the circumference of the lower pit boundary The absolute rate of change sequence |υ(A r )|:
[0199] Among them, Figure 3 As shown, j is any natural number from 1 to I-1.
[0200] Step 9-2, calculate the transition radius r T Sequence (larger change rate can reflect the turning point of the boundaries of different levels of pits):
[0201] First, find |υ(A r )|The k largest values of a sequence: (For the value of k, after debugging, Transition radius It can better reflect the boundary state of the erosion pit; ceil is the ceiling function, that is, rounded up);
[0202] Secondly, find the r )|The k largest values of the sequence The corresponding rate radius is taken as the transition radius r T sequence: (Example: The corresponding velocity radius is r j+1 ).
[0203] Step 9-3, calculate the sequence The average value of is taken as the equivalent radius of the erosion pit
[0204]
[0205] Step 10, logical judgment:
[0206] (1) If m = M, then all the pit expansion points {E 1 ,E 2 ,E 3 ……E MExpansion is completed. Save the pit feature parameters and go to Step 10 for visualization processing.
[0207] (2) If m < M, then assign m + 1 to m and return to Step 5 (i.e., repeat steps Step 5 to Step 10) (initialize the parameters and continue to expand the next pit expansion point).
[0208] Step 11, Visualization processing:
[0209] Based on the viscicles function in MATLAB, draw the circumferences of the pit boundaries for the corresponding pit feature parameters of all pit expansion points.
[0210] 1. First, use the surf function to draw the pseudocolor map of the corrosion surface
[0211] 2. Use viscircles to draw the corresponding circumferences to reflect the characteristics of the pits
[0212] The code is as follows:
[0213] for i = 1:(size(PitData,1))
[0214] viscircles([PitData(i,1),PitData(i,2)],PitData(i,4),'Color','black','LineWidth',1.5,'LineStyle','-'); % PitData is the information of all pits, including coordinates, radius, and depth. Through viscircles, the corresponding circles can be drawn to reflect the characteristics of the pits
[0215] end
[0216] The above - mentioned embodiments are the preferred embodiments of the present invention, which are only used to conveniently illustrate the present invention and do not impose any form of limitation on the present invention. Any person with ordinary knowledge in the technical field, without departing from the technical features of the present invention, makes local modifications or equivalent embodiments by using the technical content disclosed in the present invention and without departing from the technical feature content of the present invention, still fall within the scope of the technical features of the present invention.
Claims
1. A method for identifying pits based on morphological processing method, characterized in that: It includes the following steps: S100, Corrosion data preprocessing: Determine the corrosion pit expansion points; S200, Determine the equivalent radius of the corrosion pit for each corrosion pit expansion point.
2. The method for identifying etch pits according to claim 1, characterized in that: The step S100 includes the following sub-steps: S101, Obtain corrosion information: First, obtain the three-dimensional corrosion image of the component at any time, and then obtain the depth matrix X; S102, the component depth matrix X is divided into N Q-order sub-matrices, and the central elements of the first to Nth Q-order sub-matrices are all used as etch pit candidate points to generate an etch pit candidate point sequence {P1, P2, P3...P N }At the same time, record any j-th pit candidate point P j The number of columns in the X matrix Number of lines Calculate the average values of the first to Nth Q-order submatrix elements PJ1~PJ N ; S103, calculate the sub-matrix index sequence: {E1, E2, E3, ..., E M }.
3. The method for identifying etch pits according to claim 2, characterized in that: The method for forming the depth matrix X in S101 is: Import the three-dimensional corrosion image into the VK-X Series software for processing to obtain the height value matrix H; The height value matrix H is processed to form the depth matrix X: the minimum value of the elements in the H matrix is recorded as h min ; Each element of the H matrix is related to |h min |The matrix obtained by adding is the depth matrix X.
4. The method for identifying etch pits according to claim 2, characterized in that: The value of Q in step S102 is 5.
5. The method for identifying etch pits according to claim 2, characterized in that: Step S103 includes the following sub-steps; S103-1, setting depth threshold D H With the circumference threshold D C ; S103-2, Initialization setting: Assign the parameter n as 1 and the parameter M as 1; S103-3, Judge the size of n and N: If n is greater than N, execute step S200; If n is less than or equal to N, execute step S103-4; S103-4, determine P n With D H Size: If P n Greater than or equal to D H , E M =n, the value of M increases by 1, and the value of n increases by 1; return to step S103-3 (i.e., repeat steps S103-3 to S103-4); If P n Less than D H , the value of n is increased by 1, and the process returns to step S103-3 (i.e., repeating steps S103-3 to S103-4).
6. The method for identifying etch pits according to claim 5, characterized in that: D in step S103-1 H The standard deviation of all elements of the depth matrix X; D c Take the average of all elements of the depth matrix X.
7. The method for identifying etch pits according to claim 1, characterized in that: The step 200 includes the following sub-steps: S201, Set the corrosion pit expansion point counter m = 1; S202, Initialize the setting parameters: The radius iteration counter i = 1, the starting radius r1 = Q / 2, and the radius iteration increment Δr = 1; S203, When m = 1, go to step S204; When m > 1, go to step S205; S204, The first interruption determination of the first corrosion pit point; S205, The first interruption determination of other corrosion pit points; S206, second interruption determination, determining the equivalent radius of the mth pit expansion point S207, Logical judgment: If m=M, output result: The output result is the equivalent radius of M pit expansion points If m < M, assign m + 1 to m and return to Step5.
8. The method for identifying etch pits according to claim 1, characterized in that: Step S204 includes the following sub-steps: S204-1, solve the current radius r i The circumferential mean of the lower pit boundary S204-2, Logical judgment: (1) If r i Assign values to pit expansion points The first interruption radius r I , and let I = i; then make the following logical judgment: (1.1) If I > 1, enter step S206; (1.2) If I=1, Assign a value of 0 and proceed to step S207; (2) If Greater than D C , i+1 is assigned to i, r i-1 +Δr is assigned to r i ; Return to step S204-1; Step S205 includes the following sub-steps: S205-1, calculate D1 sequence, D2 i Sequence, D3 i sequence, current radius r i The circumferential mean of the lower pit boundary S205-2, Initialize the first interruption counter w = 0; S205-3, Assign w + 1 to w; S205-4, Logical judgment: (1) If w = m, then and D C Make the following judgment: (1.1) If r i Assign values to pit expansion points The first interruption radius r I , and let I = i, and then continue the following logical judgment: if I>1, go to step S206; if I = 1, Assign a value of 0 and go to Step 10; (1.2) If i+1 is assigned to i, r i-1 +Δr is assigned to r i ; Return to step S205-1; (2) If w is not equal to m, make the following judgment: (2.1) If: If the pits intersect, the expansion point of the pits is The first interruption radius r I =r i -Δr, and set I=i, and go to step S206; (2.2) If: Determine the content of the pit. Assign a value of 0 and go to Step 10; (2.3) If: Return to step S205-3; Step S206 includes the following sub-steps: S206-1, calculate the expansion point of the erosion pit The average value of the circumference of the lower pit boundary The absolute rate of change sequence of : in, j is any natural number from 1 to I-1; S206-2, calculate the transition radius r T sequence: First, find |υ(A r )|The k largest values of a sequence: in, Secondly, find the r )|The k largest values of the sequence The corresponding rate radius is taken as the transition radius r T sequence: Among them, with any The corresponding velocity radius is r j+1 ; S206-3, calculate the equivalent radius of the mth pit expansion point 9. The method for identifying etch pits according to claim 8, characterized in that: Circumferential mean The calculation method includes the following steps: Step a, calculate the pit expansion point The Euclidean distance to all elements in the X matrix; among them, the erosion pit expansion point Euclidean distance to any element in X matrix The calculation is done using the following formula: in, Represented as pit expansion points x, y are the number of columns and rows of any element of the X matrix; Step b, the X matrix satisfies The elements of the circle are called circular elements, and then the average value of the circular elements obtained above is the circular mean. The D1 sequence and D2 sequence in step S205-1 i Sequence, D3 i The sequence is explained as follows: D1 sequence: {R1,R2,R3...R m-1 }; {R1, R2, R3...R m-1 } indicates the current pit expansion point and distance; Any pit expansion point The distance is Represented as pit expansion points The number of columns and rows in the X matrix; for The number of columns and rows in the X matrix; D2 i sequence: D3 i Ranking:
10. A storage medium, characterized in that: It stores a computer program, and the computer program is used to execute the corrosion pit recognition method described in any one of claims 1 to 9.
Citation Information
Patent Citations
Method for automatically detecting corrosion pit by using 3D convolution and correlation operator
CN115937217A
Metal structure corrosion fatigue coupling life simulation method based on cellular automaton and continuum mechanics
CN118351990A