# Research on Image Denoising in Edge Detection Based on Wavelet Transform
## 5 Analysis and Discussion  
In the previous sections of this paper, it was shown that the difference in the results of edge detection before and after denoising illustrates the importance of denoising. When using the canny operator for detection, Gaussian filtering is generally used for denoising purposes. Gaussian filtering is a linear smoothing filter, which is suitable for removing Gaussian noise and is widely used in the noise reduction of image processing. Generally speaking, Gaussian filtering is the process of weighted averaging of the entire image, where the value of each pixel is obtained by a weighted average of its own value and the values of other pixels in its neighborhood. Gaussian filtering is performed by scanning each pixel in the image with a template (or convolution, mask) and by replacing the value of the pixel point at the center of the template with the weighted average grey value of the pixels in the neighborhood determined by the template. For mean and box filtering, the weights of each pixel in the neighborhood are equal. In the case of Gaussian filtering, the weights at the center are increased and the weights away from the center are decreased, on the basis of which the sum of the different weights of each pixel value in the neighborhood is calculated. To further illustrate the superiority of the wavelet, transform denoising in edge detection, the effects of wavelet transform and Gaussian filtering corresponding to the two denoising methods are compared. The effect can be expressed in terms of the Pratt quality factor, which focuses on the three errors of missed detection of valid edges, edge positioning  
Figure 7: Canny operator edge detection results: (**a**) not denoised; (**b**) denoised. errors and misjudging noise as edges [30; 31], and takes values from 0 to 1. The calculation is as follows [32]. \[FM=\frac{1}{\max(I_{A},I_{I})}\sum_{i=1}^{I_{A}}\frac{1}{1+ad_{i}^{2}} \tag{4}\]  
where \(I_{A}\), \(I_{I}\), \(d_{i}\) and a are the detected edge point, the reference edge point, the distance between the detected edge point and the reference edge point and the design constant that is used to penalize misaligned edges, respectively. Generally, \(a=1/9\) is taken. As shown in Table 3, the quality factors of 0.47 and 0.53 were calculated for the Gaussian-filtered and wavelet-transformed images, respectively, which showed that the quality factor of edge detection increased after the wavelet-transformed noise removal, and the detection effect was improved to a certain extent, that is to say, more edge details were retained while the noise interference was removed. Gaussian filtering is mainly applicable to the removal of Gaussian noise and has limited effects on the removal of other types of common image noises (pretzel noise, Poisson noise, multiplicative noise), while the wavelet transform has no such limitations. The _PSNR_ and _MSE_ of the denoised images were calculated and are plotted in Table 4. They initially suggest that the wavelet transform is less susceptible to the limitations of noise types. In the following, the edge detection results will be combined for further argumentation. Figures 8-10 show the edge detection results after noise removal. Because Gaussian filtering has limited effects on the elimination of these three types of noise, the noise will lead to a negative impact on the detection effect in the edge detection process, and a lot of noise remains in the image, which affects the image quality and the extraction of relevant detail information. In contrast, the effect of noise in the edge detection image after denoising by wavelet transform is less, which is more conducive to the following effective information extraction. Therefore, in terms of applicability to noise types, wavelet transform has more advantages.