A Subpixel Concrete Crack Measurement Method Based on the Partial Area Effect

: To improve the accuracy of concrete crack measurement with a machine vision method in structural health monitoring and in technical status evaluation, a subpixel crack measurement method based on the partial area effect was proposed. (1) First, a pixelwise crack image segmentation method was established through a multi-step process of multi-threshold fusion and morphology operation, and a novel pixel degree crack width calculation method was developed with the extraction of the middle points, the center line and its normal, and the intersection of the center line normal and crack edges. (2) Then, a subpixel algorithm based on the partial area effect was introduced to locate vertical, horizontal, and oblique cracks in subpixel crack edges, and the subpixel crack width could be calculated along the crack center line pixelwise. (3) Finally, the proposed method was verified by indoor concrete beam crack measurement tests with a digital microscope, and the results show that the maximum relative errors of the subpixel width of the horizontal, vertical, and oblique straight cracks measured by the proposed method were 3.06%, 8.97%, and 5.16%, respectively. The absolute error of the crack length was less than 0.30 mm, and the measurement accuracy could reach 0.01 pixels. The subpixel crack measurement method provides a novel possible solution for structural health monitoring.


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.08pixels [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: 1  ⃝ Acquisition of crack images using a civil camera; 2 ⃝ Identification of crack images using grayscale threshold, area threshold and morphological operations; 3 ⃝ Acquisition of crack edges and crack center lines by a 4-neighbourhood convolution kernel; 4  ⃝ 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.
Buildings 2024, 14, x FOR PEER REVIEW 3 of 17 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.

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.

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 ( , ) F x y represents the grayscale value of any pixel in the original image, and ( , ) I x y 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.

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.

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 F(x, y) represents the grayscale value of any pixel in the original image, and I(x, y) 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 T 0 , set as the average of the image's maximum and minimum grayscale values, and an allowable error t 0 . 1  ⃝ The image is then segmented into background (F 1 ) and crack (F 2 ) regions using T 0 . 2  ⃝ The mean grayscales for F 1 (µ 1 ) and F 2 (µ 2 ) can be calculated, and a new threshold T 1 can be calculated as the average of µ 1 and µ 2 . 3 ⃝ If the absolute difference between T 1 and T 0 is less than t 0 , the process stops and T 0 is set as the final threshold for image segmentation.Otherwise, T 1 is assigned to T 0 , and the above steps are repeated until the absolute difference between T 1 and T 0 is less than t 0 .The workflow is shown in Figure 2.
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 (  1 ) and F2 (  2 ) can be calculated, and a new threshold T1 can be calculated as the average of  1 and  2 .③ 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 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 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 (  1 ) and F2 (  2 ) can be calculated, and a new threshold T1 can be calculated as the average of  1 and  2 .③ 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 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.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 G 1 , . .., G N , then the area of the corresponding connected domain is A 1 , . .., A N , 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.σ A of the connected domain area is used as the area threshold T area [28].Any connected domain with an area less than this threshold is considered noise, i.e., Iterative method 77.91 290 Otsu method 78 363

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.In this paper, the standard deviation  A 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.

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-neigh- 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.

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.

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 4neighbourhood convolution value is five are considered as internal crack pixels, or nonedge 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

Crack Parameter Extraction
After segmenting the crack images using the multi-threshold fusion a necessary to perform a quantitative calculation of the crack length, width, vant parameters for structure status evaluation and integrity assessment.In crack parameter calculation was proposed that involved three steps, first bourhood convolution method to detect the crack edges, then the crack ce generated by crack edges.At last, the crack width could be calculated by cr perpendicular line of the center line, and the crack length could be calculate est outer rectangle of the center line.

Crack Edge Extraction Based on4-Neighbourhood Convolution
In the concrete crack binary image, the crack pixels are ones and conc ros, as a result, all internal crack pixels are all in four connectivity with cr the boundary crack pixels do not satisfy this condition.So only pixels whos hood convolution value is five are considered as internal crack pixels, or no otherwise are classified as boundary crack pixels, also call crack edges.I property, a new crack edge extraction was proposed based on 4-neighbour tion.Figure 6 shows the convolutional kernel used, and Table 2 is the detai of the crack's edges extraction steps.Step Image 1. Importing crack images.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.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.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.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.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.

Subpixel Crack Width Calculation
Accurate measurement of cracks is critical for assessing the structural integrity, and the application of traditional pixel-level crack detection methods is restricted due to its limited measurement precision, leading to potential inaccuracies threat in quantifying fine cracks through structure health monitoring.Otherwise, precision measurement with a high spatial resolution will increase the cost in image device, capture, transmission and storage.To address this problem, a subpixel algorithm based on the partial area effect is introduced to improve crack measurement precision over conventional pixel-level crack detection without significant cost in economy and time consumption.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 (x 0 , y 0 ) and (x n , y n ), the length and width of the smallest outer rectangle of the crack center line are|y 0 − y n |, |x 0 − x n |, respectively.Therefore, the length of the crack is l = (y n − y 0 ) 2 + (x n − x 0 ) 2 , and the schematic diagram of crack length calculation is shown in Figure 10.

Subpixel Crack Width Calculation
Accurate measurement of cracks is critical for assessing the structural integrity, and the application of traditional pixel-level crack detection methods is restricted due to its limited measurement precision, leading to potential inaccuracies threat in quantifying fine cracks through structure health monitoring.Otherwise, precision measurement with a high spatial resolution will increase the cost in image device, capture, transmission and storage.To address this problem, a subpixel algorithm based on the partial area effect is introduced to improve crack measurement precision over conventional pixel-level crack detection without significant cost in economy and time consumption.

Subpixel Crack Width Calculation
Accurate measurement of cracks is critical for assessing the structural integrity, and the application of traditional pixel-level crack detection methods is restricted due to its limited measurement precision, leading to potential inaccuracies threat in quantifying fine cracks through structure health monitoring.Otherwise, precision measurement with a high spatial resolution will increase the cost in image device, capture, transmission and storage.To address this problem, a subpixel algorithm based on the partial area effect is introduced to improve crack measurement precision over conventional pixel-level crack detection without significant cost in economy and time consumption.

Subpixel Edge Localization with the Partial Area Effect
Subpixel edge location algorithms can improve the measurement accuracy by subdividing a pixel into aa much finer measurement unit with the help of the local gray gradient matrix, and can satisfy the requirement of Technical Specification for Digital Image Inspection of Engineering Structures and highway bridge structural health monitoring.So subpixel edge location attract the wide attention of researchers, literature review indicate that current subpixel edge algorithms were based on interpolation [24], moment methods [25], and partial area effect methods [26].Partial area effect methods can efficiently extract edge position, orientation and curvature, and work well even for crack images with noisy and blurred edges from complex environments.So, in this section, the partial area effect algorithm proposed by Trujillo in 2013 is introduced in crack edge location, and the key steps are briefly described as follows.
(1) Suppose the edge is a straight line expressed as y = a + bx, and the slope is between 0 and 1.For any pixel point on the crack edge, a 3 × 5 local pixel neighborhood can be taken, as shown in Figure 11.(3) Repeat the above two steps to find the subpixel coordinates for each crack edge pixels.

Subpixel Width Calculation of Crack
For pixel-level crack edge detection, the crack width could be calculated along the skeleton line by the crack width calculation method of the skeleton line [32], but for subpixel crack computation, the accuracy of the skeleton line and pixel-level crack edge location is not enough and improvements are demanded on the basis of center line and subpixel edge location.Similarly, the subpixel crack width computation model of each pixel on the crack center line could be established, as shown in Figure 12; for any point P on the crack center line, a certain number of center line points forward and backward in row along the center line were taken out to fit a polynomial curve.The degree of the polynomial and the number of points on the crack center line determined as appropriate, by trial and error, 5 points above and under point P, were selected to fit a quadratic polynomial y = ax 2 + bx + c by least square method, as shown in Figure 12.
In this way, the crack center line can be divided into segmented quadratic polynomials, and the perpendicular line can also be obtained on each point along the crack.For the point P, the normal slope of its corresponding quadratic polynomial can be calculated as: The intersections of the normal line of quadratic polynomial on point P and two crack edge pixel points are Pl and Pr, the corresponding subpixel edge point are indicated as Fl (xl, yl) and Fr (xr, yr), and xl, yl, xr, and yr are the subpixel coordinates, respectively.The subpixel crack width can be calculated as follows.(2) Assuming that the gray value of pixel is F(x, y), S L , S M and S R are the sum of the gray values of the left, middle and right columns in the 3 × 5 pixels neighborhood, respectively, i.e., In concrete crack images, the gray value of concrete area and crack area are denoted as A and B, and can be estimated by pixels in the two corner regions of the 3 × 5 neighborhood, i.e., And the edge straight line coefficient is: The subpixel location of (0, a) can be obtained by calculation of the coefficients a and b according to Equation (5).For a detailed description of the method, please refer to literature [26].
(3) Repeat the above two steps to find the subpixel coordinates for each crack edge pixels.

Subpixel Width Calculation of Crack
For pixel-level crack edge detection, the crack width could be calculated along the skeleton line by the crack width calculation method of the skeleton line [32], but for subpixel crack computation, the accuracy of the skeleton line and pixel-level crack edge location is not enough and improvements are demanded on the basis of center line and subpixel edge location.Similarly, the subpixel crack width computation model of each pixel on the crack center line could be established, as shown in Figure 12; for any point P on the crack center line, a certain number of center line points forward and backward in row along the center line were taken out to fit a polynomial curve.The degree of the polynomial and the number of points on the crack center line determined as appropriate, by trial and error, 5 points above and under point P, were selected to fit a quadratic polynomial y = ax 2 + bx + c by least square method, as shown in Figure 12.

Overview of the Crack Identification Experiment on Concrete Specimens
To verify the accuracy of the proposed subpixel crack width method, a static loading experiment of 160 mm × 40 mm × 40 mm concrete specimens was carried out indoors, and the concrete specimens surface cracks were orthogonally photographed by a Nikon D810 camera (Nikon, Tokyo, Japan).At the same time, the crack parameters were measured by a 50~1600× magnification digital microscope to verify the measurement results from proposed crack length and width calculation methods.To eliminate the influence of unfavorable complex illumination, two LED lights were employed for auxiliary illumination, and the test site was arranged, as shown in Figure 14.In this way, the crack center line can be divided into segmented quadratic polynomials, and the perpendicular line can also be obtained on each point along the crack.For the point P, the normal slope of its corresponding quadratic polynomial can be calculated as: The intersections of the normal line of quadratic polynomial on point P and two crack edge pixel points are P l and P r , the corresponding subpixel edge point are indicated as F l (x l , y l ) and F r (x r , y r ), and x l , y l , x r , and y r are the subpixel coordinates, respectively.The subpixel crack width can be calculated as follows.
Repeating the above steps could yield pixel-by-pixel subpixel crack width calculation along the center line, as shown in Figure 13.

Overview of the Crack Identification Experiment on Concrete Specimens
To verify the accuracy of the proposed subpixel crack width method, a static loading experiment of 160 mm × 40 mm × 40 mm concrete specimens was carried out indoors, and the concrete specimens surface cracks were orthogonally photographed by a Nikon D810 camera (Nikon, Tokyo, Japan).At the same time, the crack parameters were measured by a 50~1600× magnification digital microscope to verify the measurement results from proposed crack length and width calculation methods.To eliminate the influence of unfavorable complex illumination, two LED lights were employed for auxiliary illumination, and the test site was arranged, as shown in Figure 14.To verify the accuracy of the proposed subpixel crack width method, a static loading experiment of 160 mm × 40 mm × 40 mm concrete specimens was carried out indoors, and the concrete specimens surface cracks were orthogonally photographed by a Nikon D810 camera (Nikon, Tokyo, Japan).At the same time, the crack parameters were measured by a 50~1600× magnification digital microscope to verify the measurement results from proposed crack length and width calculation methods.To eliminate the influence of unfavorable complex illumination, two LED lights were employed for auxiliary illumination, and the test site was arranged, as shown in Figure 14.

Overview of the Crack Identification Experiment on Concrete Specimens
To verify the accuracy of the proposed subpixel crack width method, a static loading experiment of 160 mm × 40 mm × 40 mm concrete specimens was carried out indoors, and the concrete specimens surface cracks were orthogonally photographed by a Nikon D810 camera (Nikon, Tokyo, Japan).At the same time, the crack parameters were measured by a 50~1600× magnification digital microscope to verify the measurement results from proposed crack length and width calculation methods.To eliminate the influence of unfavorable complex illumination, two LED lights were employed for auxiliary illumination, and the test site was arranged, as shown in Figure 14.The maximum magnification of the high-precision digital microscope used in the test was 1600 times, and the parameters of the Nikon D810 camera and the digital microscope are shown in Table 4.

Experiment Result Calculation and Analysis
In the experiment, orthogonal photography was used for crack image acquisition and the camera was calibrated using the scale factor method.For a target of size D (mm), the pixel size in the image space is d (pixel) and the scale factor s is calculated as: Horizontal crack, vertical crack and oblique crack images are selected, and the scale factors of horizontal, vertical and oblique cracks are 0.007 mm/pixel, 0.009 mm/pixel and 0.006 mm/pixel, respectively, as calculated from Equation (8).At the same time, the scale factors of a high-precision digital microscope are 0.00696 mm/pixel, 0.00822 mm/pixel and 0.00597 mm/pixel, respectively.And ten points on the center line are chosen on each crack, as shown in Figure 15.

Experiment Result Calculation and Analysis
In the experiment, orthogonal photography was used for crack image acquisition and the camera was calibrated using the scale factor method.For a target of size D (mm), the pixel size in the image space is d (pixel) and the scale factor s is calculated as: Horizontal crack, vertical crack and oblique crack images are selected, and the scale factors of horizontal, vertical and oblique cracks are 0.007 mm/pixel, 0.009 mm/pixel and 0.006 mm/pixel, respectively, as calculated from Equation (8).At the same time, the scale factors of a high-precision digital microscope are 0.00696 mm/pixel, 0.00822 mm/pixel and 0.00597 mm/pixel, respectively.And ten points on the center line are chosen on each crack, as shown in Figure 15.Crack width values of ten points, as shown in Figure 15, in horizontal, vertical and oblique cracks are measured using a digital microscope and the subpixel calculation method proposed, as shown in Tables 5-7, respectively.Crack length values of cracks in different directions measured by a microscope and calculated by the proposed method are shown in Table 8.Crack width values of ten points, as shown in Figure 15, in horizontal, vertical and oblique cracks are measured using a digital microscope and the subpixel calculation method proposed, as shown in Tables 5-7, respectively.Crack length values of cracks in different directions measured by a microscope and calculated by the proposed method are shown in Table 8.

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.

Data Availability Statement:
The data that support the findings of this study are available from the corresponding author, upon reasonable request.

Figure 7 .
Figure 7. Crack skeleton line extraction model.(a) Crack binary diagram.(b) First iteration.(c) Skeleton line of cracks after n times iterations.

Figure 8 .
Figure 8. Center line extraction model based on image row direction.(a) Crack image edge situation.(b) Crack center line.

Figure 7 .
Figure 7. Crack skeleton line extraction model.(a) Crack binary diagram.(b) First iteration.(c) Skeleton line of cracks after n times iterations.

Figure 7 .
Figure 7. Crack skeleton line extraction model.(a) Crack binary diagram.(b) First iteration.(c) Skeleton line of cracks after n times iterations.

Figure 8 .
Figure 8. Center line extraction model based on image row direction.(a) Crack image edge situation.(b) Crack center line.

Figure 8 .
Figure 8. Center line extraction model based on image row direction.(a) Crack image edge situation.(b) Crack center line.

Figure 9 .
Figure 9. Crack center line extraction results.(a) Vertical crack center line extraction result.(b) Horizontal crack center line extraction result.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 = − + − 22 00 ( ) ( ) nn l y y x x , and the schematic diagram of crack length calculation is shown in Figure 10.

Figure 10 .
Figure 10.Schematic diagram of crack length calculation.

Figure 9 .
Figure 9. Crack center line extraction results.(a) Vertical crack center line extraction result.(b) Horizontal crack center line extraction result.

Figure 9 .
Figure 9. Crack center line extraction results.(a) Vertical crack center line extraction result.(b) Horizontal crack center line extraction result.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 = − + − 22 00 ( ) ( ) nn l y y x x , and the schematic diagram of crack length calculation is shown in Figure 10.

Figure 10 .
Figure 10.Schematic diagram of crack length calculation.

Figure 10 .
Figure 10.Schematic diagram of crack length calculation.

Figure 11 .
Figure 11.Computational model for subpixel edge location.

17 Figure 12 .
Figure 12.Schematic diagram of subpixel width calculation based on the intersection of the normal line of the crack center line and crack edges.

Figure 13 .
Figure 13.Crack width measurement and local magnification.

Figure 12 .
Figure 12.Schematic diagram of subpixel width calculation based on the intersection of the normal line of the crack center line and crack edges.

Figure 12 .
Figure 12.Schematic diagram of subpixel width calculation based on the intersection of the normal line of the crack center line and crack edges.

Figure 13 .
Figure 13.Crack width measurement and local magnification.

Figure 13 .
Figure 13.Crack width measurement and local magnification.

4 .
Concrete Crack Parameter Measurement and Verification 4.1.Overview of the Crack Identification Experiment on Concrete Specimens

Figure 12 .
Figure 12.Schematic diagram of subpixel width calculation based on the intersection of the normal line of the crack center line and crack edges.

Figure 13 .
Figure 13.Crack width measurement and local magnification.

Author Contributions:
Conceptualization, J.Z., H.L. and Y.L.; methodology, H.L., Y.L. and J.Z.; validation, R.L. and J.H.; formal analysis, R.L.; investigation, H.L. and Z.Z.; resources, J.Z. and Z.Z.; data curation, R.L. and J.H.; project administration, H.L.; Software, H.L.; writing-original draft preparation, Y.L.; writing-review and editing, J.Z.; supervision, J.Z.All authors have read and agreed to the published version of the manuscript.Funding: This work was supported by the National Natural Science Foundation of China (Grant.No. 51778094), the Chongqing graduate joint training base construction project (Grant.No. JDLH-PYJD2020019), the Graduate Tutor Team Construction Project of Chongqing (Grant.No. JDDSTD2022003), the Transportation Science and Technology Project of Sichuan Province (Grant No. 2020-ZL-B1) and the Scientific Research Innovation Project of Chongqing (Grant.No. CYS22398).We also acknowledge the State Key Laboratory of Mountain Bridge and Tunnel Engineering for providing experimental equipment.

Table 1 .
Iterative and Otsu method threshold calculation results.

Table 2
is the detailed illustration of the crack's edges extraction steps.

Table 2 .
Crack edge extraction process.

Table 3 .
Canny edge detection algorithm and 4-neighborhood convolution calculation results.

Table 4 .
Basic parameters of experiment devices.

Table 5 .
Horizontal crack widths obtained by different methods.

Table 6 .
Vertical crack widths obtained by different methods.