Computer Vision Starter · free course

Free course · Lesson 4 of 5

Filters and Edges

In this lesson you will

  • Explain how a filter slides over an image
  • Describe how edges are detected

A filter slides a small grid of weights, called a kernel, over the image. At each position it multiplies the weights by the pixels underneath and adds them up. Different kernels blur, sharpen or find edges, and the same idea is used by the convolution layers of deep networks.

  • Blurring (Gaussian or median) reduces noise; median blur removes specks while keeping edges.
  • Sobel kernels measure how fast brightness changes from left to right or from top to bottom.
  • Canny turns those changes into thin, connected edge lines using two thresholds.

Practical Skill: Edge maps can highlight possible cracks in walls or roads, but they help an engineer look. They cannot decide whether a structure is safe.

TemplateOne Sobel Step by Hand
Worksheet
3 x 3 patch across a dark-to-bright edge     Sobel x kernel   20   20  200                                 -1  0  1   20   20  200                                 -2  0  2   20   20  200                                 -1  0  1 Sum of (patch x kernel):  (-1)(20) + (1)(200) + (-2)(20) + (2)(200) + (-1)(20) + (1)(200)  = -20 + 200 - 40 + 400 - 20 + 200 = 720      ->  strong vertical edge A patch that is all 20s (or all 200s) gives 0: no edge.

Practice exercise

Using the worked example, compute by hand the Sobel x response for one 3×3 patch that contains the dark-to-bright boundary.

Key takeaways

  • A filter multiplies a small grid of weights with each image patch
  • Edges are places where brightness changes quickly
In the full program Module 4: Image Filtering and Edge Detection See how this topic is taught in depth, with practical activities and an assessment.

Free self-study lesson — no certificate. For the full instructor-led program, see registration options.