Skip to content
Search

Convolution

lastmod 2026-09-30created 2015-09-0122 edits

Convolution is a mathematical operator that multiplies one function by another function that has been reversed and shifted, and then integrates over an interval to obtain a new function.

When the input signal and the impulse response of a system are given and you want to find the output signal of a linear system, you need to evaluate an integral of a special form over the input function and the impulse response function; this form of integral is called the convolution integral. To find the output signal of a linear system in the time domain, you must always compute the convolution integral of the input signal and the impulse response signal. If the output signal is given in a form other than the convolution of the system's input signal and impulse response signal, the system can be regarded as not being a linear system.

If you take the Fourier transform of a linear system's input signal, impulse response, and output signal and work in the frequency domain, the convolution form in the time domain appears as a product in the frequency domain; this is called the convolution theorem.

Definition

Given two functions \(f\,\) and \(g\,\), the convolution of the two functions is written in mathematical notation as \(f * g \,\).

  • \(f\,\): input function.
  • \(g\,\): characteristic function.
  • \((f * g ) = y\,\): output function.

The convolution operation means reversing and shifting one of the two functions f and g, then integrating the result of multiplying it with the other function. In mathematical notation, this is written as follows.

\[ (f * g )(t) = \int_{-\infty}^\infty f(\tau) g(t - \tau)\, d\tau \]

Alternatively, if f is reversed and shifted instead of g, it can be written as follows. The two operations differ in form but give the same result.

\[ (f * g )(t) = \int_{-\infty}^\infty f(t - \tau) g(\tau)\, d\tau \]

In the integrals above, the integration interval depends on the ranges over which f and g are defined.

Also, given two random variables X and Y with probability density functions f and g respectively, the probability density function of X+Y can be written as \(f * g \,\).

Meaning

The composition (product) of a function \(f\) and its reversed function \(f'\) is 1. That is, all properties end up with the same value.

\[ f(x)f'(x) = (5) \cdot (\frac{1}{5}) = 1 \]

Shifting this property while computing the integral (area) makes only the specific components stand out.

Definition in image processing

Also called spatial filtering (Spatial Filtering); in short, it is described as rubbing, sweeping, or masking (Masking) a fixed matrix over an image.

Used to find out the characteristics of an image or data.

Image_processing_-_convolution.jpg

In OpenCV, use the cv2.filter2D function.

Convolution Integral

(Continuous systems) Convolution integral (Convolution Integral, superposition integral).

Discrete-Time Convolution

Convolution_of_box_signal_with_itself2.gif

For complex-valued functions f, g defined on the set Z of integers, the discrete convolution of f and g is given by:

\[ (f * g)[n]\ \stackrel{\mathrm{def}}{=}\ \sum_{m=-\infty}^\infty f[m]\, g[n - m] \]

Discrete-Time_Convolution_Array.png

Example

See also

Favorite site

References


  1. Discrete_time_convolution.pdf ↩

  2. Example_of_2D_Convolution.pdf ↩

  3. Playing_with_convolutions_in_Python.pdf ↩

author Zer0 sitemap