Microsoft Word - numero_30_art_64 W. Tao et alii, Frattura ed Integrità Strutturale, 30 (2014) 537-544; DOI: 10.3221/IGF-ESIS.30.64 537 A research on detecting and recognizing bridge cracks in complex underwater conditions Wang Tao, Du Tao, Zou Xiaohong, Sun Yiming Institute of Highway, Chang’an University, Xi'an, 710064, China 48045664@qq.com ABSTRACT. The method aims to recognize and extract the characteristic parameters of bridge cracks based on images of the cracks obtained through the application of preprocessing technologies, such as graying, graphical enhancements, spatial filtering, gray-level threshold segmentation, etc.. The approach has been tested for accuracy to avoid the incorrect identification of chaff as a method error. The proposed method has proved to be rather accurate and effective in extracting information on cracks from the bridge image tests. KEYWORDS. Crack detection; Digital processing; Image analysis; Fracture fragments; Electronic information. INTRODUCTION he first cracks start appearing at the bottom of the bridge structure. If detected in time, engineers can then follow the development of the cracks. Meanwhile, it should the bridge should be maintained and repaired without delay. Detecting and recognizing cracks in time can reduce maintenance costs greatly and effectively guarantee the security of public transportation [1]. The difficulties in detecting cracks at the bottom of bridges are as follows [2]: the underwater pressure is immense and the light is dim. Furthermore, conditions in the underwater environment can be very bad. The peculiarity of the underwater environment and the characteristics of the water can impede and obstruct communications. These difficulties combined lead to typical problems in underwater viewing. The complex imaging environment makes underwater images more sensitive to noise and interference. That inevitably leads to the generally bad quality and information redundancy of underwater images. Digital image processing technology has been widely used in the detection of underwater bridge cracks in complicated conditions. This primarily includes the preprocessing and partition of images, the extraction of of the image features, image classification and other links [3]. In China, Bo Shaobo [4] has proposed that the morphological corrosion operator should refine the crack to obtain a single-pixel width skeleton image. Meanwhile, the length and width of the cracks may be measured by applying the statistical pixel method in dealing with rule cracks in images. The encroachment method should be used to measure the area of the crack when dealing with irregular cracks. Liu Xiaorui [5] has presented a fusion method combined with several processing tectonic treatment methods-SFC. Fu Jun [6] has applied a new method of image segmentation based on a neural network. Abroad, Iota et al [7] have applied image binarization, wavelet transform, gray correction and other image processing methods to analyze the crack images and extract information. KawamuraK et al. [8] have found that the parameter genetic algorithm of image processing can be semi-automatically optimized for the effective accurate detection of cracks. Abdel-Qader [10] etc. also assessed surface crack detection efficiency at the same time. They compared the results of the Fourier transformation, Sobel filtering, Canny filtering and wavelet transform method, finding that the wavelet transform was more reliable. However, the research on underwater bridge crack image segmentation algorithms still failed to meet the development needs of bridge image detection technology. And image T W. Tao et alii, Frattura ed Integrità Strutturale, 30 (2014) 537-544; DOI: 10.3221/IGF-ESIS.30.64 538 segmentation plays a key role in the process and, to some extent, in the analysis of the images. The quality of the segmentation can directly affect the further understanding of the image. Thus, we need to perform an in depth research into the image processing technology of underwater bridge cracks. EXTRACTING INFORMATION ON UNDERWATER BRIDGE CRACKS Histogram image enhancement mage enhancement is needed after collecting and graying the crack image. Histograms are statistical tables about the gray levels of image distribution. Gray histogram images indicate that the relative frequency is about various gray levels of pixels. Generally, the grayscale is the abscissa of the histogram. The ordinate is the occurrence number of the grayscale probability [11]. In the crack images, cracks are the darker areas, while the background is relatively light in the process of gathering images. But the whole image is too dark due to lack of exposure. The area mixes with the background and is hard to distinguish, as shown in Fig. 1 (a). In Fig. 2 (a) we can see the original image’s grayscale values are concentrated on the gray area between 0-100. We have to extend the image grayscale values to distinguish the crack from the background. The low gray with high grayscale has created significant differences in the grayscale. Meanwhile, it would increase the contrast ratio of the image. As shown in Fig. 2 (b), the gray scope of the image has extended to the entire gray level (0-255). We can obtain crack images with a high contrast after performing equalization processing on the original image, as shown in Fig. 1 (b). (a) (b) Figure 1: (a) Original image; (b) After enhancement. (a) (b) Figure 2: (a) Original image’s gray histogram; (b) Gray histogram after enhancement. Spatial filtering The common method of spatial filtering adopts the neighborhood average and median filtering law. This paper applies the neighborhood average method to an ideal situation. In the ideal situation, many gray and constant small patches constitute I W. Tao et alii, Frattura ed Integrità Strutturale, 30 (2014) 537-544; DOI: 10.3221/IGF-ESIS.30.64 539 an image. The spatial correlation between the neighbor pixels of the image is high. But the noise is relatively independent. Non-weighted average is the simplest and most commonly applied neighborhood average method. (1) Set one image  ,f x y . Then express the gray value of a pixel in the image as  ,g x y , which is the square windows of field S n n  . The total number of points is set to be M . Thus the gray value of this point after smoothness is: , 1 ( , ) ( , ) i j S g x y f i j M    We can use formation templates to describe the non-weighted average neighborhood law. That is, we need to move the filtering template point-by-point and get the sum of products. When applying neighbor pixels defined in the image template on template operation, the coefficient  0, 0 of template corresponds with the  ,x y in the image. Set the template size to be 33 . The application of this template can produce a result as follows: 1 1 1 1 ( , ) ( , ) m n R m n f x m y n       (2) Set the gray value of point  ,x y in the neighborhood of n n . The gradient inverse  ,W i j is defined as:       1 , 1, 1 , W i j f x y f x y     Gray-level threshold segmentation The threshold segmentation produces a binary image. The position of the pixels is represented in the image through a grayscale image  ,f x y and the coordinates  yx, . T is the threshold and the binary images are represented through using  ,B x y after the threshold. The expression is as follows:       1, , , 0, , f x y T B x y f x y T      (3) We can know from the above that the appropriate threshold is concerned with gray closed segmentation. This article uses the iterative method to auto-select thresholds according to the following steps: 1) Calculate the maximum maxT and minimum minT gray value of the entire image. Both average values are just about the initial threshold 0T .   2minmax0 TTT  ; 2) Segment the image based on hT and respectively solve the average gray level of foreground 1G and background 2G ; 3) Solve the new threshold value  1 1 2 2hT G G   ; 4) Take a new threshold. Repeat steps 2 to 4 until 1h hT T  in subsequent iterations remains basically unchanged. An iterative method is used to make the grayscale threshold segmentation up to a gray level image, as shown in Fig. 3. (a) (b) Figure 3: (a) Grayscale image; (b) Image after iterative segmentation. W. Tao et alii, Frattura ed Integrità Strutturale, 30 (2014) 537-544; DOI: 10.3221/IGF-ESIS.30.64 540 MEASURING THE PARAMETERS OF UNDERWATER BRIDGE CRACKS n dealing with the image, the target description is mainly boundaries and regions. The object boundary is generally represented by a chain code. The target area usually has 2 representations method of 4-neighborhood and 8- neighborhood. But this article will not expand on this in detail. Feature extraction Common regional features include size, external ellipse, external rectangles, gravity center, circularity, perimeter, etc.. Grayscale features have a highest gray value, a minimum gray value and an average gray value, etc.. Contour features include contour length. The basic steps of the feature extraction process are shown in the following picture. In order to detect the cracks it is necessary to find the cracks in the image, confirm the crack area and obtain the crack region area, length, width, perimeter and other parameters. 1) Measurement of proportion In regular binary image processing, the calculation of proportion, in fact, is about the geometry characteristics quantity for measurement of the size of connected area after binaryzation. The specific definition is the total amount of pixel in connected area. We speculate that the pixel value of cracks in binary image is 1. Therefore, the calculation of the proportion can be simply expressed as:    , , x y s A g x y    S is expressed as the connected domain that needs to be measured;  ,g x y is the pixel value of point  ,x y . Although the overall proportion measurement of the target is very accurate, the proportion refers to the total proportion of all targets in the image. It may involve the fracture section, various complex cracks or some small cracks that have interference (eg. the unfiltered random noise). Above all, the complex cracks such as massive cracks or crocodile cracks cannot be clearly distinguished into single cracks. Thus, the big error exists. Therefore, we propose a new means to solve the problem. We use the template and target to conduct bitwise AND, in fact, logic and operation on binary image to calculate the area of cracks. We select curve  ,f x y and use binary logic operation to obtain more accurate value. Binary logic and operation meet the following formula: 0 & 0 0 ; 0 & 1 0 ; 1 & 0 0 ; 1 & 1 1 (In binary image, the pixel value of points in the image only have two kinds of values; in the specific calculation process, we adopt bitwise and operation on the binary image array.) By doing this, the false data that may be contained around crack and in crack can be removed. That can make the image area calculation become more accurate. In addition, bit manipulation, the most basic operation in the computer, occupied the absolute advantage in calculation speed because the hardware of the computer only identifies 0 and 1. 2) Measurement of length and width In practical crack image, absolute across and down do not exist. Generally, the cracks have radian and even burr. The middle part may also break. Therefore, we adopt the following assumption for the easy disposal of computer. 1) In the segmented sub-block, axis of cracks in the target area is expressed as curve  ,f x y . It is a connected fracture section with unit pixel width; 2) Cracks in the target area is the point with the minimum gray level in the non-growth direction area of that point; 3) Curve  ,f x y can fit a straight line in subsection. Read image Binaryzation Noise  removal Mark area Calculate  feature  quantities I W. Tao et alii, Frattura ed Integrità Strutturale, 30 (2014) 537-544; DOI: 10.3221/IGF-ESIS.30.64 541 According to the known area, the computer can calculate the pixel point, and thus obtain the value of the length and width. 4) Perimeter p The contour perimeter level reflects the overall extension of the crack. The number of pixels on the border is calculated after acquiring the boundary contour of the cracks. Then we can obtain the contour perimeter. 5) Circle C Circularity reflects the complexity of the target boundary. The computational formula is as follows. The probability of appearance of the gray value 24C A P A: When the pixel value of the crack target in a previously assumed binary image is 1 , the area of the connected domain will be P . 6) External Ellipse The external oval reflects the position and range of the area. The center coordinates  ,X Y in the ellipse can be represented by the first moment:    , , 1 1 , x y R x y R X x Y y A A     where A: The area of the range; R: The connected domain needs measuring. Example verification This paper chooses 10 underwater bridge crack pictures the size is 640 480 according to the description and analysis of the crack target features. A statistical analysis is performed for a number of typical characteristic quantities of the crack features and the crack area. A gray feature of its external rectangle is performed. The characteristic quantities are shown in Tab. 1. Order number Area Perimeter External rectangle width External rectangle height Aspect ratio Circularity 1 6301 1829.36 639 86 7.43 0.0232 2 2098 1170.11 420 54 7.78 0.0198 3 3591 1640.05 621 59 10.53 0.0174 4 2180 1299.99 395 71 5.56 0.0161 5 2503 1102.27 53 309 5.83 0.0312 6 8053 1750.75 639 40 15.98 0.0322 7 5496 1598.88 419 130 3.22 0.0269 8 6208 2601.47 640 115 5.57 0.0115 9 6697 2259.63 640 113 5.66 0.0159 10 3559 2034.64 640 72 8.89 0.0110 Table 1: Result of the crack image’s characteristic quantities (unit: pixel). W. Tao et alii, Frattura ed Integrità Strutturale, 30 (2014) 537-544; DOI: 10.3221/IGF-ESIS.30.64 542 It emerges from the calculation results that target cracks’ circularity is very small, with 90% being below 0.01. This indicates that the boundary shape of the crack range is relatively complex and irregular. The axial ratio of the external ellipse is large. The rate above 7 percent is more than 80%. And it is in accordance with the features in the real cracks observed. The present linear features a slender line while the width-height ratio 80% of the external rectangle is over 2.5. And the reflection of the characteristics of the crack shape is not obvious. In the grayscale image, the gray value of the crack area is smaller, while the gray value of the external rectangle becomes bigger. The differences between them are obvious. And the difference rate above 30 accounts for 85% of the total. In accordance with the situation that some real cracks observed are darker and the background color is lighter. But there are some exceptions because of the gray value of the closed segmentation. Some backgrounds were closed to the gray level of the cracks. The crack has connected into an area and expanded the crack area, including a small amount of non-crack pixels. The average gray of the expanded region is higher than the original average gray of the crack area. This leads to the decline of the grayscale difference. There is a 0 value generated into the calculation results about the image’s feature quantity. This is because several complex image processing results are not satisfactory and the cracks’ target cannot be extracted from the image. The above statistical analysis results show that by selecting several characteristic quantities we can represent the shape and gray feature of the crack area. The difference of the external ellipse is the axis ratio and the range’s gray average value. The gist is that information on the cracks can be extracted from the image tested for these two characteristic quantities. UNDERWATER BRIDGE CRACK CLIP CONNECTION fter extracting the target, we found the target was divided into various discontinuous fragments. This is in conformity with reality. If the connection is not to be restored, it will affect the awareness and application of the target’s nature. Therefore, connecting the fragments is needed. Establishment model N-th  2N  fracture fragment is assumed to be existed after extracting crack target. The fragments belonging to different parts of the same crack are on the overall trend line. They are ordered from left to right, top to bottom after marking the individual segment. The leftmost, upwards of the left endpoint area, are defined as the 1-th section fragments. The rightmost, downwards, are defined as the N-th section fragments. Set a simple model shown as Fig. 5 (a). (a) (b) Figure 5: (a) Location model; (b) Connecting model of the crack fragment’s endpoint A W. Tao et alii, Frattura ed Integrità Strutturale, 30 (2014) 537-544; DOI: 10.3221/IGF-ESIS.30.64 543 The regions A, B, C, D, E, F, G, H, I represent the fracture fragments after extraction. Their positional relationship between endpoints corresponds to 0, 1, 2, 3, 4, 5, 6, 7, 8 in Fig. 5 (b). Set A  ,Xa Ya as the right end point coordinates. The coordinates closed to the left end point B, C, D, E, F, G, H, I is,  ,Xb Yb ,  ,Xc Yc ,  ,Xd Yd ,  ,Xe Ye ,  ,Xf Yf ,  ,Xg Yg ,  ,Xh Yh ,  ,Xi Yi , respectively. Set A to represent i -th fragment, I, b, c, d, e, f, g, h, I. This means that the  1i  -th has 8 representative kinds of fragment with a certain position of A respectively. The connection procedure of the fragments A and B is described as below. The connection process of a, c, d, e, f, g, h, I is similar. B is located right of A. A and B match so that: ,Xb Xa Yb Ya  1) The right endpoint of segment A (the rightmost column A, from the top down, the first non-zero pixel) is obtained by coordinates  ,Xa Ya . And the left endpoint of B (the leftmost column B, from the top down, the first non-zero pixel) is obtained through coordinates  ,Xb Yb . The following method of defining the left and right endpoints of each fragment is similar to that for defining the left and right endpoints of each fragment. 2) The coordinate difference is calculated: d Yb Ya  ; e Xa Xb  and 0d  , 0e  , so d e . 3) It proceeds along a route from  ,Xa Ya . And 1 is close to  ,Xb Yb . The pixel value of the blank during the route is set as 1. Route 1:  , 1Xa Ya  ▁ , 2Xa Ya  ▁ , 3Xa Ya  ▁ , 4Xa Ya   , 1 1Xa Ya   ;  , 2 1Xa Ya   ;  , 3 1Xa Ya   ;  , 4 1Xa Ya   Likewise, it is the same to  ,Xb Yb . 4) Reach Example verification The cracks have been divided into several segments for verifying the fracture fragment through the connecting algorithm, as shown in Fig. 6 (a). The fracture fragments algorithm is connected with the neighboring fragments. The connection results are shown in Fig. 6 (b). (a) (b) Figure 6: (a) Crack fragment image; (b) Crack fragment after connection We can see that it is correct and effective to apply the algorithm in connecting the fracture fragments. The connection of various pieces of fragments in the image forms a connected area. This paper contributes to testing the crack developments and simplifying calculation for the characteristic quantities of crack targets. W. Tao et alii, Frattura ed Integrità Strutturale, 30 (2014) 537-544; DOI: 10.3221/IGF-ESIS.30.64 544 CONCLUSIONS irstly, this paper collects crack images to conduct spatial filtering after graying and enhancing the images with the neighborhood average method. Then it performs gray-level threshold segmentation combined with the iterative method. Finally, information on the cracks is extracted based on the underwater images of the bridge. Our aim is to identify the areas of cracks in the image and obtain the parameters of the cracking region, such as area, length, width and perimeter. This paper, therefore, extracts and inspects the crack parameters as follows. The circularity of the crack target is small; the major-minor axis ratio of the external ellipse is large. The crack area’s grayscale average is smaller in the grayscale images, while the external rectangle’s grayscale average is larger. 0 value is generated in the calculation results of the characteristic quantities. The target was divided into discontinuous fragment regions after extracting the target value. We need to connect the fragment area establishing models and instance validation. Finally we will find that it is correct and valid to connect the fracture fragments by applying this algorithm. Application of the median filtering method to enhance denoising can have better denoising effect. And it could smooth the image after enhancing denoising and reduce the data volume of the monitoring stream with compressed synthesis. The neighborhood average method is a common technology for image denoising. Its advantage is rapid processing speed and wide range of application. But this algorithm also has a significant shortcoming, namely, that the image will become vague when reducing the noise at the same time, especially in the image's edges and details. It is therefore necessary to make some improvements to the simple neighborhood average method. Another key solution is keeping the image’s edges and details as much as possible to a minimum when performing image denoising. REFERENCES [1] Juwu, X., The research of application and measurement the bridge cracks based on digital image processing, Southwest Petroleum University, 5 (2011). [2] Wei, Z., The research of underwater image segmentation and recognition technology based on particle swarm, Harbin Engineering University, 9 (2008). [3] Hanxing, Q., The research of pavement crack detection and recognition based image segmentation. Chongqing Jiao tong University, 03 (2012). [4] Shaobo, B., Maode, Y., Liang jun, H., Yuyao, H., Research on measuring algorithm of asphalt pavement crack based on image processing, Computer Measurement and Control, 15(10) (2007) 1305-1307. [5] Xiaorui, L., Xiongyao, X., The research of rapid detection of tunnel surface cracks based on image processing, Chinese Journal of Underground Space and Engineering, 2 (02) (2009) 1624-1628. [6] Jun, F., Weiliang, J., Feng, K., Yunhua, C., Detection of shallow cracks in the wall with digital image processing, civil Architecture and Environmental Engineering, 31 (06) (2009)137-141. [7] Lto, A., Aoki, Y., Hashimoto, S., Accurate extraction and measurement of fine cracks from concrete block surface image, IECON02, 3 (2002) 2202-2207. [8] Kawamura, K., Miyamoto, A., Nakamura, H., Sato, R., Proposal of a crack pattern extraction method from digital images using an interactive genetic algorithm, Proceedings-Japan Society of Civil Engineers, (2003) 115-132. [9] Abdel, Q., Abudam, O., Kelly, M. E., 2003. Analysis of edge detention techniques for creak identification in bridges, Journal of Computing in Civil Engineering, 17(3) (2003) 255-263. [10] Guoqi, Z., The research of concrete bridge underside crack detection method based on image processing, Beijing Jiao tong University, 06 (2010). [11] Galvez, J. C., Cervenka, J., Cendon, D. A., Saouma, V., A Discrete Crack Approach to Normal/Shear Cracking of Concrete, Cement and Concrete Research, 32(10) (2002) 1567-1585. [12] Xiaorui, L., Xiongyao, X., Rapid Crack Inspection of Tunnel Surface Based on Image Processing, Chinese Journal of Underground Space and Engineering, 5(02) (2009) 1624-1628. [13] Xiaomao, R., A technology of screen translation, Computer and Digital Engineering, 2(22) (1994) 44-45. [14] Ciyin, Y., Lianqing, H., Contrast enhancement of medical image based on since grey level transformation, Optical Technique, 5 (28) (2002) 407-408. [15] Xu, B., A Study on the Bridge Diseases Inspection and the Cracks Measurement Based on the Imagery Processing Technology, Chang'an University, (2009). F