A New Image-Based Model For Predicting Cracks In Sewer Pipes

Visual inspection by a human operator has been mostly used up till now to detect cracks in sewer pipes. In this paper, we address the problem of automated detection of such cracks. We propose a model which detects crack fractures that may occur in weak areas of a network of pipes. The model also predicts the level of dangerousness of the detected cracks among five crack levels. We evaluate our results by comparing them with those obtained by using the Canny algorithm. The accuracy percentage of this model exceeds 90% and outperforms other approaches. Keywords—Visual inspection; Sewer pipes; Canny algorithm; Crack detection


I. INTRODUCTION
There is an urgent need to develop a proactive sewer pipeline crack prediction model.Due to the fact that sewer pipelines are hidden from day to day view, deterioration can occur unnoticed and this can in turn lead to unexpected functional failures.Moreover, maintenance and rehabilitation of aging sewers have become an overload in terms of budget allocation and investment planning for towns [1].There are many factors that may lead to deterioration in the condition of sewer pipelines.These factors may be related to the physical structure of the sewer pipelines such as length, diameter, material and depth.Nevertheless, factors contributing to such deterioration may also be environment-related such as the type of soil and waste [2,3].
There has been a number of studies on the interpretation of sewer pipes inspection data for the purpose of detecting cracks.Moselhi et al [5] described image analysis and pattern recognition techniques of sewer inspection, based on neural network analysis of digitized video images.The neural network analysis technique was found helpful in identifying four categories of sewer defects: cracks, joint displacements, reduction of cross-sectional area.Chae at al [6] developed an automated sewer inspection data interpretation system.
The other approach is to predict a sewer's existing condition prior to its detailed inspection for selective, cost effective sewer inspection.Hasegawa et al. [7] developed a method for predicting sewer pipes condition based on the knowledge of pipe material, length, diameter and other characteristics.
However, it was concluded that the method could not evaluate sewer's condition effectively.Ariaratnam et al [4] developed a logistic regression model for condition evaluation of sewers.The model was developed through historical data based upon factors; such as, pipe age, diameter, material, waste type and depth.Another approach for condition assessment of large sewers was developed by assessing the impact of different factors; such as location, size, burial depth, functionality etc. in [8].Baur et al [9] developed a methodology of forecasting condition of sewers by using transition curves.These transition curves were developed through the historical condition assessment data.Sewers characteristics; such as, material, period of construction, location were used to define the existing condition of sewers for scheduling detailed inspection.
Yan et al [10] proposed a fuzzy set theory based approach for a pipe's condition assessment.Various linguistic factors: soil condition, surroundings, etc, were transformed through fuzzy theory into numerical format for assessing their impacts on pipes.Ruwanpura et al [1] used rulebased simulation methodology to predict condition rating of sewers.
The model predicted the condition rating of pipe based on age, material and length of pipe.Najafi et al [11] developed an artificial neural network model for predicting the condition of sewers based on historical data.The above mentioned approaches tend to predict existing condition of sewers for prioritizing detailed inspections.Table I shows the comparison between these 7 models including the strong and the weak points.
This paper proposes a model for predicting cracks in sewer pipes cracks.In section II, the data set including sewer pipes image collection is described.Section III presents crack detection using canny algorithm while section IV presents our proposed model for crack detection and crack dangerousness level prediction.Experimental work and results are presented in section V followed by a conclusion in section VI.

II. SEWER PIPES IMAGE COLLECTION
A commercially available SONY-DSC T5 digital camera of 5.1 mega pixels with optical zoom 3x has been used for data collection of 101 crack surface defects.Fig. 1 shows one of these images.These images have been taken to Cairo sewer pipes network.MATLAB functions DILATE (), THRESH () and LAPLACIAN () were developed and applied to this image collection.www.ijacsa.thesai.orgGiving more details of cracks and joint.
Disability to predict the developments of cracks.

Chae [6]
Using Sewer Scanner and Evaluation Technology (SSET) The used camera is very old so the results are weak.Hasegawa [7] Using material, length, diameter and other characteristics for predictions.
Could not evaluate sewer's condition effectively.

