Wednesday, September 16, 2009

Activity 18: Noise Model and Basic Image Restoration

In this activity, we are to model noise on a three-value grayscale image and restore those images using different filters.


NOISE MODEL

The noise model used were Gaussian, Rayleigh, Erlang or Gamma, Exponential, Uniform, and the Impluse or Salt and Pepper noise, the probability distribution function of each are shown below:




Rayleigh Noise was modeled using the genrayl function in the modnum toolbox. Salt and Pepper Noise was modeled using the function imnoise and the rest were modeled using the function grand. To verify the added noise, we examined the histogram of each resulting image. It is expected that the histogram follows the shape of the noise added and since we have 3 grayscale values, we will see 3 peaks depending on the parameters used and the interval between the grayscale values. Note that a convolution of the 3 peaks will be observed for smaller grayscale value intervals. Shown below are the histogram of the original image and the images with noise and the corresponding images on the inset.







IMAGE RESTORATION

After noise modeling, we restore the images by using different filters. We apply the filters to mxn (3x3, for my case) subimage window gi centered at point (x , y) and let it run through the whole image. Four filters were used in this activity and these are shown below:



Applying the above filters (in order as that above), the following images resulted:







Salt and Pepper







It is seen that Q>0 in the contraharmonic filter indeed minimizes pepper noise more, Q<0 eliminates the salt noise more, and Q=0 minimizes both salt and pepper noise. For this activity, I give myself a 10/10 since the objectives of the activity were met. Thanks to Jaya for helping me debug my code and Gilbert and Earl for the help.

No comments:

Post a Comment