A novel underwater dam crack detection and classification approach based on sonar images

Underwater dam crack detection and classification based on sonar images is a challenging task because underwater environments are complex and because cracks are quite random and diverse in nature. Furthermore, obtainable sonar images are of low resolution. To address these problems, a novel underwater dam crack detection and classification approach based on sonar imagery is proposed. First, the sonar images are divided into image blocks. Second, a clustering analysis of a 3-D feature space is used to obtain the crack fragments. Third, the crack fragments are connected using an improved tensor voting method. Fourth, a minimum spanning tree is used to obtain the crack curve. Finally, an improved evidence theory combined with fuzzy rule reasoning is proposed to classify the cracks. Experimental results show that the proposed approach is able to detect underwater dam cracks and classify them accurately and effectively under complex underwater environments.


Introduction
Numerous factors such as cracks, abrasions, cavitation, and erosion can threaten the safety of a dam [1]. Out of these, cracks represent the primary danger because they can exist not only at the dam's surface but also extend into the interior [2]. In other words, cracks in dams are the equivalent of mutations as dams accumulate internal damage [3]. Thus, cracks are always used to indicate the degree of risk in the field of dam damage, which has attracted the attention of numerous scholars [4].
Various traditional methods such as electrical prospecting, elastic wave testing, tomography, and ground penetrating radar [5][6][7] are employed to detect cracks in dams. However, some of these methods are expensive, and others are neither sufficiently convenient nor reliable. Recently, detecting underwater dam cracks using sonar images has become one of the most important methods because it is nondestructive, intuitive, convenient and efficient [8].
Sonar data is obtained based on echo intensity when the sonar beam scans the crack area. And the echo intensity is displayed on the sonar image screen using different gray levels. The method. Fourth, a minimum spanning tree is used to obtain the cracks. After obtaining the cracks, an improved evidence theory combined with fuzzy rule reasoning is proposed to classify the cracks. The detailed classification process is as follows. First, the characteristics of the crack regions are calculated to obtain the basic belief assignments (BBAs) based on the likelihood measure. Second, the BBAs of the characteristics are combined to classify the cracks based on the fuzzy rules and edge random set's expansion guidelines. And the BBAs for the two sonar frequencies from different perspectives can be obtained in the same way. Third, in order to reduce the uncertainty of the classification and improve the robustness of the decision making, BBAs from the two sonar frequencies and different perspectives are combined based on the conditional masses. The proposed method will be introduced in detail in the next sections.
The main contributions of this paper are: 1) A detection and classification approach based on sonar images for underwater dam crack is presented. 2) In the proposed approach, both the local and global features are combined and used with block clustering and statistical analysis techniques.
3) The crack information gained from the sonar images, which contain substantial  uncertainty, is mapped to a basic belief assignment. 4) The uncertainty of classification is decreased by updating the evidence, and the update rule is improved.
The next section illustrates the basic idea of the proposed approach. Some experiments are performed in the Experiments and Results section. A comparison with other methods proves the efficiency of the proposed approach. The last section concludes the paper.

Sonar images
In this paper, we obtained statistical crack detection results using twenty sonar images taken from a hydropower project, which were used as the sample database and the test database. All the sonar images were obtained using the DIDSON sonar from Dam of Longyangxia Hydropower Station by the author's research team. DIDSON is a dual frequency identification sonar with operating frequencies of 1.1 MHz/1.8 MHz. The model of DIDSON sonar is shown in Fig  2. Detailed information concerning DIDSON can be found in [24]. When the images were obtained, the sonar system was perpendicular to the face of the dam which was more than 30 yeas old with cracks and other defects on it. The distance from the sonar to the defects was 500 cm, and the depth from sonar to the surface of the water was about 10 m. The images obtained from sonar were part of the dam and the resolution of the sonar images was 360 x 144 pixels. The experiments coded in Matlab 2011 were conducted on a PC with a 2.6 GHz CPU and 4 GB of RAM.

