Shown below are the original image and the same image after it has been corrupted by noise.
Original Image Noisy ImageFor reducing the effect of the noise, a technique that uses median filtering is selected. Two median filtering implementations have been selected. The first filter utilizes the histogram of a user-specified window to determine the median value. The second type of filter implements a quick sort of the pixel values within a user-specified window to determine the median value. The quick sort runs faster for a smaller neighborhood and the histogram runs faster for a larger neighborhood.
The resulting filtered images are shown below where the size of window selected is 3x3.
Histogram Median Filtered Quick Sort Median FilteredNOTE: Observe the tradeoffs between noise reduction and the sharpness of the image when the window size is increased. Shown below are the results of filtered images using the quick sort method and with window sizes 5x5 and 7x7 respectively.
Quick Sort Median Filtered (5x5) Quick Sort Median Filtered (7x7) .