Monday, October 12, 2009

A19 Restoration of Blurred Image

--- brown out bakit mo binura files ko.

In the previous activity, we restored images that have additive noise.
Now we add another kind of degradation which is the motion blur.

The degradation/restoration process can be described by the following model.

Degradation can be represented as a function (H) that acts on an image f(x,y) and together with an additive noise, transforms it to a degraded image g(x, y). The goal is then to generate restoration filters that will transform the degraded image to an estimate of the original image f_hat(x,y).

In the spatial domain, the degradation process is a convolution with the image.

Therefore in the frequency domain it can be written as
MOTION BLUR

Suppose that this degradation is due to the uniform linear motion between the image and the sensor or camera. Then the camera would have captured the image motion in the duration of the exposure time T.
The blurred image can be expressed in Fourier space as
The degradation transfer function would then be computed using
where a and b is the total distance for which the image has been
displaced in the x- and y-direction, respectively. (Note: xo(t) = at/T and
yo(t) = bt/T)

WEINER FILTERING

This method considers images and noise as random processes and tries to minimize the MSE between orignal f and restored f_hat images using the following expression known as the Weiner filter

where
Assuming that the noise is just white noise and therefore constant, we have

Now for the application of the concepts....

For our original image we use

http://imageedit.infobind.com/examples/grayscale.jpg

Next we degrade the original image by blurring (transfer function given by Eq5) and adding Gaussian noise (Activity 18). We can get the degraded image using Eq2.

The parameters a, b, and T will determine the velocity of the motion in the x and y direction: vx=a/T and vy=b/T. Of course, increasing the velocities would just make the image more blurry as shown in the following images.

Doing the restoration using the actual noise pdf ( eqn 6 ), we get the following results.
Of course, the more blurred an image is, the less perfect the restoration. However we note that even for a=b=0.1 blurring, when image is no longer recognizable, filtering was still able to salvage some of the lost data.


Now we compare the results when we just assume white noise (Eq 7). As expected. better results were obtained when we did not assume white noise. K=0 results to almost all noise images. The filtering improved when K=0.001 and increasing K further does not seem to result to better restorations.


In this activity, I was able to do reconstructions of very blurry images so I give myself a grade of 10.


No comments:

Post a Comment