A novel image enhancement technique for tunnel leakage image detection

A novel image enhancement technique for tunnel leakage image detection

Chunquan Dai Yunlong Lv Yanxia Long Hongtao Sui  

College of Civil Engineering and Architecture, Shandong University of Science and Technology, Qingdao 266590, China

Corresponding Author Email: 
31 December 2018
| Citation



Based on wavelet transform, this paper proposes a novel image enhancement algorithm to solve the problems of existing leakage image treatment techniques (weak light, low contrast, heavy noise and unobvious target area). Firstly, the original image was subjected to a three-level decomposition based on wavelet transform, producing low-frequency and high-frequency signals. After that, the low-frequency signal was enhanced by homomorphic filtering and treated with histogram equalization, while the noisy high-frequency signal was denoised by semi-soft threshold function. The enhancement of the low-frequency signal aims to facilitate the extraction and enhancement of the image information from the target leakage area; the denoising of the high-frequency signal attempts to enhance the texture details. Finally, the proposed method was verified through Matlab simulations on an actual tunnel leakage image, and compared quantitatively with a traditional enhancement algorithm through image normalization. The results show that our algorithm can satisfactorily overcome the defects of the traditional method and produce leakage images with sharp contrast, bright lightness and clear textures. The research findings lay a solid theoretical basis for the fast and accurate identification of images on leakage disease.


 tunnel leakage image, wavelet transform, image enhancement

1. Introduction

Recent years has seen a boom in China’s tunnel construction. Different types of tunnels have been constructed across rivers and the sea to link up different places or in urban areas for metro transport. The frenzy of tunnel projects is threatened by the increasingly prominent structure diseases, the most severe of which is tunnel leakage (Yuan et al., 2013). With the fast development of machine vision technology, the emerging nondestructive testing methods offer a possible solution to detection of such diseases. In addition, the recent coupling between computer technology, electronic technology and image processing technology has also made it possible to quickly detect tunnel diseases based on image processing (Huang and Li, 2017).

The machine vision detection method is one of the non-destructive detection methods. It uses a high-definition camera to automatically trigger the acquisition of the tunnel lining image, and automatically detects the location, length, and width of the disease by image processing technology. Because the method uses the matching image analysis technology to process the data, it can overcome the shortcomings of manual detection and gradually become the main research method in the field at home and abroad (Yuan and Xue, 2017). Faced with dusts, insufficient light and local highlighted areas (Wang et al., 2016), the tunnel environment is so complex that the tunnel images cannot be processed satisfactorily by conventional image enhancement methods. Considering the complexity of tunnel environment, the recent studies on image processing have concentrated on enhancing the dark areas, suppressing the highlighted areas and enriching texture details, aiming to enhance the images and improve the matching speed (Zhou, 2018; Petschnigg, 2004; Wang et al., 2014; Wu and Huang, 2018).

To process images of different environments, the conventional image enhancement methods have been improved at home and abroad. For example, Wu et al. (2018) designed an effective wavelet enhancement method through the integration of the wavelet transform and the histogram equalization based on dynamic threshold allocation. Chen et al. (2014) proposed a fast wavelet transform algorithm for signal and image processing and reconstruction. Despite the fruitful results on the processing of images taken in different environments, there are very limited reports on the processing of tunnel leakage images due to the late start of tunnel disease rapid detection, not to mention the enhancement of images on special tunnel environments (Wang et al., 2018; Xu and Tao, 2017; Ding and Duan, 2011).

Considering features of tunnel leakage images, this paper probes deep into the wavelet transform enhancement for the processing of leakage images, and discusses the signal processing of such images in details: based on wavelet transform, the decomposed low- and high-frequency signals are respectively enhanced by homomorphic filtering and treated by semi-soft threshold function. Compared with the conventional image enhancement algorithms, the proposed processing algorithm can reduce the contrast of highlighted areas while enriching the image details. The feasibility and adaptability of the algorithm were verified through image enhancement experiments on the Matlab. The research findings lay a solid theoretical basis for the fast and accurate identification of images on leakage disease.

2. Features and processing of tunnel leakage images

2.1. Tunnel imaging environment