Underwater dam crack detection
The proposed underwater dam crack detection method mainly consists of two steps: 1) Clustering analysis of image blocks. 2) Adaptive tensor voting of the crack fragments. The details of the proposed method is fully represented in the flow chart in Fig 3. A. Clustering analysis of image blocks. First, the image matrix's rows and columns are divided by a fixed value. Then, the image is divided into non-overlapping blocks. The block size should be chosen properly. When the blocks are too small, the number of false positive crack detections will tend to increase. In contrast, when the blocks are too large, the computation of the statistical features of tiny cracks will tend to vanish. The selection of the block size which will affect the detection results obviously is a limitation of this algorithm. In this paper, the blocks are 9 × 9 pixels, which represent a good trade-off between computational performance and crack detection accuracy. Three characteristic values are calculated for each block, which construct three feature matrix for the image: 1) the mean value matrix (Mm), 2) the standard deviation matrix (STDm), and 3) the information entropy matrix (IFE). A clustering analysis method is used to distinguish cracks from the background using 3-D spatial classifiers; each point identifies one image block. Then, the feature set in the 3-D space is defined as follows: where n is the number of block points for the pattern vector V, which is constructed using Mm, STDm and IFE, and y i corresponds to the ith block. The blocks are divided into two classes, namely, c 1 and c 2 , denoting blocks containing non-crack information and blocks containing crack information, respectively. Furthermore, the K-means classification approach is used to facilitate the clustering analysis [23]. The clustering result in the 3-D feature space is shown in Fig 3(i). The classes that are labeled with red circles in the 3-D feature space belong to the target class c 2 , and the rest belong to the target class c 1 . After removing those blocks that are confirmed to have non-crack information, the remaining blocks are binarized by the Otsu method [25]. The binary image which contained crack segments and noise is shown in Fig 3(d).

