# Evaluation of Corrosion Growth on SS304 Based on Textural and Color Features from Image Analysis

Authors: Ramana M. Pidaparti; Brian Hinderliter; Darshan Maskey
Journal: ISRN Corrosion
 (2013)

---

## Abstract

Corrosion surface damage in the form of pitting and microcracks is observed in many systems and affects the integrity of steel structures in nuclear, civil, and industrial engineering. In order to gain a better understanding and develop nondestructive and automatic detection/assessment of corrosion damage and its growth, an image analysis based on texture using wavelet transforms and color features was carried out. Experiments were conducted on steel 304 panels under three different electrolyte solutions, and periodic scans were used to obtain the images for analysis over time. The results obtained from the image analysis are presented to illustrate the metrics which best characterize early stage corrosion damage growth behavior. The results obtained indicate that textural features in combination with color features are more effective and may be used for correlating service/failure conditions based on corrosion morphology.


---

## Body

## 1. Introduction

Engineering components made from structural steel 304 metals are being used in many industries, commercial and domestic fields, because of their chemical durability, mechanical properties, weldability, good corrosion, and heat resistant properties. Corrosion of stainless steel in aggressive environmental conditions in particular is a fundamental concern to academia and industry due to the destructive nature of corrosion on mechanical properties of components. Ships, storage tanks, bridges, and pipelines commonly made from structural steel are not sufficiently resistant to corrosion in their operating environments which impacts corrosion costs associated with maintenance and also safety risks. Therefore, corrosion monitoring is an important issue in detecting corrosion damage and its growth before failures occur [1–3].There are many different experimental and analysis methods used for corrosion inspection and monitoring purposes. These include mechanical measurements (weight loss), chemical analysis, and visual inspections. In visual inspections, the corrosion damage identification requires an expert who can clearly demarcate the corrosion based on experience as well as types of corrosion, with red rust as a common experience. Usually, the corrosion process produces rough surfaces, and image analysis based on textural features can be used for quantification and discriminate corrosion extent and type. Several authors investigated automatic corrosion detection using image processing techniques [4–7]. Computer image processing involves definition and development of techniques and algorithms for processing pictorial data and its pixel value. Parameters related to the image are extracted and analyzed correlating with the corrosion time. In addition to textural features, color changes of metallic surfaces are also used for the detection of corrosion [8] due to various metal oxides and other corrosion products.Image analysis has been used to characterize corrosion morphology in aluminium alloys subjected to a variety of environmental conditions. Wang and Song [9] used wavelet packet decomposition energies of images at different subbands as features to study the atmospheric corrosion behavior of zinc samples. They acquired a relation between the selected image features and the corrosion weight loss. Tao et al. [10] analyzed the atmospheric corrosion of field exposed high strength aluminum alloys. They used wavelet packed decomposition energies at different subbands to estimate the corrosion loss of five types of aluminum alloys. It was found that the values of subimage energies decreased with increasing exposure time.In order to qualitatively and quantitatively characterize corrosion damage growth, an investigation of image analysis was carried out. Specifically, in this paper, we explored the idea of developing textural/color features that are sensitive to corrosion images, with a low-tech tool using a commercial color scanner. An investigation of textural features from wavelet transforms and color features through image analysis was carried out in order to identify the metrics for corrosion damage growth detection under three different electrolyte solutions. Our approach is to integrate functionality reducing properties due to material compromise (textural features) with local aspects (color values) to describe corrosion damage growth with increasing time. Results obtained from the analysis are presented and discussed.


## 2. Experiments

Stainless steel 304 metal samples with dimensions 6′′ × 3′′ and thickness 0.020′′ were obtained from Q-Panel. Initially, the specimens were first inspected visually to make sure they are in good condition. They were washed with clean water and ground with sand paper 300 grit first and then 600 grit. Then they were washed again and dried in a desiccator for about 10 minutes. Afterwards, these specimens were immersed in three different solutions, sodium chloride (saturated), distilled water, and sodium sulphate (1% weight). The specimens were kept in these solutions completely immersed for various times. After a specified time, the specimen is taken for image analysis using a 3200 dpi resolution scanner. The specimens were scanned at 5, 10, 15, 30, 45, 60, 75, 90, 105, 120, and 135 minutes in order to quantify the corrosion damage growth then returned to the solution until the next characterization. The experimental setup and process are shown in Figure1. Typical scanned images and subimages were used in image analysis. This setup allows the evolution of the surface corrosion, along with some pitting corrosion, to be tracked, with three color components of red, green, and blue, energy, and entropy.Figure 1
An overview of corrosion damage growth evaluation procedure.


