Building crack monitoring based on digital image processing

Building crack monitoring is of great value to the judgment of building safety. In this study, the digital image processing technology was studied and applied to the monitoring of building cracks. Crack images were collected by CCD camera, and then operations such as graying, correction, denoising and segmentation were carried out to obtain clear crack images. The obtained images were processed morphologically to further improve the quality. Finally, the width and length of cracks were calculated. In the case analysis, the results of 15 cracks measured by a microscope were taken as the standards and compared with the calculated results. The results showed that the results calculated in this study and the manual measurement results differed little, and the average errors of the width and length were 0.021 mm and 0.024 mm respectively, which suggested that the method proposed had a high reliability. The findings of this study provide a new idea for the further development of the building crack monitoring field and is conducive to the accurate assessment of building safety.


INTRODUCTION
n the process of concrete production, due to the uneven expansion and contraction, cracks will inevitably occur in the ground. In the process of component transportation and assembly, cracks may also occur due to the influence of external environment. In the process of building use, cracks will gradually occur along with the deformation of materials. Building cracks will continue to develop and expand to destroy the integrity of the building structure, resulting in a decline in the mechanical properties of the overall structure; if serious, it may lead to shorter building life and cause safety accidents. Cracks in buildings develop slowly, and changes in the width and length can reflect the safety of buildings. Therefore, effective monitoring of cracks has important practical values [1]. With the development of technology, digital image processing has shown excellent performance in crack monitoring. Riyadi et al. [2] monitored pavement cracks with digital image processing technology, developed detection technology through the Gauss pyramid method, classified cracks and non-cracks by linear discrimination, and found that the method had an accuracy of 92.8571% and the processing time of each picture was 1.5 seconds. Kim et al. [3] combined Unmanned Aerial Vehicle (UAV) technology with digital image processing technology to realize the crack assessment of concrete structures and found that the system could successfully I measure cracks with thickness greater than 0.1 mm and the estimated error of the maximum length was 7.3%. Hoang et al. [4] studied the detection and classification of cracks in asphalt pavement, processed images with digital image processing technology, classified images by machine learning algorithm, and found that the method was helpful to assist inspectors in assessing pavement conditions. Lu et al. [5] studied the cracks of cement matrix composites, designed a double threshold algorithm for image processing, and found through experiments that the proposed method could effectively calculate the crack width. Felli et al. [6] studied related cracks of the right foreleg of Colleoni equestrian statue and made long-term examination on the crack expansion through pasting Fiber Bragg Grating sensor. In this study, a series of digital image processing methods were designed for building cracks, and the example analysis verified that the proposed method had high monitoring accuracy, which provides some bases for its practical application and is conducive to the effective evaluation of building health and the improvement of safety and reliability of buildings.

DIGITAL IMAGE PROCESSING
igital images refer to images composed of data points (pixels). Taking a 360*500 image as an example, it refers to an image which is composed of 360 rows of pixels and 500 columns of pixels. Digital image processing refers to the transformation of image signal to digital signal through computer. Digital image processing has many advantages: (1) high accuracy: by processing each pixel in the image, the image can maintain a high accuracy; (2) high processing speed: data-based digital images can perform various operations quickly in the process of processing; (3) easy storage: unlike paper images, digital images are not affected by time and are easy to store; (4) a wide range of applications: no matter what kind of equipment the image is collected, it can be processed by digital image processing; (5) high flexibility: linear and non-linear processing can be realized. In the actual acquisition, the image of building cracks may be affected by illumination, photography, occlusion and so on, which makes the boundary between cracks and background unclear and makes it difficult to accurately extract cracks. Clear crack images can be obtained through digital image processing technology to realize the monitoring of cracks.

Image acquisition
n order to obtain high-quality images, the selected image acquisition equipment should have high pixel and resolution. In this study, MV-VDM200SM/SC CCD industrial camera produced by Video Digital Image Company ( Fig. 1) was used. Some of its parameters are shown in Tab. 1.

D I
In the process of acquisition, the lens was located in front of the crack. The stable image was obtained by tripod and level instrument, and a ruler was set around the crack to provide a standard for crack calculation. Then the acquired image was input to the computer through USB.

Image preprocessing
Under the influence of illumination and noise, the collected images often have some problems, such as low clarity and inconspicuous details, which are not conducive to crack monitoring. Therefore, image preprocessing is needed to improve the quality.

Image graying
The image captured by camera is usually color image in RGB format. The amount of calculation involved in the processing is considerable, which can seriously affect the speed of image processing. Therefore, it is necessary to gray the RGB image.
In this study, graying was achieved by the weighted average method [7]. It is assumed that there is an RGB image   , f i j . The treatment formula is:

Gray level correction
In order to improve the gray resolution of the image, gray correction can be made to the image. In this study, the image was corrected by the histogram equalization method [8].
Firstly, the gray histogram  

Image denoising
The image is denoised by Median filter [9], that is, the gray value in window W is ranked. Then the median value is used as the gray value of the central point. The calculation formula is: where   , f i j stands for the original gray value in W and   , g p q stands for the gray value after median filtering denoising.

Image segmentation
Cracks and background are separated by image binarization. For the original image   , f x y , threshold T is set, and the segmented image is: The method for determining the threshold is as follows. Firstly the initial threshold max min 2   T  T  T     is calculated, where max T and min T stand for the maximum and minimum gray values in the image respectively. The image gray level is divided into two groups, group 1 with gray level larger than T and group 2 with gray level smaller or equal to T . The average gray values 1  and 2  of the two groups are calculated. Suppose . The above procedures repeat until T is stable, and finally the binarization threshold is obtained.