B. Adaptive tensor voting of the crack fragments.
Following the cluster analysis step, cracks marked with independent segments are actually an integrated crack. Unless those segments are connected, a full understanding of the crack is difficult. In this paper, a self-adaptive tensor voting algorithm is presented because the spatial proximity and the smoothness of the cracks are the main interfering factors. Thus, the crack fragments can be expressed in a tensor field that contains a ball tensor and a stick tensor. The two tensors can be defined as follows [26]: Ball tensor: if point P is an isolated point, the tensor is expressed as Stick tensor: if point P is a point on the curve, the tensor is expressed as cos 2 y sin y cos y sin y cos y sin 2 y " # . θ is the tangent angle between the tangent and the horizontal direction.
The stick tensor along the y-axis from the coordinate origin O and the voting strength from P can be calculated using the degradation function [27]: where σ is the voting scale, s ¼ yl sin y is the arc length, c ¼ À 16 log 0:1ÁðsÀ 1Þ p 2 controls the degradation speed of the function curvature, and k ¼ 2 sin y l is the curvature. σ is the free parameter of the voting field design; it directly controls the scale of the voting field. In previous studies, σ was usually set from prior knowledge; however, prior knowledge is difficult to obtain in underwater dam crack detection. Thus, parameter-adaptive fracture fragments are presented based on the clustering analysis. The scale of the voting field determines how much the neighborhood of the corresponding point impacts and also determines how much the neighborhood of the corresponding point is affected by its neighbors. As shown from the experiment, the number of marked cracks is inversely proportional to the voting field scale. Thus, the voting field scale is obtained as where k is the adjustment coefficient and n 2 is the number of c 2 , which is obtained from the clustering step. Then, a minimum spanning tree and edge pruning are used to further remove image noise and other false positives [28].
The proposed algorithm was used to analyze three typical cracks found in underwater dam surface sonar images captured at a hydropower dam project. And the sonar images taken at 1.8MHz were used to illustrate the detection algorithm process in detail. The first crack type is a large crack with a complex background (see a(i) in Fig 4); the second type is a medium crack (see a(ii) in Fig 4); and the third type is a tiny crack (see a(iii) in Fig 4). First, the three original sonar images were pre-processed; the results are shown in Fig 4(b). Then, the images were divided into blocks for clustering analysis, to mark the blocks that contains the crack information, as shown in Fig 4(c). Then, adaptive tensor voting was used to connect the marked crack fragments, as shown in Fig 4(d). Finally, the minimum spanning tree algorithm and edge pruning are used to obtain the marked cracks. The final crack shapes are shown in Fig 4(e).
Underwater dam crack classification based on the fusion of images obtained from dual-frequency sonar After obtaining the crack, a new crack classification algorithm based on the fusion of crack characteristics is put forward. There are three crack types: tiny cracks, medium cracks and large cracks. The tiny/medium/large cracks represent different severity levels of dam cracks. The division criteria of crack types is defined by the author's research team according to the accurate measured dam crack of Longyangxia station. The crack classification are shown in Table 1. In this paper, the rare types of crack are not taking into account such as a crack is tiny in length but large in depth.
The crack characteristics obtained from the images are used to classify the three crack types. There are several shape characteristics that can be used to describe a crack [29]. The relatively accurate features obtained from the detection part are the relative length (C) and the gray intensity ratio (D). The sonar images show that the relative length of cracks can accurately reflect their linear characteristics-slenderness. The grayscale intensity of cracks in an image reflects the fact that cracked region are darker than their surroundings. However, decision-making process based on C and D is different. Thus, a fuzzy expert rule base is established based on the statistical properties and experience. Here, the relative length and the gray intensity ratio obtained from the sonar images with high frequency patterns are denoted as C 1 and D 1 . In addition, those with low frequency pattern features are labeled as C 2 and D 2 .
In D-S theory, the total set of interested targets with mutually exclusive and exhaustive propositions is referred to as the frame of discernment (FoD), which is denoted as Θ = {θ 1 , θ 2 , Á Á Á, θ m }, where θ i is the minimum identified level of information and m is the number of elements in the universal set. 2 Θ is used to denote the power set of Θ. In D-S theory, support for proposition A is provided via the basic belief assignment, which maps m Θ (.) : 2 Θ ! [0, 1]. This mapping function Let Θ be the universal set representing all possible states under consideration. The pattern set of crack types is Θ = {θ 1 , θ 2 , θ 3 }, where θ 1 represents tiny cracks, θ 2 represents medium cracks, and θ 3 represents large cracks. We observed that sonar used at 1.8MHz is sensitive to the relative lengths of cracks, providing one method for distinguishing between the three types of cracks. However, 1.8MHz sonar is insensitive to crack depth; therefore, it cannot be used to distinguish tiny cracks from medium cracks based solely on the gray intensity ratio. In contrast, sonar used at 1.1MHz is insensitive to crack relative length but it is sensitive to crack depth; thus, it provides another method for distinguishing between the three types of cracks.
Based on these observations, three fuzzy partitions are established for C 1 and D 2 . The fuzzy linguistic terms for C 1 are S (Small amplitude), M (Medium amplitude), and H (Large amplitude). And the gaussian membership functions are constructed by calculating the mean value and the standard deviation value of relative length sample set which is obtained from each type of crack on the 1.8Hz sonar images. Similarly, the membership functions for D 1 , C 2 and D 2 are chosen by experiment statistics of sample characteristic set in the same way. The linguistic terms' universe of C 1 is U(C 1 ) = (C 11 , C 12 , C 13 ) and that of D 2 is U(D 2 ) = (D 21 , C 22 , C 23 ), where the linguistic terms' subscripts 1, 2, and 3 represent S, M, and H, respectively. In addition, two fuzzy partitions are established for D 1 and C 2 , and the fuzzy linguistic term is S (Small amplitude) and H (Large amplitude). The linguistic terms' universe of C 2 is U(C 2 ) = (C 21 , C 22 ) and that of D 1 is U(D 1 ) = (D 11 , D 12 ), where the linguistic terms' subscripts 1 and 2 represent S and H. The membership function is shown in Fig 5. In this paper, the BBAs are calculated using the likelihood measure τ(C k (x), C kq (x)), where C k (x) refers to the relative lengths of cracks. In addition, the likelihood measure τ(C k (x), C kq (x)) refers to the matching degree of C k (x) belonging to the linguistic terms C kq (x).
The matching degree is the maximum value of the intersecting point ordinate between the test membership degree curve and the sample membership degree curve. When the intersecting degree increases, the matching degree increases, which in turn provides greater evidence. The evidence reflects the extent of support, which is directly used as a basic belief assignment function after normalization. Thus, the BBA values can be calculated as follows: Obviously, Similarly, the BBAs of the gray intensity are obtained as follows: The likelihood measure τ(D k , D kq ) can be calculated in the same way as τ(C k , C kq ), where tðD k ; D kq Þ ¼ sup x min fD k ðxÞ; D kq ðxÞg; The previous item of the BBA can be calculated based on the Cartesian product stochastic relation, and the next item of the BBA can be calculated based on the edge random set's expansion guidelines. The linguistic terms' set of inputs e is U(e) = U 1 × U 2 × Á Á ÁU n ; here, e can be C or D. Thus, the random sets (U k , m kq ), q = 1, Á Á Á, J k , are marginal random sets. In addition, (U, M In ) can be obtained as the stochastic relation of a decomposable Cartesian product. Here, where I = (I 1q, I 2q, Á Á ÁI nq ) 2 U, q 2 {1, Á Á Á, J k }, k = 1, Á Á Á, n. Among the fuzzy rule bases, the relationship between the input and output can be expressed as h ¼ f ðI 1q ; I 2q ; Á Á Á I nq Þ; thus, the image of (U, m In ) of the crack type space Θ is (<, m Out ), which can be obtained based on the random set extended criterion.
where < is the set class composed of the nonempty set of the Θ and I i are the elements of U. The mass function established using the matching degree of fuzzy features is the basic belief assignment of uncertainty. First, the two frequencies of the sonar images at arbitrary angles are used. Then, a fuzzy expert rule base is established based on the statistical properties and expert experience, as shown in Table 2.
To reduce the uncertainty of the classification and improve the robustness of the decision making, evidence from sonar imagery using both the high-frequency pattern and low-frequency pattern should be combined using the Dempster Combination Rule (DCR) [30]. Furthermore, this combination should increase the credibility of the classification, reducing the uncertainty to the maximum extent. Additional evidence for the two patterns from different perspectives can be obtained and combined in the same way. When new perspective evidence B is used to update the existing evidence A, the crack's information becomes more comprehensive. In addition, conditional masses are used in this paper to update the evidence. The conditional masses can be calculated as follows [31]: where a½k þ where lðAÞ ¼ fX 2 Y :

