Convolution is the operation at the heart of digital filters and convolutional neural networks: a small array of numbers, the kernel, slides across a signal and at each position computes a weighted sum of the samples it overlaps. That single sliding dot-product can blur, sharpen, or detect edges depending only on the weights chosen for the kernel.
The same sliding-window operation, generalised to 2D grids of pixels, is the core building block of convolutional neural networks (CNNs) used in modern image recognition — a 3×3 or 5×5 kernel of learned weights slides across an image exactly like the 1D kernel slides across this signal.
A kernel slides across a 3D input signal, computing a weighted sum at every position to build a filtered output signal one sample at a time.
Discrete convolution: the output at each step is the dot product of a small kernel with the samples it currently overlaps, and swapping the kernel's weights changes the filter's behaviour entirely.
Pick a kernel and an input signal, then watch the highlighted window slide across the back row while the front row fills in with the convolved result. Adjust slide speed or pause to inspect any step.
This same sliding dot-product, extended to 2D pixel grids, is the fundamental operation inside every convolutional neural network used for image recognition.