We used Median Filtering method for
noise reduction. An alternative filter could be averaging filter but it
would distribute the noise to the non-noisy
pixels rather than reducing it.
In the median filter, as noisy pixel
is differs in value with respect to other pixels in the mask, after sorting,
it will be placed at the end or beginning of
the list and the median element will be the pivot element itself or
another pixel near to the pivot element in intensity.
We first tried 5-by-5 filter, which
resulted in good noise reduction but a very blurred image such that it
destroys the edges especially in artificial
images. Therefore, we agreed that a 3-by-3 filter leads to a better
result. We take its
element
as the median, since the noise value is supposed to be either
in the first or last position among the sorted values within the mask,
so the
element's value
is closer to its neighbors.
We then assign the median's value to
the pivot element each time shifting the filter.