A convolutional neural network never looks at a whole image at once. Instead, a small matrix of learned numbers — the kernel (here 3×3) — slides across the image one position at a time. At every stop it multiplies its weights against the patch of pixels underneath, sums the result, and writes a single number into the output feature map. The left grid is the input image, rendered as a height field where taller/brighter columns are brighter pixels. The right grid is the feature map being built in real time as the orange scan window sweeps the input.
The classic Sobel edge kernels used here date back to 1968, decades before deep learning existed — CNNs simply learn kernels like these automatically from data instead of having them hand-designed.
A 3×3 kernel slides across a pixel-height image grid, computing a dot product at every stop to build a feature map cell by cell — the sliding-window mechanism that powers every convolutional layer in a CNN.
The left grid renders an image as a height field; the orange window is the kernel scanning it. Each scan step multiplies the nine kernel weights against the nine pixels beneath it, sums them, and writes the result into the matching cell of the feature map on the right.
Pick a kernel (edge detector, sharpen, blur, emboss) and an input pattern, then watch the feature map fill in live. Adjust scan speed and relief height, or pause and restart the sweep at any time.
A single trained CNN layer typically runs dozens of different kernels over the same image in parallel, each producing its own feature map — stacked together they let deeper layers combine simple edges into complex shapes.