This example shows how to remove salt and pepper noise from an image using an averaging filter and a median filter (medfilt2) to allow comparison of the ...
www.mathworks.com