Keywords: front-page

# Circular Convolution Theorem

[Laboratory]

It is possible to implement any linear and shift invariant filter using convolution. The circular convolution theorem states that circular convolution can be implemented by the DFT and vice-versa.

The illustration of this theorem is as follows

a)Original image; b)image convolved with Roberts kernel'
a) | b)

Robert's kernel

When this type of operation is performed, we say that the processing is in the spatial domain.

We can take the forward DFT of the original image, also take the forward DFT of the extended convolution kernel, then multiply them together to obtain the DFT of the resultant filtered image.

a)DFT of original image; b)DFT of the Roberts kernel
a) | b)

a)Multiplication of both DFTs; b)Inverse-DFT
a) | b)

When the processing is carried out by multiplying DFT's we say that the processing is done in the frequency domain.

To confirm the implementation algorithms (convolution and DFT), a subtraction is done between both results which is shown below:

difference between spatial and frequency filtering, max=1.14E-5

The small differences are due to truncation errors in the implementation. The maximum difference is 0.0000114 in this example.

### Conclusions

A consequence of the convolution theorem is that for any filter kernel in the spatial domain there is a correspondent filter in the frequency domain, and vice versa.

So when to use one or the other?

Computational speed indicates that convolution runs faster with smaller kernels and the DFT method runs faster if the kernel is large. What is small and large? Is there a threshold value for the size of a kernel?

In the case of filtering coherent noise the the design of the filter and latter processing is done in the frequency domain. Some simple operations like averaging, Gaussian filtering, Laplacian filtering, that use small kernels are frequently used in the spatial domain.

It is important to keep in mind that any linear and shift invariant filter can either be implemented using convolution or DFT tools.

- Lab: Circular Convolution Theorem