Monday, October 5, 2009

Activity 18 Noise models and basic image restoration

Just like any other measuring device or data gathering techniques noise is present in almost all forms of digital image acquisition. Noise, in general, is any unwanted aberration, random signal, or artifacts present in the image. Some of our previous activities already involved dealing with poor quality images using image enhancements. Previously we have used filtering in Fourier space, morphological operations, and even white balancing to improve the images. In this activity we will be using different image restoration methods to improve images with additive noise. In contrast to image enhancement, image restoration involves reversing the degradation process that produced the noise in the image. This means that a priori knowledge of the noise is important for a successful image restoration.

For this activity, we are tackling additive noise in the form of random variables following a specific probability distribution functions (PDF). We will be using six different noise models specifically: gaussian, rayleigh, gamma, exponential, uniform, and impulse noise.


Figure 1

There are many different types and methods of image restoration but in our case we will limit ourselves with spatial filters since they are most suited for additive noise. We will be using four types of filters namely, arithmetic, geometric, harmonic, and contraharmonic mean filters. With this filters we are basically changing the pixel values using the information provided by the image. All of this filters work by considering a subimage window centered at pixel(x,y) and using all the values within this window to calculate the new value of pixel(x,y) (figure 1). Equation 1 shows the formula followed by the arithmetic mean filter. This filter replaces the pixel value with the average of all the values in the window. On the other hand the geometric mean filter uses the product of all the values and takes its Ath root where A is the total area of the window (equation 2). The harmonic and contraharmonic mean filters follows equation 3 and 4 respectively.



Equation 1

Equation 2


Equation 3


Equation 4

In this activity we first create a noisy image by adding noise to a grayscale image then apply a restoration filter. We do this for each of the noise types and each of the restoration filters. Furthermore, to aide us in assessing our results we also take the histograms of all our images before and after restoration.

Figure 2 to 7 shows the result of applying the different restoration filters for each of the six noise types. It is clearly seen that even though the result is slightly more blurred it is actually much closer to the original image. This is further highlighted by looking at the image histograms. The histograms of the restored images are much closer that of the original image. The broadening or shifting introduced by the noise was greatly reduced by all the restoration filters. The minor blurring is simply due to the windowing; that is a smaller window results in less blurring but sacrifices the efficacy of the restoration. Here we used a 5x5 pixel window for a 256x256 pixel image.

Figure 2 Figure 3

Figure 4 Figure 5


Figure 6 Figure 7

However, looking at figure 7, we see that the restoration processes don't seem to negate the effect of the impulse (salt and pepper) noise. comparing the images we see very little to no improvement after implementing the arithmetic and geometric mean filters. Furthermore, looking at the histograms we even see that the restoration process degraded the image. The only semblance of improvement we can see is that the harmonic filtering and contraharmonic filtering with negative Q were both able to completely remove salt noise but not pepper. On the other hand using the contraharmonic filter with positive Q removes pepper noise but not salt.

We also did this whole procedure for a real grayscale image obtained from the internet (figure 8).

Figure 8
Overall this activity has been very enlightening and the results were very convincing. We were able to show that the different spatial filters are indeed useful for image restoration except for salt and pepper noise. I give myself a grade of 10 in this activity.

Main Reference:
AP186 "A18 – Noise models and basic image restoration", 2009


No comments:

Post a Comment