## 2 Frequency Domain Filtering of Overlapping Patches  
### Frequency Domain Filtering of Overlapping Patches  
For some simplicity, but without loss of generality, we focus in this work on filtering grayscale images. Filtering of color images can be reduced to channel-wise processing of grayscale images, and therefore this simplification really does not affect anything. Let \(f(\cdot)\) be an image. We may consider it as a superposition of a desired component \(g(\cdot)\) and a noise component \(q(\cdot)\). As we focus here on additive and multiplicative noises, the respective representations of this superposition are additive \(f(\cdot)=g(\cdot)+q(\cdot)\) and multiplicative \(f(\cdot)=g(\cdot)\times q(\cdot)\). The process of image filtering consists of finding an approximation of an ideal image \(\tilde{f}(\cdot)\) such that the difference between a filtered image and the ideal (noise-free) image is minimized according to a given metric. Usually, the root mean square error (RMSE) is used as this metric. \[\text{RMSE}=\sqrt{\frac{1}{MN}\sum_{i=1}^{M}\sum_{j=1}^{N}(A(i,j)-B(i,j))^{2}}\]  
Minimization of RMSE means maximization of the peak signal-to-noise ratio (PSNR). \[\text{PSNR}=20\log_{10}\biggl{(}\frac{L}{\text{RMSE}}\biggr{)},\]  
where \(L\) is the maximum possible pixel intensity value for a grayscale 8-bit image \(L=255\). Specifically, PSNR is usually used to evaluate the quality of filtering. Many classical image filtering methods [18; 19; 20; 21; 22; 23] usually utilize linear and nonlinear filtering in the spatial domain. However, filtering in the frequency domain can also be highly effective. For example, one of the most effective filters for Gaussian and speckle noise reduction--BM3D--processes images in the frequency domain. It is a common understanding that a visible noise component in the case of additive and multiplicative noise primarily affects higher frequencies. This can be observed in Figure 1.  
Hence, filtering of this kind of noise should typically be utilized via low-pass filtering preserving low frequencies and carefully and selectively suppressing high-frequency components affected by noise. This means that we may consider the process of filtering in the frequency domain as the detection of high-frequency components affected by noise followed by their suppression. A crucial part of this process is in fact the accurate identification of the components affected by noise and their correction. It is important to keep in mind that high-frequency components also contain information about small details and object boundaries. Therefore, while we are interested in noise filtering, we need to do our best to preserve useful information. By simply suppressing all high-frequency components, we may lose important information in a filtered image. The design of filters is a sophisticated task. Some filters work effectively for a specific type of noise but prove to be ineffective for other types. This demands either modifying an existing filter or developing a new one. Such a situation drives the search for tools that enable the efficient design of new filters by implementing complex functional dependencies between the ideal and noisy images, thereby facilitating high-quality noise removal. We employ here a neural network as such a tool. The idea behind the use of a neural network in image filtering is based on the ability of the network to learn from its environment. As a neural network may learn a lot of things from data, there are many reasons to believe that it may learn how to detect and suppress noise while at the same time preserving image details. Neural networks have successfully been applied to image filtering for more than a decade. Successful use of MLP for noise filtering was shown, for example, in [44; 45]. So far, all applications of neural networks in image filtering have been in the spatial domain. That is, in all these applications a neural network developed  
Figure 1: (**a**) Ideal image. (**b**) Image with additive Gaussian noise. (**c**) Magnitude of ideal image Fourier transform.