1. Introduction
Cracks in substantial concrete structures, including in-service bridges, tunnels, and dams, can pose a danger to the operational safety of the structures, and it is essential to conduct regular inspections and evaluations of cracks, along with long-term monitoring of their condition, to ensure that structures remain in optimal technical condition. The method of periodic inspection is mainly manual visual inspection, which is often not precise enough and prone to produce inconsistent results [
1,
2]. Long-term status monitoring is costly and time consuming, and it can only monitor changes in crack width. Moreover, the number of monitoring points is limited, making it suitable only for the status monitoring of a few specific cracks [
3]. To enhance the safety status of structures and improve the efficiency of structural health monitoring, researchers have presently achieved automated physical inspections of structures [
4]. Furthermore, these are capable of the automatic detection and segmentation of structures with damage [
5].
In recent years, machine vision crack recognition methods based on deep learning have made great progress (black-box techniques) [
6]. There are many networks applied in crack recognition, including residual networks (ResNet) [
7], fully convolutional networks (FCN) [
8], and convolutional neural networks (CNN) [
9]. Dais used deep learning to identify cracks in masonry walls [
10]. Zhang used the BC MobileNet network model to identify cracks in bridges [
11]. And Wu used a U-net network model to identify road cracks [
12]. Li proposed a convolutional neural network and naive Bayesian data fusion method, which solves the problems of inefficiency and low accuracy of traditional visual feature-based defect detection methods [
13]. Wang utilized a ResNet to enhance measurement accuracy and crack recognition [
14]. Ali studied the application of a convolutional neural network in crack detection, and the limitations of machine vision techniques (white-box techniques) and machine learning in crack recognition were discussed [
15]. Deep learning and traditional image process methods can be combined to solve crack detection problems (grey-box techniques) [
16]. Despite the success of deep learning techniques in concrete crack detection, the decision-making process of deep learning is characterized by its lack of interpretability. The accuracy of the results produced by deep learning techniques depends on the network used and requires large datasets for training, along with significant computational power.
The traditional image process method has the advantages of high interpretability and efficiency and does not demand a large dataset and computational power. Therefore, there is still a place for the development of the image process method. Researchers have established a variety of concrete crack image segmentation methods to extract cracks and calculate crack length and width. Tang used a bilateral filtering and image adaptive chunking method to achieve the detection of cracks in tunnels [
17]. Sun proposed an improved seed fill algorithm and designed a concrete surface crack image recognition system that calculates the number of crack bars and their length and width [
18]. Han combined deep learning with digital image technology and used the improved edge gradient method to locate and calculate the maximum width of the pixel crack [
19]. Liu proposed an improved crack detection algorithm based on structural analysis, specifically targeting images of crack defects in underground tunnels [
20]; addressing the challenges encountered in traditional pipeline crack detection, Altabey developed an image processing-based method for detecting pipeline cracks in complex environments [
21]. Pantoja-Rosero proposed a novel algorithm to calculate displacement maps in tangential and normal directions in a crack skeleton from a binary image by a Euclidean transformation model and non-linear least squares-based optimization method [
22]. However, the measurement precision of the traditional image process method is at a pixel level, which may result in significant errors in high-precision measurement conditions—for example, measuring minute cracks variations changed with time.
High-precision crack measurement is in urgent demand by infrastructure inspection and health monitoring services; China’s
Technical Specification for Digital Image Inspection of Engineering Structures requires a minimum width measurement of 0.1 mm for digital image methods [
23]. For highway bridges, the standard is even finer at 0.01 mm. These high-precision measurement requirements pose significant challenges for the selection of machine vision equipment, as well as data transmission and storage. The pixel parameter calculation method is inadequate for practical engineering requirements. Consequently, a subpixel-based location method has attracted extensive attention from researchers. Chen used a cubic polynomial fitting image edge to achieve subpixel localization [
24], and Luo suggested an enhanced gray-moment subpixel edge detection algorithm, yielding a measurement accuracy of approximately 0.06~0.08 pixels [
25]. Trujillo proposed a subpixel edge positioning approach that is based on the partial area effect and can eventually compute the subpixel coordinates, inclination, and curvature of the edges [
26]. Subpixel location algorithms are promising in infrastructure crack width and length calculation, but they have not attracted enough attention from researchers and are not employed in high-precision crack measurement and crack parameter extraction.
In this paper, we present a novel white-box approach focused on enhancing the precision of crack measurements in concrete structures. Different from the crack segmentation method in the current literature, our approach incorporates a subpixel algorithm based on the partial area effect, and it significantly improves the precision of crack detection. This method is distinct in its ability to accurately locate both pixel and subpixel crack edges, an advancement over traditional pixel-based techniques.
The measurement of cracks on concrete structure surface proposed in this paper mainly includes the following parts: ① Acquisition of crack images using a civil camera; ② Identification of crack images using grayscale threshold, area threshold and morphological operations; ③ Acquisition of crack edges and crack center lines by a 4-neighbourhood convolution kernel; ④ Calculation the crack precise width and length by subpixel algorithm of the partial area effect. As stated above, our approach is a process composed of crack image capture, identification, feature extraction and parameter calculation. The overall framework of crack image identification is shown in
Figure 1.
2. Pixelwise Crack Image Segmentation and Parameters Extraction
In this section, we propose a multi-threshold segmentation method that integrates grayscale, area, and connection thresholds. This method is designed to denoise concrete crack images and detect cracks at the pixel level.
Common segmentation approaches, such as those based on thresholds, gradients, and regions, are considered standard. Our method advances these by combining multiple thresholds to enhance the precision and accuracy of crack segmentation in concrete structures.
2.1. Pixel Image Segmentation with Multi-Threshold Fusion
2.1.1. Grayscale Threshold Segmentation of Images
Grayscale threshold segmentation can separate crack areas in an image from the image background. A reasonable grayscale threshold
T is the foundation for maximizing crack extraction and ensuring accurate results. When using a grayscale threshold for image crack segmentation, pixels smaller than grayscale threshold
T are identified as cracks and assigned a value of 1; pixels greater than or equal to the grayscale threshold
T are recognized as background and assigned a value of 0, i.e.,
where
represents the grayscale value of any pixel in the original image, and
represents the grayscale value of the pixel after grayscale threshold segmentation.
The grayscale threshold T is crucial for the accuracy of crack segmentation. If the grayscale threshold T is set too large, it will cause background pixels to be mistakenly recognized as cracks, resulting in oversegmentation. Conversely, if the grayscale threshold T is set too small, it will cause the crack pixels to be mistakenly recognized as background, resulting in undersegmentation. Common methods for grayscale threshold segmentation include the iterative method, the Otsu method, and the self-set threshold method.
The iterative method is a method for iteratively calculating the grayscale threshold of images, suitable for crack images with bimodal histograms. It starts with an initial threshold
T0, set as the average of the image’s maximum and minimum grayscale values, and an allowable error
t0. ① The image is then segmented into background (
F1) and crack (
F2) regions using
T0. ② The mean grayscales for
F1 (
) and
F2 (
) can be calculated, and a new threshold
T1 can be calculated as the average of
and
. ③ If the absolute difference between
T1 and
T0 is less than
t0, the process stops and
T0 is set as the final threshold for image segmentation. Otherwise,
T1 is assigned to
T0, and the above steps are repeated until the absolute difference between
T1 and
T0 is less than
t0. The workflow is shown in
Figure 2.
The Otsu method aims to find a grayscale threshold
T that maximizes the variance between cracks and background regions, thereby achieving optimal image segmentation [
27]. The self-set threshold method is a subjective selection method based on experience. It involves manually selecting a suitable grayscale threshold
T for image segmentation through understanding and judgment of the image.
To compare the effectiveness of different methods, concrete crack images were segmented using the iterative method, the Otsu method, and the self-set threshold method for comparison, as shown in
Figure 3. The self-set threshold method had grayscale thresholds
T of 64 and 128, respectively. This method necessitates manually setting the grayscale threshold
T for every crack image, which is inefficient. In contrast, the iterative method and the Otsu method do not require manual adjustment of the grayscale threshold
T, making them more efficient and effective.
The threshold calculation results and time consumption of the iterative method and the Otsu method are shown in
Table 1. The results indicate that the grayscale thresholds obtained by the iterative method and the Otsu method are very close, with a difference of only 0.09; However, in terms of computational efficiency, the iterative method is superior to the Otsu method (73 ms faster than the Otsu method for every 1000 executions). Therefore, this paper adopts the iterative method for calculating and determining the grayscale threshold.
2.1.2. Area Threshold Denoise
The binary image obtained by using a grayscale threshold for image segmentation contains noise caused by poor lighting, concrete surface stains, aggregates, etc. There are two types of crack image noise, one is low reflection coefficient noise in the concrete area, and the other is high reflection coefficient noise in the crack area, as shown in
Figure 4. To improve the accuracy of crack identification, these noises need to be removed. If the set of connected pixels in an image is a connected domain
G1, …,
GN, then the area of the corresponding connected domain is
A1, …,
AN, measured in the number of pixels. There are mainly two connectivity validation algorithms: 4-neighbourhood algorithm and 8-neighbourhood algorithm. The 4-neighbourhood algorithm searches horizontally and vertically, as shown in
Figure 5a, while the 8-neighbourhood algorithm searches horizontally, vertically and obliquely, as shown in
Figure 5b. For crack exterior noise, as shown in
Figure 4a, the 8-neighbourhood algorithm will consider the crack edge noise and the crack as the same set of pixels, so this type of noise cannot be removed using the 8-neighbourhood algorithm. In contrast, the 4-neighbourhood algorithm can distinguish between this type of noise and cracks, and can effectively remove it.
of the connected domain area is used as the area threshold
Tarea [
28]. Any connected domain with an area less than this threshold is considered noise, i.e.,
To eliminate internal noise in cracks, it is imperative to invert the binary image and subsequently eliminate the noise using Equation (2).
In the grayscale thresholding stage, the grayscale threshold should be set slightly higher so that the retained parts are slightly larger than the crack area, to prevent crack pixels from being filtered out. Furthermore, in the area size thresholding segmentation stage, the area threshold is determined by 4-neighborhood connectivity, effectively identifying and excluding regions that do not belong to the crack. This method ensures that the final segmented image predominantly contains actual crack features.
Though the above steps, we have established a multi-step, multi-threshold fusional infrastructure crack segmentation method, and pixel crack image map can be obtained.
2.2. Crack Parameter Extraction
After segmenting the crack images using the multi-threshold fusion algorithm, it is necessary to perform a quantitative calculation of the crack length, width, and other relevant parameters for structure status evaluation and integrity assessment. In this section a crack parameter calculation was proposed that involved three steps, first used 4-neighbourhood convolution method to detect the crack edges, then the crack center line were generated by crack edges. At last, the crack width could be calculated by crack edges and perpendicular line of the center line, and the crack length could be calculated by the smallest outer rectangle of the center line.
2.2.1. Crack Edge Extraction Based On4-Neighbourhood Convolution
In the concrete crack binary image, the crack pixels are ones and concrete are all zeros, as a result, all internal crack pixels are all in four connectivity with crack pixels, but the boundary crack pixels do not satisfy this condition. So only pixels whose 4-neighbourhood convolution value is five are considered as internal crack pixels, or non-edge pixels, otherwise are classified as boundary crack pixels, also call crack edges. In view of this property, a new crack edge extraction was proposed based on 4-neighbourhood convolution.
Figure 6 shows the convolutional kernel used, and
Table 2 is the detailed illustration of the crack’s edges extraction steps.
The crack edge detection method proposed is different from the Canny edge detection algorithm [
29] in the efficiency and the selection of threshold, where there is no need to set the threshold manually by iterative thresholding method and the standard deviation of all connected domain areas in proposed method, while two threshold value need manually selection. Moreover, the proposed method enhanced the computation efficiency of crack detection than the Canny method, as shown in
Table 3.
2.2.2. Crack Center Line Extraction
After extracting the crack edges, the skeleton line needs to be extracted to calculate crack length. Zhang proposed an iterative skeleton line extraction method to refine the crack to a 1-pixel thickness line through iterations of two local conditional judgments each iteration [
30]; however, the algorithm led to the decreases in the crack length with an increased number of iterations, which made the measured crack length shorter than the actual crack length, as shown in
Figure 7.
To avoid such errors in crack length and width measure, the center line instead of the skeleton line was proposed to extract straight cracks precision parameter, and straight cracks could be three types of cracks, vertical, horizontal and oblique cracks, based on the direction of crack extension and inclination [
31]. For simplicity, take straight vertical cracks as an example, there are only two edge pixel points in each row of the image crack region in ideal conditions, as shown in
Figure 8a, and the centroid of the crack in each row could be calculated using the corresponding two crack edge points extracted. In nonideal conditions, there are more than two edge pixel points in each row of the image crack region, also shown
Figure 8a, the two nearest pixel points in each edge are selected to determine the centroid of the row. In this way, the center line of straight vertical crack could be detected by connecting all center points in each row, as shown in
Figure 8b.
It should be noted that the proposed center line extraction model can only be applied to straight cracks, and curved, intersected cracks are not taken into consideration to avoid complex geometric properties and relations. For the crack extended along horizontal direction, its center line could also be extracted after a after a 90° rotation transformation, as shown in
Figure 9.
For straight cracks, the curvature is small and local curve length could be neglected, so the crack length could be approximately characterized by the diagonal length of the smallest outer rectangle of the crack center line. Assuming that the coordinates of the two endpoints of the crack center line are (
x0,
y0) and (
xn,
yn), the length and width of the smallest outer rectangle of the crack center line are|
y0 −
yn|, |
x0 −
xn|, respectively. Therefore, the length of the crack is
, and the schematic diagram of crack length calculation is shown in
Figure 10.
5. Conclusions and Envisions
This paper proposes a high-precision concrete crack measurement method through a process of multi-threshold fusion, crack center line abstraction, and subpixel edge location computation. And the main conclusions are as follows:
- (1)
This paper proposed a multi-step process and multi-threshold fusion and morphology operation combined pixelwise crack image segmentation and the parameter extraction algorithm. In the crack segmentation stage of the algorithm, a 4-neighbourhood convolution-based edge extraction is developed to detect the crack and experiment results show that the algorithm is very efficient. In the parameter extraction stage of the algorithm, the crack center line detection method is developed and the center line length is present as the crack length calculation method that can be applied both pixelwise and at the subpixel level.
- (2)
Based on the principle of the photoelectricity of image capturing, a subpixel algorithm based on the partial area effect is introduced to locate the subpixel edges of vertical, horizontal, and oblique cracks, and a novel subpixel crack width calculation method along the crack center line pixelwise is developed by extraction of middle points, the center line and its normal, and the intersection of center line normal and crack edges. With this method, the width of any point along the crack center line can be calculated.
- (3)
The proposed method is verified by an indoor concrete beam crack measurement experiment with a digital microscope, and results show that the maximum relative errors of the subpixel width of horizontal, vertical, and oblique straight cracks measured by the proposed method are 3.06%, 8.97% and 5.16%, respectively. The absolute error of the crack length is less than 0.30 mm, and the measurement accuracy can reach 0.01 pixels.
With the subpixel parameter calculation algorithm proposed, crack evolution monitoring in SHM can be easily achieved with precision, and it breaks through the limitation of traditional pixelwise crack segmentation. However, in complex environments like low light, severe surface dirt and stains, or great variation in crack width, it is difficult to select the proper dataset image size to make sure crack images with bimodal histograms can be obtained, which is prerequisite for iterative or Otsu threshold selection. Further research should focus on illumination setup, and the fusion of the global and local threshold methods to make sure more precise threshold values can be chosen. Moreover, curved and multi-branched cracks pose difficulties for the extraction of the center line geometrically. Since the localized region of the crack is characterized by a bimodal histogram, our future work will also focus on converting multi-branched cracks into single branches. Additionally, when dealing with single-branch curved cracks, segmenting them into multiple straight cracks will be necessary. These aspects will be the focus of the next phase of our research.