Ariaratnam [4]
The model was developed through historical data based upon factors; such as, pipe age, diameter, material, waste type and depth.
Disability to find the relationship between all parameter.

Baur [9]
Developing a methodology of forecasting the condition of sewers by using transition curves.
Depends on historical assessment data only.

Ruwanpura [1]
Using rule-based simulation methodology to predict condition rating of sewer pipes based on age, material and length of pipe.
Makes the task of planning, prioritizing and allocating funds a complex exercise Najafi [11] Using artificial neural network model for predicting the condition of sewers based on historical data.
The way of obtaining historical data is unclear.Image edges and texture are also useful attributes for segmentation [15].

Image segmentation techniques
include thresholding methods, boundary/edge-based methods and region based methods.This section presents the steps needed to implement the Canny edge detector for crack detection.
The first step is to filter out any noise in the original image before trying to locate and detect any edges.After smoothing the image and eliminating noise, the second step is to find the Fig. 2. Steps of the crack detection model edge strength by taking the gradient of the image.The Sobel operator performs a 2-D spatial gradient measurement on an image.Then, the approximate absolute gradient magnitude (edge strength) at each point can be found.The Sobel operator uses a pair of 3x3 convolution masks Fig. 3, one estimating the gradient in the x-direction (columns) and the other estimating the gradient in the y-direction (rows).These masks are applied to every pixel in the image.The third step is to find the edge direction which is computed simply using the formula:- (1) Once the edge direction is known, the next step is to relate the edge direction to a direction that can be traced in an image.So if the pixels of a 5x5 image are aligned as follows: x x x x x x x x x x x x a x x x x x x x x x x x x It can be observed by looking at pixel "a" that there are only four possible directions when describing the surrounding pixels -0 degrees (in the horizontal direction), 45 degrees (along the positive diagonal), 90 degrees (in the vertical direction), or 135 degrees (along the negative diagonal).Now, the edge orientation has to be resolved into one of these four directions depending on which direction it is closest to (e.g. if the orientation angle is found to be 3 degrees, make it zero degrees).accordingto equation (1) .

IV. CRACK DETECTION MODEL
We propose a model to discover sewer pipes cracks.A series of steps have to be performed Fig. 2.

A. Converting Colored Images to Grey
The proposed system has been used for binary (black and white) images and has been extended later to be used with grayscale images as well.The light and dark portions of an image can be reshaped or morphed in various ways under a control of a structuring element which can be considered as a parameter to morphological operation [12].The MATLAB function im2bw() is used to convert a colored image to a binary image .

B. Image Segmentation
Segmentation of an image entails dividing or partitioning of an image into regions of similar attributes.The most basic attribute for segmentation is image luminance amplitude for a monochrome image and color components for a colored image.
Image edges and texture are also useful attributes for segmentation [13].
Sets A and B in z ( image) are defined to represent a greylevel image consisting of pixels p(x, y) and a structuring element (Fig. 4), respectively: Converting scanned images into binary images for segmenting pipe defects by using a thresholding method and determining the optimal thresholds for the opening operated gray-level images by maximizing the following measure of class separability [17]: Equations ( 4) to (9) apply segmentation in the original images .z is the grey-level of a pixel in the scanned image and ranges from 0 through L -1, h(z) is the normalized grey-level histogram of the scanned image.By maximizing the criterion function in Eq. ( 3), the means of the light and dark image regions can be separated as much as possible and the variances of the two image regions can be minimized.

