In this activity, the objective is to demonstrate restoration of an image corrupted with a known degradation function (in this case, motion blur) and additive noise. [1]
A grayscale image containing text was copied from the web and corrupted by applying motion blur and noise, following the equation:where f(x,y) is the original image, h(x,y) is the blurring (degradation) function, n(x,y) is the added noise. Or in Fourier space, the corrupted image is given by:
where G,H,F, and N are the Fourier transforms of the corresponding terms in the previous equation [1].
The degradation function is modeled by the equation:where a and b are the total distance for which the image has been displaced in the x- and y-direction and T is the total time of displacement [1].
The image is restored by Weiner filtering or minimum mean square error filtering or least square error filtering by applying the following equation, which gives the frequency-domain estimate of the restored image:where:
H(u,v) is the degradation or blurring function
|H(u,v)|^2 = H(u,v)* H(u,v)
Sn(u,v) = |N(u,v)|^2 (power spectrum of the noise)
Sf(u,v)| = |F(u,v)|^2 (power spectrum of original image)
Most of the time, the power spectrum of the original image is unknown, in which case we apply the other form of the Weiner filter given by:where K is a specified constant.
The original image (left of the divider) is blurred by applying the degradation function (where a=b=0.1 and T was varied) and Gaussian noise was added. The restored images are shown below (right side of divider).
All the images above are restored assuming the power spectrum of the undegraded image is known. We can see that as long as the power spectrum of the original image is known, the image can be restored quite well no matter how the image was degraded.
Now we look at the effects of varying a and b to the restoration. Shown below are the restored images blurred with varying a and b.
We can see that varying a and b has minimal effect on the restoration, as long as the power spectrum of the undegraded image is known.
What if we do not know the power spectrum of the original image? We try to predict the value for K. Shown below are the restored images using different values of K.
Restoring the corrupted image without knowledge of the power spectrum of the original image proved to be more difficult. Different K values were tried out, and it was observed that starting from K=0.001 below, the image is restored quite well. But for values greater than K=0.001, the restored image is still blurred.
Problems encountered:
I, as well as other classmates, had trouble displaying the blurred image. The resulting image which was supposedly corrupted with motion blur did not display the expected blurred image with streaks but instead showed a superposition of the "initial and final frames" of the supposedly blurred image. However, the information contained in the array in the program seems correct, because reconstruction was done successfully. The problem is just in displaying the blurred image.
I give myself 9 points for this activity. I would like to thank Thirdy Buno for useful discussions.
References:
[1] A19 - Restoration of blurred image - Dr. Maricor Soriano
0 comments:
Post a Comment