1 Introduction

Image noise is any random variation of the pixel value which can be produced in digital image acquisition by sensors, scanner, and circuits of digital cameras [19]. The periodic noise, as one type of image noise, is generated by electrical or magnetic interference [39]. This noise is seen in some visual applications such as medicine [18], remote sensing [10], television [35], traffic control [25], and real-time applications. Periodic noise is detected as a repetitive pattern on the image, which degrades the image quality. Due to its abundance, periodic noise removal is one of the important issues in image processing.

Periodic noise not only sharply degrades the image quality in the visual effect but also risks its suitability for subsequent processing, e.g., image un-mixing and classification. The goal of our work is to remove periodic noise and improve image quality before subsequent interpretation.

Periodic noise for an image of size MN is spatially modeled through the summation of several sinusoidal functions (S) with different parameters [8] as follows:

$$\begin{aligned} n(x,y)=\sum _{i=1}^SA_i\sin \left( \left[ \frac{2{\pi }u_{0i}(x+B_{xi})}{M}\right] +\left[ \frac{2{\pi }v_{0i}(y+B_{yi})}{N}\right] \right) \end{aligned}$$
(1)

where \(A_i\) denotes the amplitude, \(u_{0i}\) and \(v_{0i}\) are the ith sinusoidal frequency along the axes x and y and \(B_{xi}\) and \(B_{yi}\) are the phase displacements with respect to the origin and \(S{\in }Z^+\).

Periodic noise is divided into global, local, and stripping categories. Global periodic noise, the noise parameters (amplitude, frequency, and phase) are spatial-independent. In local periodic noise, these parameters are spatial-dependent [33]. The stripping noise is a kind of periodic noise in which the peak is along the vertical or horizontal axis in the Fourier domain. Figure 1 shows three types of periodic noise.

Fig. 1
figure 1

X-Ray imaging of the human skeleton corrupted by periodic noise [21]

Periodic noise reduction methods are divided into two general groups. The groups are spatial methods and spectral methods. Numerous spatial approaches have been proposed for the stripping noise due to it is spatially simpler than other periodic noise. Spatial domain methods operate directly on the image pixels for periodic noise suppression [17], while spectral methods are based on frequency domain filtering [7].

From the methodological perspective, spatial methods are divided into two categories namely: optimization based methods and statistical based methods.

The main idea in statistical-based methods is to correct the distribution of the data to a reference distribution [32]. In the optimization based methods, denoising tasks are modeled as inverse problems to be tackled by regularization [9, 14].

Since of scattering in the spatial domain, the efficiency of spatial methods decreases with global and local periodic noise [13]. Despite the spread of periodic noise in the spatial domain, it is concentrated in one or more adjacent coefficients in the frequency domain. Figure 2 shows the periodic noise at the frequency domain. Therefore, the frequency domain approaches are usually preferred.

Fig. 2
figure 2

Fourier transform of an image contaminated by periodic noise

In the frequency domain, noise reduction is performed in two steps. The first step is to find the location of the noisy frequencies. The main challenge in this step is to find out the location of the noise frequencies. The second step is how to repair the noisy frequencies and to get the restored image. Spectral approaches can be divided into subcategories according to the function they provide.

The first subcategory consists of algorithms that try to detect the peaks such as threshold-based methods [21, 22, 39], histogram analysis-based methods [8], clustering-based methods [12], spectral modeling methods [40, 41], statistical-based methods [1,2,3, 36,37,38].

The second subcategory consists of algorithms that try to repair noise frequencies. In the simplest case, noise frequencies were replaced by zero or divided by a constant [1, 12]. To improve the repair operation, the noise component replaced by the minimum value [39] or median value [3, 41] of its neighbors. In several studies, once the peaks detected, each peak together with its closest surroundings corrected by a windowed Gaussian notch filter [2, 22, 38]. Meanwhile, Gaussian notch filter not only rejected the central noise frequency but also suppressed its neighbors [5]. Gaussian-star filter and sinc-based filter were proposed due to the star-like appearance of noise peak [6, 8].

Moreover, it should be noted that the Low-Frequency Region (LFR) should not be confused with periodic noise. In the simplest case, the LFR protected by protecting the DC component [1] or a square/circle in the center of the spectrum [2, 3, 36, 38]. In addition, the region growing method [8] and connected component analysis method [12] were used to separate the low-frequency region.

This paper holds mainly two twofold. First, periodic noise peaks are found adaptively. The first hypothesis is that a compression method can be used for adaptive detection of the peaks because of the content loss is one part of the inherent property of lossy compression methods. If the content loss in a compression method takes place in edge pixels, it can also be used for adaptive peak detection. Second, the noise frequencies are repaired. The hypothesis is that filtering of the noise frequencies should be performed using a smoothing method.

In this research, the fuzzy transform (shortly, F-transform) is used to test hypotheses. Fuzzy transform is an approximation technique with a simple idea. The domain of a continuous function is partitioned using overlapping fuzzy sets. The theoretical preliminaries of the fuzzy transform have been described in [27], and its practical applications have been developed in time series analysis and forecasting [23], smoothing [15], edge detection [29], image fusion, image reconstruction [30], image compression [20], and image analysis [31, 34]. The fuzzy transform is suitable for the purpose intended in this research because the content loss in the fuzzy transform take place on edges. Therefore, this method is used to detect periodic noise peaks. In addition, F-transform has been successfully applied in smoothing applications. Hence, a fuzzy notch filter can be presented according to the F-transform smoother while saving the computational time as well. Comparative study shows that our proposed algorithm outperforms both statistically and visually for various types of pure, quasi periodic noises including low, high, and multi-frequency periodic noise.

