-
Notifications
You must be signed in to change notification settings - Fork 3
Wiener Filter
The objective of this application is to restore an image that has been affected by noise. In this application the user can add a Gaussian white noise to the original image and later recover the image by applying a Wiener Filter. In order to obtain the desired result, we need to simulate the Wiener Filter definition:
The most important technique for removal of blur in images due to linear motion or unfocussed optics is the Wiener filter. With this graphical interface, the Gaussian noise level that the user wants to introduce to the image can be regulated by using the “Noise Level” slider. As the slider is being moved, the image also varies by showing an increase or decrease in the amount of noise it presents. By default, the first image that appears has imperceptible noise, but after moving the slider the noise can be easily detected.
The following code was used to add/modify the noise being added to the image:
However, the purpose of this application is to filter a noisy image, meaning to remove as much as possible Gaussian noise from it. The image will not be perfect as it was at the beginning, but the Wiener filter does work efficiently enough to provide the best estimated signal with respect to the squared error averaged applied over the original image. The Wiener Filter is the best option to minimize the mean squared error and to solve the the problem in image restoration. By modifying the Kernel size the Wiener filter will show a different performance. The larger the Kernel the better the effect of the filter over the image. This change can be seen on the second image as the "Kernel Size" slider is being regulated.
To implement the filter with this Kernel function the following code was used: