The invention belongs to the technical field of marine corrosion detection, and particularly relates to a characterization and evaluation method of marine corrosion under a paint layer based on a pulse eddy current thermal imaging and BEMD noise reduction method.
Disclosure of Invention
The invention aims to provide a characterization and evaluation method of marine corrosion under a paint layer based on pulse vortex thermal imaging and BEMD noise reduction, which comprises the following steps of detecting a marine corrosion sample by adopting pulse vortex thermal imaging (ECPT) and obtaining corrosion image sequences of heating and cooling of the surfaces of corrosion samples with different corrosion degrees, separating the corrosion images layer by adopting the BEMD method, removing intrinsic mode functions IMF corresponding to noise, reconstructing the corrosion images, comparing corrosion areas with non-corrosion areas of the corrosion images after noise removal, and evaluating the corrosion degrees of marine corrosion test samples.
The technical scheme adopted by the invention is that the characterization and evaluation method of marine corrosion under a paint layer based on pulse eddy current thermal imaging and BEMD noise reduction method comprises the following steps:
step1, detecting a marine corrosion test sample by adopting pulse eddy current thermal imaging,
Step 2, obtaining corrosion images of the surface of the marine corrosion test sample in the heating and cooling processes,
Step 3, adopting a two-dimensional empirical mode decomposition (BEMD) method to separate different frequencies and scale features in the corrosion image layer by layer, removing an Intrinsic Mode Function (IMF) corresponding to noise, and reconstructing the corrosion image;
And 4, comparing the corroded area with the non-corroded area of the corroded image after noise removal, and evaluating the corrosion degree of the marine corrosion test sample.
The intrinsic mode function IMF meets the following judging conditions:
the difference value between the extreme point number and the zero point number in the whole data set is less than or equal to 1;
Condition (2) that at any point, the average value of the envelope defined by the local maxima and minima is zero.
Further, smooth changes of spots and pits in the corrosion image are processed by a bilinear difference method.
Further, the specific steps of processing the smooth change of spots and pits in the corrosion image by a bilinear difference method are as follows:
difference in the horizontal axis direction:
f(x,j)=f(i,j)·(i+1-x)+f(i+1,j)·(x-i)
f(x,j+1)=f(i,j+1)·(i+1-x)+f(i+1,j+1)·(x-i)
Where f (x, j) represents the interpolation function value at the (x, j) position, f (i, j) represents the value at grid point (i, j), f (i+1, j) represents the value at grid point (i+1, j), f (x, j+1) represents the value at grid point (x, j+1), f (i, j+1) represents the value at grid point (i, j+1), f (i+1, j+1) represents the value at grid point (i+1, j+1), x represents the coordinate of non-grid point in the horizontal axis direction, i represents the abscissa of the first point in the grid, j represents the ordinate of the first point in the grid.
Then, interpolation is performed in the vertical axis direction, resulting in a value f (x, y) at a non-grid point (x, y):
f(x,y)=f(x,j)·(j+1-y)+f(x,j+1)·(y-j)
Where f (x, y) represents an interpolation function value at a non-grid point (x, y), y represents a coordinate of the non-grid point in the longitudinal axis direction,
Thereby, an upper envelope can be obtainedAnd lower envelope
Wherein the method comprises the steps ofRepresenting the value at the position of the upper envelope surface (x, y),Representing the value at grid point (x, j) in the upper envelope surface,Representing the value at grid point (x, j + 1) in the upper envelope surface,Representing the value at the lower envelope surface (x, y) position,Representing the value at grid point (x, j) in the lower envelope surface,Representing the value at grid point (x, j+1) in the lower envelope surface. Calculating an upper envelopeAnd lower envelopeFor removing local low frequency trends or global structural information in the image.
Preferably, the envelope average value is adjusted based on the corrosion characteristics in the marine atmospheric environment in combination with the corrosion depth distribution weight, so that the severely corroded areas in the image are weighted more significantly in the decomposition process, and the areas can be better separated by the BEMD by giving the areas with larger depth higher weight, so that the corroded areas in the final image are clearer, which is helpful for subsequent image analysis and corrosion evaluation, and the method specifically comprises the following steps:
Calculating a corrosion depth value D (x, y) at (x, y) in the corrosion image:
q (x, y) represents the heat source intensity at the position of the corrosion image (x, y), and α (x, y) represents the thermal diffusivity at the position of the corrosion image (x, y).
Then normalizing the corrosion depth to eliminate the influence of dimension, obtaining normalized corrosion depth D norm (x, y), and further constructing an adaptive weight function of an envelope average value:
w(x,y)=1+β·Dnorm(x,y)
Wherein w (x, y) represents an adaptive weight function value corresponding to the position of the corrosion image (x, y), beta is a weight adjustment coefficient for controlling the increasing amplitude of the weight,
Finally, the adjusted average envelope is calculated in combination with the adaptive weight function:
where m 11 (x, y) represents the average envelope value at the calculated erosion image (x, y).
Further, removing an intrinsic mode function IMF corresponding to noise, and reconstructing a corrosion image comprises the following steps:
Intermediate variable h 11 (x, y) for computing the acquired IMF represents the first intermediate variable value at (x, y) acquired when computing the first component of the IMF:
h11(x,y)=f(x,y)-m11(x,y)
Where f (x, y) represents the interpolation function value at the eroded image (x, y).
The calculation of the adjusted average envelope is repeated k times until h 1k (x, y) represents the kth intermediate variable value at (x, y) obtained when calculating the first component of the IMF.
Meets the judgment condition of the IMF, and sets the judgment condition as the first component c 1 (x, y) of the IMF:
h1k(x,y)=h1(k-1)(x,y)-m1k(x,y)
c1(x,y)=h1k(x,y)
Where h 1(k-1) (x, y) represents the kth-1 intermediate variable value at (x, y) obtained when computing the first component of the IMF, and m 1k (x, y) represents the kth average envelope value at (x, y) obtained when computing the first component of the IMF.
Residual r 1 (x, y) of the corrosion image is obtained by the following equation, representing the residual value obtained by subtracting the value at the first component (x, y) of IMF from the value at the corrosion image (x, y):
r1(x,y)=f(x,y)-c1(x,y)
R 1 (x, y) was taken as a noise-removed corrosion image.
Preferably, the first component of the IMF is gaussian filtered and the pixels in the neighborhood are weighted averaged by a gaussian function to smooth the image.
Further, the degree of corrosion is assessed by the magnitude of the gray contrast of the corroded area versus the non-corroded area.
The gray contrast ratio adopts the following formula:
Wherein L M and L N respectively represent average gray values of corroded areas and non-corroded areas in the corroded image, L represents average gray values of the corroded image, M represents corroded areas, N represents non-corroded areas, δ M and δ N respectively represent standard deviations of the average gray values of the corroded areas and the non-corroded areas, L (b) is the gray value of the b-th pixel point, C represents the gray contrast value, and g is the number of pixels in the area.
Alternatively, the degree of corrosion is estimated by the differential peak shape deviation amount.
The characterization and evaluation method of marine corrosion under a paint layer based on pulse eddy current thermal imaging and BEMD noise reduction method has the beneficial effects that:
1. The present invention reduces noise interference in the eroded image by BEMD, where the eroded image sequence is considered stable, but the noise interference changes the number and location of the extremes of the eroded image sequence, thereby changing the amplitude and frequency of the eroded image sequence. BEMD is a nonlinear decomposition method based on local extreme points, can perform self-adaptive decomposition according to the characteristics of a corrosion image, and can effectively reduce noise interference in the corrosion image.
2. The invention adopts peak shape deviation normal distribution quantity to represent the temperature change process of each pixel point, has more abundant information, and is beneficial to improving the accuracy and sensitivity of representation in terms of the method.
3. Because the color value of the corrosion image sequence corresponds to the temperature value, the invention takes the contrast of the corrosion area and the non-corrosion area as the index for evaluating the BEMD denoising effect, and can intuitively reflect the denoising effect.
4. The single characteristic value has limitation in distinguishing early corrosion and middle and later corrosion, and the corrosion sample can be comprehensively evaluated by a method of fusing the differential peak shape deviation amount and the contrast ratio, so that the corrosion degree of each stage can be effectively distinguished.
Detailed Description
The invention is specially used for processing the corrosion image sequence in the vortex pulse thermal imaging, and mainly aims at reducing noise and enhancing the corrosion image, in particular to preserve corrosion characteristic information. This application is critical for detecting marine corrosion, as such corrosion information is typically very weak and easily inundated with noise.
The invention provides a characterization and evaluation method of marine corrosion under a paint layer based on pulse eddy current thermal imaging and BEMD noise reduction, which is shown in figure 3 and comprises the following steps:
step1, detecting a marine corrosion test sample by adopting pulse eddy current thermal imaging,
Step 2, obtaining corrosion images of the surface of the marine corrosion test sample in the heating and cooling processes,
Step 3, adopting a two-dimensional empirical mode decomposition (BEMD) method to separate different frequencies and scale features in the corrosion image layer by layer, removing an Intrinsic Mode Function (IMF) corresponding to noise, and reconstructing the corrosion image;
And 4, comparing the corroded area with the non-corroded area of the corroded image after noise removal, and evaluating the corrosion degree of the marine corrosion test sample.
The following is a specific procedure for the design of the present invention.
First, in the ECPT experiment, an infrared camera receives thermal radiation generated from the surface of a sample using an infrared detector, and obtains a corrosion image of the response through signal processing. However, other sources of radiation in the environment are a challenge to imaging quality. For stable, periodic radiation sources, such as room light sources and excitation coils, the method of subtracting the background frame is effective. However, the differentiation method has limitations when there are irregular, non-periodic sources of interference, such as surrounding human bodies, equipment and instruments.
Moreover, the influence of the marine environment on the carbon steel corrosion sample is complex and various, not only comprises uniform corrosion, but also comprises various corrosion forms such as pitting corrosion, crevice corrosion, stress corrosion cracking and the like, and the forms are complex and unevenly distributed, so the invention adopts a method for decomposing BEMD by two-dimensional empirical modes, and the essence of the method is that the intrinsic oscillation modes are identified through characteristic time scales in data, and then the data are decomposed into a plurality of Intrinsic Mode Functions (IMFs). The eigenmode function is a function satisfying two conditions (1) the difference between the extreme point number and the zero point number is less than or equal to 1 in the whole data set, and (2) at any point, the average value of the envelope defined by the local maxima and minima is zero.
The method comprises the following steps:
(1) Since noise interference is often represented as an extreme point in a corrosion image, finding the extreme point of a two-dimensional corrosion image I (x, y) is a key step, where x, y represents the abscissa and ordinate of any pixel in the corrosion image, and I (x, y) represents the temperature value of the pixel.
(2) Obtaining an upper envelope by bilinear difference methodAnd lower envelopeThe bilinear difference method has better smoothness and is suitable for processing smooth changes of spots and pits in the corrosion image. The bilinear difference is calculated as follows:
difference in the horizontal axis direction:
f(x,j)=f(i,j)·(i+1-x)+f(i+1,j)·(x-i)
f(x,j+1)=f(i,j+1)·(i+1-x)+f(i+1,j+1)·(x-i)
Where f (x, j) represents the interpolation function value at the (x, j) position, f (i, j) represents the value at grid point (i, j), f (i+1, j) represents the value at grid point (i+1, j), f (x, j+1) represents the value at grid point (x, j+1), f (i, j+1) represents the value at grid point (i, j+1), f (i+1, j+1) represents the value at grid point (i+1, j+1), x represents the coordinate of non-grid point in the horizontal axis direction, i represents the abscissa of the first point in the grid, j represents the ordinate of the first point in the grid.
Then, interpolation is performed in the vertical axis direction, resulting in a value f (x, y) at a non-grid point (x, y):
f(x,y)=f(x,j)·(j+1-y)+f(x,j+1)·(y-j)
Where f (x, y) represents an interpolation function value at a non-grid point (x, y), y represents a coordinate of the non-grid point in the longitudinal axis direction,
Thereby, an upper envelope can be obtainedAnd lower envelope
Wherein the method comprises the steps ofRepresenting the value at the position of the upper envelope surface (x, y),Representing the value at grid point (x, j) in the upper envelope surface,Representing the value at grid point (x, j + 1) in the upper envelope surface,Representing the value at the lower envelope surface (x, y) position,Representing the value at grid point (x, j) in the lower envelope surface,Representing the value at grid point (x, j+1) in the lower envelope surface. Calculating an upper envelopeAnd lower envelopeFor removing local low frequency trends or global structural information in the image.
(3) The average of the upper and lower envelopes is calculated. In order to aim at corrosion characteristics in the marine atmospheric environment, a method for adjusting envelope average value calculation by combining corrosion depth distribution weight is innovatively proposed. Firstly, the corrosion depth value D (x, y) at each pixel point in a corrosion image is required to be obtained, a one-dimensional thermal diffusion model is utilized to describe the temperature change process, the initial temperature is assumed to be T 0, and the temperature change of a corrosion area can be expressed as:
Wherein T (T) is a temperature value at a certain moment, T is time, Q is heat source intensity, and alpha is thermal diffusivity. Where a high corrosion depth means that the thermal resistance of the material surface and interior increases, so that more heat is accumulated in the corrosion area. Thus, a larger Q reflects deeper corrosion. A low corrosion depth means that the material has a weaker thermal diffusion capacity. Corrosion loosens the structure of the material, reduces the thermal conductivity, and results in a reduction in α. Thus, a lower α also reflects a deeper corrosion. Therefore, according to the thermal diffusion model parameters, the corrosion depth is estimated by using the following formula, and the corrosion depth is normalized to eliminate the influence of dimension:
Where Q (x, y) represents the heat source intensity at the corrosion image (x, y) location, α (x, y) represents the thermal diffusivity at the corrosion image (x, y) location, D norm (x, y) represents the normalized corrosion depth at the corrosion image (x, y) location, D max and D min are the maximum and minimum corrosion depths, respectively. Next, an adaptive weight function w (x, y) is defined, representing an adaptive weight function value corresponding to the position of the corrosion image (x, y), the weight function being based on the normalized value D norm (x, y) of the corrosion depth distribution. Considering that the greater the corrosion depth, the greater its impact on the envelope average, the weight function can be defined as:
w(x,y)=1+β·Dnorm(x,y)
Wherein, beta is a weight adjustment coefficient for controlling the increasing amplitude of the weight. Calculating an adjusted average envelope in combination with the adaptive weight function:
(4) The intermediate variable h 11 (x, y) is calculated by the following equation, representing the first intermediate variable value at (x, y) obtained when calculating the first component of the IMF:
h11(x,y)=I(x,y)-m11(x,y)
(5) Repeating steps (2) - (4) k times until h 1k (x, y), which means that the kth intermediate variable value at (x, y) obtained when calculating the first component of IMF satisfies the judgment condition of IMF, and setting it as the first component c 1 (x, y) of IMF:
h1k(x,y)=h1(k-1)(x,y)-m1k(x,y)
c1(x,y)=h1k(x,y)
(6) Residual r 1 (x, y) of the corrosion image is obtained by the following equation, representing the residual value obtained by subtracting the value at the first component (x, y) of IMF from the value at the corrosion image (x, y):
r1(x,y)=f(x,y)-c1(x,y)
(7) Repeating the above steps with r 1 (x, y) as the noise-removed corrosion image until the number of extreme points in one residual component is less than 2, the corrosion image I (x, y) can be expressed as a superposition of all IMFS components, as shown in the following formula:
Where c a (x, y) represents the a-th component of the IMF, r h (x, y) represents the h-th residual, h represents the BEMD decomposition is complete until the h-th residual is obtained.
BEMD has multi-scale adaptive properties that enable layer-by-layer separation of different frequencies and scale features in a corrosion image, where higher frequency IMFs often contain fine noise information, while lower frequency IMFs retain the main structural information and corrosion features of the corrosion image, where the first IMF often contains the highest frequency component, which is often primarily noise. However, simply removing the first IMF may lose some of the real information about corrosion, and therefore, the first IMF is gaussian filtered based on BEMD, and the gaussian filter smoothes the corrosion image by weighted averaging pixels in the neighborhood by the gaussian function, as follows:
(1) A filter window is first defined, of size q x q, q representing the length of the filter window.
(2) The gaussian weights are calculated from the following equation:
Wherein G (u, v) represents a gaussian weight value, u represents a horizontal offset in the filter window, v represents a horizontal offset in the filter window, σ is a standard deviation of a gaussian function, and the smoothness of the filter is determined.
(3) Gaussian filtering is applied to the first IMF component c 1 (x, y) and normalized:
c 1 (x+u, y+v) represents the value at the first component (x+u, y+v) of IMF, c' 1 (x, y) represents the first component of IMF after gaussian filtering and normalization, W is the sum of gaussian weights, and can be derived from the following equation:
And reconstructing the first IMF component obtained after Gaussian filtering, the residual IMF and residual error items to generate a noise-reduced corrosion image. In the reconstructed corrosion image, noise is significantly reduced, while meaningful corrosion characteristics are preserved and enhanced.
Example 1
The invention can use the degree of deviation of the temperature response curve from normal distribution to represent the temperature change characteristic of each pixel point in the corrosion image, and the temperature change characteristic is shown in the following formula. The characteristic parameter is essentially the third-order central moment of the random signal, which is used to measure the degree of deviation of the random signal from the normal distribution.
Where sk represents the degree to which the temperature response curve at the (x, y) position in the eroded image deviates from the normal distribution, f s (x, y) represents the temperature sample value of the s-th frame at the eroded image (x, y), s represents the number of frames of the current pixel point,For the mean of the temperature samples of the s-th frame at the eroded image (x, y), p is the total frame number of the eroded image.
The invention is used for representing the deviation degree of the temperature curve from the normal state, because the change of the magnetic conductivity, the electric conductivity and the thermal conductivity of the material can influence the heating and cooling processes of the material under the action of external excitation, and the temperature curve is deflected, left deflected or right deflected. According to the analysis, the temperature response curves of the pixel points in the corroded area and the non-corroded area of the material surface deviate from normal distribution to different degrees, so that the temperature response curves can be used for reconstructing a corroded image, the calculation steps are as shown in fig. 4, firstly, a corroded image sequence of a corroded sample is obtained, BEMD noise reduction processing is carried out on each frame of image, then, the temperature change curve of each pixel point is calculated, normalization processing is carried out to obtain data peak normal distribution quantity, and the peak normal distribution quantity of each pixel point is used as the value of the pixel point in the reconstructed image, so that a reconstructed image is obtained.
Example 2
Since the color value of the corroded image sequence corresponds to the temperature value, the invention takes the contrast of the corroded area and the non-corroded area as an index for evaluating the BEMD denoising effect. The contrast is measured by the degree of light, dark change or color difference in the corrosion image, the larger the contrast is, the larger the brightness or color difference between different areas is, the clearer the detail features are, and for the corrosion image of the corrosion sample, when the contrast value between the corrosion area and the non-corrosion area is larger, the higher the distinction degree of the corrosion area and the non-corrosion area is, the more obvious demarcation is provided, and the corrosion detection and evaluation are facilitated. And comparing the contrast indexes of the corrosion images before and after the BEMD denoising, thereby judging the denoising effect of the BEMD. The local contrast calculation formula is:
Wherein L M and L N respectively represent average gray values of corroded areas and non-corroded areas in the corroded image, L represents average gray values of the corroded image, M represents corroded areas, N represents non-corroded areas, δ M and δ N respectively represent standard deviations of the average gray values of the corroded areas and the non-corroded areas, L (b) is the gray value of the b-th pixel point, C represents the gray contrast value, and g is the number of pixels in the area. The standard deviation may help detect outliers or extreme data points, which is particularly important in the processing of the erosion image. By considering the standard deviation in the contrast calculation, the interference of the abnormal value on the result can be eliminated in the corrosion identification, and the stability and accuracy of the contrast evaluation can be improved. And the degree of dispersion of the data points relative to the mean value can be measured, so that the mean value and the standard deviation are combined in corrosion detection, the data distribution range of a corrosion area can be determined, and the characteristics of different areas can be distinguished more accurately.
Example 3
According to the method, the difference peak shape deviation amount and the contrast of the corroded area and the non-corroded area of the reconstructed corroded image after denoising are fused, the difference peak shape deviation amount and the contrast of the corroded area and the non-corroded area are used as indexes for comprehensively evaluating the corrosion degree, and corrosion samples under different corrosion degrees are distinguished, so that the evaluation accuracy is improved.
The evaluation flow is as shown in fig. 5, firstly, calculating the temperature change curve of each pixel point and carrying out normalization processing to obtain the data peak shape normal distribution quantity, using the peak shape normal distribution quantity of each pixel point as the value of the pixel point in the reconstructed image to obtain a reconstructed image and obtaining a reconstructed corrosion image by using the skewness, subtracting the average skewness value of the non-corroded area from the average skewness value corresponding to each pixel point in the reconstructed image to obtain the differential skewness characteristic value, meanwhile, calculating the contrast value of the corroded area and the non-corroded area, finally carrying out multidimensional data visualization analysis based on the two characteristic values, using the differential skewness characteristic value as an abscissa, using the contrast characteristic value as an ordinate, and displaying the corrosion degree of each sample in the form of a coordinate point, wherein the corrosion degree evaluation can not accurately evaluate the corrosion degree due to the non-monotonicity of the corrosion degree along with time only by using the single characteristic value, so that the corrosion degree of different degrees can be distinguished after the characteristic value is increased.
The above embodiments are provided to illustrate the technical concept and features of the present invention and are intended to enable those skilled in the art to understand the content of the present invention and implement the same, and are not intended to limit the scope of the present invention. All equivalent changes or modifications made in accordance with the spirit of the present invention should be construed to be included in the scope of the present invention.