The main contribution of this paper is summarized as follows:

  1. 1.

    In this research, the problem of periodic noise reduction task is converted to a form of the compression, and smoothing problem and a fuzzy-based model is proposed for adaptive periodic noise removal.

  2. 2.

    The content loss has been used to construct a model for detection of noise frequencies which offers a new perspective on periodic noise reduction task.

  3. 3.

    Using the F-transform in a spectral method requires by taking into account for decreasing trend of the spectrum. In this research, F-transform has been used in the frequency domain by changing the partition space.

  4. 4.

    The noise peaks must be smoothed after detecting the noise frequencies. A fuzzy notch filter is proposed to repair the noise frequencies.

The structure of the paper is organized as follows. In Sect. 2, we briefly overview the main notions of the F-transform theory. Section 3 is devoted to a theoretical explanation of the efficiency of F-transform in the problem of periodic noise reduction. It goes into the details of the algorithm in Sect. 4. Comparison results between the proposed algorithm and some conventional methods are given and discussed in Sect. 5. The final section also presents the conclusion.

2 Preliminaries

F-transform is used as a tool in image processing applications and has two phases: direct and inverse. An image after normalization can be considered as a fuzzy matrix (relation). In the fuzzy partition, this matrix is divided into several sub-matrices known as blocks.

In the direct F-transform, each block is transformed to achieve the F-transform component. In fact, this component is the weighted mean value of the block that the weights given by the basic functions. In the inverse F-transform, a reconstructed block is obtained using basic functions resulting in an approximation of the original one [20]. The concepts and theories related to the fuzzy transform are explained below.

2.1 Fuzzy Partition

If the rectangle area \(D^2= [a,b] \times [c,d]\) is a common domain of all real-valued functions, the main idea consists of construction of two fuzzy partitions for intervals [ab] and [cd].

Definition 1

[24] If the interval [ab] is partitioned by basic functions \(A_1,\dots ,A_n\subseteq \) \([a,b],n>2\), and the interval [cd] is partitioned by basic functions \(B_1,\dots ,B_m\subseteq \) \([c,d],m>2\), the fuzzy partition of \(D^2\) would be obtained by fuzzy Cartesian product \(\{A_1,\dots ,A_n \}\times _\odot \) \(\{B_1,\dots ,B_m \}\), with respect to the product t-norm of these two fuzzy partitions. In case, both fuzzy partitions of particular axes are uniform, then the overall fuzzy partition is also uniform.

The direct and inverse Fuzzy transform of two variables function is a generalization of the case of one variable.

2.2 Direct Fuzzy Transform

Definition 2

[16] Let \(A_1,\dot{,}A_n \subseteq [a,b]\) and \(B_1,\dot{,}B_m \subseteq [c,d]\) be basic functions that form fuzzy partition of \([a,b] \times [c,d]\). In the discrete case, an original function \(w:( p_i,q_j )\in ([a,b]\times [c,d])\rightarrow R\) is known only at points \(( p_i,q_j )\), where \(i=1,\dot{,}N ,j=1,\dot{,}M\). In addition, the discrete F-transform FT[w] of w is given by the following matrix of components:

$$\begin{aligned} FT[w]=(FT_{kl}[w])_{nm}= \begin{bmatrix} FT_{11}[w] &{} \dots &{} FT_{1m}[w] \\ \vdots &{} \ddots &{} \vdots \\ FT_{n1}[w] &{} \dots &{} FT_{nm}[w] \end{bmatrix} \end{aligned}$$

where for \(k=1,\dots ,n ,l=1,\dots ,m\), the components of \(FT_{kl}\) are given by

$$\begin{aligned} FT_{kl}=\frac{\sum _{j=1}^N \sum _{i=1}^Mw(p_i,q_j)A_k(p_i)B_l(q_j)}{\sum _{j=1}^N\sum _{i=1}^MA_k(p_i)B_l(q_j)} \end{aligned}$$
(2)

2.3 Inverse Fuzzy Transform

Definition 3

[24] Let \(A_1,\dots ,A_n\subseteq [a,b]\) and \(B_1,\dots ,B_m \subseteq [c,d]\) be fuzzy partitions. Let FT[w] be the F-transform of \(w:[a,b]\times [c,d]\rightarrow R\) with respect to the basic functions \(A_1,\dots ,A_n\) and \(B_1,\dots ,B_m\). Then, inverse fuzzy transform of \(\tilde{w}\) would be defined as:

$$\begin{aligned} \tilde{w}(p_i,q_j)=\sum _{k=1}^n \sum _{l=1}^mFT_{kl}A_k(p_i)B_l(q_j) \end{aligned}$$
(3)

3 Theoretical Framework

F-transform is a method that is successfully used in image compression. Lossy image compression methods tend to introduce distortions such as general loss of sharpness and oscillations around high-contrast edges, blocking structure and loss of color details. The considered distortion in F-transform takes place at edges. This property to detect the noise frequencies adaptively in this research as used, meaning that the noise frequency, like edge pixels, has a rapid change in the intensity. So, if the image spectrum undergoes to this transform, the periodic noise peaks will be detected.

In this section, the main goal is to show that the F-transform enables a extraction of the main image frequencies and the sub-component forming the noise component by F -transform can be either completely removed or significantly reduced. The explanation will be given on the example of a discrete function that corresponds to the function w. Let w be represented by the discrete function \(w : P \rightarrow R\) of two variables where \(P = {(i, j) | i = 1, \dots ,N, j = 1, \dots ,M}\) is an \(N \times M\) array.

Proposition 1

The klth component \(FT[w]_{kl} (k = 1, \dots , n, l = 1, \dots , m)\) minimizes the function

$$\begin{aligned} \Psi (y) = \sum _{j=1}^l {(w(i,j) - y)}^2 A_k(i)B_l(j) \end{aligned}$$
(4)

The next statement [28] describes a representation of the discrete Fourier transform of the F-transform components.

Proposition 2

Let \(Z_l = \{0,1, \dots , l - 1 \}\) and \(\bar{w}\) be the Fourier transform of a function \(w : Z_l \rightarrow R\). Let \(n \ge 3\) and \(A_1, \dots ,A_{n-1}\) be a fuzzy partition \(\left[ a, b\right] \). Let \(W : Z_l \rightarrow R\) be the discrete function given by

