# A Novel Technique for High-Efficiency Characterization of Complex Cracks with Visual Artifacts
## 2 Proposed Method
### Post-Processing Unit (PPUI) for Crack Morphological Parameters  
In the literature, estimating crack parameters from segmentation maps relies on mathematical models based on pixel connectivity. To avoid such errors in the literature, crack reconstruction methods based on image processing models are utilized, such as brightness [9], region connectivity [19], and the TuFF algorithm [50]. They are applied for separated large cracks; thus, they may not always work, especially when cracks are complex. To solve this problem, we present a novel approach that relies on the physics of crack formation and scanning lines. The implementation details are discussed below.  
For each input image (\(I_{rgb}\)) with SHSnet, a binary segmentation map (\(I_{bin}\)) of the labels for each pixel was generated. This is described in Equation (2).  
\[I_{bin}=argmax_{i}\Big{(}SHCnet\Big{(}I_{rgb}\Big{)}\Big{)} \tag{2}\]  
where i is the ith label.  
Each independent crack segment was fitted with an ellipse as in Figure 4a. Then, the equation of the axes of this ellipse was computed. Finally, the orientation of the major axis of this ellipse was computed; then, the direction of the crack propagation as shown in Figure 4a is this orientation.  
The fracture model for concrete suggests that the crack propagates in the direction perpendicular to the effective tensile load (ETL). Therefore, the direction that is perpendicular to the average of the orientation of the major axes of all the cracks is taken as the tensile loading direction. With this, a very efficient technique to compute crack parameters such as crack number, crack width, maximum crack width, and crack length from the segmentation map is proposed as follows.  
Scanning lines parallel to the direction of the ETL (shown in Figure 4b) were generated digitally. The number of these scanning lines will determine the density of the measurements of the crack parameters. In the binary image, '0' refers to the background and '1' refers to the crack. The cracks are identified by finding the number of step-up (\(N_{step-up}\)) locations along the scanning line. The crack number (n) is the average of the \(N_{step-up}\) of all scanning lines (Equation (3)).  
\[n=\frac{1}{m}{\sum_{j=1}^{m}N_{step-up}^{j}} \tag{3}\]  
where j is the jth scanning line.  
The average crack width (ACW) (Equation (6)) is computed by averaging the widths (\(W_{k}^{j}\) = crack width at the kth intersection of a crack segment by jth scanning line).  
\[ACW=\frac{1}{m*_{0}}{*}{\sum_{j=1}^{m}\sum_{k=1}^{o}W_{k}^{j}} \tag{4}\]  
Figure 4: (**a**) Ellipse fitting on segmentation mask for crack orientation (in grey arrows). (**b**) Four scanning lines perpendicular to crack orientations.  
The maximum crack width (MCW) is the maximum of all the Ws (Equation (5)):  
\[CW=\underset{j}{\max}\left(\underset{k}{\max}\left(W_{k}^{j}\right)\right) \tag{5}\]  
Since each crack is a thin element for such an element, crack length (CL) is estimated as half of the perimeter of the crack (Equation (6)). I_bin was shifted one pixel along the loading direction and subtracted from the original binary image. Morphological operation erosion was employed to convert the boundaries of the subtracted image to a single-pixel width. Then, the perimeter of the object (i.e., crack) was calculated based on region connectivity, which is a well-known technique utilized in computer graphics [51]. It should be noted that when two adjoining pixels are connected in the vertical, diagonal, or horizontal direction, they are considered part of the same object.  
\[CL=\frac{perimeter}{2} \tag{6}\]