Image denoising • Noise – collection of black & white pixels sprayed on the image. This noise is also known as salt & pepper noise, impulse noise, on-off noise.
Smoothing Image with Salt & Pepper noise
Median filtering Replace each pixel with the median grey-level value of a specified neighborhood of the pixel
Median filtering • What happens if we increase the Nbhd size. Original Image 3 x 3 7 x 7 21 x 21
Why only median? • Min filter – Use the smallest value in the Nbhd • Max filter – Use the largest value in the Nbhd Original Image Min filter 7 x 7 Max filter 7 x 7 • These are examples of order-statistics filters
Image sharpening spatial filters • To enhance fine details in the image for example lines, edges, points. • Opposite of smoothing an image. • Fine details = Discontinuities in pixel values. • Need operators that respond to discontinuities Differentiation!
Differentiation • Finite differences to approximate derivatives. • Given a function f(x), – the first order derivatives are:
First derivative (fwd diff)
First derivative (backward diff)
First derivative (central diff)
Second derivative • Finite difference approximation using central difference scheme for first derivatives:
Second derivative response
Observations • Second derivative enhances more finer details then the first derivative, incl noise. • To a constant gradient input the first derivative response would be constant and the second derivative response would be zero. • To a step input, the first derivative response approximates an impulse and second derivative response approximates a double impulse.