Monday, October 12, 2009

ACTIVITY 19 Restoration of Blurred Image


In this activity, we demonstrate the degradation process and the restoration of the degraded image. A diagram is shown in Figure 1 to illustrate the process of degradation and then restoration of an image. The degradation part is equivalent to equation 1 where G, H, F and N are the Fourier transforms of the degraded image, degradation function, original image and noise, respectively. We used the model of motion blur as our degradation function (see equation 2). The assumption of this model is that the blurring is due to linear motion between the image and the sensor during image acquisition. In equation 2, T is the duration of the exposure, a and b are the total distances for which the image has been displaced in the x- and y-direction, respectively. In addition to degradation, noise was also introduced to the image in the form of Gaussian. The equation for this type of noise was already shown in the previous activity. The restoration process is through minimum mean square error (Weiner) filtering. Equations 3 and 4 give us the Fourier transform of the restored image. So, the restored image can be shown by getting the inverse Fourier of these transforms. Note that u and v are just the indices of the pixels in the image.

Figure 1.

Equation 1.

Equation 2.


Equation 3.

Equation 4.

Figure 1.

The following are the investigations I did in relation to the degradation and restoration of the image shown in Figure 1.

1.) The value of T in H (degradation function, equation 2) was varied.
Figure 2 shows the degraded and restored images for different values of T. As you can see, the only detectable difference in the images but not that obvious is that the image becomes whiter as the value of T is increased. This difference becomes more obvious when the images are restored as shown in Figure 2. This is because T is the duration of the exposure. So, the longer the time the image is exposed, the whiter the image will be.

2.) The values of a and b (same value) were varied.
Figure 3 shows the degraded and restored images for different values of a and b (same value). a and b are the total displacement in the x- and y-direction. So, the larger the values of these variables are,the more blurry the image will be. Moreover, the blurriness is equal in the two directions since a and b are equal. The more blurry the image is, the harder it is to restore. As you can see in Figure 3, the level of restoration decreases as the values of a and b increase.

3.) The values of a and b (different values) were varied.
Figure 4 shows the degraded and restored images when a and b (different values) were varied. Since a and b are not equal anymore, the blurriness is not the same in the two directions (x and y). As you can see, when a is larger(smaller), the degraded image appears to be stretched horizontally (vertically). Comparing the restored images, it can be observed that the lines (contour) of the texts are darker when a is larger than b.

4.) The standard deviation and mean in the Gaussian noise were varied.
Figure 5 shows the degraded and restored images for different values of the standard deviation and mean. The larger the value of these parameters are, the noisier the image is. Similar to the results of varying a and b but of equal values, it is harder to restore the image when it is noisier.

4.) The value of K in equation 4 was varied.
This time, we did not vary the degradation process but the restoration process. Figure 6 shows the restored images for different values of K. When the value of K is at extreme 0 or 1, the filter failed to restore the image. When it is near 0, the blurriness is removed but the noise remains. In fact, the noise already covers the entire image that it is not visible anymore. On the other hand, when it is near 1, the noise is removed but the image becomes more blurry. Thus, the value of K must be properly chosen to produce the best restored images. Compared to the restored image using equation 6, equation 7 produces images that are still noisy. This is because this equation assumes that the noise is spectral white. However, in our case, the noise we used is Gaussian. This is why equation 6 has better results because it is able to use the right noise.

Figure 2.

Figure 3.

Figure 4.

Figure 5.

Figure 6.

I would give myself a grade of 10 for this activity.