Every CNN starts with one humble move: slide a tiny grid of numbers — a kernel — across an image, multiply, add, write down the answer. That's convolution, and it's the entire trick. Blur, sharpen, find edges: all the same operation with different numbers in the grid. Hover the image below and watch the arithmetic happen, one pixel at a time.
Each output pixel is a weighted sum of the 3×3 input patch around it: line the kernel up on a pixel, multiply each of the 9 input values by the kernel number sitting on it, add the 9 products — that sum is the output pixel. Then slide one pixel over and do it again, everywhere. The kernel never changes as it slides — the same 9 weights judge every neighborhood in the image. Pick a kernel, then hover (or drag on) the left image to see the exact patch × kernel arithmetic for that spot.
Blur says "be the average of your neighborhood" — all nine weights equal, summing to 1, so flat areas pass through and sharp details get smeared. Sharpen says "be yourself, amplified, minus your neighbors" — it boosts wherever a pixel differs from its surroundings. Edge (the Laplacian) drops the "be yourself" part entirely: weights sum to zero, so any flat region — bright or dark — outputs black, and only change survives. And Sobel is Phase 2 calculus in a trench coat: right column positive, left column negative is literally a discrete ∂brightness/∂x — a derivative, computed by sliding. Vertical edges (the house walls) light up under Sobel ↔ but vanish under Sobel ↕; the horizon does the opposite. Edit any cell in the kernel grid and invent your own.
For 40 years, computer vision meant experts hand-choosing these grids — Sobel for edges, Gaussian for noise. The CNN revolution is one idea: make the 9 numbers learnable weights and let backprop decide what to detect. Given data, the first layer of a trained CNN rediscovers edge and color detectors on its own — nobody tells it to. Later layers convolve the outputs of earlier ones, building corners from edges, eyes from corners, faces from eyes. You'll watch that pipeline run in the CNN explainer next.
Curated companion: Setosa — Image Kernels.