Image-Based Concrete Crack Detection Method Using The Median Absolute Deviation
Image-Based Concrete Crack Detection Method Using The Median Absolute Deviation
Article
Image-Based Concrete Crack Detection Method Using
the Median Absolute Deviation
Juan Camilo Avendaño * , John Leander and Raid Karoumi
Division of Structural Engineering and Bridges, KTH Royal Institute of Technology, 10044 Stockholm, Sweden;
[email protected] (J.L.); [email protected] (R.K.)
* Correspondence: [email protected]
Abstract: This paper proposes an innovative approach for detecting and quantifying concrete cracks
using an adaptive threshold method based on Median Absolute Deviation (MAD) in images. The
technique applies limited pre-processing steps and then dynamically determines a threshold adapted
for each sub-image depending on the greyscale distribution of the pixels, resulting in tailored crack
segmentation. The edges of the crack are obtained using the Laplace edge detection method, and the
width of the crack is obtained for each centreline point. The method’s performance is measured using
the Probability of Detection (POD) curves as a function of the actual crack size, revealing remarkable
capabilities. It was found that the proposed method could detect cracks as narrow as 0.1 mm, with a
probability of 94% and 100% for cracks with larger widths. It was also found that the method has
higher accuracy, precision, and F2 score values than the Otsu and Niblack methods.
Keywords: crack detection; probability of detection; median absolute value; thresholding; computer
vision; damage detection
1. Introduction
Bridges are crucial assets connecting regions and enabling transportation, making
them fundamental for a society’s development [1]. Assuring their correct functioning
requires recurring inspections of the structures at regular intervals, in order to detect
Citation: Avendaño, J.C.; Leander, J.; possible damage [2]. Damage detection is important in infrastructure management since it
Karoumi, R. Image-Based Concrete helps the assessment of deterioration over time due to different causes, such as corrosion,
Crack Detection Method Using the creep, and cyclic loading, among others. These procedures aim to detect damages in
Median Absolute Deviation. Sensors bridges and concrete structures subjected to different adverse conditions that can lead to
2024, 24, 2736. https://doi.org/ their deterioration. These hazards can come from natural processes such as earthquakes,
10.3390/s24092736 flooding, landslides, and human construction errors. Another cause for damage is the effect
Academic Editor: Filippo Ubertini of loads on the structure (wind load, vehicle load, thermal loads, and others), which can
produce damages. Among the most common types of damage found are cracks, which
Received: 5 April 2024 serve as early signs of deterioration and are, in many cases, made by flexion or shear
Revised: 19 April 2024
forces as well as temperature-induced stresses. Cracks are therefore important to study to
Accepted: 20 April 2024
ensure structural reliability and integrity of structures. Thus, efficient management and
Published: 25 April 2024
maintenance operations, based on identified damage, can considerably extend a structure’s
life span [3].
For civil infrastructure, the basic and main method used for assessing condition, both
Copyright: © 2024 by the authors.
functional and physical, is visual inspection [4]. However, this kind of inspection has
Licensee MDPI, Basel, Switzerland. some limitations because it involves the use of heavy machinery, elevated costs, and risky
This article is an open access article situations for the personnel performing the work, and the results can fluctuate between
distributed under the terms and different inspectors due to human error [5–8].
conditions of the Creative Commons To address these limitations, methods of Structural Health Monitoring (SHM) have
Attribution (CC BY) license (https:// been developed and used in various fields, such as mechanical, aerospace, and civil en-
creativecommons.org/licenses/by/ gineering, to ensure the safety and integrity of assets. SHM involves strategies to detect
4.0/). damage using various methods (hardware or software) and obtain data that can be analysed
to properly manage and maintain the assets [9]. Within SHM, there are several methods
and they can be classified as either contact or non-contact techniques. Contact sensing
methods involve sensors attached to a structure to measure accelerations, displacements,
and inclinations. These can pose a constraint from an economic point of view, as well
as generate practical challenges, in terms of the time and labour cost of the installation
process [10].
Non-contact methods have gained popularity due to the economic advantages and
practical benefits they present. Methods using cameras have been developed for image-
based inspections [10]. These methods are becoming an important part of SHM for eval-
uating different types of objects, their location, and understanding their context. The
process of analysing the images and their content is called ‘computer vision’ and can be
used to detect damage [11]. Some processing techniques applied to images are: histogram
transforms, background subtraction, texture recognition, filtering, or edge detection, and
others [4]. Filtering is one of the most common operations used in computer vision and can
be sorted into two different categories: space domain algorithms and frequency domain
algorithms [12]. Space domain filtering focuses on pixels directly from the image. On the
other hand, frequency domain filtering uses transformations on the pixels (using Fourier
transform or Wavelet transforms) and then transforms them back to the space domain.
Commonly used space domain filters include the median filter, mean filter, Gaussian filter,
and bilateral filtering [13].
One of the most common processing techniques used to extract crack information
is the ‘edge detection algorithm’. Crack edge detection algorithms have been developed
by adapting methods used in other disciplines; e.g., for text recognition [14], the Sauvola
method has been used to identify text from images with a noisy background [15]. Re-
searchers have used this knowledge and applied it to civil engineering structures to delimit
the crack boundaries and differentiate pixels from cracks and the background [16–18]. Once
the pixels are delimited, the background and crack pixels are usually transformed into
black and white, with the help of image binarisation using threshold methods, such as the
Niblack, Otsu, or Wolf methods [8,19].
Based on these procedures, researchers have developed algorithms like Crack Width
Transform to determine a crack candidate region and then filter by using a threshold [20].
Kim et al. [19] used a median filter to remove noise and Sauvola’s binarisation method
to transform the image from greyscale to black and white, identifying cracks. Later, Kim
et al. [15] used the Sauvola method with two different sets of parameters to detect cracks
and determine their widths and lengths.
Other methods use histogram-based algorithms to study cracks in concrete or pave-
ments [21]. Kapela et al. [22] used Histograms of Oriented Gradients (HoG) for crack
detection by computing the intersection of Gaussian functions in intensity histograms to
determine a segmentation threshold. Li et al. [23] proposed a threshold algorithm based on
the Neighbouring Difference Histogram Method (NDHM) that uses the standard deviation
of an image to obtain the result. Histogram-based thresholding methods are popular due
to their simplicity and high efficiency, but using a general threshold makes the results
susceptible to noise [24]. Although image thresholding can be used for identifying cracks,
and it is among the most popular methods [25], the results are highly dependent on the
threshold parameters, which cannot be used for every situation [15].
In recent years, the development of Unmanned Aerial Vehicles (UAVs) has led to
cost-efficient data collection when accessing difficult locations to perform image-based
inspections [26]. In [27], Dorafshan et al. compared different processing algorithms for
UAV-assisted crack detection, such as filtering, edge detection, image enhancement, and
segmentation. The edge detection was carried out using six filters: Roberts, Prewitt, Sobel,
and Laplacian of Gaussian (in the spatial domain) and Butterworth and Gaussian (in the
frequency domain). The minimum detectable crack width was found to be 0.2 mm. They
concluded that the Laplacian of Gaussian filter provided the fastest and most accurate
method for studying crack width.
Sensors 2024, 24, 2736 3 of 16
2. Methodology
The algorithm employed in this paper consists of three different main stages: crack
detection within the image, pixel extraction, and crack width measurement.
The images obtained were pre-processed by dividing them into sub-images and
converting them to greyscale, in order to simplify the study of the pixel intensities. To
differentiate background and crack pixels, a specific threshold value was determined for
2. Methodology
The algorithm employed in this paper consists of three different main stages: crack
detection within the image, pixel extraction, and crack width measurement.
Sensors 2024, 24, 2736 The images obtained were pre-processed by dividing them into sub-images and con-
4 of 16
verting them to greyscale, in order to simplify the study of the pixel intensities. To differ-
entiate background and crack pixels, a specific threshold value was determined for each
sub-image, using the Median Absolute Deviation (MAD). Subsequently, a thresholding
each sub-image, using the Median Absolute Deviation (MAD). Subsequently, a thresholding
procedure was applied to isolate the potential crack region. Edge detection was employed
procedure was applied to isolate the potential crack region. Edge detection was employed
in the crack regions, to delimitate the boundaries of the detected crack. This was per-
in the crack regions, to delimitate the boundaries of the detected crack. This was performed
formed
using the using the Laplacian
Laplacian function.function. After
After this thisthe
step, step, the centreline
centreline of the of the was
crack crackobtained
was ob-
tained through the ‘skeletonize’ function. For each pixel that is part of the skeleton
through the ‘skeletonize’ function. For each pixel that is part of the skeleton centreline, centre-
the
line, the distances to the nearest edges were calculated. The distance measured
distances to the nearest edges were calculated. The distance measured corresponded to corre-
the
sponded to the width of the crack at
width of the crack at the specific point.the specific point.
2.1. Data
2.1. Data Acquisition
The data
The data acquisition
acquisition employed
employed in this study aimed to gather images containing con-
crete cracks
crete cracks that
that included
included widths
widths between
between 0.1 0.1 and
and 1.5
1.5mm.
mm. The
The imaging
imaging waswas performed
performed
withaa Nikon
with NikonD810 D810digital
digitalcamera,
camera,coupled
coupledwith withananAF-s
AF-sNikon
Nikon24–70
24–70mm mmf/2.8
f/2.8 G ED lens.
Thesensor
The sensorin in the
the digital
digital camera
camera hadhad aa resolution
resolutionof of 36
36 megapixels.
megapixels. TheThe images
images werewere taken
taken
with the
with the highest
highest available
available resolution
resolution provided
provided by by the
the camera,
camera, obtaining
obtaining aa resolution
resolution ofof
7380 ×
7380 × 4928
4928 pixels
pixels per image. For optimal contrast, the ISO used used was
was 125.
125. The
The camera
camera was
was
mounted
mounted on on aa tripod
tripod atat aa distance
distance of of approximately
approximately 11 m m from
from the
the sensor
sensor to
to the
the concrete
concrete
surface,
surface, in
in order
order to to obtain
obtain aa pixel
pixel size
size of
of 0.1
0.1 mm
mm and
and avoid
avoid blurring
blurring caused
caused byby hand-held
hand-held
motion.
motion. The
The distance
distance fromfrom the
the sensor
sensor to to the
the surface
surface was
was measured
measured with
with aa Bosch
Bosch GLMGLM 50c
50c
laser with a range from 0.05 to 50.00 m and an accuracy of ± 1.5 mm.
laser with a range from 0.05 to 50.00 m and an accuracy of ±1.5 mm. To avoid camera To avoid camera vibra-
tion and image
vibration blurring,
and image a tripod
blurring, was used
a tripod wasduring the datathe
used during acquisition process.process.
data acquisition The images
The
obtained correspond
images obtained to cracksto
correspond located
cracksinlocated
a bridge incolumn,
a bridgemultiple
column,bridge abutments,
multiple and
bridge abut-
an arch and
ments, of a an
bridge.
arch These structures
of a bridge. These present different
structures levels
present of smoothness
different levels of in the concrete
smoothness in
and different and
the concrete tones, some being
different tones,darker
some than
beingothers.
darkerThis
thangave a significant
others. This gavevariability in
a significant
the type of in
variability concrete
the type surface that was
of concrete studied.
surface Examples
that was studied. ofExamples
the different types
of the of concrete
different types
surfaces are presented in Figure 1.
of concrete surfaces are presented in Figure 1.
Figure 1. Surfaces
Figure 1. Surfaces studied:
studied: (a)
(a) Concrete
Concrete Wall,
Wall, (b)
(b) Bridge
Bridge Column,
Column, (c)
(c) Bridge
Bridge Abutment,
Abutment, (d)
(d) Bridge
Bridge
Arch.
Arch.
In order to validate the results determined using the suggested method, it was neces-
sary to determine the crack widths along different sections of the cracks. For this purpose,
a crack magnifier with a scale of 20 mm and divisions of 1/10 mm was employed for
direct measurements on the concrete surfaces. For each crack, measurements were per-
formed at multiple sections along the crack, allowing for the collection of multiple width
measurements. The positions of these measurement were marked to identify where each
In order to validate the results determined using the suggested method, it was nec-
essary to determine the crack widths along different sections of the cracks. For this pur-
pose, a crack magnifier with a scale of 20 mm and divisions of 1/10 mm was employed for
Sensors 2024, 24, 2736 direct measurements on the concrete surfaces. For each crack, measurements were5 of per-
16
formed at multiple sections along the crack, allowing for the collection of multiple width
measurements. The positions of these measurement were marked to identify where each
measurement has
measurement has been
been performed
performed and and facilitate
facilitate their
their identification
identification itit in
in the
the images.
images. The
The
images captured correspond
images correspondtotocracks
crackswhere
where measurements
measurements using
usingthethe
crack magnifier
crack had
magnifier
beenbeen
had performed. In total,
performed. 29 cracks
In total, were were
29 cracks captured usingusing
captured the camera: four images
the camera: corre-
four images
spond to cracks
correspond located
to cracks in theincolumn
located of a road
the column of a bridge, nine images
road bridge, correspond
nine images to a con-
correspond to
acrete wall, wall,
concrete two images correspond
two images to cracks
correspond in the abutment
to cracks of a roadofbridge
in the abutment a roadand fourteen
bridge and
to cracks to
fourteen located
cracksinlocated
the archinofthe
a road
arch bridge.
of a roadWithin these
bridge. cracks,these
Within a total of 409a sections
cracks, total of
409 sections showcasing
showcasing different
different widths werewidths were using
measured measured usingmagnifier.
the crack the crack magnifier. These
These measure-
measurements
ments serve as serve
groundas truth
ground truthwhich
against against which
the resultstheofresults of the proposed
the proposed method are method
com-
are compared.
pared.
2.2.
2.2. Pre-Processing
Pre-Processing
In
In the
the initial
initial pre-processing
pre-processing step,
step,the
theimages
imageswere
weredivided
dividedinto
intosub-images
sub-imagesofof224224××
224 pixels. The sub-image approach was used to generate threshold values
224 pixels. The sub-image approach was used to generate threshold values for each spe-for each specific
section. By doing
cific section. this, the
By doing determined
this, thresholds
the determined were specific
thresholds were to each sub-image,
specific avoiding
to each sub-image,
aavoiding
single threshold for the entire image.
a single threshold for the entire image.
Subsequently,
Subsequently,the thesub-images
sub-imageswere
weretransformed
transformedinto greyscale,
into following
greyscale, followingthethe
standard
stand-
practice of combining the intensities of the RGB components with NTSC
ard practice of combining the intensities of the RGB components with NTSC coefficients coefficients [33].
The conversion simplifies the analysis of pixel intensity distribution, since each pixel has
[33]. The conversion simplifies the analysis of pixel intensity distribution, since each pixel
only one value between 0 and 255. The transformation from RGB to greyscale was carried
has only one value between 0 and 255. The transformation from RGB to greyscale was
out using Equation (1) [34]:
carried out using Equation (1) [34]:
Y 𝑌==0.299R
0.299𝑅++0.587G
0.587𝐺
++ 0.114𝐵
0.114B (1)
where R,
where R, G,
G,and
andBBcorrespond
correspondto
tored,
red,green,
green,and
andblue
bluechannel
channelintensities,
intensities,respectively.
respectively.
2.3.
2.3. Crack Segmentation
Segmentation Based
Based on
on the
the Median
Median Absolute
Absolute Deviation
Deviation
This
This stage
stage of
of the
the methodology
methodology focused on the greyscale distribution of the pixels.
Figure
Figure22illustrates
illustratestwo
tworegions
regionswithin
withinananimage,
image,one
onewhere
wherea asub-image
sub-imagedoes
doesnot
notcontain a
contain
crack (window
a crack (window A)A)and another
and when
another when it it
does (window
does (windowB).B).
Figure 2.
Figure 2. Non-Cracked
Non-Cracked region
region (Window
(Window A)
A) and
and Cracked
Cracked region
region (Window
(Window B)
B) on
onimage.
image.
Figure 3 shows the pixel intensity distributions for both sub-image A and B. Figure 3a
shows the typical intensity distribution for a sub-image devoid of cracking. The intensi-
ties vary but without extreme values that can be considered as intensity discontinuities.
However, Figure 3b corresponds to the pixel intensity distribution for sub-image B, where
cracking is present. While some intensity variation is evident in certain areas, a clear dis-
Figure Figure 3 shows
3 shows thethepixel
pixel intensity
intensity distributions
distributionsfor both sub-image
for both A and B.AFigure
sub-image and B. Figu
3a shows the typical intensity distribution for a sub-image devoid of cracking. The inten-
3a shows the typical intensity distribution for a sub-image devoid of cracking. The inte
sities vary but without extreme values that can be considered as intensity discontinuities.
sities However,
vary butFigure
without extreme values that can be considered as intensity discontinuiti
3b corresponds to the pixel intensity distribution for sub-image B, where
Sensors 2024, 24, 2736 However, Figure 3b corresponds to the pixel
cracking is present. While some intensity intensity
variation distribution
is evident for sub-image
in certain areas, 6 of
a clear 16 B, wh
dis-
cracking is present.
continuity While some
corresponding intensity
to the crack variation
becomes apparent. is The
evident indistinctly
crack is certain areas,
identifia-a clear d
ble as the region with the lowest values of pixel intensity.
continuity corresponding to the crack becomes apparent. The crack is distinctly identifi
continuity corresponding to the crack becomes apparent. The crack is distinctly identifiable
ble asasthe
the region with
region with thethe lowest
lowest valuesvalues ofintensity.
of pixel pixel intensity.
(a) (b)
Figure 4.
Figure 4. Uncracked
Uncracked concrete
concrete section:
section: (a)
(a) sub-image
sub-image A,
A, (b)
(b) intensity
intensity histogram
histogram distribution.
distribution.
(a) (b)
Figure 4. Uncracked concrete section: (a) sub-image A, (b) intensity histogram distribution.
Sensors 2024, 24, x FOR PEER REVIEW 7 of 16
Sensors 2024, 24, 2736 7 of 16
(a) (b)
Figure5.5.Cracked
Figure Crackedconcrete
concretesection:
section:(a)
(a)sub-image
sub-imageB,
B,(b)
(b)intensity
intensityhistogram
histogramdistribution.
distribution.
Toaddress
To addressthisthisissue,
issue,this
thispaper
paperused
usedthe
themedian
medianasasan
anindicator
indicatorof
ofthe
thetendency
tendencyfor
for
thegreyscale
the greyscaleintensity
intensitywhich
whichisisless
lesssensitive
sensitiveto
tooutliers
outliers[35],
[35],and
andcalculated
calculatedthetheMedian
Median
AbsoluteDeviation
Absolute Deviation(MAD).
(MAD). The MAD is a scale estimator that measures the variability of
a dataset and itiscan
The MAD be used
a scale for outlier
estimator detection. the
that measures Thevariability
MAD is calculated as: and it can be
of a dataset
used for outlier detection. The MAD is calculated as:
𝑀𝐴𝐷 = 𝑚𝑒𝑑𝑖𝑎𝑛 𝑋 − 𝑋 (2)
MAD = median Xi − X (2)
where Xi is each element of the series, and 𝑋 is the median of the series. With this, a
e
Figure
Figure 6. Crack width
6. Crack width calculation.
calculation.
With the
2.6. Method measurements in terms of millimetres as the predicted value, the error in the
Performance
width calculation was obtained using the values measured with the crack magnifier as the
The performance evaluation involved different criteria: the Probability of Detection
true values and applying the formula:
(POD), accuracy, recall, precision, F2 score metrics, and the accuracy of crack width esti-
mation. Predicted value − True value
Errorto
The POD is intended )=
(%determine theTrue
ability of a method ×
value to100 (7)
detect a crack of a given
size, defining the largest crack width that the method can overlook. Crack width accuracy
2.6. Method Performance
is determined by comparing the manually measured widths using the crack magnifier
with The performance
the method’s evaluation
estimation involved
for each of thedifferent criteria: To
points gathered. thefurther
Probability of the
validate Detec-
re-
tion
sults(POD), accuracy,
of the method, recall,
the precision,
accuracy, recall,F2F2score metrics,
scores, and the accuracy
and precision of crack
metrics were width
calculated.
estimation.
The number of true positives/negatives and false positives/negatives were recorded man-
The POD is intended to determine the ability of a method to detect a crack of a given
size, defining the largest crack width that the method can overlook. Crack width accuracy
is determined by comparing the manually measured widths using the crack magnifier with
the method’s estimation for each of the points gathered. To further validate the results
of the method, the accuracy, recall, F2 scores, and precision metrics were calculated. The
number of true positives/negatives and false positives/negatives were recorded manually
for each crack and compared with the results obtained. A True Positive (TP) corresponds
Sensors 2024, 24, 2736 9 of 16
to a pixel belonging to a crack that has been correctly identified by the method. A False
Positive (FP) is a pixel from the background that has been marked as part of a crack by
the method. A True Negative (TN) is a pixel belonging to the background that has been
correctly identified as such and not marked in the final image. The False Negative (FN)
corresponds to a pixel that is part of a crack but that has not been detected as such and, thus,
is not marked in the final image. The calculations of the metrics are performed according
to Equations (8) to (11), according to [37,38].
TP + TN
Accuracy( Acc) = (8)
TP + FP + TN + FN
TP
Recall ( Re) = (9)
TP + FN
TP
Precision( Pr ) = (10)
TP + FP
5 × Pr × Re
F2 score = (11)
4 × Pr + Re
By carrying out these steps, we evaluated the capability of the method to detect cracks
of different widths and determine the accuracy of the width estimations.
Accuracy corresponds to the number of correct predictions made as a ratio of all
predictions made. Recall is the measure of how often the method correctly identified
positive observations from all the actual positive cases (the true positives + the false
negatives). Precision is the measure which determines how often the positive predictions
of the method are correct by considering the positive observations (true positives) and all
the observations it labelled as positive (the true positives + the false positives). The F2 score
is a measure to balance precision and recall; it corresponds to the weighted harmonic mean
of the precision and recall. The F2 score gives more weight to recall than to precision since
minimizing false negatives is the main concern.
3. Results
We applied the MAD method for the different cracked images gathered using the
different values of k.
Figure 7 presents the different outcomes obtained by applying the method to one of
the studied cracks. In each case, the method determined the MAD value for each sub-image
and with the corresponding k value the threshold T was obtained to generate the threshold
image with the crack marked in yellow pixels. The width was determined for each crack
at each point of the skeleton using the procedure presented in Section 2.5. In each case,
the dark pixels treated as outliers by the method have been marked, creating a continuous
slender line that forms the crack. This means the method identifies the pixels of interest.
For each value of k, cracks are highlighted however, the amount of noise presented and
the width of the crack change. For a low value of k (such as two in Figure 7a), the crack
is highlighted in the image and, in the upper part of the image, different elements can be
seen around the crack. These elements do not have an elongated shape as cracks usually
do. Instead, they appear as dots or rounded elements, constituting noise in the image. As
k increases, as in Figure 7b–e, the components considered as noise decrease in size and
number. This same process is noticeable along the crack. For k = 2.5, the noise in the image’s
upper and lower parts has decreased considerably concerning Figure 7a with a value of
k = 2.0. This trend is even more noticeable for k = 3.5, where many dot elements have
disappeared.
Furthermore, the width of the crack is also affected, particularly at the tip of the
two cracks present in the sample. The reduction in width can also be seen as a reduction in
the crack area leading to parts of the crack being missed (gaps).
Furthermore, the width of the crack is also affected, particularly at the tip of the two
cracks present in the sample. The reduction in width can also be seen as a reduction in the
Sensors 2024, 24, 2736 10 of 16
crack area leading to parts of the crack being missed (gaps).
Figure
Figure 8. POD
8. POD curves
curves forfor different
different values
values of of k for
k for thethe different
different crack
crack sizes
sizes studied.
studied.
Table
Table 2. 2. Detection
Detection rates a90a90
rates and a95a95
and forfor different
different values
values k. k.
of of
k Value
k Value a90 (mm)
a90 (mm) a95 a(mm)
95 (mm)
2.0 2.0 0.10 0.10 0.100.10
2.2 2.2 0.10 0.10 0.100.10
2.5 2.5 0.10 0.10 0.100.10
3.0 0.15 0.18
3.0 3.5 0.15 0.19 0.180.21
3.5 0.19 0.21
From
From thethe POD
POD results,
results, it can
it can bebe seen
seen that,
that, byby using
using thethe MAD
MAD segmentation
segmentation approach
approach
presented in this paper, the largest crack width that is possible to miss is
presented in this paper, the largest crack width that is possible to miss is 0.19 mm, when0.19 mm, when
using a k value of 3.5. By using a k value of 2.5, the probability of detecting cracks
using a k value of 3.5. By using a k value of 2.5, the probability of detecting cracks that that have
a width of 0.1 mm is 97%. Among the different values used for k, 2.0, 2.2, and 2.5 have
have a width of 0.1 mm is 97%. Among the different values used for k, 2.0, 2.2, and 2.5
the lowest values for a90 and a95, showing that the method is efficient for detecting crack
widths of 0.1 mm and greater. This can be a useful tool for inspectors, since they can obtain
the small crack regions that can sometimes be overlooked when visually reviewing images.
values were determined for each crack size and each k value; these are presented in Table 3.
The method detects the regions that correspond to the crack where the width is 0.1 mm but,
in general, it overestimates the width by more than double (>100%). The error is similar for
the different values of k, although decreasing. Indeed, the mean error tends to decrease
with higher values of k and higher values of crack width. Although in the majority of
cases there is an overestimation of the crack width, using k = 3.5 generates negative values
corresponding to an underestimation of the width.
Errors are more pronounced for smaller crack widths. One of the contributing factors
is that, in order to identify regions corresponding to crack widths of 0.1 mm, the k value
for the MAD is set to lower values. This implies that the threshold value is closer to the
median, resulting in a larger number of intensities which can be categorised as outliers. As
a result, pixels in the neighbourhood of a crack, which have close intensity values to the
pixels within the crack, end up being marked as part of the crack, effectively enlarging the
crack area. The selection of the k influences the width estimation as well as the probability
of detection, as presented previously. For lower values of k, the POD is higher since there
are no gaps in the continuity of the crack, but the noise and the overestimation of the width
increase. For higher values of k, gaps might appear, but the width estimation is closer to
reality. Considering these two scenarios, the selection of k becomes a trade-off between the
amount of noise accepted, the need to detect the full extension of the crack, and the width
of the crack.
Additionally, it is important to consider that the real size of the pixels corresponds to
the minimum value for the target crack size. This means that an error of one pixel for a
crack measuring 0.1 mm corresponds to an error of 100%. In order to mitigate this, it would
be necessary to have a pixel size smaller than 0.1 mm, either by using a camera with higher
resolution or by setting the camera closer to the concrete surface.
Figure 9. Comparison
Figure 9. Comparison of
of MAD,
MAD, Otsu,
Otsu, and
and Niblack
Niblack methods.
methods.
In the case of the Otsu method, the crack cannot be seen in a clear way, while the
When using the MAD method, the cracks are clearly delimited, simplifying their as-
MAD and Niblack methods clearly highlight the cracks. However, in these two cases, some
sessment for an inspector. While the method generates noise similar to the previous cases,
noise is represented by areas incorrectly highlighted as cracks. Despite the crack being
the quantity of noisy regions is considerably less than for the Otsu or Niblack methods.
distinguishable, the noise limits the possibility of an inspector or responsible person being
able to From
focusthe considered
solely images, the
on the damage. manually
Indeed, when marked
using theregions were used
Otsu method, the to determine
noise makes
itthe number
difficult of True/False
to clearly Positive/Negative
delineate detections
the crack and determine thefor comparison
extent of the methods.
of the damage.
The results
On the of these
other metrics
hand, for are
the presented in Tablethe
Niblack method, 4. crack is delineated when the back-
ground surface is homogeneous, to some extent. In the case of the second image, variations
in the concrete colour and different sizes of aggregate make the surface more heterogeneous;
this situation generates noise that can make the crack more difficult to distinguish in some
regions. This case would require a higher level of attention for an inspector to be able to
notice the limits of the crack effectively.
When using the MAD method, the cracks are clearly delimited, simplifying their
assessment for an inspector. While the method generates noise similar to the previous cases,
the quantity of noisy regions is considerably less than for the Otsu or Niblack methods.
From the considered images, the manually marked regions were used to determine
the number of True/False Positive/Negative detections for comparison of the methods.
The results of these metrics are presented in Table 4.
The accuracy of the MAD method demonstrates superior results when compared with
the Otsu and Niblack methods, with the lowest value being 97%. Recall represents the
number of observations the method correctly identified as cracks from all the possible
positive cases. For this metric, the Otsu method performed best but with a precision of
Sensors 2024, 24, 2736 14 of 16
only 5%. Precision corresponds to the rate of observations the method correctly identified
as cracks, relative to all the observations classified as cracks. Although Otsu has the best
results of recall, the MAD performed better for that metric than Niblack, while achieving
the best results for precision.
In this context, a high level of recall is important as it indicates how effectively the
method detects relevant information (cracks in this case). Precision gives a measure of
false alerts, which can be considered less critical than correctly identifying damage, making
recall more significant. Taking this into account, the MAD method achieves the best results
for the F2 score, which relates recall and precision and puts more emphasis on recall.
4. Conclusions
The method applies the MAD to determine a threshold value for different sub-images
of an image where there is a crack. The calculation of the MAD for each sub-image allows
us to obtain an adaptable threshold value, adjusted to the characteristics of each particular
sub-image, rather than using a general threshold for the entire image. This approach has
proved to be efficient for determining cracks in the images; detecting cracks with widths
of 0.1 mm at a probability of 97%, when using low values of k, and 64% with the highest
value of k. The method delivers results with minimum pre-processing requirements, other
than converting the image into greyscale.
The results indicate that lower k values (2.5 and below) give superior results in terms of
crack detection, but higher errors in their quantification. On the contrary, the highest value
of k gives suboptimal detection results, but the best in terms of quantification. To enhance
the method’s performance, a combination of two k values can be explored, one prioritising
the crack detection and another prioritising the quantification, creating a balance between
the two aspects.
It is important to acknowledge a limitation for the method, since it tends to over-
estimate the crack width in most cases. The overestimation is attributed to the k values
selected, which have a tendency to prioritise the detection of crack areas by applying a
larger threshold value. Additionally, the error is influenced by the size of the pixel, since
an error of one pixel can represent a 100% error, in terms of the real value. Despite this
limitation, the overestimation can be perceived as a conservative measure, assuring that
the method is overestimating damage and, thus, a harmful situation for the structure.
Likewise, the presence of noise in the results should be considered. However, when
considering the practical application of this method and the evaluation of the results by an
inspector, the human perspective plays a crucial role in distinguishing the noise from vital
information. As presented in the comparison of the methods, the MAD method outputs
the lowest values for noise in comparison to the Otsu and Niblack methods, showing the
highest values of precision and F2 score. The method highlights regions containing cracks,
allowing an inspector to focus on those specific areas without having to examine the entire
picture. This reduces the possibility of the inspector missing a crack due to fatigue, lack
of concentration, or having cracks blending in with the background. Although part of the
noise could be wrongly identified as a crack, this conservative approach is preferred over
missing regions with cracks, thus making the results more reliable.
In future studies, hybrid processing will be implemented, integrating various values
of k to balance between prioritizing crack detection and width estimation. Additionally, a
post-processing step will be introduced after applying the MAD procedure to eliminate
noise based on the shape of detected elements. This involves analysing the relationship
between length and width to identify and remove round elements that correspond to noise,
thereby enhancing the precision of crack identification.
Author Contributions: Conceptualization, J.C.A. and J.L.; methodology, J.C.A. and J.L; software,
J.C.A.; validation, J.C.A.; formal analysis, J.C.A.; investigation, J.C.A.; resources, J.C.A., J.L. and
R.K.; data curation, J.C.A.; writing—original draft preparation, J.C.A.; writing—review and editing,
J.L. and R.K.; visualization, J.C.A.; supervision, J.L. and R.K.; project administration, J.L. and R.K.;
Sensors 2024, 24, 2736 15 of 16
funding acquisition, J.L. and R.K. All authors have read and agreed to the published version of
the manuscript.
Funding: This paper was produced as part of the Mistra InfraMaint research programme, with
funding from Mistra, the Swedish Foundation for Strategic Environmental Research, and Stockholms
Stadshus AB.
Institutional Review Board Statement: Not applicable.
Informed Consent Statement: Not applicable.
Data Availability Statement: The data used in this study are available on request from the corre-
sponding author.
Conflicts of Interest: The authors declare that they have no known competing financial interests or
personal relationships that could have appeared to influence the work reported in this paper.
References
1. Neves, A.C.; González, I.; Leander, J.; Karoumi, R. Structural health monitoring of bridges: A model-free ANN-based approach to
damage detection. J. Civ. Struct. Health Monit. 2017, 7, 689–702. [CrossRef]
2. Ai, D.; Jiang, G.; Lam, S.K.; He, P.; Li, C. Computer vision framework for crack detection of civil infrastructure—A review. Eng.
Appl. Artif. Intell. 2023, 117, 105478. [CrossRef]
3. Sonbul, O.S.; Rashid, M. Algorithms and Techniques for the Structural Health Monitoring of Bridges: Systematic Literature
Review. Sensors 2023, 23, 4230. [CrossRef]
4. Koch, C.; Georgieva, K.; Kasireddy, V.; Akinci, B.; Fieguth, P. A review on computer vision based defect detection and condition
assessment of concrete and asphalt civil infrastructure. Adv. Eng. Inform. 2015, 29, 196–210. [CrossRef]
5. Gervásio, H.; da Silva, L.S. Life-cycle social analysis of motorway bridges. Struct. Infrastruct. Eng. 2013, 9, 1019–1039. [CrossRef]
6. Morgenthal, G.; Hallermann, N. Quality Assessment of Unmanned Aerial Vehicle (UAV) Based Visual Inspection of Structures.
Adv. Struct. Eng. 2014, 17, 289–302. [CrossRef]
7. Yeum, C.M.; Dyke, S.J. Vision-Based Automated Crack Detection for Bridge Inspection. Comput. Civ. Infrastruct. Eng. 2015, 30,
759–770. [CrossRef]
8. Liu, Y.F.; Cho, S.; Spencer, B.F.; Fan, J.S. Concrete Crack Assessment Using Digital Image Processing and 3D Scene Reconstruction.
J. Comput. Civ. Eng. 2016, 30, 04014124. [CrossRef]
9. Neves, A.C. Structural Health Monitoring of Bridges: Model-Free Damage Detection Method Using Machine Learning; KTH Royal
Institute of Technology: Stockholm, Sweden, 2017.
10. Sony, S.; Laventure, S.; Sadhu, A. A literature review of next-generation smart sensing technology in structural health monitoring.
Struct. Control Health Monit. 2019, 26, e2321. [CrossRef]
11. Zaurin, R.; Catbas, F.N. Integration of computer imaging and sensor data for structural health monitoring of bridges. Smart Mater.
Struct. 2010, 19, 015019. [CrossRef]
12. Peng, B.; Jiang, Y.; Pu, Y. Review on Automatic Pavement Crack Image Recognition Algorithms. J. Highw. Transp. Res. Dev. (Engl.
Ed.) 2015, 9, 13–20. [CrossRef]
13. Cubero-Fernandez, A.; Rodriguez-Lozano, F.J.; Villatoro, R.; Olivares, J.; Palomares, J.M. Efficient pavement crack detection and
classification. EURASIP J. Image Video Process. 2017, 2017, 39. [CrossRef]
14. Epshtein, B.; Ofek, E.; Wexler, Y. Detecting text in natural scenes with stroke width transform. In Proceedings of the 2010 IEEE
Computer Society Conference on Computer Vision and Pattern Recognition, San Francisco, CA, USA, 13–18 June 2010; pp.
2963–2970.
15. Kim, H.; Lee, J.; Ahn, E.; Cho, S.; Shin, M.; Sim, S.H. Concrete Crack Identification Using a UAV Incorporating Hybrid Image
Processing. Sensors 2017, 17, 2052. [CrossRef] [PubMed]
16. Abdel-Qader, I.; Abudayyeh, O.; Kelly, M.E. Analysis of edge-detection techniques for crack identification in bridges. J. Comput.
Civ. Eng. 2003, 17, 255–263. [CrossRef]
17. Zhao, H.; Qin, G.; Wang, X. Improvement of canny algorithm based on pavement edge detection. In Proceedings of the 2010 3rd
International Congress on Image and Signal Processing, Yantai, China, 16–18 October 2010; Volume 2, pp. 964–967.
18. Hutchinson, T.C.; Chen, Z. Improved Image Analysis for Evaluating Concrete Damage. J. Comput. Civ. Eng. 2006, 20, 210–216.
[CrossRef]
19. Kim, H.; Sim, S.H.; Cho, S. Unmanned aerial vehicle (UAV)-powered concrete crack detection based on digital image processing.
In Proceedings of the International Conference on Advances in Experimental Structural Engineering, Urbana, IL, USA, 1–2
August 2015; Volume 2015-Augus.
20. Cho, H.; Yoon, H.J.; Jung, J.Y. Image-Based Crack Detection Using Crack Width Transform (CWT) Algorithm. IEEE Access 2018, 6,
60100–60114. [CrossRef]
21. Kirschke, K.R.; Velinsky, S.A. Histogram-based approach for automated pavement-crack sensing. J. Transp. Eng. 1992, 118,
700–710. [CrossRef]
Sensors 2024, 24, 2736 16 of 16
22. Kapela, R.; Śniatała, P.; Turkot, A.; Rybarczyk, A.; Pożarycki, A.; Rydzewski, P.; Wyczałek, M.; Błoch, A. Asphalt surfaced
pavement cracks detection based on histograms of oriented gradients. In Proceedings of the 2015 22nd International Conference
Mixed Design of Integrated Circuits & Systems (MIXDES), Torun, Poland, 25–27 June 2015; Volume 2015, pp. 579–584.
23. Li, Q.; Liu, X. Novel approach to pavement image segmentation based on neighboring difference histogram method. In
Proceedings of the 2008 Congress on Image and Signal Processing, Sanya, China, 27–30 May 2008; Volume 2, pp. 792–796.
24. Chen, C.; Seo, H.; Jun, C.; Zhao, Y. A potential crack region method to detect crack using image processing of multiple thresholding.
Signal Image Video Process. 2022, 16, 1673–1681. [CrossRef]
25. Cao, W.; Liu, Q.; He, Z. Review of Pavement Defect Detection Methods. IEEE Access 2020, 8, 14531–14544. [CrossRef]
26. Duque, L.; Seo, J.; Wacker, J. Bridge Deterioration Quantification Protocol Using UAV. J. Bridge Eng. 2018, 23, 04018080. [CrossRef]
27. Dorafshan, S.; Thomas, R.J.; Maguire, M. Benchmarking Image Processing Algorithms for Unmanned Aerial System-Assisted
Crack Detection in Concrete Structures. Infrastructures 2019, 4, 19. [CrossRef]
28. Miao, P.; Srimahachota, T. Cost-effective system for detection and quantification of concrete surface cracks by combination of
convolutional neural network and image processing techniques. Constr. Build. Mater. 2021, 293, 123549. [CrossRef]
29. Munawar, H.S.; Hammad, A.W.A.; Haddad, A.; Soares, C.A.P.; Waller, S.T. Image-based crack detection methods: A review.
Infrastructures 2021, 6, 115. [CrossRef]
30. Özgenel, F.; Sorguç, A.G. Performance comparison of pretrained convolutional neural networks on crack detection in buildings.
In Proceedings of the ISARC 2018—35th International Symposium on Automation and Robotics in Construction and International
AEC/FM Hackathon: The Future of Building Things, Berlin, Germany, 20–25 July 2018.
31. Campbell, L.E.; Connor, R.J.; Whitehead, J.M.; Washer, G.A. Benchmark for Evaluating Performance in Visual Inspection of
Fatigue Cracking in Steel Bridges. J. Bridge Eng. 2020, 25, 04019128. [CrossRef]
32. Keprate, A.; Ratnayake, R. Probability of detection as a metric for quantifying NDE capability: The state of the art. J. Pipeline Eng.
2015, 14, 199–209.
33. Chun, P.J.; Izumi, S.; Yamane, T. Automatic detection method of cracks from concrete surface imagery using two-step light
gradient boosting machine. Comput. Civ. Infrastruct. Eng. 2021, 36, 61–72. [CrossRef]
34. Güneş, A.; Kalkan, H.; Durmuş, E. Optimizing the color-to-grayscale conversion for image classification. Signal Image Video
Process. 2016, 10, 853–860. [CrossRef]
35. Leys, C.; Ley, C.; Klein, O.; Bernard, P.; Licata, L. Detecting outliers: Do not use standard deviation around the mean, use absolute
deviation around the median. J. Exp. Soc. Psychol. 2013, 49, 764–766. [CrossRef]
36. Avendaño, J.C.; Leander, J.; Karoumi, R. Image based inspection of concrete cracks using UAV photography. In Bridge Safety,
Maintenance, Management, Life-Cycle, Resilience and Sustainability; CRC Press: Boca Raton, FL, USA, 2022; pp. 1973–1978.
37. Park, K.; Song, Y.; Cheong, Y.G. Classification of attack types for intrusion detection systems using a machine learning algorithm.
In Proceedings of the 2018 IEEE 4th International Conference on Big Data Computing Service and Applications (BigDataService),
Bamberg, Germany, 26–29 March 2018; pp. 282–286.
38. Flach, P.A.; Kull, M. Precision-Recall-Gain curves: PR analysis done right. Adv. Neural Inf. Process. Syst. 2015, 1, 838–846.
39. Gonzalez, R.C.; Woods, R.E. Digital Image Processing, 3rd ed.; Pearson: London, UK, 2008.
40. Deng, J.; Singh, A.; Zhou, Y.; Lu, Y.; Lee, V.C.S. Review on computer vision-based crack detection and quantification methodologies
for civil structures. Constr. Build. Mater. 2022, 356, 129238. [CrossRef]
41. Vivekananthan, V.; Vignesh, R.; Vasanthaseelan, S.; Joel, E.; Kumar, K.S. Concrete bridge crack detection by image processing
technique by using the improved OTSU method. Mater. Today Proc. 2023, 74, 1002–1007. [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual
author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to
people or property resulting from any ideas, methods, instructions or products referred to in the content.