Frequency Analysis

 

When we speak of frequency analysis, we generally mean Fourier analysis unless otherwise stated. The Fourier transform is used to construct a basis, which is a series of functions used to represent a signal or image. In the case of Fourier, the basis is a series of sinusoids. The fundamental, or first harmonic, has the same period as the longest periodicity of the signal or image itself. Higher harmonics, from 2nd, to 3rd, to 4th, and so on, are simply integer multiples of the 1st harmonic in terms of their periods. Therefore, higher harmonics have greater frequencies, since the frequency f in cycles per second (Hertz) is the inverse of the time period T in seconds.

The Fourier series is that set of harmonics that are used to represent a particular signal or image, including the parameters of amplitude and phase lag for each of the harmonics. The accuracy of the representation depends on the character of the signal or image. If for example a square wave is to be represented with a series of sinusoids, many harmonics will be needed for accurate representation. Whereas, a blood pressure pulse signal, which has a tendency to possess few sharp edges in normal persons, requires only a few harmonics (perhaps 7) for accurate representation. 'Accuracy' of representation can be measured in a number of ways. A common method is to take the difference between the original signal or image and that reconstructed with a predefined number of Fourier harmonics. For example, say that 7 harmonics are used to represent a particular blood pressure signal. To form the Fourier reconstructed signal we simply add the harmonic signals together after first scaling and shifting them using the values of the amplitude and phase lag parameters, respectively. We then subtract, digitized point by digitized point, the Fourier reconstructed signal from the original blood pressure signal. The resulting set of m difference values is known as the error vector e, where:

e = (e1, e2, ..., ek, ..., em)T

Typically, we square and sum the error from each point k of the signals to form an estimate of the mean squared error:

MSE » (1/m) S ek k = 1, m

We can compare the mean squared error with the original signal itself using:

Percent accuracy = 100 * [(sT · s) - S ek2] / (sT · s)

Where sT . s is the dot product of the original signal with itself. Typically, an accuracy of 90 - 95% is considered good.

Concerning images, error of representation can b computed with only slight variation from the above procedure. We must simply treat the digital pixels of each image (original and Fourier reconstructed) as sample points. The order in which we mathematically operate on the pixels is arbitrary so long as the corresponding pixels from the original and reconstructed images are used.

The frequency space for 1 dimensional signals can be plotted as two graphs: one for magnitude, or amplitude, of each harmonic and one for the phase shift or lag. The independent variable (X-axis) for each of these graphs is the Fourier harmonic number. Generally but not always, the magnitude of the Fourier harmonic used for reconstruction of a signal decreases with increased harmonic number. (For very complex and sharp signals, however, this is not necessarily true). In contrast, he phase lag of each harmonic is not usually dependent on harmonic number. For images, we typically plot the Fourier magnitude on a square the size of the image. The location and orientation of a given Fourier harmonic is marked by a pair of points which are symmetric about the center of the Fourier space. A line formed by the pair of points gives the orientation of the Fourier harmonic with respect to the image, and the brightness (or color) of the points denotes the magnitude, or amplitude, of the Fourier harmonic.

Consider for example an image that consists of a sinusoidally changing brightness level with a fixed orientation. As the period of the sinusoid decreases, the frequency increases, i.e., the representation by a pair of points in Fourier space will be such that the points are shifted farther apart. As the period of the sinusoid increases, the frequency decreases, i.e., the representation by a pair of points in Fourier space will be such that the points are shifted closer together. In the limit as the period of the sinusoid becomes very long and approaches the DC (average) level, the pair of points converge upon the center of the Fourier space (i.e. the location where the DC level is represented). If there are two or more sinusoidally changing patterns of brightness in the image, it will be represented by the corresponding numbers of Fourier pairs in the Frequency space. The location and brightness level of each pair corresponds to that of the patterns in the image.

 More complex image shapes can also be represented in Fourier space. For example, a step function, or square pattern in the image, can be represented. Just as for square-wave signals, many Fourier harmonics are needed for accurate representation of a step or square in the original image. Similarly, patterns such as letters of the alphabet, faces, or cells can be represented in Fourier space. Since these patterns however, like a step or square in an image, are not periodic, many Fourier components will be needed to represent them to a good level of accuracy (i.e., harmonics throughout the Fourier space will be needed).

There are at lest two main reasons for the Fourier analysis of images:

1. recognition - the image may be more recognizable by computer algorithm based on the pattern of Fourier components.

2. filtering - noise in the image that is periodic can be removed by computing the Fourier transform, removing those harmonics, as much as possible, consisting of the noise space, and reconstructing the image with the remaining harmonics.