C. Applying Initial Enhancements on Images
The contrast of the RGB pipe image has to be improved by enhancing the dark (crack) pixels relative to the background image.In order to perform crack enhancements, erosion and dilation operators are used.Erosion and dilation are two fundamental operators of digital image processing and whose implementations are of great value in the area of image analysis.
The dilation process is performed by laying the structuring element B on the image A and sliding it across the image .
The dilation of A by B,  , is the union of all pixels in A surrounded by the shape of B [14] and is defined as: The dilation algorithm is applied as: 1) If the origin of the structuring element coincides with a 'white' pixel in the image, there is no change; move to the next pixel.
2) If the origin of the structuring element coincides with a 'black' in the image, make black all pixels from the image covered by the structuring element.Fig. 5 shows the shape of the structure element.The example shown in Fig. 5 shows that with a dilation operation, all the 'black' pixels in the original image will be retained, any boundaries will be expanded, and small holes will be filled.
The erosion process is similar to dilation, but we turn pixels to 'white', not 'black'.As before, slide the structuring element across the image and then follow these steps: 2

) If the origin of the structuring element coincides with a 'black' pixel in the image, and at least one of the 'black' pixels in the structuring element falls over a white pixel in the image, then change the 'black' pixel in the image (corresponding to the position on which the center of the structuring element falls) from 'black' to a 'white'.
Erosion of A by B, denoted as A  B, removes all pixels within a distance B from the edge of A (Fig. 6) and is defined as: The opening operation is defined as :    (13) Fig. 7. Illustration of the opening process These two basic operations, dilation and erosion, can be combined into more complex sequences as shown in Fig 7.
The most useful of these for morphological filtering are called opening and closing [19].Opening consists of an erosion followed by a dilation and can be used to eliminate all pixels in regions that are too small to contain the structuring element.In this case the structuring element is often called a probe, because it is probing the image looking for small objects to filter out of the image.
The effect of opening operation is to remove image regions which are lightly relative to the structuring element while preserving image regions greater than structuring elements [16].
Converting scanned images into binary images for segmenting pipe defects by using a thresholding method and, determining the optimal thresholds for the opening operated gray-level images by maximizing the following measure of class separability [17]:

D. Crack Enhancement
Before finally detecting the cracks, some enhancement steps are applied to the preprocessed image as shown in Fig. 8 and Fig. 9.The first enhancement operation on the image is applying a Laplacian filter.The Laplacian of an image f(x,y) denoted is defined as [18] : Commonly used digital approximations of the second derivatives are ( 15) and ( 16) From equations ( 14), ( 15) and ( 16), it is deduced that (17) This expression can be implemented at all points (x, y) in an image by convolving the image with the following spatial mask: An alternate definition of the digital second derivatives takes into account diagonal elements, and can be implemented using the mask: Both derivatives sometimes are defined with the signs opposite to those shown here, resulting in masks that are the negatives of the preceding two masks.Enhancement using the Laplacian is based on equation (18).(18) where is the input image, is the enhanced image, and c is 1 if the center coefficient of the mask is positive, or -1 if it is negative [18] Because the Laplacian is a derivative operator, it sharpens the crack but drives constant areas to zero.Adding the original image back restores the graylevel color .

E. Calculating Crack Width and Length
In the process of calculating the crack width, it is not needed to divide the width into segments because the maximum width measured is 43.132 mm.On the other hand, since the crack length may reach 910.876 mm, it is necessary to divide the total length into segments when the crack length is calculated.Each segment doesn't exceed 100 mm in length which helps to improve the results.

F. Calculating Pixel Resolution
Resolution refers to the number of pixels in an image and describes the extent of details that can be appreciated in an image.The image resolution and the surface area can be related to determine the quantity of space that each pixel represents in the trail image (Fig. 11).Equations ( 19) and ( 20) are used to determine the pixel space represented by an image.Pixel space is represented by the pixel width and height denoted as C w and C h respectively.Image trail width and height are denoted by w and h respectively while c is the number of pixel columns and r the number of pixel rows in the image.

