Convolution Principles

[Laboratory]

Concepts of Linear Systems and Convolution

Discrete Convolution is a tool to build any linear and shift invariant filter. The equation for the convolution, g(x), of the sequence f(x) with the convolution kernel h(x) is

displaymath175

h(x) is also called the impulse response, Point Spread Function PSF, window kernel, window mask, window, filter, or template. This formula can be easily extended to the 2D case.

Region of Support

We normally show the region of support of the convolution kernel. That is, the region where the kernel values are valid. The kernel values are zero outside the region of support.

There are two main types of convolution, depending on how we define the data: Linear Convolution and Circular Convolution.

  1. For the 1D case, let f(x) and h(x) be infinite sequences, with region of support of length N for f(x) and M for h(x), meaning that outside the region of support all the data pointns are zero. Then the convolution g(x) is said to Linear Convolution. The resultant sequence g(x) will also be infinite with region of support of length M+N-1.
  2. Again for the 1D case, if we define f(x) and h(x) as periodic sequences, with the same period N, then the convolution is said to be Circular Convolution. The resultant sequence g(x) will also be periodic with the same period N. In this case, outside the display of f(x), the data is periodically repeated, and outside the region of support of h(x), the data is zero extended up to the completion of one period with dimension N. Remember that h(x) is also periodic with same period as f(x).

Below are the illustrations on how the sequences are represented in both cases:

a)original image f; b)kernel h
a) b)

a)zero outside (for linear convolution); b)periodic (for circular convolution)
a) b)

a)3x3 kernel for linear convolution; b)3x3 kernel for circular convolution (periodic with same period as the image)
a) b)

Origin of a Convolution Kernel

When we define a convolution kernel, we do not always we have the origin of its coordinates positioned at the top left corner of its region of support. Normally, there is a shift in the resultant image if the origin of the convolution kernel is not at the center of its region of support. A simple name for the origin is "sweet spot".

Simple Examples of Convolution

Observe that if there is an isolated point (impulse) in the input image then the kernel appears reproduced in the filtered or output image.





Main DIP Menu
DIP Feedback Form
Copyright © 1997-1995 KRI, ISTEC, Ramiro Jordán, Roberto Lotufo. All Rights Reserved