Results
To test the performance of the proposed approach, some experiments were performed. In this section, the results of the proposed algorithm for the 1.8 MHz and 1.1 MHz sonar images were given out. The BBA values of the relative lengths of the dam cracks in the sonar imagery can be obtained using formula (5) and (6). Similarly, the BBA values of the gray intensities are obtained using formula (7) and (8). Subsequently, the BBA values of the crack types are calculated using formula (9) and (11). To reduce the uncertainty of the classification, evidences from the two images at different frequencies are combined by DCR. The results are shown in Table 3 as evidence from one perspective. By rotating the sonar, 5 other pieces of evidence for the same area of dam surface from different perspectives are obtained in the same manner, and the results are shown in Table 4. Finally, evidence from all 6 perspectives is updated using formula (12) and (13). The results are shown in Fig 6.

Discussion
To test the performance of the proposed approach for detection, the results are compared with those obtained using tensor voting [28] and the wasp colony algorithm [32]. The results are shown in Fig 7, in which the wasp colony algorithm is unable to effectively perform crack detection. The tensor voting method is able to detect the large cracks but could not detect The performance of the proposed approach for classification was tested using different frequencies and their fusion. The results show that the uncertainty of classification decreases substantially after the fusion of the different frequencies and perspectives. A total of 30 cracks for each type were conducted to test the proposed approach. The criteria of the classification is as follows: 1) The maximum BBA value should be greater than 0.65. 2) The m(Θ) should be less than 0.05. 3) The difference between the maximum BBA value and the other values should be greater than 0.2. The statistical results are shown in Table 5.

Conclusions
This paper considered the underwater dam crack detection and classification problem, and proposed a novel approach. The statistical parameters of the image blocks constructed in the 3-D feature space and the image blocks are used to facilitate crack clustering analysis. Then, adaptive fracture fragments based on tensor voting are used to connect the crack fragments. The proposed crack detection algorithm can be applied to sonar images with low resolution, even though the cracks are tiny and subject to interference from other factors. The proposed crack classification algorithm can solve the underwater crack classification problem. In particular, when the test dam crack images and the sample images are both fuzzy, the proposed method still manages to obtain good performance. The experiments show that the proposed approach is able to effectively detect cracks and classify them accurately under complex underwater environments.   Data curation: PS.