## 3. Image Analysis Methods

Several image analysis methods are available for characterizing corrosion damage surface morphology. In this study, texture features from wavelet transform image processing as well as color attributes from optical imaging were used. These methods are described below briefly.


### 3.1. Textural Features from Wavelet Packet Transform

In order to extract textural features from scanned images, multiresolution wavelet transforms can be used, the details of which can be found in [11]. As an extension of the standard wavelets, wavelet packets which represent a generalization of the multiresolution analysis use the entire family of subband decompositions to generate a complete representation of images. Two-dimensional discrete wavelet packet transform (DWPT) decomposition allows us to analyze an image simultaneously at different resolution levels and orientations. In 2D DWPT method, an image is decomposed into one approximation and three detail images. The approximation and the detail images are then decomposed into a second-level approximation and detail images, and the process is repeated. The standard 2D DWPT can be implemented with a low-pass filter and a high-pass filter [11]. The 2D DWPT of a N×M discrete image A up to level P+1(P≤min(log2N,log2m)) is recursively defined in terms of the coefficients at level p as follows:
(1)C4k,(i,j)p+1=∑m∑nh(m)h(n)Ck,(m+2i,n+2j)p,C4k+1,(i,j)p+1=∑m∑nh(m)g(n)Ck,(m+2i,n+2j)p,C4k+2,(i,j)p+1=∑m∑ng(m)h(n)Ck,(m+2i,n+2j)p,C4k+3,(i,j)p+1=∑m∑ng(m)g(n)Ck,(m+2i,n+2j)p,
where C00 is the image A and k is an index of the nodes in the wavelet packet tree denoting each subband. At each step, the image Ckp is decomposed into four-quarter-size images C4kp+1, C4k+1p+1, C4k+2p+1, and C4k+3p+1.The Shannon entropy in different subbands is computed from the subband coefficient matrix as(2)Entropyp(k)=-∑i∑j|Ck,(i,j)p|2log|Ck,(i,j)p|2,Energyp(k)=∑i∑j|Ck,(i,j)p|2,
where Energyp(k) and Entropyp(k) are the energy and entropy of the image projected onto the subspace at node (p,k). The entropy of each subband provides a measure of the image characteristics in that subband. The energy distribution has important discriminatory properties for images and as such can be used as a feature for texture classification. From the equations above, it follows that the wavelet entropy is minimum when the image represents an ordered activity characterized by a narrow frequency distribution, whereas the entropy is high when an image contains a broad spectrum of frequency distribution. In this study, Haar mother wavelet was employed to decompose the corrosion images to a second level of decomposition, and Shannon entropies of images at each subband have been used as image features. In the corrosion damage region, both the energy and entropy features describe how the pixel values are distributed within the corroded region and indicate the degree of corrosion reflecting the texture of corrosion surface.


### 3.2. Color Features Analysis

Three primary color features, namely, red (R), green (G), and blue (B), which are commonly found in the spectral distribution of light, were related to corrosion damage, specifically iron oxide ions. “Imtool” in Matlab software [12] was used for obtaining the RGB values of each image along a specific profile line. RGB value of each pixel was calculated, and average values were correlated with respect to corrosion damage time. Subimages with diagonal and bisector lines along visible corrosion damage were used as the fundamental profile line to extract RGB values of each image. The R, G, and B values obtained are presented and correlated in order to quantify the corrosion damage growth. In addition, a color saturation range of 128 (8 bit color density) was selected. The first saturation layer of images at their respective times was imported in Matlab to observe the highest range of pixel for a quantification of 128.


## 3.1. Textural Features from Wavelet Packet Transform