The metro tunnel is an underground tubular structure in a low light environment. With a special curvature, the lining surface has many interferences that affect image recognition, including but not limited to panel joints, power cables, pipes, bolt holes, grouting holes and LED lights (Huang and Li, 2017). The interferences are shown in Figure 1 below.

Figure 1. Interferences on tunnel surface

Many leakage images were taken from a metro section in Jinan, the seat of eastern China’s Shandong province. After classifying these images on the complex tunnel surface, the influences of the special tunnel environment on imaging are summarized as (Zhang and Zhang, 2014):

(1) Various shapes: The water has penetrated and diffused to many block and strip areas on the tunnel surface, creating leakage areas in various shapes and with varied degrees of the disease.

(2) Directionality: The water leakage is under the effect of gravity. In tunnel leakage images, the pixel distribution in the leakage areas is more directional than that in the non-leakage areas (Figure 2).

(3) Grayscale difference: Compared with the non-leakage areas, the leakage areas have obvious changes in grayscale. In general, these areas are dark with local brightness.

(4) Presence of background noise: Due to construction and operation, the lining surface of the tunnel is inevitably covered by cement mortar, water stains, oil stains, scratches and artificial markings. As a result, the collected images become heterogenous, which adds to the difficulty in subsequent analysis.

(5) Uneven illumination: The tunnel is a low-light environment. The uneven illumination leaves halos in some of the images, making the images blurry.

Figure 2. Leakage images

2.2. Features of leakage images

Due to the complex and variable tunnel environment (Liu et al., 2012), the leakage images acquired from the tunnel carry the following features:

(1) Low contrast: The variable illumination in the tunnel is insufficient for high-quality imaging. The resulting images are faced with uneven brightness, blurry details and poor contrast, which hinders the subsequent processing.

(2) Many noises: The acquired images have such defects as false contours and false shadows, which are resulted from the scattering effect of suspended matter in the air, the obstruction of pipes and other obstacles and the directional distribution of leakage areas.

(3) Uneven grayscale: The grayscales of the acquired images are unevenly distributed, because the images are taken under the non-uniform ambient light caused by the use of auxiliary illumination.

The above description shows that the images acquired by rapid tunnel leakage detection system vary greatly from each other, owing to the complexity of the tunnel environment. What is worse, the images are interference by noises like spots, halos and false contours, making it hard to distinguish between the leakage and non-leakage areas. As a result, the tunnel leakage images share the problems of low contrast, color distortion and poor clarity.

To sum up, the acquired background images have strong color variations, while the leakage area images carry indistinguishable features, which are attributable to the complex environment and uneven texture distribution on the lining surface. Considering the complex factors in tunnel leakage images (Huang et al., 2012) and the features of wavelet transform, this paper designs an image enhancement method based on wavelet transform to reduce the impacts of the complex environment on the imaging. Targeting the images on tunnels with insufficient or uneven illumination, this method attempts to effectively enhance the features of the target leakage areas and enrich the image details, without sacrificing the original details of the target images.

3. Image enhancement

3.1. Wavelet transform

The wavelet transform-based image processing is implemented as follows: decomposing the target image via wavelet transform, processing the low- and high-frequency component coefficients separately, and restoring the image via wavelet reconstruction to meet the specific requirements. Compared with Fourier transform, the wavelet transform supports the analysis in both the space (time) domain and the frequency domain (Huang et al., 2012).

The discrete wavelet transform of the 2D function $f(m, n) \in l^{2}\left(Z^{2}\right)$ can output a low-pass sub-band image $S_{j}$ and three high-pass sub-band images $H_{i, j}$ with direction selectivity. Further decomposition of the low-pass sub-band image $S_{j}$ can yield the multi-level wavelet decomposition of f(m, n). The decomposition results can be expressed as:

    $W(f(m, n))=\left\{\left(H_{i, j}=W_{j}^{i}[f(m, n)]\right) S_{j}\right\}, 1 \leq i \leq 3,1 \leq j \leq i$  (1)

where $H_{i, j}$ is the detail information on the scale j and in the direction i;$S_{j}$ is the general description of the image on the highest scale j, representing the low-frequency information of the image.

