Filtering

Convolution with kernels and padding, blurring and noise removal with mean, Gaussian and median filters, and edge detection with Sobel gradients.

About 5 hours of study

Learning objectives

Lessons

  1. 1

    Convolution and kernels Intermediate

    Slide a small grid of weights over an image and add up the products: that one operation blurs, sharpens and finds edges. Learn kernels, output sizes, borders and padding, and the difference between correlation and true convolution.

  2. 2

    Blurring and noise removal Intermediate

    Real images are noisy. Compare the mean, Gaussian and median filters, see why the median removes salt-and-pepper noise without smearing it, and build a separable Gaussian blur from its formula.

  3. 3

    Edges with Sobel gradients Intermediate

    Edges are where brightness changes quickly. Measure that change with the Sobel kernels, combine it into a gradient magnitude and direction, and thin thick edges the way the Canny detector does.

Module practice

Module quiz

1. What is each output pixel of a filter?
2. Which filter suits salt-and-pepper noise best?
3. What padding keeps a 5 x 5 kernel's output the same size as the input?
4. What does the Sobel gx kernel respond to?
5. Why is a Gaussian blur usually applied before edge detection?
6. A kernel is not symmetric. How does true convolution differ from correlation with it?

‹ Images as dataFinding shapes ›