Morphological treatment
or the segmented crack image, the morphological algorithm is taken for further improvement, which mainly includes two steps: corrosion and expansion.
(1) Corrosion: where A stands for the target image and B stands for the structural element. The noise and burr in the image can be further removed after corrosion.
(2) Expansion: . After expansion, the image can be restored to the original size.

Calculation of crack width
Coordinates are set around the crack to calculate the distance between the two points: where  represents the pixel scale parameter, which is the actual size represented by the pixel. As cracks are mostly irregular, the coordinates of left pixels are kept unchanged in the calculation, and then the coordinates of right pixels are calculated in turn with the window size of 5×5, and the minimum value is denoted as the crack width.

Calculation of crack length
The length of crack is calculated through the Euclidean distance between the starting point of crack  

Crack image acquisition
ifteen cracks were collected by CCD camera in building A in Hengshui, Hebei, China. The data of the length and width of the fifteen cracks were collected using a WYSK-40X reading microscope (Fig. 2). The specification of the microscope was 50 × 23 × 138 mm. The focus of the microscope was adjustable, and it carried with pure white LED light source, had scale, and had 40X magnification.  It was found from Fig. 3 that the quality of crack images was poor under the influence of illumination and noise, which was not conducive to crack monitoring. The crack images obtained after the processing of the digital image processing method proposed in this study are shown in Fig. 4. It was found from Fig. 4 that the crack images obtained were clearer and distinct from the background after processing such as denoising, segmentation and morphological treatment, which was conducive to the subsequent crack calculation.

Crack calculations
The width and length of the extracted crack images were calculated using the method mentioned in the section of crack calculation. The comparison between the calculated results and manual monitoring results is shown in Fig. 5 and 6.  It was found from Fig. 5 and 6 that the width and length of cracks calculated by the method were almost the same as the measured values, which showed that the method had a high monitoring accuracy and could replace manual monitoring to achieve effective monitoring of cracks.
The errors between the results obtained by the proposed method and those obtained by manual monitoring are shown in Tab Table 2: Errors between the results obtained using the method proposed in this study and the manual detection results It was found from Tab. 2 that the maximum error of the method was 0.04 mm, the minimum error was 0.01 mm, and the average error was 0.021 mm in the width monitoring; in the length monitoring, the maximum error was 0.04 mm, the minimum error was 0.01 mm, and the average error was 0.024 mm. The errors were so small that could be nearly neglected, which would not affect the evaluation of cracks, suggesting that the method was reliable. All the results showed that the digital image processing method could obtain almost the same results as the manual monitoring, with a good accuracy, and could realize the effective monitoring of building cracks.

DISCUSSION
igital image processing has a good application in many fields [10]. For example, in the field of medicine, it can analyze ultrasound and electrocardiogram images [11] to provide a guidance for doctors' surgery [12]. In the field of industry, it can realize the analysis and detection of circuits, chips, micro parts, etc [13,14]. In the field of D security, it can identify fingerprints and iris [15]. In the field of art, it can realize the restoration and reconstruction of cultural relic pictures [16]. Cracks in buildings are closely related to the overall safety of buildings. Monitoring cracks is an important work of building health assessment. Traditional manual monitoring methods have many limitations in practical operation, which cannot meet the current needs of building crack monitoring. The emergence of digital image processing technology has brought a new idea for building crack monitoring. This study collected the building crack images by CCD camera, then obtained the clear crack images by a series of pretreatment operations such as graying, denoising and segmentation, and finally realized the monitoring of building cracks by taking the width and length as the criteria. The processing method proposed in this study was found effective in the example analysis. It was found from Fig. 4 that the blur, noise and stain in the original images were effectively removed, the image quality was significantly improved, and the cracks were clearly separated from the background, which was conducive to the follow-up operation. Then, in the comparison of the results of crack length and width, the data measured by microscope was taken as the result of manual monitoring and compared with those calculated by the method proposed in this study. Fig. 5 and 6 show that the results obtained by the two methods were very similar, which was also verified in the calculation of errors. The width error was only 0.021 mm, and the length error was only 0.024 mm. With a high accuracy, the method can realize monitoring of the cracks in buildings. In practice, the method not only has high reliability, but also is convenient, fast and highly usable. However, the manual monitoring method based on microscope is very difficult to achieve in the monitoring of a large number of cracks as it is time-consuming and energy consuming. Therefore, the method is more suitable for the monitoring of actual building cracks. In this study, although some achievements have been made in the research of building crack monitoring, there are still many shortcomings, for example, unable to achieve on-line crack monitoring and the identification of complex cracks. In the future work, it is necessary to find more accurate monitoring methods and monitor more characteristics of cracks such as area and depth.

CONCLUSION
n this study, the monitoring of building cracks was studied, clear crack images were obtained through digital image processing technology, and the length and width of the cracks were calculated and compared with the results obtained by the manual detection. It was found that: (1) the crack image which was processed by digital image processing method was clear and distinguished significantly from the background; (2) the crack results obtained by the method proposed in this study had small errors with the manual detection results, and the average errors of the length and width were 0.024 mm and 0.021 mm respectively; The experimental results verified that the method was reliable in crack monitoring, which is conductive to improving the crack monitoring efficiency and scientifically analyzing crack structure and moreover makes some contributions to the safety monitoring and restoration of buildings.