Convolution: the 3×3 grid where machine vision begins
Draw a shape and watch a tiny 3×3 filter find its edges, blur it, or sharpen it. It is the exact operation that powers convolutional neural networks.
This week the machine learns to see. The perceptron drew a line, the Markov babbler counted words, and tic-tac-toe searched a game tree. Today’s toy does the one thing every image model does first: it filters pixels.
The gadget below is a convolution playground. Draw something in the left box (or hit Load demo), pick a filter, and watch the right box update. Each filter is a tiny 3×3 grid of numbers called a kernel. The machine slides that kernel over every pixel, multiplies the nine neighbors by the nine numbers, adds them up, and writes the result. That single operation, repeated across the whole image, is convolution.
Try this:
- Leave the filter on Edge detect and load the demo. The solid shapes collapse to just their outlines. The filter reacts to change: flat areas go dark, borders light up.
- Switch to Blur, Sharpen, or Emboss and watch the same drawing transform. The little grid in the middle is exactly the math being applied.
- Draw your own scribble and see what each filter keeps and what it throws away.
Why edges matter
Finding edges sounds humble, but it is the foundation of computer vision. An edge is where something changes, and objects are mostly made of edges. Stack many convolution filters and the early ones detect edges, the next ones combine edges into corners and textures, and later ones assemble those into eyes, wheels, or cats.
The idea that woke up in 2012
Convolution in image processing is decades old. What changed was scale. In 2012, AlexNet stacked convolutional layers on GPUs and crushed the ImageNet challenge, kicking off the deep learning era. Under the hood it is the same move you are doing here: a small neural network kernel sweeping across an image. The twist is that a real network does not use hand-picked kernels like these. It learns the nine numbers from data, millions of times over.
So the humble 3×3 grid is where machine vision begins. You draw; the filter decides what is worth noticing.
Missed the earlier editions? Train a perceptron, watch a Markov chain babble, or lose to unbeatable tic-tac-toe.