Salt and Pepper impulse Denoising opencv
Can we consider these noises as salt and pepper noise.? Is there something else that I am missing?


several pixels getting erased to either zero or one -> yeah, that fits my definition of salt and pepper noise. However, there might be other definitions around, including assumptions of noise autocorrelation, and whether or not your noise fulfills these is impossible to answer without knowing what definition you want to follow.

Anyway, yeah, let's call this salt and pepper, doesn't hurt anyone, does it?


  What could be the better suggested method? Currently, I am planning to implement Switching Median filter by Pei-Eng et al, but I would like to know if this could be the right track.


I'd start by looking for pixels that are either exactly white or exactly black – those are your only candidates for noise pixels. Leave the rest alone.

Among these pixels, I'd look at the 8 neighbor pixels. If 3 or more of them are a similar intensity, keep the pixel. It's probably properly white or black.

For the other pixels, a good estimate is probably an average (instead of a median) of the 8 neighbors plus itself, weighing itself maybe a bit less. Generally, a continuation of the structure of the surroundings.

By the way, be careful not to be too smart – the observer of the denoised picture doesn't know you've denoised it, and wrong diagnoses based on overcorrected imagery are thoroughly possibly. (I've lost a bit of faith in the ability of different physicians to consistently diagnose based on the same MRI, but coming from a machine they don't know, after having done a signal processing project in medical diagnosis.)