WienerFilter
- class eyefeatures.preprocessing.smoothing.WienerFilter(x, y, t=None, pk=None, K=4.3e-05, sigma=0.2, size=11)[source]
Bases:
BaseSmoothingPreprocessorWiener filter. Applied independently along ‘x’ and ‘y’ axis.
Algorithm
This filter assumes the following model of distortion:
where \(f\) is true signal, \(h\) is distortion signal, \(*\) is convolution operation, \(s\) is noise, and \(g\) is distorted signal (observed signal). Wiener’s approach considers input signal and noise as random variables and finds estimator \(\hat{f}\) which minimizes the variance of \(\hat{f} - f\). It could be shown that in the underlined model the minimum is achieved (in Fourier frequency domain) at:
where
\(\hat{F}(x)\) - Fourier-image of \(f\).
\(H(x)\) - Fourier-image of distorting function \(h\).
\(\overline{\cdot}\) - complex inverse.
\(|\cdot|\) - complex modulus.
\(K\) - approximation constant.