In order to extract textural features from scanned images, multiresolution wavelet transforms can be used, the details of which can be found in [11]. As an extension of the standard wavelets, wavelet packets which represent a generalization of the multiresolution analysis use the entire family of subband decompositions to generate a complete representation of images. Two-dimensional discrete wavelet packet transform (DWPT) decomposition allows us to analyze an image simultaneously at different resolution levels and orientations. In 2D DWPT method, an image is decomposed into one approximation and three detail images. The approximation and the detail images are then decomposed into a second-level approximation and detail images, and the process is repeated. The standard 2D DWPT can be implemented with a low-pass filter and a high-pass filter [11]. The 2D DWPT of a N×M discrete image A up to level P+1(P≤min(log2N,log2m)) is recursively defined in terms of the coefficients at level p as follows:
(1)C4k,(i,j)p+1=∑m∑nh(m)h(n)Ck,(m+2i,n+2j)p,C4k+1,(i,j)p+1=∑m∑nh(m)g(n)Ck,(m+2i,n+2j)p,C4k+2,(i,j)p+1=∑m∑ng(m)h(n)Ck,(m+2i,n+2j)p,C4k+3,(i,j)p+1=∑m∑ng(m)g(n)Ck,(m+2i,n+2j)p,
where C00 is the image A and k is an index of the nodes in the wavelet packet tree denoting each subband. At each step, the image Ckp is decomposed into four-quarter-size images C4kp+1, C4k+1p+1, C4k+2p+1, and C4k+3p+1.The Shannon entropy in different subbands is computed from the subband coefficient matrix as(2)Entropyp(k)=-∑i∑j|Ck,(i,j)p|2log|Ck,(i,j)p|2,Energyp(k)=∑i∑j|Ck,(i,j)p|2,
where Energyp(k) and Entropyp(k) are the energy and entropy of the image projected onto the subspace at node (p,k). The entropy of each subband provides a measure of the image characteristics in that subband. The energy distribution has important discriminatory properties for images and as such can be used as a feature for texture classification. From the equations above, it follows that the wavelet entropy is minimum when the image represents an ordered activity characterized by a narrow frequency distribution, whereas the entropy is high when an image contains a broad spectrum of frequency distribution. In this study, Haar mother wavelet was employed to decompose the corrosion images to a second level of decomposition, and Shannon entropies of images at each subband have been used as image features. In the corrosion damage region, both the energy and entropy features describe how the pixel values are distributed within the corroded region and indicate the degree of corrosion reflecting the texture of corrosion surface.


## 3.2. Color Features Analysis

Three primary color features, namely, red (R), green (G), and blue (B), which are commonly found in the spectral distribution of light, were related to corrosion damage, specifically iron oxide ions. “Imtool” in Matlab software [12] was used for obtaining the RGB values of each image along a specific profile line. RGB value of each pixel was calculated, and average values were correlated with respect to corrosion damage time. Subimages with diagonal and bisector lines along visible corrosion damage were used as the fundamental profile line to extract RGB values of each image. The R, G, and B values obtained are presented and correlated in order to quantify the corrosion damage growth. In addition, a color saturation range of 128 (8 bit color density) was selected. The first saturation layer of images at their respective times was imported in Matlab to observe the highest range of pixel for a quantification of 128.


## 4. Results and Discussion