In the target image, the high-frequency contents usually concentrate in a low-scale high-pass sub-band, while the noises concentrate in a high-scale sub-band $H_{i, j}$. In actual processing, the decomposition coefficients of different scales enhanced to different degrees, aiming to prevent the excessive enhancement of noises in common enhancement methods. Considering the defects of single-scale enhancement, multi-scale wavelet transform is adopted here to decompose and enhance the image (Huang and Jiang, 2006).

After the first-level wavelet transform, the original image was decomposed into four sub-images, respectively representing the smooth approximation component, the horizontal component, the vertical component and the diagonal component of the original image. The wavelet reconstruction is the inverse process of wavelet decomposition. The wavelet transform process is explained in Figure 3 below.

Figure 3. Sketch map of wavelet transform

For an image acquired from a low-illumination tunnel, the key to signal processing lies in the correct and fast separation between the low-frequency incident component and the high-frequency reflection component. Since wavelet transform can effectively separate the high- and low-frequency information in images, this paper puts forward an enhancement algorithm for low-illumination image based on wavelet transform. The overall procedure is presented below (Chen et al., 2018):

(1) Performing a three-level discrete wavelet transform;

(2) Using homomorphic filtering to remove the incident component from the low-frequency sub-band extracted from wavelet transform;

(3) Using semi-soft threshold function to enhance and denoise each high-frequency coefficient obtained via wavelet transform, such as to enrich the texture details of the image;

(4) Reconstructing the processed image via inverse discrete wavelet transform.

3.2. Discrete wavelet decomposition

To realize real-time tunnel detection, the Daub wavelet transform wave adopted to perform a three-level wavelet decomposition on the leakage image. The positive transform formulas are:

$d_{1}[2 n]=s_{0}[2 n+1]-\left\{\frac{1}{2}\left\{s_{0}[2 n]+s_{0}[2 n+2]\right\}+\frac{1}{2}\right\}$    (2)

$d_{1}[2 n]=s_{0}[2 n+1]-\left\{\frac{1}{2}\left\{s_{0}[2 n]+s_{0}[2 n+2]\right\}+\frac{1}{2}\right\}$     (3)

The inverse transform formulas are:

$d_{1}[2 n]=s_{0}[2 n+1]-\left\{\frac{1}{2}\left\{s_{0}[2 n]+s_{0}[2 n+2]\right\}+\frac{1}{2}\right\}$     (4)

$d_{1}[2 n]=s_{0}[2 n+1]-\left\{\frac{1}{2}\left\{s_{0}[2 n]+s_{0}[2 n+2]\right\}+\frac{1}{2}\right\}$     (5)

where $s_{0}[n]$ is the original 1D signal; $s_{1}[2 n]$ and $d_{1}[2 n]$ a are the information acquired through low-pass filtering and down-sampling and high-pass filtering and down-sampling, respectively. One low-frequency sub-band $S_{j}$ and three high-frequency sub-bands $H_{i, j}$ (i=1, 2, 3) can be obtained through the three-level decomposition. Since the low-frequency sub-band $S_{j}$ has an area of only 1/64 of the original image, it is extremely fast to estimate the incident component on the low-frequency sub-band.

3.3. Homomorphic filtering enhancement

Based on the illumination reflection imaging principle in the image acquisition, the homomorphic filtering is a frequency domain technique that can enhance the image details by adjusting the grayscale range and eliminating the uneven illumination of the image. The first step of homomorphic filtering enhancement is to set up an image model under illumination. Generally, the tunnel leakage image is denoted as$f(m, n) .$ According to the Retinex theory of color vision, the incident component and the reflection component in image $f(m, n)$ can be denoted as $i(x, y)$ and $r(x, y)$, respectively (Zhou et al., 2015). The incident light is reflected onto the reflective object, forming the reflected light, which is then reflected into the visual receiver to form an image. The relationship between the image, the incident component and the reflection component can be expressed as:

$f(m, n)=i(x, y) \times r(x, y)$               (6)

Uneven illumination is illustrated by the incident component $i(x, y)$, which is basically a slowly changing low-frequency component reflecting the slow spatial transformation of the image. By contrast, the details of the scene are illustrated by the reflection componentreflection component $r(x, y),$ which is a high-frequency component. To transform the relationship between $i(x, y)$ and $r(x, y)$ via multiplication and addition, the logarithmic operation was performed on the above equation before the discrete Fourier transform. The resulting frequency domain can be expressed as:

