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.
Definition
Section titled “Definition”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:
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.
Explanation
Section titled “Explanation”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.
Examples
Section titled “Examples”Convolution of two signals
Section titled “Convolution of two signals”Given two signals f(x) (the input) and g(x) (the filter or kernel), their convolution is:
This represents summing the product f(t)g(x-t) over t while the kernel is shifted across the input.
Smoothing with a low-pass filter
Section titled “Smoothing with a low-pass filter”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.
Image processing with a filter kernel
Section titled “Image processing with a filter kernel”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.
Use cases
Section titled “Use cases”- Signal processing for smoothing or frequency-based filtering.
- Image processing for transformations such as edge detection.
Related terms
Section titled “Related terms”- Filter
- Kernel
- Low-pass filter
- Edge detection
- Signal
- Image