Skip to content

Convolution

  • Applies a filter or kernel to an input by sliding the kernel and computing the sum of products at each position.
  • Used to transform signals or images, e.g., smoothing with a low-pass filter or highlighting edges.
  • Common technique in signal processing and image processing to extract important information.

Convolution is a mathematical operation that combines two functions to produce a third function. For two signals f(x) and g(x), the convolution is given by:

f(x)g(x)=f(t)g(xt)dtf(x) * g(x) = \int f(t)g(x-t)\, dt

In this equation, the asterisk symbol (*) denotes convolution, and the integral represents the sum of the product of f(t) and g(x-t) over a given range of t.

Convolution can be visualized as sliding the kernel g(x) over the input function f(x) and calculating the sum of the products of the two functions at each point. In discrete or sampled signals, this corresponds to computing the dot product between the kernel (filter) and overlapping segments of the input. The result is a new function or signal that is transformed by the applied filter.

Given two signals f(x) (the input) and g(x) (the filter or kernel), their convolution is:

f(x)g(x)=f(t)g(xt)dtf(x) * g(x) = \int f(t)g(x-t)\, dt

This represents summing the product f(t)g(x-t) over t while the kernel is shifted across the input.

If f(x) is a signal representing a series of discrete time-steps and g(x) is a kernel representing a low-pass filter, the convolution produces a new signal that is a smoothed version of the original input. The low-pass filter suppresses high-frequency components and retains low-frequency components, resulting in a smoothed output.

In image processing, the input is an image and the kernel is a small matrix of numbers (a filter). The filter is applied by sliding it over the image and computing the dot product of the filter and the overlapping image pixels at each position. This produces a new output image transformed by the filter.

For example, if the input is a grayscale image of a face and the kernel is an edge-detection filter, the convolution produces an output image that highlights edges, because the filter emphasizes regions with sharp changes in pixel intensity.

  • Signal processing for smoothing or frequency-based filtering.
  • Image processing for transformations such as edge detection.
  • Filter
  • Kernel
  • Low-pass filter
  • Edge detection
  • Signal
  • Image