Typical scanned images of specimens in NaCl solution along with wavelet transformed images of specimens at four different times are shown in Figure2. As shown in the figure, it can be seen that it is very difficult to identify the corrosion damage regions (Figure 2(a)). To further improve the damage identification, a wavelet transformation is applied to those images and selective features, specifically if energy and entropy values were extracted. The wavelet transformed image is shown in Figure 2(b). It can be seen from Figure 2 that some of the corrosion damage features are now evident in the wavelet transformed images. The energy feature values of corroded specimens under three different solutions are presented in Figure 3(a). In general, the energy values decrease with increasing corrosion time. However, the energy values are higher for NaCl solution and lower for deionized water. In the first 90 minutes, the rate of decrease in energy value is about 55% for NaCl solution, whereas it is about 88% for sodium sulphate solution. However, the energy values are pretty much constant for distilled water. The results presented in Figure 3(a) show that a decrease in energy values illustrate the corrosion damage, which is higher under NaCl solution in comparison to the sodium sulphate solution.Typical scanned images (a) and wavelet transformed images (b) at four different times for specimens corroded in NaCl solution.
(a)
Energy feature from wavelet transformation for corroded specimens
(b)
Entropy feature from wavelet transformation for corroded specimensEnergy (a) and Entropy (b) of corrosion damage growth calculated from wavelet image analysis under different solutions.
(a)
Energy feature from wavelet transformation for corroded specimens
(b)
Entropy feature from wavelet transformation for corroded specimensThe entropy feature values of corroded specimens under three different solutions are presented in Figure3(b). In general, the entropy values increase with increasing corrosion time. However, the entropy values are lower for NaCl solution and higher for sodium sulphate solution. The entropy values are lower and constant for distilled water condition. In the first 90 minutes, the rate of increase in entropy value is about 17% for NaCl solution, whereas it is about 2% for sodium sulphate solution. However, the entropy values are pretty much constant for distilled water. The results presented in Figure 3(b) show that an increase in entropy values represents corrosion damage, which is higher under sodium sulphate solution in comparison to NaCl solution. In order to quantify local defects such as pits, an approach based on region of interest (ROI) with entropy, RGB analysis, and cutoff-range method was used as shown in Figure 4. The entropy values specific to a corroded of region of interest (ROI) under NaCl solution were analyzed, and the results are presented in Figure 5. It can be seen from Figure 5 that entropy values increase about 14% for about 135 minutes from the initial 20 minutes. The pit nucleation (area in pixels) with time for a specific selected pit profile is shown in Figure 6. It can be seen from Figure 6 that the pit area increases (in terms of pixels) with time and reaches a plateau. The results of energy and entropy features presented in Figures 3–6 illustrate that entropy is more sensitive and can be correlated to corrosion damage with increasing time.Figure 4
An overview of the approach for correlation of corrosion growth evaluation based on ROI.Figure 5
Entropy values calculated based on ROI.Figure 6
Pit initiation and growth with increasing time for a specific ROI.The results of RGB analysis of specimens under NaCl solution at different times are shown in Figures7 and 8 for two specific profiles, one along a diagonal line and the other a straight line profile. It can be seen from both Figures 7 and 8 that G and B color values decrease whereas the R color increases with increasing corrosion time. It is interesting to note that the R color, which relates to iron oxide ions, might give a better indication of corrosion damage with increasing time. In comparing the diagonal profile with the straight line profile, the R color values are more sensitive for the straight line profile. In order to detect corrosion damage based on RGB color values, the cutoff-range method was used based on specific pixel range. The overall cutoff-range method is shown in Figure 9. Initially, a color saturation range of 25 was selected for the cutoff. The first saturation layer of images at their respective time was analyzed using Matlab to observe the highest range of pixels. The result of applying the cutoff-range method in first saturation layer is presented in Figure 10. It can be seen from Figure 10(b) that the pixel range of 101–125 showed increasing trend whereas pixel range of 76–100 showed decreasing trend. No distinct features were seen at other pixel ranges. This result indicates that, at the pixel range of 100–125, more corrosive pixel values are increasing and the corrosion in this particular case must fall around this range. Overall, the results presented in Figure 10 suggest that selecting a suitable cutoff-range in pixel values can be used as an indication of corrosion damage growth with increasing time.Figure 7
Average RGB values of corroded specimen along diagonal profile damage line.Figure 8
Average RGB values of corroded specimen along bisection profile damage line.Figure 9
Schematic of cutoff-range approach.Results of cutoff-method analysis.
(a)
RGB color values at various cutoff pixels
(b)
Variation of pixel ranges with corrosion time


## 5. Conclusions

In this paper, we investigated textural features from wavelet transforms and color features through image analysis in order to identify the metrics for corrosion damage growth detection under three different electrolyte solutions. We explored the feasibility of studying textural/color features that are sensitive to corrosion images, with a low-tech tool, a commercial desktop scanner, and a system that can easily be replicated in a portable device. Our approach of integrating global textural features with local features (color values) was helpful in assessing corrosion damage growth with increasing time. The energy of the images decreased, and the entropy increased with respect to corrosion time for most of the corrosive media. However, the energy and entropy values remained fairly constant in distilled water and verified the response that steel takes longer time to corrode in distilled water. It was also found that red color increased with time whereas green and blue pixel color values decreased with time. The 101–125 pixel range was found to have an increasing trend with the corrosion time. The approach presented in this paper may be used for correlating service/failure conditions based on corrosion morphology in metals. However, more work is needed for identifying multiple descriptors from image processing methods. Our future work will address this issue with controlled experiments to further validate the methods.



---

*Source: 376823-2013-09-19.xml*