CMPE 464 Project 4:
Given: Three images, lena.bmp, lenag.bmp, lenai.bmp
Required:
Write programs to implement the following techniques:
1.
Apply linear filtering to the noisy images, lenag.raw and lenai.raw.
Use two different filters: A square-shaped averaging filter and a gaussian
filter. The filter window size user be user-selectable. Note that in each case,
the filter kernel should sum to one. That is, the output pixel value should be
divided by the sum of the values in the kernel. At the edges, assume that the
image extends outside. Assume that the values outside are the same as the
closest pixels inside. (This is equivalent to appending a number of rows and
columns at the top, bottom, left and right).
2.
Apply nonlinear filtering to the noisy images, lenag.raw and lenai.raw.
Use two different filters: A square-shaped standard median filter and a square
shaped alpha trimmed mean filter. The filter window size and alpha for the alpha
trimmed mean should be user-selectable.
In each case, find the mean sqared error(MSE) and
tabulate MSE values. MSE is defined as the average squared error between
corresponding original image pixels and filtered noisy images.
Take
printouts of the outputs in each case and discusss:
·
The effect of linear filtering on two types of noisy images
·
Averaging filter vs. gaussian filter – which one do you prefer?
·
The effect of linear filter size
·
The effect of nonlinear filtering on two types of noisy images
·
Median vs. weighted median – do you see advantages with weighted
median? Which weights are best?
·
The effect of filter size