$$\begin{aligned} W(t) = \sum _{j=0}^{l-1} A(t-j)w(j); t = 0, \dots ,l-1 \end{aligned}$$
(5)

which contains the F-transform components of w among its values. The Fourier transform of W is given by

$$\begin{aligned} \begin{aligned} \bar{W}(0)&= \bar{w}(0) \\ \bar{W}(k)&\approx \frac{mn^2}{2\pi ^2k^2}\mathrm{exp}(-2\pi ik/n)\left( 1-\mathrm{cos}\frac{2\pi k}{n}.\bar{w}(k)\right. \\ k&= 1, \dots , l-1 \end{aligned} \end{aligned}$$
(6)

where m is a fixed parameter.

By Proposition 2, the influence of the Fourier coefficient \(\bar{w}(k)\) in the presentation (6) is weakened by the factor \(\frac{1}{k^2} ,k = 1, \dots ,l-1\), i.e., every F-transform component works as a low pass filter of an original function. So, the content loss takes place in edge pixels.

In each case, the difference between an original function and its inverse F-transform works as a high-pass filter of the former have been concluded. Therefore, this difference can be used as a membership function of the fuzzy set “noisy component” in respects the following rule: the bigger is the value n, the “higher” are the corresponding periodic noise bandwidth. This rule is a core of the proposed algorithm.

Peaks in a noisy spectrum are an area that can be characterized by a significant change of intensity. This characterization can be formalized. Firstly, the characteristic function of a given crisp set will be formed which corresponds, to the above-given characteristics and then provide a fuzzified version.

$$\begin{aligned} E= & {} \{(x_i, y_j) \in P | \exists (x, y) \in P (d((x_i, y_j), (x, y)) \le \lambda ) \nonumber \\&\hbox { and }|w(x_i, y_j) - w(x,y)| \ge \kappa \} \end{aligned}$$
(7)

where d is a distance, \(\lambda \) determines a size of the “important” neighborhood or in other way, bandwidth of the noise, and \(\kappa \) specifies a “significance” of the intensity change. The right-hand side expresses the fact that the value of a derivative of w at the point \((x_i, y_j) \in E \) is “rather big.”

Now, the fuzzy set with the membership function is characterized for a noisy component that assigns a degree of belongness to every frequency. Given membership function fuzzifies the characteristic function (7) of a noisy component. Both properties Propositions 1 and 2 of the F-transform components will be used in the proposed characterization.

Let nm be numbers of fuzzy sets in a fuzzy partition of the domain \(P = [1,N] \times [1,M]\) of w. Numbers n, m relate to a size of a chosen neighborhood in (7) was characterized by the inequality \(d((x_i, y_j), (x, y)) \le \lambda \). In our approach, the above inequality is characterized by \(A_i(x)\cdot B_j(y)\), where \(\lambda \) relates to lengths of supports of \(A_i, B_j\). If \(FT[w]_{i, j} , 1 \le i \le n, 1 \le j \le m\) are components of the F-transform of w, then the difference \(|w(x, y)-FT[w]_{i, j}|\) approximates the respective difference \(|w(x_i, y_j)-w(x,y)|\) in (7). Thus, the following fuzzy set is:

$$\begin{aligned} \begin{aligned} E&= \{ (x, y) \in P | (\exists i, j)(x \in A_i) \\&\hbox { and }(y \in B_j)\hbox { and }|w(x,y) - FT[w]_{i, j}| \} \end{aligned} \end{aligned}$$
(8)

The membership function of a noisy component E is represented in (8) by the formal expression with the following interpretation: \(\exists \) relates to the addition, “and” to the product, \((x \in A_i)\) is interpreted as \(A_i(x)\) (similarly, \(y \in B_j\)), and finally \(|w(x,y)-FT[w]_{i, j}|\) is re-scaled to [0, 1] value. Therefore, the membership degree E(xy) is equal to \(|\sum _{i=1}^n \sum _{j=1}^m A_i(x)B_j(y) (w(x, y)-FT[w]_{i, j})|\). The following Proposition gives another representation of the value of E(xy) which will be used in the periodic noise reduction algorithm.

Proposition 3

Let the assumptions above be fulfilled. Then, for all \((x, y) \in P\),

$$\begin{aligned} \begin{aligned} E(x,y)&= \left| \sum _{i=1}^n \sum _{j=1}^m A_i(x)B_j(y) (w(x, y)-FT[w]_{i, j})\right| \\&= |w(x,y) - w_{n.m}(x,y)| \le \\&\quad \sum _{i=1}^n \sum _{j=1}^m A_i(x)B_j(y) |(w(x, y)-FT[w]_{i, j})| \end{aligned} \end{aligned}$$
(9)

4 Experimental Verification

In this section, the main steps of the periodic noise reduction algorithm demonstrate how the above-described method works on a noisy image, it will be compared with the classical methods.

In this section, we will explain the main steps of the periodic noise reduction algorithm and demonstrate how the above-described method works on noisy images. We will also compare it with the classical methods for periodic noise reduction.

5 F-transform-Based Algorithm for Periodic Noise Reduction

This research is based on F-transform, and two main steps are considered in it. The first step is the periodic noise frequencies detection, and the second one is the restoration step.

Let f(xy) and g(xy) and \(\hat{f}(x,y)\) be the pixel values of noise-less and noisy image and restored image in the (xy) coordinate, respectively. The origin shifted Fourier transform of a noisy image is defined by

$$\begin{aligned} \bar{G}(u,v)=\frac{1}{MN}\sum _{x=0}^{M-1} \sum _{y=0}^{N-1}(-1)^{x+y}g(x,y)e^{-j2{\pi }(\frac{ux}{M}+\frac{vy}{N})} \end{aligned}$$
(10)

where \((-1)^{(x + y)}\) denotes the origin shifting operation. The diagram of the proposed method is shown in Algorithm 1, and the peak detection algorithm is detailed through the following steps.

figure c

5.1 The Preprocessing

The preprocessing stage of the algorithm is normalizing the magnitude spectrum. The operation is performed by dividing the magnitude spectrum by its largest value and defined as:

$$\begin{aligned} \begin{aligned} ns(u,v)&=\frac{\big |\bar{G}(u,v)\big |}{\max _{u=1,\dots ,M,v=1,\dots ,N}\big |\bar{G}(u,v)\big |} \\ \big |\bar{G}(u,v)\big |&=\sqrt{R^2(u,v)+I^2(u,v)} \end{aligned} \end{aligned}$$
(11)

where R(uv) and I(uv) are real and imaginary values of \(\bar{G}(u,v)\).

5.2 Adaptive Peak Detection and Filtering

The proposed method is a spectral domain method. Thus, fuzzy partition, direct, and inverse F-transform have to be matched with spectrum properties. In an origin shifted Fourier spectrum, the amplitudes often decrease as the frequency increases in each direction away from the origin. Therefore, the frequency coefficients in polar coordinates have been used and defined fuzzy partitioning into \([1, max(\rho ) ]\) and \([0,\pi ]\) intervals and adapted the direct and inverse F-transform to this domain. Note that \((\rho ,\phi )\) is the polar coordinates of the position (uv) in the spectrum of size \(M\times N\). It is given by:

$$\begin{aligned} \rho =\sqrt{{\left( \frac{u}{M}\right) }^2+{\left( \frac{v}{N}\right) }^2} \end{aligned}$$
(12)

where \(\rho \) is the radial distance from (0, 0) and \(\phi \) is the counterclockwise angle from the u-axis.

The direct and inverse F-transform are modified as follows. Suppose that the input domain is a rectangle \([a,b]\times [c,d]\in \mathbb {Z}\times \mathbb {R}\) and \(x_1\;<\dots \;<x_n\) are fixed nodes from [ab] and \(y_1\;<\dots \;<y_n\) are fixed nodes from [cd], such that \(x_1=1,x_n =max(\rho ), y_1= 0,y_m=\pi \) and \(n,m\ge 2\). Assuming that \(A_1,\dots ,A_n\subseteq [a,b]\) and \(B_1,\dots ,B_m\subseteq [c,d]\) are basic functions defined on these nodes. The direct and inverse fuzzy transforms are given by

$$\begin{aligned} NS_{kl}=\frac{\sum _{j=0}^\pi \sum _{i=1}^{\max {(\rho )}}ns(\rho _i,\phi _j)A_k(\rho _i)B_l(\phi _j)}{\sum _{j=0}^\pi \sum _{i=1}^{\max {(\rho )}}A_k(\rho _i)B_l(\phi _j)} \end{aligned}$$
(13)

for each \(k=1,\dots ,n,l=1,\dots ,m\).

$$\begin{aligned} \hat{ns}(\rho _i,\phi _j)=\sum _{k=0}^\pi \sum _{l=1}^{\max {(\rho )}}{NS}_{kl}A_k(\rho _i)B_l(\phi _j) \end{aligned}$$
(14)

The zero frequency coefficient is excluded in the calculation since its amplitude dominates over the others. The F-transform components of the normalized spectrum have been computed. Then, we obtain an approximation of the original one using the inverse F-transform.

In the proposed method, we consider practical consideration. It is expected that the coefficients of the noise-less image spectrum will not be changed. Firstly, the algorithm identifies the maximum frequency value of a noise peak. Then, the neighboring noisy areas associated with the peak are identified. In a noise-less image, no coefficient should be determined as center frequency and the neighboring coefficients should not undergo subsequent changes.

The center frequency in the normalized spectrum has a clear difference with its approximation. Additionally, it was mentioned that the amplitudes in the spectrum usually decrease as frequency increases in any direction away from the origin. So, we tried to utilize a descending threshold function to detect noise center frequencies as shown in the following equations:

$$\begin{aligned} \begin{aligned} CF(u,v) = \Bigg \{ \begin{array}{ll} 1 &{} \text {if}\, {\frac{\hat{ns}(u,v)}{ns(u,v)}\;<\chi (u,v)}, \\ 0 &{} \text {otherwise} \end{array} \\ \chi (u,v)=\max \left( \epsilon ,\frac{{(\rho (u,v)-\max (\rho ))}^{power}}{2{(\max (\rho )-1)}^{power}}\right) \end{aligned} \end{aligned}$$
(15)

where \(\chi \) is a descending threshold function and \(\epsilon \) is the greatest lower bound to identify the noisy center.

After that, the algorithm considers all neighborhood into a binary map image defined by:

$$\begin{aligned} \begin{aligned}&NOISEMAP(\hat{u},\hat{v}) = 1 , \forall \hat{u}\in \{u-1,u,u+1\},\hat{v}\in \{1,\dots ,N\} ,\\&\quad \forall \hat{v}\in \{v-1,v,v+1\},\hat{u}\in \{1,\dots ,M\} \end{aligned} \end{aligned}$$
(16)

where (uv) is the position of the coefficient that satisfies the condition in (15).

If the frequency center placed at the spectrum border, the binary map will wrap around its opposite side and will flag those pixels in the NOIZEMAP. Moreover, if noise-bandwidth increases, then many coefficients in a row or column would be involved. In this case, the condition in (15) is satisfied by several components in the center of the peak, and a greater number of adjacent rows and columns are flagged in the binary map.

We want to filter out only the noisy portion effectively without damaging the non-noisy part as much as possible. So, an adaptive filtration framework is proposed by exploiting the F-transform. Now, the flagged components are investigated with two considerations. First, it is important that the value of the flagged component in the normalized spectrum is greater than its approximation. Second, there is a large gap between this and the mean value. The approximation values obtained from the inverse fuzzy transform are used as mean. So, a filtering mask for flagged components of NOISEMAP defined by:

$$\begin{aligned} Ncoef(u,v) = \Bigg \{ \begin{array}{ll} \frac{\hat{ns}(u,v)}{ns(u,v)} &{} \text {if}\, STD(u,v)>\theta _1 \text {and} \frac{\hat{ns}(u,v)}{ns(u,v)}\; < \theta _2 \\ 1 &{} \text {otherwise} \end{array} \end{aligned}$$
(17)
$$\begin{aligned} \begin{array}{ll} STD(u,v)=\sqrt{{(ns(u,v)-\hat{ns}(u,v))}^2} \\ {\forall (u,v)\in NOISEMAP} \end{array} \end{aligned}$$
(18)

where \(\theta _1\) is the minimum distance from the mean and \(\theta _2\) is the least upper bound for the ratio between the normalized coefficient value and its approximation.

We aim to form a filtering mask that reduces a portion of frequency value corresponding to the periodic noise. So, the term \(\frac{\hat{ns}(u,v)}{ns(u,v)}\) is used in filtering mask.

Up to now, the noisy frequencies are identified. Then, the F-transform notch filter is obtained after convolving the outlier map, Ncoef, by a Gaussian kernel defined as:

$$\begin{aligned} \begin{aligned} FTmask(u,v)&= \min (Nooef(u,v), \\&\sum _{p}\sum _{q}Nooef(p,q)Ga(u-p+1,v-q+1) \\ Ga(n_1,n_2)&=\frac{h_g(n_1,n_2)}{\sum _{n_1}\sum _{n_2}h_g} \\ h_g(n_1,n_2)&=e^\frac{-(n_1^2+n_2^2)}{2\sigma ^2} \end{aligned} \end{aligned}$$
(19)

This filter is used to compensate for noisy components. Finally, the algorithm performs inverse shifted Fourier transform to reconstruct the restored image.

$$\begin{aligned} \check{F}(u,v) = \bar{G}(u,v) \times FTmask(u,v) \end{aligned}$$
(20)

6 Implementation and Experimental Results

The proposed method is implemented in the MATLAB environment. The performance of this method has been objectively/subjectively assessed by other state-of-the-art algorithms in terms of the mean absolute error (MAE), the standard deviation of absolute error (STD), the peak signal-to-noise ratio (PSNR), the mean structural similarity index measure (SSIM), and the edges fall-out and miss rate(EFM). The performance analysis of different algorithms is carried out with synthetic and non-synthetic corrupted images.

If f and \(\hat{f}\) are noise-less image and restored image of size \(M \times N\), respectively, then the objective performance metrics are expressed by:

$$\begin{aligned} MAE = \frac{\sum _{x=0}^{M-1}\sum _{y=0}^{N-1} \big | f(x,y) - \hat{f}(x,y) \big |}{M\times N} \end{aligned}$$
(21)
$$\begin{aligned} STD = {\left[ \frac{1}{M \times N}\sum _{i=0}^{M-1}\sum _{j=0}^{N-1} {\left[ \left| f(x,y) - \hat{f}(x,y)\right| - MAE\right] }^2 \right] }^{\frac{1}{2}} \end{aligned}$$
(22)

PSNR is the ratio of the power of peak signal to the power of distorting noise and it is usually expressed in terms of the logarithmic decibel scale [4]. It is mathematically defined as:

$$\begin{aligned} \begin{aligned}&PSNR = 10 \log _{10} \left( \frac{{255}^2}{MSE} \right) (\mathrm{d}B)\\&MSE = \frac{\sum _{x=0}^{M-1}\sum _{y=0}^{N-1}{(f(x,y) - \hat{f}(x,y))}^2}{M\times N} \end{aligned} \end{aligned}$$
(23)

SSIM takes into account the biological factors of the human vision system when comparing the quality of restored images [42]. It is expressed by

$$\begin{aligned} SSIM =\frac{(2\mu _f\mu _{\hat{f}} + C_1) \times (2\sigma _{f\hat{f}} + C_2)}{(\mu _f^2 + \mu _{\hat{f}}^2 + C_1 ) \times (\sigma _f^2 + \sigma _{\hat{f}}^2 + C_2)} \end{aligned}$$
(24)

where \(\mu _f\) and \(\sigma _f\) are the mean intensity and standard deviation of pixels in the original image, and \(\mu _{\hat{f}}\) and \(\sigma _{\hat{f}}\) are mean intensity and standard deviation of pixels in the de-noised image. \(C_1\) and \(C_2\) are added to avoid instability.

6.1 Fall-out and Miss Rate of the Edge Pixels

One of the obvious effects of the periodic noise is seen on the edge pixels; i.e., periodic noise may introduce some extra edges or destroy some of the edges. A good restoration algorithm must be able to remove the undesired edges and to reconstruct the decayed ones. Since false positive and true negative have a high chance of occurring, the performance of the restoration algorithms can also be evaluated in terms of fall-out and miss rate of the edge pixels [41]. For calculating those parameters, we need the information about true edge points and false edge points. Here, the Canny method is employed for edge detection.

(A) The miss rate of the edge pixels : This measure is the percentage of edges present in the edge image of the noise-less image but not present in the edge image of the restored image to the total number of edge pixels present in the noise-less image and is defined by:

$$\begin{aligned} \begin{aligned}&\xi _1 = \left( \frac{\sum _{x=1}^{M}\sum _{y=1}^{N}N_{\xi _1}(f,\hat{f})}{\sum _{x=1}^{M}\sum _{y=1}^{N}O(f,\hat{f})} \right) \times 100(\%)\\&N_{\xi _1}(f,\hat{f}) = \left\{ \begin{array}{ll} 1 &{} \text {if }\, O(f,\hat{f})=1\hbox { and }R(f,\hat{f}) =0 \\ 0 &{} \text {otherwise} \end{array}\right. \end{aligned} \end{aligned}$$
(25)

where O and R are the edge images of the original image (f), and the restored image \((\hat{f})\), respectively.

(B) The fall-out of the edge pixels: It is the percentage of edges present in the edge image of the restored image but are not present in the edge image of the noise-less image to the total number of non-edge pixels present in the noise-less image and is defined by

$$\begin{aligned} \begin{aligned}&\xi _2 = \left( \frac{\sum _{x=1}^{M}\sum _{y=1}^{N}N_{\xi _2}(f,\hat{f})}{MN - \sum _{x=1}^{M}\sum _{y=1}^{N}O(f,\hat{f})} \right) \times 100(\%)\\&N_{\xi _2}(f,\hat{f}) = \left\{ \begin{array}{ll} 1 &{} \text {if}\, O(f,\hat{f})=0\hbox { and }R(f,\hat{f}) =1 \\ 0 &{} \text {otherwise} \end{array}\right. \end{aligned} \end{aligned}$$
(26)
$$\begin{aligned} EFM = \xi _1 + \xi _2 \end{aligned}$$
(27)

An efficient algorithm in noise reduction would have a high value of SSIM and PSNR and low value of MAE, STD, and EFM.

The performance of the proposed method is compared with Windowed Adaptive Switching Minimum Filter (WASMF) [40], Adaptive Threshold-Based Frequency domain filter (ATBF) [39], Laplacian-based Frequency Domain Filter (LFDF) [41], Median Filter in spectral domain (AMF1) [3], Mean Filter in spectral domain (AMF2) [1], Windowed Gaussian Notch Filter (WGNF) [2], Adaptive Gaussian Notch Filter (AGNF) [22], Adaptive Optimum Notch Filter (AONF) [21], A-Contrario Automated Removal of quasi-Periodic noise using frequency domain statistics (ACARP) [36], Automated Removal of quasi-Periodic noise using frequency domain statistics (ARP) [38], soft morphological filter (SMF) [17], Adaptive Sinc Restoration Filter (ASRF) [6]. Table 1 shows the parameters of compared methods.

Table 1 The parameters of compared methods

6.2 Results and Discussion

The proposed method was tested in several steps as follows

  • Synthetic periodic noise

  • Low-frequency periodic noise of various noise strengths

  • High-frequency periodic noise of various noise strengths

  • Pure and quasi-periodic noise

  • Striping noise

  • Multi-frequency periodic noise

  • Periodic noise on a tonal gradient image

  • Non-synthetic periodic noise

  • Noise-less image

  • Periodic noise removal in RGB images

Then, the computational complexity analysis of the proposed method is discussed. The synthetic corrupted images are created by adding artificially generated sinusoidal noise patterns to the uncorrupted reference images. The performance of spectral domain techniques is strongly dependent on the test image and the noise parameters; therefore, the results averaged on the 40 repetitions under test conditions. In all tests, the test images are \(256 \times 256\) pixels. In all tables, the “noisy image” column is added to evaluate the quality of the degraded noisy image. For that, the performance values are averaged for each set of noisy images. Tables 2, 3, 4, 5, 6, and 7 show the performance comparison of our proposed algorithm with comparison with other approaches in terms of performance measures.

7 Synthetic Periodic Noise

7.1 Low-frequency Periodic Noise of Various Noise Strengths

In this step, low-frequency periodic noise structures are considered as a noise source. In this case, the simulations are carried out on the images with noise pattern of Eq. 1 with \(u_0,v_0 \subseteq [2,14]\). The simulation results are shown in Table 2.

Table 2 Comparison among different restoration algorithms for restoring sample images corrupted by low-frequency periodic noise in terms of performance metrics \((\epsilon =0.08,power=10,\theta _1=0.5,\theta _2=9\times 10^{(-4)} )\)

This table shows the performance of the compared algorithm for synthetic periodic noise with varying noise amplitudes. Generally, the restoration method should restore a more inferior image when increasing the noise amplitude. It is evident from Tables 2 that the proposed algorithm is capable of achieving higher performances than the others.

The LFR radius detection in AGNF is not optimum in [8]. In AGNF, the coefficients are averaged to calculate the LFR radius. As DC and its nearby region are usually enriched with higher spectral amplitude values, these values will be affected the average value when the noise peak is revealed near the LFR;

In this case, the noise peak may not be detected and mistaken as part of the LFR. The simulations show that some methods are incapable of peak detection when the noise peak appears near the DC component. This issue is reflected in the results as in Table 2. It is due to WASMF, LFDF, ACARP, and ARP use static prefixed windows for the LFR radius, irrespective of noise conditions; in this case, the noisy peak area may place in this region and exclude this peak from restoration. Of course, ACARP and ARP show better performance because the LFR radius is relatively small in these methods. Also, in ASRF, the noise area is added to the boundaries of the LFR in the dilation process and is excluded from restoration.

As shown in Table 2, a higher PSNR value is not necessarily associated with a higher SSIM value. In other words, the method may have a higher PSNR and lower SSIM than the other, or vice versa. This will better capture the challenges of periodic noise reduction. Noisy components should be replaced by appropriate values after the restoration method to find the noise peaks. Otherwise, the brightness of the image may be affected. In this case, a restoration method has a higher value of the SSIM metric and a lower value of the PSNR. Obviously, this is more important for low-frequency noise due to the high values of the low-frequency region.

7.2 High-frequency Periodic Noise of Various Noise Strengths

In Table 3, high-frequency periodic noise structures are considered. In this case, the simulations are carried out on the images with noise pattern of Eq. 1 with \(u_0,v_0>20\). The simulation results are shown in Table 3. It is clear in Tables 2 and 3 that the restoration algorithms have better performance in high-frequency periodic noise fading.

When the bandwidth of the periodic noise increases, several rows or columns of the spectrum may be involved, so a restoration method with better detection and correction capabilities has a higher efficiency.

Table 3 Performance values of different methods for high-frequency periodic noise under various noise levels(\((\epsilon =0.08,power=10,\theta _1=0.5,\theta _2=9\times 10^{(-4)} )\))

The region growing approach in AGNF curbs the number of detected coefficients. In ASRF, the noise affected zone is limited by the position of the nearest fundamental peak and the DC component. This method is better to expand the correction of coefficients in rows and columns, but as the noisy zone has expanded across the spectrum, many coefficients undergo changes inevitably.

In addition, for increasing the noise power tends to decrease the performance of spatial-domain methods such as SMF and AONF regardless of frequency bands. Naturally, AMF1, AMF2, and WGNF may perform efficiently for a specific image-noise combination, but they are not adaptive.

7.3 Pure and Quasi-periodic Noise

In this step, pure periodic noise is added to the original images and the performance of the proposed method is evaluated. In this case, the simulations are carried out on the images with noise pattern of Eq. 1 with integer values for \(u_0\) and \(v_0\). The simulation results are shown in Table 4.

Periodic noise is detected as peaks in pure and quasi-periodic case. In pure case, the periodic noise affects only one frequency, and quasi-periodic case influences a set of frequencies.

The size of the filtering window in WGNF is not adaptive to noisy peak areas. This decreases the performance of this method for pure periodic noise. In ARP and ACARP, the noise peak is characterized in the average power spectrum which is smaller than the original spectrum size. Then, the outlier map is expanded by interpolation to match the size of the spectrum. The interpolation operation propagates filtering from bright spots to the surrounding area. It may fail to produce satisfactory results for pure periodic noise.

7.4 Stripping Noise

In this step, stripping noise structures are considered as a noise source. The simulation results are shown in Table 5.

Table 4 Comparison among different restoration algorithms for restoring sample images corrupted by pure periodic noise in terms of performance metrics (\((\epsilon =0.08,power=10,\theta _1=0.5,\theta _2=9\times 10^{(-4)} )\))
Table 5 Comparison among different restoration algorithms for de-stripping sample images corrupted by stripping noise in terms of performance metrics (\((\epsilon =0.08,power=10,\theta _1=0.5,\theta _2=9\times 10^{(-4)} )\))

Stripping noise signal always appears as spike along the vertical or horizontal axis in the Fourier domain. In this case, the simulations are carried out on the images with noise patterns of Eq. 1 with \(u_0=0\) and \(v_0=0\). De-striping requires more precision in the detection and correction of noisy frequencies. In this case, the filtering problem consists of removing the striping noise of the images without introducing any blurring effect or eliminating the horizontal/vertical components of the spectrum. So, only prominent peaks must be considered.

7.5 Multi-frequency Periodic Noise

In this case, the simulations are carried out on the images with noise pattern of Eq. 1 with \(s \subseteq {1,2,3,4,5}\). The simulation results are shown in Table 6. Qualitative evaluation of the restoration algorithms is shown in Fig. 6 for Lena image corrupted by multi-frequency periodic noise.

Table 6 Comparison among different restoration algorithms for restoring sample images corrupted by multi-frequency periodic noise in terms of performance metrics (\((\epsilon =0.08,power=10,\theta _1=0.5,\theta _2=9\times 10^{(-4)} )\))

Generally, the restoration algorithms work well for single frequency periodic noise, but multi-frequency periodic noise fading is a challenging problem. Most of the non-synthetic images are corrupted by multi-frequency periodic noise. In this simulation, the reference images are presented with additional multi-frequency periodic noise.

7.6 Periodic Noise in a Tonal Gradient Image

Periodic noise increases the value of one or more coefficients in the spectrum. If the noisy component is replaced by zero value, the damage to image frequency is notable. This effect may not be obvious in high-frequency noise condition, but the degree of damage may be severe in low-frequency noise. However, the compared methods used various correction approach to reinstate the noisy frequency. The result must preserve the dynamic range of the intensity values, accuracies and sharpness of the edges. In this simulation, a tonal gradient corrupted by synthetic periodic noise is considered. Qualitative results of the restoration algorithms are shown in Fig. 5.

One of the advantages of the proposed method is its noise-correction-manner framework. The main slogan is to filter out only a portion of the flagged component, and this portion is given by F-transform. Therefore, the tonal attributes of the restored image will be preserved. As depicted in Fig. 5, the proposed method preserves gray-scale values, while it removes the periodic patterns. In this case, F-transform helps to replace the noise coefficient by a proper value.

8 Non-Synthetic Periodic Noise

The performance of the proposed method is evaluated in a real situation. In this case, the images from various fields, corrupted with different types of non-synthetic periodic noise structures, are tested as a benchmark.

As the distortion-free reference image is not within reach, the performance evaluation metrics cannot be computed. Hence, the performance is compared only visually. Figures 7 and 8 show that our method outperforms the most recent state-of-the-art algorithms for non-synthetically corrupted images in real situations. Figure 9 shows the restored outputs of the proposed algorithm while restoring a few non-synthetically corrupted images.

9 Periodic Noise Removal in RGB Images

Spectral periodic noise reduction methods can easily generalize from gray-scale images to RGB images. For this purpose, image planes are separated from each other. Then, the periodic noise reduction method is applied to each separated plane. The final RGB image is obtained from the combination of these results. Figure 3 shows the restored outputs of the proposed algorithm while restoring the corrupted color image.

Fig. 3
figure 3

Periodic noise removal in RGB images using proposed method \((\epsilon =0.08,power=10,\theta _1=0.5,\theta _2=9\times 10^{(-4)} )\)

10 Noise-less Image

It is expected that the coefficients of the noise-less image spectrum will not be changed, particularly when dealing with adaptive periodic noise detection. The local structures of the original image must be well preserved. In this simulation, the reference images are considered and the performance of the proposed method is evaluated. The simulation results are shown in Table 7. In this table, “INF” denotes infinity, i.e., the restored image is the same as the reference image.

Table 7 Comparison among different restoration algorithms for restoring sample noise-less images in terms of performance metrics (\((\epsilon =0.08,power=10,\theta _1=0.5,\theta _2=9\times 10^{(-4)} )\))

While filtering permits to eradicate periodic noise, this requires first to discriminate between noise spikes and spectrum patterns caused by spatially localized textures or repetitive structures. It is important to note that the periodic structures and repetitive patterns are revealed as peaks at the spectrum. These peaks would be the weakness of the spectral methods.

11 Parameter Analysis

This section makes the parameter analysis of the parameters used by the proposed algorithm. The parameter \(\epsilon \) is used for ensuring that the descending function is above the uncorrupted version of the F-transformed spectrum. Figure 4a shows the average performance metrics values obtained from several restored images by varying noise strength and \(\epsilon \) values. In this research, the value of \(\epsilon \) is set to 0.08.

Fig. 4
figure 4

Parameter analysis on \(\epsilon \), \(\theta _1\), and \(\theta _2\)

The parameter \(\theta _1\) is used to ensure that a component is greater than its fuzzy transformed component. Since the peak center passes the previous step, the parameters \(\theta _1\) and \(\theta _2\) are used to extend substitution across adjacent components in rows and columns. More neighboring frequencies may be changed by increasing the value of these parameters. Figure 4b shows the average performance metrics values obtained from several restored images by varying noise strength and \(\theta _1\) values. In this study, an attempt is made to change the minimum frequency components. Therefore, experiments conducted by varying \(\theta _1\). The parameter \(\theta _1\) is selected 0.5 in this research.

Each noise component must be dominant over its counterpart component in the F-transformed spectrum, and the algorithm controls the domination intensity by parameter \(\theta _2\). The increase in this parameter gradually decreases this sensitivity. Hence, according to Fig. 4c, more neighbors may be changed, and the performance measures may be reduced. In this research, the parameter \(\theta _2\) is selected \(9\times 10^{(-4)}\).

It is noted that in all of the experiments of this section, different types of periodic noise (low frequency, high frequency, pure, stripping, and multi-frequency) considered and the average value of criteria reported. In addition, for testing each parameter, the other two parameters are considered fixed and the experiments are conducted.

12 Computational Complexity Analysis

Since the proposed method is a spectral method, it is necessary to compute the Fourier transform of the image. If fast Fourier transform is used, the complexity of this step would be O(MNlogMN) [11].

For a general type of partitions, the time consumption requirement is \(o(Sr(2^r+\log (n))\) for direct F-transform and \(o(r(2^r+\log (n)))\) for inverse F-transform [26] where r is the dimension of the original function domain that is to say the number of input variables. The frequency coefficients are presented in polar coordinates so, \(r = 2\). Also, S is the count of the sample in which the original function is known or simply the number of input data vectors. In order to speed up further, the proposed method makes use of the symmetric property of the Fourier spectrum. It processes the noisy peak area detection to the first two quadrants. So, \(S = (M \times N) / 2\), M, and N are the spectrum size.

Finally, n is equal to the maximal number of basic functions from individual dimensions and defined by

$$\begin{aligned} n = \bigvee _{l=1}^r n_l \end{aligned}$$
(28)

where \(\bigvee \) denote the maximum operator and \(n_l\) is number of basic functions in dimension l.

Low-frequency components with large amplitude are located near the center of the Fourier spectrum and higher frequency components with small values are located toward the edges of the Fourier spectrum. Notably, non-uniform partitioning was considered in the proposed method. \(\big \{ 2^i \big \},i=0,1,\dots ,\log _2(\max (\rho ))\) are considered as fixed nodes in the \(\rho \) dimension. In addition, a 10-uniform partition with \(\big \{ 10(j-1) ,j=1,\dots ,19 \big \}\) nodes is considered for the \(\phi \) dimension.

The number of noise coefficients of a spectrum is usually lower than non-noisy coefficients. If the computational complexity of the correction of these coefficients is assumed to be constant, the computational complexity of the algorithm is dominated by the Fourier transform. Therefore, the computational complexity of the proposed method is \(O(MN\log (MN))\).

Fig. 5
figure 5

Visual comparisons for different denoising algorithms for a synthetically corrupted tonal gradient image by periodic noise of strength \(a=1.3(\epsilon =0.08,power=10,\theta _1=0.5,\theta _2=9\times 10^{(-4)} )\)

Fig. 6
figure 6

Visual comparisons for different denoising algorithms for a synthetically corrupted sample image Lena by multi-frequency periodic noise\((\epsilon =0.08,power=10,\theta _1=0.5,\theta _2=9\times 10^{(-4)} )\)

Fig. 7
figure 7

Visual comparisons for different denoising algorithms for a non-synthetically corrupted image Clown \((\epsilon =0.08,power=10,\theta _1=0.5,\theta _2=9\times 10^{(-4)} )\)

Fig. 8
figure 8

Visual comparisons for different denoising algorithms for a non-synthetically corrupted image Moonlanding \((\epsilon =0.08,power=10,\theta _1=0.5,\theta _2=9\times 10^{(-4)} )\)

Fig. 9
figure 9

Real images corrupted by different non-synthetic periodic noise structures, and restored images using proposed method \((\epsilon =0.08,power=10,\theta _1=0.5,\theta _2=9\times 10^{(-4)} )\)

13 Conclusion

There is a various source of periodic noise and many studies have attempted to remove it from the images. However, there are still challenges about adaptive detection of noise frequencies and appropriate attenuation. This study showed that adaptive detection can be achieved by a compression method in which the content loss takes place in high-frequency positions. Moreover, in such a case decompressed result is smooth. However, the current findings suggest that F-transform smoothing property can be used as an attenuation factor for better restoration of noise frequencies. In this research, fuzzy partitioning was proposed in polar coordinates for the operation in the frequency domain. Experimental results in terms of subjective and objective metrics depicted that the performance of the proposed method in restoring periodic noise corrupted images is better as compared to the state-of-the-art algorithms used in the comparative study. Further work will be directed to the improvement of the developed solution. It is difficult to discriminate between noise peaks and spectrum peaks caused by spatially localized textures or repetitive structures. Furthermore, providing a dual-domain approach is one of the subjects of our future research. Further still, the proposed method is not a fully automatic method due to several parameters. As for the model to automate the parameters can be attempted as another future work by incorporating fuzzy, neural network, and optimization techniques.