$F\{\ln f(x, y)\}=F \ln i(x, y)+\ln r(x, y)$             (7)

To eliminate the uneven brightness of the image caused by non-uniform illumination, the spectral content of the incident component should be weakened in the frequency domain, while enhancing that of the reflection component. According to the image properties characterized by the incident component and the reflected component, the author selected a proper homomorphic filtering function $H(u, v)$ to suppress the low-frequency component and boost the high-frequency component, hereby overcoming the effect of non-uniform illumination and enhancing the image contrast.

The processing of the frequency domain by the filtering function $H(u, v)$ can be expressed as $H(u, v) \times F\{\ln f(x, y)\}$ . For simplicity, let $\mathrm{I}=F \ln i(x, y)$ and $\mathrm{R}=\ln r(x, y) .$ Then, the space domain obtained after inverse discrete Fourier transform can be expressed as:

$F^{-1}\{H(u, v) \times F\{\ln f(x, y)\}\}=F^{-1}\{H(u, v) I\}+F^{-1}\{H(u, v) R\}$    (8)

Finally, the image g(x,y) can be obtained through the exponential operation.

The selection of the filter is essential to the effect of homomorphic filtering. In an image, the incident component often reflects the slow changes in the space domain, while the reflection component usually depicts the sudden changes in that domain, especially on the edge of the object. Therefore, the low-frequency part of the image is associated with illumination, while the high-frequency part is associated with the reflection. In light of these, the high-pass filter was selected for our homomorphic filtering function.

3.4. Wavelet high-frequency enhancement

After the three-level discrete wavelet transform, the resulting high-frequency sub-bands are $H_{i, j}$ (i=1, 2, 3). Among them, the coefficients with large absolute values represent the texture and details of the image, while those with small absolute values might be noises. To enhance the texture and suppress noises, the semi-soft threshold function was introduced to enhance the image. The goal is to eliminate noises while preserving the edges and texture information.

After the decomposition of image signals by wavelet transform, the low-frequency signals are usually retained, while the high-frequency coefficients are subjected to multi-directional thresholding and reconstruction using the scale vector and the threshold function. Hence, the threshold selection of the function plays a key role in the removal of high-frequency noises. The classic threshold functions can be roughly divided into hard threshold function and soft threshold function. The former works well in maintaining edge details, but sometimes produces a “ringing effect”, causing visual distortion. The soft threshold function can ameliorate the distortion issue through smooth detail processing, but the processed image is too smooth to be clear. To sum up, soft and hard threshold functions each has its strengths and weaknesses. Therefore, this paper selects an improved semi-soft threshold function to enhance the target image acquired in the complex tunnel environment with uneven illumination:

