# Research on Wavelet Transform Modulus Maxima and OTSU in Edge Detection
## 3 Materials and Methods
### Data Processing  
#### 3.2.1 Pre-Treatment  
In order to facilitate the edge detection on the target image, appropriate pre-treatment is necessary. The pre-treatment used in this paper is image enhancement. Image enhancement can improve the visual effects, highlight the useful information of an image and compress invalid information facilitating computer analysis. Image enhancement methods can be broadly classified into two categories: spatial domain methods and frequency domain methods. The spatial domain method is to directly perform linear or non-linear operations on the image to process on the pixel grey values of the image [45]. The frequency domain method, on the other hand, considers an image as a two-dimensional signal and performs signal enhancement on it based on Fourier transform [46].  
In this paper an image frequency domain method is adopted based on the wavelet transform. With efficient scaling and translation capabilities, the wavelet transform can analyze signals at multiple scales [47] and resolve some problems that cannot be solved by traditional frequency domain transforms. After the two-dimensional wavelet transform is applied to the image, some kinds of two-dimensional signal, the approximate signal and the detailed signal (horizontal, vertical and diagonal directions) can be obtained. The contour information of the image is mainly concentrated in the approximate signal [46], and some details and noise are concentrated in the detailed signal. In order to promote the contrast of the target image and suppress the background, non-linear image enhancement can be applied to the approximate signal [48]. Eventually, based on the processed approximate and detail signals, wavelet reconstruction is performed to obtain the enhanced image. The specific processing process [49] is shown in Figure 4, where wavelet decomposition, non-linear enhancement, denoising and wavelet reconstruction are the main operational steps.  
When performing non-linear enhancement, histogram equalization can generally be used. Histogram equalization causes pixels with a high probability of grey values to be stretched, and in the process of stretching, the noise will be locally enhanced. After the wavelet transform, the noise information is concentrated in the detail signal and not in the approximate signal, so the histogram equalization for the approximate signal avoids the problem of amplifying the noise, which is the advantage of the wavelet transform.  
Now the image enhancement is carried out on the target image. Firstly, db4 (Daubechies) is selected as the wavelet function to decompose the target image in three levels to obtain the approximate signal and the detail signal; then, the histogram equalization is carried out on the approximate signal; and finally, the approximate signal and the detail signal are reconstructed again to obtain the enhanced image. The enhancement result is shown in Figure 5b. From the comparison of (a) and (b) in Figure 5, it can be seen that the image becomes brighter overall and the overall contour of the bridge is more prominent. Moreover, the contrast becomes greater and the features become more obvious, providing favorable conditions for edge detection in the next step.  
Figure 4: Image enhancement process.  
Figure 5: (**a**) Original image. (**b**) Enhanced greyscale image.