2 dimensional convolution

The two image oen wishes to convolute are each 256*256 pixels 8 bits gray scales and display:
• A Gaussian function (spread peak) centered on pixel (100,150)
• A set of 4 Dirac peaks centered on (0,0), (0,50), (100,0) et (75,50) with respective heights 1, 0.75, 0.5 et 0.25. Gaussian function centered on (100,150) Set of 4 Dirac peaks (the 4 white points close to the  top left corner)

The convolution of these two image is obtained by appying succesively the Gaussian function to each of the four Dirac peaks, taking into account their heights. The peaks at (0,0) {at the exact top-left corner}will not modify the Gaussian function : one obtains a Gaussian centered on (100,150) and of same height (weight = 1), as in the original image; the Dirac peak at (0,50) creates a second Gaussian function centered on (100,200) = (100,150)+(0,50) of smaller height (because its weight is only 0.75); the Dirac peak at (100,0) creates a third Gaussian on (200,150)=(100,150)+(100,0) of half height compared to the original one; finally, the last Dirac peak leads to a fourth Gaussian at (175,200)=(100,150)+(75,50) of height 1/4 of the original one: Convolution of the Gaussian function with 4 Dirac peaks

If the two images (functions) are simple, their convolution can be done 'at hand' as in the previous example , by 'applying' the images one to the other. The 'aaplication' of image 1 on image 2 or image 2 on image 1 leads to the same result: the convolution is a commutative operator.

Mathematically, the convolution of two one dimensional functions f(t) et g(t) is defined by: One example

The convolution phenomenom is present is almost every data recording.
For example, one whishes to digitalize the text 'Hello' written on a white paper sheet. For that purpose, one scans this text page with a light beam delimited by a rectangular aperture and one records the intensity of the light reflected by the paper (one assumes that the black text absorbs the light whereas the white paper is absolutely reflecting): The text written on a paper sheet is digitalized with a beam light of rectangular section The text one wishes to digitalize The slit delimiting the light beam used to digitalize the text (white rectangle at the top-left corner)

The image of the text obtained by such a process will not be a faithfull copy of this original object, but will be spread: it results from the convolution of the shape of the original object with the shape of the light beam: Digitalized text: convolution of the orignal text with the shape of the slit of the scanning device

This example show that techniques used to observe an object can lead to images that are not faithfull to the original object; it is then important to know these effects, and in our example it is possible to correct them, because one knows the slit shape.

In order to perform this correction, one uses the convolution theorem: the unalterated image will be obtained by calculating the inverse Fourier tranform of the ratio between the FT of the alterated image and of the FT of the slit:

First one calculates the FT of the alterated text:  Digitalized text alterated by the shape of the scanning device & its Fourier transform

From the shape of the scanning slit one deduces its Fourier transform:  Slit used to digitalize the text & its Fourier transform

One calculates the ratio between the FT of the alterated text and the FT of the slit, followed by an inverve FT:  Ratio of the FT of the alterated text and the FT of the scanning slit & its inverse Fourier transform (right)

One obtains effectively the original unalterated text.

This particular example works perfectly (i.e. the reconstructed final image is the same as the original one) because in order to produce the modifed (alterated) text one used a convolution (i.e. exactly the inverse procedure we used together to deconvolute this alterated text!). In practice this deconvolution procedure is more complicated due to several factors, including the fact that one can't perfectly know the shape of the slit (one can measure it with another -thinner- slit...) and because all experimental data / recording is stained with noise.