In the figure below when the image on the left was filtered
Solution
We can see that the filtering removed salt and pepper noise from the original image without any blurring.
if averaging filter is applied then salt and pepper noise will not be removed, rather a blurring effect will be present, which is not there. So, obivously it is not averaging filter.
Due to similar reasons, it is also not ideal low pass filter.
Guassian low pass filter induces less blurring effect but is not very effective at removing salt and pepper noise.
median filter is best for removing salt and pepper noise. So, in thhis case a median filter was used. (a)
The larger the size of the mask, the more number of pixels are compared and median value chosen from them to be set the pixel value of concerned pixel. So, as the mask for a pixels grows, the local nature of the pixel is removed hence salt and pepper noise will be removed more effectively. Hence it can be concluded, if the mask size is trippled then the image will be more smooth.
