Degraded Depth by Image Analysis
Degraded Depth by Image Analysis
Abstract
The combination of a staining method and an automatic digital image-processing algorithm is
presented here, to measure degradation depths in cementitious materials. The measurement of
those degraded depths is usually made by direct visual measurements, resulting in many errors
and low reproducibility. The automatic digital image analysis (ADIA) method proposed here
is mainly based on the differentiation of the degraded zone and the sound zone on the basis of
the image histogram. The method comprises several steps, such as sample alignment, image
calibration, background subtraction, image filtering, automatic segmentation and final
measurement of the degraded depth. The algorithm developed has been used to measure the
degraded depths of a set of decalcified cement mortars, made from different cement types and
with varying w/b ratios. Relative to previous methods, this automatic procedure improves the
precision (about 0.03 mm) and the statistical representation of the measurements. The results
obtained by ADIA were compared with direct visual measurements with a very good
correlation (R2 = 0.96) and a mean error of 6%.
(Some figures in this article are in colour only in the electronic version)
0957-0233/10/055103+12$30.00 1 © 2010 IOP Publishing Ltd Printed in the UK & the USA
Meas. Sci. Technol. 21 (2010) 055103 I Segura et al
Table 1. Dosage of cement mortars used in this work. 4, 11, 21 and 32 days. This immersion method accelerates
Sample the decalcification process 150 times compared with the same
process under deionized water but diffusion remains the rate-
Component (g) MC4030 MC5030 MC6030
controlling factor [23]. Further information about the entire
Cement 450 450 450 experimental procedure can be found in [24]. Degraded
Sand 1350 1350 1350 samples were cut in slices of 5 mm thickness with a Secotom
Water 180 225 270 10 precision cut-off machine. Subsequently, the samples were
Water/binder ratio 0.4 0.5 0.6
Sand/binder ratio 3/1 3/1 3/1 sprayed with the phenolphthalein standard solution [5, 7] and
images were obtained from the samples’ surfaces.
2
Meas. Sci. Technol. 21 (2010) 055103 I Segura et al
Figure 1. Scheme of the analysis procedure developed to obtain the degraded depths by automatic image analysis.
3
Meas. Sci. Technol. 21 (2010) 055103 I Segura et al
Figure 3. Procedure used for image calibration: (a) reference piece after being isolated, (b) binary reference piece and (c) final filled
reference piece.
(d) (e) (f )
Figure 4. Procedure for image alignment: (a) original image, (b) selected side of the sample, (c) filtered and segmented side, (d) border
detection by Sobel’s method, (e) longest line detected by the SHT procedure and (f ) final automatically rotated image.
angle formed by the sample borders with the image borders, [29, 30]. Through this procedure, it is possible to identify
combining both edge and line detection. First, the image lines in the edges of the sample. To ensure that the line
is filtered to enhance the border identification. A nonlinear identified is related to the sample border, only the longest one
2D median filter (NLMF) with a 75 × 75 neighbourhood is is considered. The SHT procedure also allows us to measure
used, as it is the most effective way of filtering when the the angle formed by that line with the coordinated axes, so that
goal is to reduce noise and preserve edges simultaneously the image can be rotated. An example of how the alignment
[26]. Each output pixel contains the median value from procedure works can be seen in figure 4.
the 75 × 75 neighbourhood around the corresponding pixel
in the input image. Thus, an average filtering window 3.3. Image processing
of approximately 2.1 mm is applied through the selected
part of the image. After filtering, a blurred image will be The main operations in the image-processing step are
obtained in which the information on the edges is preserved background subtraction and image segmentation. Both
and the unnecessary information (e.g. pores or aggregates) operations are based on the histogram analysis. If the
is eliminated by averaging with information concerning the histograms of each colour plane in an RGB image are analysed
cementitious matrix. separately, it can be seen that if the proper colour plane is
The image is then segmented by Otsu’s method, to chosen, it is possible to differentiate between the sample and
enhance the differences between the image border and the the background, as well as between the degraded zone and
background. Edges are identified by searching the local the sound zone. Since the greyscale depth value is 0, the
maxima in the image gradient, as described by Sobel’s method background is easily differentiated in each colour channel, see
[27]. In the final step, lines are identified by computing figures 5(b) and (d). However, the degraded and the sound
the Standard Hough Transform (SHT) of the binary image zone can only be distinguished by using the green channel
4
Meas. Sci. Technol. 21 (2010) 055103 I Segura et al
(b)
(a)
(c)
(d)
Figure 5. (a) Original image; colour channels and the corresponding histograms from an RGB image: (b) red channel, (c) green channel
and (d) blue channel.
(figure 5(c)). Thus, background subtraction and image accurate threshold levels, consequently obtaining poor image
segmentation can be done by selecting the proper colour segmentation and wrong measurements of the degraded depth.
channel. The first way to avoid such an error during segmentation
Primarily, the background must be subtracted from the is applying a nonlinear median filter to the image. As said
images. As mentioned above, either red or blue colour before, it is the most effective way of filtering an image when
channels allow good differentiation between the sample and the goal is to reduce noise and preserve edges simultaneously.
the background, so one of those channels is automatically Such noise in this case is caused by the aggregates, the pores
selected to continue the background subtraction step. The and all the superficial defects that may be present. The NLMF
greyscale image is then filtered to ensure better subsequent filter is applied with a 75 × 75 neighbourhood. As the filtering
thresholding. The NLMF filter with a 75 × 75 neighbourhood window is larger than the aggregate maximum size (2 mm), a
is used, as described in the pre-processing step. Then, the blurred image will be obtained with enhanced differentiation
background and the sample are merged by segmentation. The between the degraded zone and the sound zone, see figure 7.
threshold level is automatically computed by Otsu’s method To allow better processing and avoid errors associated with
and the greyscale image is converted to a binary image (pixel the corners of the sample, the image is cropped to obtain
values are 0 or 1), in which the background pixels have a four separated images (called si ) related to each side of the
value equal to 0. Finally, a morphological reconstruction [30] sample.
is performed in the binary image to obtain a uniform image. At this point, it is possible to compute an optimal threshold
This binary image is used to subtract the background from the level for the si image, so the degraded zone and the sound
original image. The whole process of background subtraction zone can be clearly distinguished. According to the kind
is shown in figure 6. of histogram displayed by the si image (figure 7(b)), the
The final step comprises the segmentation of the image in most suitable thresholding method is Rosin’s method [32, 33].
such a way that the pixels related to the degraded zone and the Rosin’s thresholding method is specifically intended to cope
sound zone can be distinguished. The final output shall be an with essentially unimodal distributions rather than the usual
image in which the pixels of both the non-degraded zone and bimodal or multimodal distributions. That is, the second peak
the background are equal to 0. The main problem arises when is either very small or is submerged within the main peak. It
in the image histogram there is no clear distinction between is worth noting that it is quite difficult for the thresholding
the zones of interest, as happens when trying to distinguish method to be suitable for all the images to be studied. In the
between the degraded zone and the sound zone (figure 5(c)). case under study, as the material is quite heterogeneous and
A bimodal distribution can be seen in the histogram, with the can stand for several microstructural characteristics (aggregate
peaks located approximately at greyscale values of 90 and type, porosity, mineral composition, superficial imperfections
200, but with no clear valley between both peaks. In such of the samples, non-uniform staining, etc), the images to be
cases, the automatic thresholding methods may not provide analysed can also change.
5
Meas. Sci. Technol. 21 (2010) 055103 I Segura et al
(b) (c)
(a)
(e) (d)
Figure 6. Procedure for background subtraction: (a) original image, (b) selection of the appropriate colour plane, (c) median filtering,
(d) segmentation and morphological reconstruction and (e) final background-subtracted image.
6
Meas. Sci. Technol. 21 (2010) 055103 I Segura et al
(a)
(b)
(c)
(d)
Figure 8. Examples of different stained mortar samples and their histograms: (a) CEM I sample—w/b 0.6—32 days of degradation,
(b) CEM II/B sample—w/b 0.4—32 days of degradation, (c) CEM IV sample—w/b 0.6—11 days of degradation and (d) CEM IV
sample—w/b 0.4—21 days of degradation.
(a) (b)
(c)
(d)
(e)
Figure 9. Procedure for the image segmentation: (a) obtaining of the si image by cropping, (b) selection of the colour channel and filtering,
(c) thresholding by Rosin’s method and filtering, (d) segmentation of the si image and (e) evaluation of the alternative thresholding methods
and choice of the most adequate one (in this case, Otsu’s method).
each n column of si , just by determining the full width each si image êD and its standard deviation σ d can be easily
at half maximum (FWHM) of each colour intensity profile. obtained. It is worth noting that each value of êD will be the
FWHM is a statistical parameter commonly used to describe a mean value of the n degraded depth values, where n is the
measurement of the width of an object in a picture, when that dimension in pixels through the x-axis of the si image. In
object does not have sharp edges. It is given by the distance the example shown in figure 10, the image has an n value
between points on the curve where the function reaches half of 945 pixels. The statistical meaning of the degraded depth
of its maximum value. The mean degraded depth value for measurements made by using this method is thus evident.
7
Meas. Sci. Technol. 21 (2010) 055103 I Segura et al
(a) (b)
Figure 10. Final step of the procedure: parameter extraction; (a) segmented si image and (b) colour intensity profile along the thickness of
the sample.
4. Results and discussion between the degraded and non-degraded zones. In all cases,
the combination of low staining intensity and dark areas of
The algorithm designed has been used to analyse and process the degraded zone (caused by its high porosity or resulting
the photographs of the materials described in section 2. from the cutting process) does not allow us to obtain accurate
The histograms of the samples shown in figure 8 seemed segmentations using a fully automatic method.
to indicate poor results at the end of the segmentation The degraded depths obtained with the designed algorithm
process. The automatic segmentation process was applied to are shown in table 2. The maximum relative standard deviation
those samples, and the so-obtained results are presented in of the degraded depth measurements using the automatic
figure 12. The errors generated during the segmentation method presented here is about 6%. This value is associated
process were confirmed in some cases. In practice, it is with the repeatability of the measurements. If microstructural
very difficult to develop an automatic method that can take variations and differences between samples are considered, the
into account all the processes and characteristics associated algorithm provides very good results. The precision (about
with this kind of material. We found that porosity, superficial 0.03 mm) and statistical representation of the measurements
imperfections of the samples and non-uniform staining may made with this automatic procedure was not attained by other
induce such errors during automatic processing of the images. methods used to date.
Supervision is thus needed to identify the samples that may go The measurements of the degraded depths made with
through a semi-automatic processing step. the developed procedure shall be contrasted, to determine
Figure 11(a) shows a sample with w/b 0.6 and 32 days whether the segmentation was successful or not. This is
of degradation of CEM I. Analysis of the histogram conducted by comparing the automatic measurements with
corresponding to the filtered greyscale image (figure 8(a)) the visual measurements of the degraded depth. Manual
indicates that there is no clear difference between the peak measurements are the most used procedure to determine
corresponding to the degraded zone (centred around 145) and degraded or carbonated depths [19, 20]. These measurements
the one corresponding to the sound zone (centred around are usually made by directly measuring the thickness of the
94). Thus, the thresholding process will not give an interesting zone with a calliper. In this case, using the same
accurate segmentation of the image, mainly due to porosity images as those used by the algorithm, the degraded depths
of the sample, which introduces dark zones in the image. were determined by manually measuring the distance in pixels
Figure 11(b) shows a sample with w/b 0.4 and 32 days of between the border of the sample and the beginning of the
degradation of CEM II/B. In this case, the situation is more stained zone. Five measurements were made along each side
complex since in some parts of the image it is quite difficult to of the samples, avoiding the corners of the sample and trying to
differentiate between the degraded zone and the sound zone. In have a homogeneous distribution of measurements. There are
this case it is not possible to obtain good image segmentations very good correlations between the automatically measured
using the automatic procedure, mainly due to the low contrast and the visually measured values (figure 12). The correlation
8
Meas. Sci. Technol. 21 (2010) 055103 I Segura et al
(a)
(b)
(c)
(d)
Figure 11. Results of the segmentation process in the samples shown in figure 8: (a) CEM I sample—w/b 0.6—32 days of degradation,
(b) CEM II/B sample—w/b 0.4—32 days of degradation, (c) CEM IV sample—w/b 0.6—11 days of degradation and (d) CEM IV
sample—w/b 0.4—21 days of degradation.
Table 2. Degraded depths obtained with the algorithm and standard deviations of the measurements.
Degraded depths (mm)
w/b ratio Time (days) CEM I CEM II/A CEM II/B CEM III CEM IV
0.4 4 3.22 0.16 2.53 0.12 2.29 0.10 2.89 0.09 2.72 0.04
11 5.73 0.14 4.18 0.01 3.74 0.13 5.01 0.15 – –
21 6.19 0.19 5.47 0.10 6.96 0.04 6.78 0.20 5.79 0.11
32 8.31 0.29 7.51 0.08 9.95 0.19 8.97 0.07 7.97 0.18
0.5 4 3.26 0.11 2.73 0.05 2.98 0.04 3.26 0.07 3.24 0.19
11 5.81 0.21 4.36 0.09 4.33 0.04 5.27 0.14 5.13 0.19
21 8.41 0.10 5.75 0.14 7.46 0.19 6.66 0.06 7.14 0.30
32 11.68 0.27 7.60 0.08 10.14 0.07 8.45 0.20 8.72 0.15
0.6 4 3.88 0.10 3.24 0.19 3.27 0.08 3.40 0.16 3.81 0.06
11 4.81 0.19 4.37 0.08 5.94 0.05 6.28 0.22 4.53 0.28
21 8.33 0.13 7.24 0.09 7.58 0.10 7.35 0.10 8.13 0.28
32 14.33 0.10 8.41 0.09 9.37 0.15 10.39 0.14 11.43 0.26
factor expressed as the adjusted-R2 of the linear fit is 0.96. residuals of the automatically measured degraded depths are
This shows the merit of the automatic procedure designed to plotted versus each measured value, as shown in figure 13. It
measure the degraded depth. The mean error, expressed as the can be seen that there are no anomalous trends, and just a few
difference between the automatically measured values and the studentized residuals exhibit an absolute value greater than 1.
visually measured values, is about 6%. The samples matching to those outlier measurements will be
analysed separately.
The analysis of the residuals can provide very useful Figure 14 shows the samples whose studentized residual
information regarding which samples provide the highest values were greater than 1. Some of the samples were
errors, and thus identify the limitations of the algorithm already shown in figure 11. The explanation for the outlier
designed. With this aim the analysis of studentized residuals measurements is the low contrast between the degraded and
will be used to identify which measures are statistically distant non-degraded zones of those samples. As mentioned above,
from the rest of the data (outlier values). The studentized the combination of low staining intensity and dark areas of
9
Meas. Sci. Technol. 21 (2010) 055103 I Segura et al
Figure 14. Samples matching the outlier values shown in figure 13.
10
Meas. Sci. Technol. 21 (2010) 055103 I Segura et al
(a) (b)
Figure 16. Applications of the algorithm designed to measure the depth of chloride penetration.
in the automatic segmentation process, because they usually Ministry of Public Works, through research project C01/2007,
do not get coloured by the stain and they can have colour is gratefully acknowledged. Dr M Molero was supported by
intensities similar to the background or the non-degraded the department of education of the Community of Madrid
zone. We are actually working to implement a final code and the European Social Fund. Dr S Aparicio is supported
which allows the degraded depth measurement in cementitious by the post-doctoral JAE-DOC program of the Spanish
materials with different shapes, high aggregate content and National Research Council (CSIC). The authors also wish to
subjected to different degradation processes. acknowledge the contribution of Dr David Martı́n Gómez and
Dr Xavier P Burgos Artizzu for their help and advice on image-
5. Summary processing techniques.
11
Meas. Sci. Technol. 21 (2010) 055103 I Segura et al
application to nuclear waste storage Mater. Struct. Engineering Department: Construction. School of Civil
39 511–23 Engineering of Madrid
[13] Petrov I and Schlegel E 1994 Application of automatic image [25] Otsu N 1979 A threshold selection method from gray-level
analysis for the investigation of autoclaved aerated concrete histograms IEEE Trans. Syst. Man Cybern. 9 62–6
structure Cement Concr. Res. 24 830–40 [26] Lim J S 1990 Two-Dimensional Signal and Image Processing
[14] Chermant J 2001 Why automatic image analysis? An (Englewood Cliffs, NJ: Prentice-Hall)
introduction to this issue Cement Concr. Compos. [27] Parker J R 1997 Algorithms for Image Processing and
23 127–31 Computer Vision (New York: Wiley)
[15] Chermant J, Chermant L, Coster M, Dequiedt A and Redon C [28] Hough P V C 1962 Method and means for recognizing
2001 Some fields of applications of automatic image complex patterns US Patent 3,069,654
analysis in civil engineering Cement Concr. Compos. [29] Duda R O and Hart P E 1972 Use of the Hough transformation
23 157–69 to detect lines and curves in pictures Commun. ACM
[16] Dequiedt A, Coster M, Chermant L and Chermant J 2001 15 11–5 Available at http://doi.acm.org/10.1145/
Distances between air-voids in concrete by automatic 361237.361242
methods Cement Concr. Compos. 23 247–54 [30] Soille P 1999 Morphological Image Analysis: Principles and
[17] Soroushian P, Elzafraney M and Nossoni A 2003 Specimen Applications (Berlin: Springer)
preparation and image processing and analysis techniques [31] Rosin P L 2001 Unimodal thresholding Pattern Recognit.
for automated quantification of concrete microcracks and 34 2083–96
voids Cement Concr. Res. 33 1949–62 [32] Conaire C Ó 2007 Code implementation of Rosin’s
[18] Basheer L, Basheer P A M and Long A E 2005 Influence of thresholding method Available at http://elm.eeng.dcu.ie/
coarse aggregate on the permeation, durability and the ∼oconaire/source/
microstructure characteristics of ordinary Portland cement [33] Xiong G 2005 Fuzzy c-means thresholding Available at
concrete Constr. Build. Mater. 19 682–90 http://www.mathworks.es/matlabcentral/fileexchange/8351
[19] Chang C and Chen J 2006 The experimental investigation of [34] Kapur J N, Sahoo P K and Wong A K C 1985 A new method
concrete carbonation depth Cement Concr. Res. for gray-level picture thresholding using the entropy of the
36 1760–7 histogram Comput. Vis. Graph. Image Process. 29 273–85
[20] Segura I, Anaya J J, Hernández M G, Macphee D E, [35] Conaire C Ó 2007 Code implementation of Kapur’s
Moragues A and Sánchez T 2007 Microstructural thresholding method Available at http://elm.eeng.dcu.ie/
characterization of aged mortar by destructive and ∼oconaire/source/
non-destructive testing 12th Int. Congress on the Chemistry [36] Ridler T W and Calvard S 1978 Picture thresholding using an
of Cement (Montreal, Canada) iterative selection method IEEE Trans. Syst. Man Cybern.
[21] Segura I, Moragues A, Macphee D E, Anaya J J and Molero M 8 630–2
2009 Study of the decalcification process in mortars [37] Ramachandram D 2003 Automatic thresholding Matlab
degraded by NH4 NO3 by using ultrasonic techniques Central Available at http://www.mathworks.com/
Mater. Construc. 59 17–36 matlabcentral/fileexchange/3195
[22] UNE-EN 196-1 1996 Methods of Testing Cement. [38] Burgos-Artizzu X P, Ribeiro A, Tellaeche A, Pajares G
Determination of Strength (Madrid: AENOR) and Fernández-Quintanilla C 2009 Improving weed
[23] Heukamp F H, Ulm F and Germaine J T 2001 Mechanical pressure assessment using digital images from an
properties of calcium-leached cement pastes. Triaxial stress experience-based reasoning approach Comput. Electron.
states and the influence of the pore pressures Cement Concr. Agric. 65 176–85
Res. 31 767–74 [39] Burgos-Artizzu X P, Ribeiro A, Tellaeche A, Pajares G
[24] Segura I 2008 Characterization of the decalcification process and Fernández-Quintanilla C 2010 Analysis of natural
in mortars by means of destructive and non-destructive images processing for the extraction of agricultural
testing PhD Thesis Polytechnic University of Madrid, Civil elements Image Vis. Comput. 28 138–49
12