Lecture 8 Spatial filtering Image denoising Noise collection

  • Slides: 14
Download presentation
Lecture 8 Spatial filtering

Lecture 8 Spatial filtering

Image denoising • Noise – collection of black & white pixels sprayed on the

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

Smoothing Image with Salt & Pepper noise

Median filtering Replace each pixel with the median grey-level value of a specified neighborhood

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

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

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

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

Differentiation • Finite differences to approximate derivatives. • Given a function f(x), – the first order derivatives are:

First derivative (fwd diff)

First derivative (fwd diff)

First derivative (backward diff)

First derivative (backward diff)

First derivative (central diff)

First derivative (central diff)

Second derivative • Finite difference approximation using central difference scheme for first derivatives:

Second derivative • Finite difference approximation using central difference scheme for first derivatives:

Second derivative response

Second derivative response

Observations • Second derivative enhances more finer details then the first derivative, incl noise.

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.