$y_{i j}=\left\{\begin{array}{c}{\mathbf{o},\left|x_{i j}\right| \leq t_{0}} \\ {x_{i j},\left|x_{i j}\right| \succ t} \\ {\operatorname{sign}\left(x_{i j}\right) * \frac{t\left(\left|x_{i j}\right|-t_{0}\right)}{t-t_{0}}, t_{0} \prec x_{i j} \leq t}\end{array}\right.$          (9)

Where $t_{0}$ is the lower threshold of the function. The value of $t_{0}$ depends on the noise signal in the target image. If the high-frequency information of the image contains rich edge information, the threshold value can be lowered properly to ensure the complete presentation of the edge details; otherwise, the threshold value can be increased properly to promote noise removal.

For the enhancement of image edges and textures, the key to enhancing high-frequency signal by the semi-soft threshold function relies in suppressing the high-frequency coefficients with small absolute values and increasing those with large absolute values through adjustment of the threshold value.

4. Algorithm flow and experimental analysis

As shown in Figure 4, the leakage image after wavelet transform maintains most of the spatial features in the original image, and facilitates the information extraction of low- and high-frequency sub-bands. The low-frequency component, corresponding to areas with slow-changing grayscale in the image, was processed by homomorphic filtering to enhance the high-frequency information in low-frequency sub-band. In addition, the processed low-frequency component was subjected to histogram equalization to further enhance the visual effect of the image. By contrast, the high-frequency component, corresponding to areas with fast-changing grayscale as well as edge and texture information of the image, received high-frequency component denoising via the semi-soft threshold function, thus clarifying the details in the high-frequency component. Finally, the wavelet reconstruction was performed to output an image with no noise, clear details and high contrast.

Figure 4. Flow of our algorithm

The algorithms mentioned above were verified through Matlab simulations on the original tunnel leakage image shown in Figure 5. It can be seen that the image has a poor visual effect: the brightness is low, the water leakage area is blurry and the details are unobvious.

The image after homomorphic filtering enhancement is presented in Figure 6. Compared with the original image, Figure 6 enjoys clear contours as well as high contrast between the leakage area and the background. However, the leakage area is too bright and lots of noises appear in local areas.

In the final image after processing by our method (Figure 7), the contrast and resolution of the leakage area have been improved, and the original noises have been largely eliminated. For example, the leakage area and the lining background are clearer and the overall contours are more prominent than those in Figure 5. This image lays a good basis for accurate and fast analysis. Hence, the simulations prove the feasibility and effectiveness of our method.

Next, the detail evaluation parameter and contrast parameter of the final image were normalized to quantitatively compare our algorithm with the traditional method that combines homomorphic filtering and histogram equalization (HF-HE). The comparison results are shown in Table 1 below.

Figure 5. Original image

Figure 6. Final image of HF-HE

Figure 7. Final image of our method

Table 1. Comparison between our method and the HF-HE


Detail evaluation parameter

Normalized value

Contrast parameter

Normalized value

Original image










Our algorithm






As shown in Table 1, the traditional HF-HE can enhance the contrast between the target area and the background and elevate the image brightness, but these effects are achieved at the cost of some details of the target area. The loss of these details may affect the accuracy of subsequent analysis. Our image enhancement method, however, is based on wavelet transform. After three-level wavelet transform of the original image, the high-frequency information was decomposed and the information of different frequencies were treated with different enhancement algorithms. In this way, the details of the original images were enhanced to a certain extent, along with the contrast between the target area and the background and the image brightness. The image enhanced by our method is more suitable for computer image processing than that processed by the HF-HE. The results show that our method is applicable to process the low illumination images, in which the target area is unclear and hard to distinguish from the background.

5. Conclusions

Owing to the complexity of the tunnel environments, the leakage images taken from tunnels have the following defects: (1) low contrast, uneven brightness, blurry details; (2) halos, false contour and false shadow; (3) uneven grayscale distribution caused by non-uniform ambient light in the imaging process. Therefore, the key difficult points in the processing of tunnel leakage images include solving the uneven brightness in the target area and enhancing texture details of these images.

Considering the complex tunnel environment, this paper presents an image enhancement method based on wavelet transform. Firstly, the wavelet transform was adopted for three-level discretization of the target leakage image, producing a low-frequency sub-band and several high-frequency sub-bands. After that, the incident component of the low-frequency sub-band was removed by homomorphic filtering and subjected to histogram equalization, while the high-frequency coefficients were enhanced and denoised by semi-soft threshold function, aiming to enrich the texture details of the image. Finally, the processed image was reconstructed by inverse discrete wavelet transform.

The proposed method was verified through Matlab simulations on an actual leakage image. The simulation results show that the contrast and resolution of the leakage area in the enhanced image have been improved to some extent, the original noise features have been improved, and the image details (e.g. the contrast between the leakage area and the lining background, the overall contour and the edges of the leakage area) were more obvious. The processed image lays a good basis for fast, accurate image analysis. After that, the final image was normalized to compare our method and the traditional HF-HE. The comparison further verified the feasibility and adaptability of our method. The research findings shed new light on the fast and accurate recognition of images on leakage diseases.


This work is supported by Natural Foundation of Shandong Province, China [Grant No. ZR2017MEE069]. Thanks for the support of Natural Foundation of Shandong Province.


Chen Y. Y., Zhu A. X., Zhang P. (2018). Automatic identification of tunnel leakage based on wavelet transform. Image & Multimedia Technology, Vol. 09, pp. 56-59. 

Chen Z. A., Hu Z. A. (2018). Remote Sensing Image Denoising Based on Improved Wavelet Threshold Algorithm. Bulletin of Surveying and Mapping, Vol. 04, pp. 28-31. https://doi.org/10.13474 /j.cnki.11-2246.2018.0105

Ding X. M., Duan H. Y. (2011). Image Enhancement Based on Soft-threshold. Journal of Hebei North University (Natural Science Edition), Vol. 27, No. 4, pp. 28-31.

Huang H. W., Li Q. T. (2017). Image recognition for water leakage in shield tunnel based on deep learning. Chinese Journal of rock mechanics and engineering, Vol. 36, No. 12, pp. 2861-2871. https://doi.org/10.13722/j.cnki.jrme.2017.0552

Huang Y. J., Liu X., Yuan Y., Liu Z. M., Wang X. Z. (2012).Auto inspection technology for detecting leakage in a shield tunnel. Journal of Shanghai Jiaotong University, Vol. 46, No. 1, pp. 73-78. https://doi.org/10.16183/j.cnki.jsjtu.2012.01.016

Huang Z. B., Jiang Y. Y. (2006). An algorithm based on wavelet transform for image contrast enhancement. Modern Computer, Vol. 249, pp. 82-83. 

Liu X. Z., Sang Y. L.,Su Y. F. (2012). Detection technology of tunnel leakage disaster based on digital image processing. Chinese Journal of Rock Mechanics and Engineering, Vol. 31, Supp. 2, pp. 3779-3786.

Petschnigg G. (2004). Digital photography with flash and no-flash image pairs. ACM Transactions on Graphics (TOG), Vol. 23, pp. 664–672.

Wang J. F., Zhao X. R., Li L., Qu Y. J. (2016). Experiment design and Matlab implementation of image smoothing based on median filtering. Journal of Nanjing Institute of Industry Technology, Vol. 16, No.1, pp. 26-29. https://doi.org/10.15903/j.cnki.jniit.2016.01.007

Wang T. H., Jia H. Z., Shu H. Z. (2018). Full-reference image quality assessment algorithm based on gradient magnitude and histogram of oriented gradient. Journal of Southeast University (Nature Science Edition), Vol. 48, No. 2, pp. 276-281. https://doi.org/10.3969/j.Issn.1001-0505.2018.02.014

Wang Y. D., Yu Z. J., Bai B., Xu X. N., Zhu L. Q. (2014). Research on image processing based subway tunnel crack identification algorithm. Chinese Journal of Scientific Instrument, Vol. 35, No. 7, pp. 1489-1496. https://doi.org/:10.19650/j.cnki.cjsi.2014.07.007

Wu C. R., Huang H. W. (2018). Laser scanning inspection method and application for metro tunnel leakage. Journal of Natural Disasters, Vol. 27, No. 4, pp. 59-66. https://doi.org/:10.13577/j.jnd.2018.0408

Wu H. B., Xu J. M., Liu D. M. (2018). Dislocation variations in tunnel segments in lining structure experiments using image processing techniques. Hydrogeology & Engineering Geology, Vol. 42, No. 3, pp. 113-118. https://doi.org/:10.16030/j.cnki.issn.1000-3665.2015.03.19

Xu C., Tao Y. P. (2017). Processing algorithm theory based on wavelet transform. Computer & Digital Engineering, Vol. 45, No. 8, pp.1643-1646. https://doi.org/10.3969/j.issn.1672-9722.2017.08.039

Yuan W. Q., Xue D. (2017). Review of tunnel lining crack detection algorithm based on machine vision. Chinese Journal of Scientific Instrument, Vol. 38, No. 12, pp. 3100-3111. 

Yuan Y., Jiang X., Liu X. (2013). Predictive maintenance of shield tunnels. Tunnelling and Underground Space Technology, Vol. 38, pp. 69-86. 

Zhang T., Zhang X. (2014). An improved adaptive median filter algorithm. Communications Technology, Vol. 47, No. 8, pp. 873-876. https://doi.org/10.3969/j.issn.1002-0802.2014.08.007

Zhou L. J. (2018). low-contrast crack extraction method based on image enhancement and watered segmentation. Computer Science, Vol. 45, No. 6A, pp. 259-261.

Zhou X. J., Tan W., Liu M., Tang W. B. (2015). A new method of contrast enhancement of infrared image. Radio Engineering, Vol. 45, No. 2, pp. 26-29. https://doi.org/10.3969/j.issn.1003-3106.2015.02.08