Convolution and Image Filters — lecture notes
Slide a small grid of numbers over an image, multiply and add. See edge-detection, blur and sharpen filters computed cell by cell.
0:001. Introduction

Blurring a photo, sharpening it, finding its edges, and even the first layers of deep networks, all use one operation: convolution.
0:092. An edge filter

The image on the left is dark on the left and bright on the right. The kernel is a three by three grid of numbers. We place it over a patch, multiply each pair of numbers, and add them up. Then slide one step and repeat. The feature map lights up with 27s exactly where dark meets bright: the filter has found the edge.
0:333. Blur

Now a blur filter: every weight is one, and we divide by nine, so each output is the average of its neighbourhood. The sharp jump from 0 to 9 becomes a gentle ramp: 0, 3, 6, 9.
0:494. Sharpen

A sharpen filter does the opposite. It boosts the centre pixel and subtracts its neighbours, exaggerating differences. Around the edge we get minus 9 on the dark side and 18 on the bright side, making the edge stand out.
1:065. Key ideas

The key ideas. A kernel is a small grid of weights. At each position we multiply and sum. Different kernels find different patterns. And in convolutional neural networks, the kernels are learned from data, not designed by hand.
1:236. Recap

To recap. Slide, multiply, add. Edge kernels respond to brightness changes, blur averages, sharpen exaggerates. And CNNs learn their own kernels.
Key takeaways
- Convolution slides a kernel over an image, multiplying and summing at each position.
- Edge kernels respond strongly where brightness changes (27s at the edge in the demo).
- Blur averages neighbours (0, 3, 6, 9 ramp); sharpen exaggerates differences.
- CNNs learn kernel values from data.
Check yourself
- What happens at each position in convolution?
Show answer
Multiply kernel and image values, then add them up — Each output is a weighted sum.
- What does a blur kernel with all 1s (÷9) compute?
Show answer
The average of the 3 × 3 neighbourhood — Equal weights divided by 9 give the mean.
- In a CNN, where do the kernel values come from?
Show answer
They are learned during training — Training adjusts the kernels like any other weights.
Go deeper
- Image Processing Fundamentals: Filtering, Convolution and Edge Detection · The AI Lecture Hall
- Convolutional Neural Networks: The Core Ideas · The AI Lecture Hall
© 2026 Janin A Apurba, CSE, AUST · Advanced ICT Officer, CNRS-UNHCR. All rights reserved. Notes for the animated lecture at https://ai-in-motion.vercel.app/watch/convolution-and-image-filters.html