Convolution & Filtering

Sliding one signal across another and integrating their overlap โ€” the operation behind every linear filter, from blurring an image to an audio equalizer.

Convolution slides a kernel across a signal and writes one output for each window
001123324451627001.3122332.342.351

Smoothing kernel

[1/3, 1/3, 1/3]

This moving-average kernel replaces each local neighborhood with its average.

window 2
Definition

Convolution combines two signals by sliding one (the kernel or filter) across the other, multiplying overlapping values and summing the result at each position. It's the mathematical operation behind every linear filter: smoothing an audio signal, blurring or sharpening an image, and detecting edges all reduce to convolving with the right small kernel.

A simple smoothing filter

Convolving a signal with the kernel [13,13,13][\frac13, \frac13, \frac13] replaces every value with the average of itself and its two neighbors โ€” a basic moving-average smoother that reduces noise at the cost of blurring sharp changes.

Try it

What would convolving an image with the kernel [0,1,0][0, 1, 0] (a single 1 in the middle, zeros elsewhere) do to the image?

Solution

Nothing โ€” it's the identity kernel. Multiplying by 1 at the center and 0 elsewhere just copies each value unchanged, leaving the original signal exactly as it was.

Related concepts