beginning gif up gif contents news

Next: Discrete Spatial SamplingThe Fast Fourier Transform
Up: Lectures
Previous: Common Functions and Properties of the FT

 

Convolution Theorem, Transfer Functions, and Filtering


Reading

Gonzalez and Woods, Ch. 3.3.8

 


Convolution

In image analysis, it's often useful to apply or to model local operators that perform some weighted sum of the neighborhood around a pixel. This can be modeled by an operation known as a convolution of two functions where one function is the image and the other is the neighborhood weighting function or kernel. A convolution of functions and is written as


where ``*'' denotes the convolution operation. This is best understood by interpreting x-t as a neighbor of x (as separated by t) and is the weight given to that neighbor. All of these neighbors are multiplied by their respective weights and the sum is the output of the convolution at the point x. For n-variable functions, convolution is written as


Many operations can be modelled by convolution. For example, consider the probabilities of each possible output for a roll of a single die. This is a uniform distribution and can be described as a step function


Now consider the probabilities of each output for rolling two dice:


Extending this to n dice


At the limit as n goes to infinity, becomes a normal (Gaussian) distribution. Indeed, a theorem called the Central Limit Theorem states that any function convolved with itself an infinite number of times becomes a Gaussian. (No wonder the statisticians like normal distributions so much-if you get enough samples together, it doesn't matter what the distribution of a single sample looks like, the overall result is a normal distribution.)

In-class exercise:

  1. Multiply by .
  2. Convolve by , remembering to flip the second list.
  3. Compare the results of the last two steps. Can you explain this?


The Convolution Theorem



Substituting s = x - t and ds = dx,


and since we may freely change the variable of integration,


Thus,
 


Likewise,
 


Eqs. 7.9 and 7.10 are the Convolution Theorem. Convolution in either domain is equivalent to multiplication in the other.

Question: If the convolution of a unit square pulse with itself is a triangle, what is the Fourier Transform of this triangle? Why?

Answer: . It is the square of the Fourier Transform of the unit square.

What this means for imaging systems is that whenever we convolve an image with a kernel, we pointwise multiply the Fourier Transform of the image by the Fourier Transform of the kernel. This attenuates or amplifies each frequency indepently and is called a filter.

Terminology: a convolution function in the spatial domain is a kernel; a pointwise multiplication function in the frequency domain is a filter.


Imaging Systems and Transfer Functions

No imaging system is perfect. For one thing, there is no such thing as perfect resolution-every system slightly blurs its input. (At best it must at least average the various intensities within the space that the image represents with a single pixel.)

Linearity

What happens if you double the intensity of the light coming into the imaging device? Does the output likewise double? What if you add a fixed amount of light uniformly across the scene? Does the output likewise increase by a fixed amount? Systems with these properties are called linear. Specifically, a function is linear if it obeys the following rule:


Linear systems are relatively easy to work with, non-linear ones aren't. Most image processing assumes that imaging systems behave linearly, but in reality most imaging systems don't.

Shift-Invariance

One desirable property for an imaging system is that it behaves the same way across the image. Shifting the imaging device across the scene produces the same image, only shifted (ignoring the effects of the field of view). This property is called shift invariance.

Shift invariance is a desirable property for an imaging system-we don't want apples turning into oranges as move them around within the scene. Most imaging systems aren't perfectly shift invariant, but we often treat them as such.

Point Spread Functions and Transfer Functions

One way of measuring the behavior of an imaging system is to measure its response to a single pinpoint of light. Such as response is called the impulse response of the system. If the system is linear and shift invariant, any imaging effects can be modelled by a convolution of the original image with a kernel called the system's point spread function (the impulse response).

Let us denote this point spread function as the kernel with Fourier Transform . Then the image of the scene is


According to the Convolution Theorem, the Fourier Transform of the image as related to the Fourier Transform of the original scene is given by


In other words, the imaging system simply amplifies or attenuates each sinusoidal basis function independently. The function is called the Transfer Function (TF) of the system. If a system involves several stages, each with their own transfer functions , they simply multiply together:


Since multiplication is commutative and associative, so is the application of a transfer functions. You can think of a pipeline of separate transfer functions or as one big system with an overall transfer function .

This also means that convolution is also commutative and associative.

Questions:

  1. What does the filter look like when you convolve an image with a Gaussian and then take the derivative in the x direction?
  2. If we were to do this with a single convolution kernel, what would it look like?

The magnitude part of the Transfer Function is called the Modulation Transfer Function (MPT) and the phase part is called the Phase Transfer Function (PTP).


Filters

Filters can generally be described by the type of frequencies that they enhance or suppress.

We'll talk about specific types of filters as throughout the course, but it is important now to understand this classification.

Question: Most imaging systems act like low-pass filters. Can you explain why?

Low-pass filters

As we'll discuss later, the frequency spectrum of white noise has a uniform distribution across frequencies. (Indeed, that is the definition of ``white'') Most images have spectra that largely include low frequency information, with some high-frequency information occurring near edges. The ratio of image information to noise information is typically greatest at low frequencies and less at high frequencies. So, one reasonable way to deal with noise is to use low-pass filters.

High-pass filters

High frequencies usual occur as the result of rapid transitions in the image. High-pass filters, therefore, accentuate these areas. This causes crisper images.

Deconvolution

Suppose that an imaging system has a transfer function such that


and that we want to eliminate the effects of the system. We can do this by dividing out the transfer function:


This process is called deconvolution--the undoing of the effects of a convolution. However, as you will see in your second programming assignment, this process is very sensitive to error and noise.



beginning gif up gif contents news

Next: Discrete Spatial SamplingThe Fast Fourier Transform
Up: Lectures
Previous: Common Functions and Properties of the FT

© Bryan S. Morse, 1995