Algorithm wiener2 lowpass-filters an intensity image that has been degraded by constant power additive noise. wiener2 uses a pixelwise adaptive Wiener method based on statistics estimated from a local neighborhood of each pixel.
wiener2 estimates the local mean and variance around each pixel where summation is over an area of N and M 1 X 1 area (N=1,M=1)
The filtered output is given by Note that the coefficient a depends on the position
RGB = imread(bush.png'); I = rgb2gray(RGB); J = imnoise(I,'gaussian',0,0.005); K = wiener2(J,[5 5]); figure, imshow(J), figure, imshow(K)
How to implement Wiener filter in one dimension? Our Wiener filter depends on only the current input, more generally we could develop an ARMA filter which is called Kaman filter and is widely used in many areas