Crack Detection Matlab Code Comment
Energies, Volume 9, Issue 12 (December 2016) Issues are regarded as officially published after their release is announced to the table of contents alert mailing list.
Abstract 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.
- Crack detection matlab code. Automatic Concrete Crack Detection, Image processing, Construction Safety and. 0 Comments Leave a Reply.
- Wall crack detection using image processing. Learn more about image processing, wall, detection.
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. Citation: Shi P, Fan X, Ni J, Khan Z, Li M (2017) A novel underwater dam crack detection and classification approach based on sonar images.
PLoS ONE 12(6): e0179627. Editor: Jonathan A. Coles, University of Glasgow, UNITED KINGDOM Received: March 11, 2016; Accepted: June 1, 2017; Published: June 22, 2017 Copyright: © 2017 Shi et al. This is an open access article distributed under the terms of the, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. Data Availability: All relevant data are within the paper and its Supporting Information files.
Funding: This work was funded by the National Natural Science Foundation of China (grant numbers 61573128, 61203365), and the Fundamental Research Funds for the Central Universities (grant number 2017B02914). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript. Competing interests: The authors have declared that no competing interests exist. Introduction Numerous factors such as cracks, abrasions, cavitation, and erosion can threaten the safety of a dam. 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.
In other words, cracks in dams are the equivalent of mutations as dams accumulate internal damage. 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. Various traditional methods such as electrical prospecting, elastic wave testing, tomography, and ground penetrating radar – 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. 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 gray levels in these sonar images represent information that can accurately reflect crack depth. However, the sonar images can not accurately reflect the crack features on the dam surface, since their echo intensities are always the same. Thus, the sonar systems used in practice always provide only low-resolution imagery. In addition, underwater environments are complex, vary over time, and are susceptible to substantial interference –, which leads to measurement signals being overcome by noise. Moreover, unstructured cracks are random and diverse, which makes them difficult to describe.
Finally, the images obtained from sonar lack calibration, and features obtained from a sample image without manual review cannot accurately reflect the relationship between a crack in the image and an actual crack. As a result, sonar images of dam cracks are highly uncertain and fuzzy, making detection and classification difficult. Many crack detection algorithms based on imagery such as neural networks, genetic algorithms, mathematical morphology and tensor voting methods, have been proposed –. presented an adaptive underwater dam crack edge detection algorithm based on multi-structure and multi-scale elements. evaluated various edge-detection algorithms and noted that the statistics-based approach was the most efficient technique for damage assessment.
Bernstone and Heyden proposed a digital image analysis technique for crack monitoring using a standard webcam to acquire continuous data sets from concrete dams. Xu and Zhang suggested an integrated model using digital image processing to develop a numerical representation of concrete structure defects. The characteristic based detection methods mentioned above are always subject to substantial noise, thereby leading to low detection rate and high false alarm rate ,. In particular, when the interference exhibits the same characteristics as the target, it will make the detection more difficult. In addition, the methods mentioned above are focused on de-noising and edge detection. Clustering and region growing methods have also been used , but apparently not for underwater sonar images.
Moreover, for the underwater sonar images, few methods jointly consider the crack detection and classification, which is common in the optical images of pavements. In sonar images, fuzziness and uncertainty must also be taken into account in making a correct classification. In this paper, a novel detection and classification approach for underwater dam cracks based on dual-frequency sonar images is proposed. Images obtained from DIDSON are used to conduct evidence fusion for classification purpose.
Both frequencies are used in this paper as source evidence. These two types of source evidence are fused to perform classification. In this paper, two main tasks are considered together: underwater dam crack detection and classification.
This paper proposes an improved crack detection algorithm based on clustering analysis and tensor voting. And then, with the results of the crack detection, an improved evidence theory combined with fuzzy rule reasoning is put forward to distinguish different types of cracks. In the proposed method, fuzzy evidence is used to reflect the fuzzy information in the images, and the uncertainty is decreased via evidence fusion. To perform these two tasks, the classification scheme relies on following two characteristics of the target cracks: 1) the image regions are darker than their surroundings, and 2) the connected domain of the crack region is thinner than that of other regions.
A workflow for the proposed approach is shown in. Two main tasks are considered together: underwater dam crack detection and classification. First of all, the sonar images are obtained from the DIDSON with two different frequencies. And then an improved crack detection algorithm based on clustering analysis and tensor voting is proposed to detect underwater dam cracks.
The detailed detection process is as follows. 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 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 workflow of the proposed approach. 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. Detailed information concerning DIDSON can be found in. 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.
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: (1) 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. The clustering result in the 3-D feature space is shown in. 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.
The binary image which contained crack segments and noise is shown in. 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 : 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. Θ 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 : (2) where σ is the voting scale, is the arc length, controls the degradation speed of the function curvature, and 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 (3) 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. 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 ); the second type is a medium crack (see a(ii) in ); and the third type is a tiny crack (see a(iii) in ). First, the three original sonar images were pre-processed; the results are shown in. Then, the images were divided into blocks for clustering analysis, to mark the blocks that contains the crack information, as shown in.
Then, adaptive tensor voting was used to connect the marked crack fragments, as shown in. Finally, the minimum spanning tree algorithm and edge pruning are used to obtain the marked cracks.
The final crack shapes are shown in. 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. 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 fuzzy rules for BBA values of relative lengths and gray intensity ratios. 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). 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 : (12) where, ∀ k ≥ 0, and β( B)⋅ = 0, ∀ B ∉ ℑ Θ⋅. M Θ( A B) k can be calculated as follows: (13) where.
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 and.
Free Matlab Code
Similarly, the BBA values of the gray intensities are obtained using formula and. Subsequently, the BBA values of the crack types are calculated using formula and. To reduce the uncertainty of the classification, evidences from the two images at different frequencies are combined by DCR. The results are shown in 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. Finally, evidence from all 6 perspectives is updated using formula and. The results are shown in.
Image detection results comparing the proposed method and other classical methods. (a) Original image, (b) Tensor voting, (c) Wasp colony algorithm and (d) The proposed method. 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. 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. References. 1. Glisic B, Inaudi D. Development of method for in-service crack detection based on distributed fiber optic sensors.
Struct Health Monit. 2012;11: 161–171. Xue X, Yang X. Earthquake safety assessment of an arch dam using an anisotropic damage model for mass concrete.
Comput Concr. 2014;13: 633–648. Rezaiee-Pajand M, Tavakoli FH. Crack detection in concrete gravity dams using a genetic algorithm. Proc Inst Civ Eng Struct Build. 2015;168: 192–209.
Martinez J, Rey J, Hidalgo MC, Garrido J, Rojas D. Influence of measurement conditions on the resolution of electrical resistivity imaging: The example of abandoned mining dams in the La Carolina District (Southern Spain). Int J Miner Process. 2014;133: 67–72.
Su H, Li J, Hu J, Wen Z. Analysis and back-analysis for temperature field of concrete arch dam during construction period based on temperature data measured by DTS. 2013;13: 1403–1412. Bouchette G, Church P, Mcfee JE, Adler A.
Imaging of compact objects buried in underwater sediments using electrical impedance tomography. Infinite undiscovery xbox 360 ntsc u. IEEE Trans Geosci Remote Sens. 2014;52: 1407–1417. Lai SL, Lee DH, Wu JH, Dong YM.
Detecting the cracks and seepage line associated with an earthquake in an earth dam using the nondestructive testing technologies. J Chin Inst Eng. 2014;37: 428–437. Stephan T, Fruehberger P, Werling S, Heizmann M. Model based image restoration for underwater images.
In: SPIE Optical Metrology; 2013. Grote AB, Bailey MM, Zydlewski JD, Hightower JE. Multibeam sonar (DIDSON) assessment of American shad (Alosa sapidissima) approaching a hydroelectric dam. Can J Fish Aquat Sci.
2014;71: 545–558. Chen C, Wang J, Zou L, Fu J, Ma C. A novel crack detection algorithm of underwater dam image. In: 2012 International Conference on Systems and Informatics (ICSAI); 2012. Williams SB, Pizarro O, Johnson-Roberson M, Mahon I, Webster J, Beaman R, et al.
AUV-assisted surveying of relic reef sites. In: OCEANS; 2008. Murphy RR, Steimle E, Hall M, Lindemuth M, Trejo D, Hurlebaus S, et al. Robot-assisted bridge inspection after Hurricane Ike. In: 2009 IEEE International Workshop on Safety, Security Rescue Robotics (SSRR); 2009. Zalama E, Gomez-Garcia-Bermejo J, Medina R, Llamas J. Road crack detection using visual features extracted by Gabor filters.
Comput Aided Civ Infrastruct Eng. 2014;29: 342–358. Dou J, Chang KT, Chen S, Yunus AP, Liu JK, Xia H, et al. Automatic case-based reasoning approach for landslide detection: Integration of object-oriented image analysis and a genetic algorithm. 2015;7: 4318–4342.
Ghamisi P, Dalla Mura M, Benediktsson JA. A survey on spectral-spatial classification techniques based on attribute profiles. IEEE Trans Geosci Remote Sens. 2015;53: 2335–2353. Guan H, Li J, Yu Y, Ji Z, Wang C. Using mobile LiDAR data for rapidly updating road markings. IEEE Trans Intell Transp Syst.
2015;16: 2457–2466. Chen CP, Wang J, Zou L, Zhang FF. Underwater dam image crack segmentation based on mathematical morpholog. Appl Mech Mater. 2012;220: 1315–1319.
Kabir S, Rivard P, He DC, Thivierge P. Damage assessment for concrete structure using image processing techniques on acoustic borehole imagery. Constr Build Mater. 2009;23: 3166–3174. Bernstone C, Heyden A.
Image analysis for monitoring of crack growth in hydropower concrete structures. 2009;42: 878–893. Xu X, Zhang X. Crack detection of reinforced concrete bridge using video image. J Cent S Univ. 2013;20: 2605–2613. Ye XW, Dong CZ, Liu T.
A Review of Machine Vision-Based Structural Health Monitoring: Methodologies and Applications. Journal of Sensors. 20: 1687–7268. Koch C, Georgieva K, Kasireddy V, Akinci B, Fieguth P. A review on computer vision based defect detection and condition assessment of concrete and asphalt civil infrastructure. Advanced Engineering Informatics. 2015;29: 196–210.
Oliveira H, Correia PL. Automatic road crack detection and characterization. IEEE Trans Intell Transp Syst. 2013;14: 155–168. Sound Metrics. DIDSON sonars Internet.
Available from:. Xu X, Xu S, Jin L, Song E. Characteristic analysis of Otsu threshold and its applications. Pattern Recognition Letters. Martinez-Sanchez A, Garcia I, Asano S, Lucic V, Fernandez JJ. Robust membrane detection based on tensor voting for electron tomography. J Struct Biol.
2014;186: 49–61. Pmid:24625523. 27. Rashwan HA, Garcia MA, Puig D. Variational optical flow estimation based on stick tensor voting.
IEEE Trans Image Process. 2013;2: 2589–2599.
Pmid:23529091. 28. Zou Q, Cao Y, Li Q, Mao Q, Wang S. Crack Tree: Automatic crack detection from pavement images. Pattern Recognit Lett. 2012;33: 227–238. Andalo FA, Miranda PAV, Torres RS, Falcao AX.
Shape feature extraction and description based on tensor scale. Pattern Recognit.
2010;43: 26–36. Jeffrey’s rule of conditioning. 1981;48: 337–362. Wickramarathne TL, Premaratne K, Murthi MN. Toward efficient computation of the Dempster-Shafer belief theoretic conditionals.
IEEE Trans Cybern. 2013;43: 712–724.
Pmid:23033433. 32. Akay B, Karaboga Dervis. A survey on the applications of artificial bee colony in signal, image, and video processing. Signal Image Video Process. 2015;9: 967–990.
Thanks for help, I might be any suggestions for this problem. But i just want to learn and do not expect the code if you feel I am expecting from your code, yes indeed I expected. It is to learn so that I can understand. Because learning from examples is the one - the only way to learn.
Previous question I asked about the best way to detect defects on the surface of the ceramic is not included for the calculation, because the code that I wrote for the detection using the same method as before. I am in order to replace it and I am confused to use the best method. For this question to calculations and I think the first question representing this question. I am so sorry it please delete this question to comment.