Salt & Pepper Noise and Median Filters, Part II – The Code

In my first post on salt & pepper noise (hereon s&p noise) and median filters I gave an overview what s&p noise is, why it occurs, and how we can tackle getting rid of it. As discussed, median filters are especially effective at removing s&p noise from images. At the end of the last post I promised to delve into the code behind generating an image with s&p noise and the filters to remove it. Read on for code extracts and explanations. Continue reading “Salt & Pepper Noise and Median Filters, Part II – The Code”

Salt & Pepper Noise and Median Filters, Part I – The Theory

Salt & pepper noise is a noise type in which the noise pixels are either black or white. This type of noise non-Gaussian i.e.┬áthe probability distribution of the noise is not normal. As we’ll see later, this has an effect on the type of filter we can use to get rid of it. Continue reading “Salt & Pepper Noise and Median Filters, Part I – The Theory”