G. Finding Crack Levels
Using fuzzy logic, three inputs (crack width, crack height and number of pixels) are used to classify the levels of crack as shown in Fig. 10.The output represents the crack level.About 80% of the image data set is used as training data and about 20% is used for testing.
(24) V. EXPRIMENTAL WORK AND RESULTS The proposed model can predict five levels of sewer pipes image cracks as shown in equation ( 24) and in Table II.Crack level 5 represents the most dangerous level where crack level C l is greater than 12.The total number of pixels in each crack is not greater than 20 but the total number of pixels in each background in not less than 100.Fig. 13 shows the pixels average is between 2 and 14.Using equations (20-24), pipe cracks which cannot be seen by the human eye can be discovered.Then, the crack level is predicted as explained previously.Fuzzy logic in MATLAB and Image J ver1.46r application are used for our implementation.The error percentage is calculated by comparing testing and training data as shown in Fig. 12.The very high and high levels of cracks dangerousness are the first priority to the decision maker.Such cracks are very difficult to detect by the human eye as the number of pixels in a crack is smaller than the number of pixels in the image background.Table IV shows the accuracy percentage obtained for each crack level.
The accuracy of the proposed model is greater than or equal to 90% for crack detection and crack prediction.The accuracy of Canny model is 86% in crack detection and very low in crack prediction as shown in Table III .This is due to the fact that edge directions according to the Canny algorithm are four directions only (0, 45, 90, 135 degrees).Any edge direction falling within the range (0 to 22.5 and 157.5 to 180 degrees) is set to 0 degrees.Any edge direction falling in the range (22.5 to 67.5 degrees) is set to 45 degrees.Any edge direction falling in the range (67.5 to 112.5 degrees) is set to 90 degrees.And finally, any edge direction falling within the range (112.5 to 157.5 degrees) is set to 135 degrees.Moreover, removing the noise in the Canny algorithm affects the image structure leading to an increase in the error percentage.www.ijacsa.thesai.orgFig. 13.The relationship between crack levels and average number of pixels As shown in Table V, the proposed model has many advantages over the previous models.The accuracy of the proposed model is about 90% which is greater than the accuracy of the previous models.The proposed model has 5 crack levels but the other models have only one crack level.The availability of a number of levels enables the operator to make a more accurate decision.The proposed model focuses on the crack so it helps to predict what will happen to this crack in the future.

VI. CONCLUSION
Most crack detection techniques depend on the human eye.This paper presents an analytical model together with its implementation for the purpose of detecting cracks as well as predicting their level of dangerousness.Using our model, very small cracks which can't be detected by the human eye can be detected and their level of dangerousness can be predicted.Five levels of dangerousness can be predicted.The accuracy of both detection and prediction exceeds 90% which outperforms other approaches.

Fig. 1 .
Fig. 1.One of the 101 trail images III.CRACK DETECTION USING CANNY EDGE DETECTOR Segmentation of an image entails the division or separation of the image into regions of similar attribute.The most basic attribute for segmentation is image luminance amplitude for a monochrome image and color components for a color image.Image edges and texture are also useful attributes for segmentation[15].

Fig. 3 .
Fig. 3.The 3x3 convolution masks used by the Sobel operator

Fig. 6 .
Fig. 6.Illustration of the erosion process 1) If the origin of the structuring element coincides with a 'white' pixel in the image, there is no change; move to the next pixel.2)If the origin of the structuring element coincides with a 'black' pixel in the image, and at least one of the 'black' pixels in the structuring element falls over a white pixel in the image, then change the 'black' pixel in the image (corresponding to the position on which the center of the structuring element falls) from 'black' to a 'white'.

Fig. 8 .
Fig. 8. Pipe crack image before and after dilation

Fig. 10 .
Fig. 10.The inputs (crack width, crack height and pixels) and output crack levels

Fig. 11 .
Fig. 11.A part of a digital image showing pixel columns and rows and also pixel height and width (19) numbers of pixels as compared to their background.PC represents the pixels in cracks while PB represents the pixels in background.the maximum pixels in cracks in the trail imaged are not greater then 30 PPI as shown in equation (19) .Measuring crack widths depend on many parameters such as:-S : no of segments (the default no of segments is >= 1 ) V: average of crack width in one image P s : The total pixel in one segment C p : The total pixel in one crack n: The number of segments in one crack K w : The total pixel in segment width

Fig. 12 .
Fig. 12.Average testing and average training error where training data is blue and testing data is red

TABLE III .
PROPOSED MODEL VS CANNY DETECTION

TABLE V .
COMPARISON BETWEEN THE PROPOSED MODEL AND THE 7