Sunday, August 18, 2013

Fourier Analysis -- A Musical Introduction



In the analysis of remotely sensed images, it is not uncommon to encounter the concept of Fourier
Analysis. In IDRISI, Fourier Analysis is offered as a technique for the restoration and enhancement of remotely sensed images (such as noise removal) and for the analysis of cyclic events and seasonal trends in the Earth Trends Modeler (ETM). The technique is powerful, but can be extremely challenging to understand for those without a strong mathematical background. Therefore, here we provide an introduction to Fourier Analysis by means of the medium of music


Consider the basic premise of Fourier Analysis. Jean Baptiste Joseph Fourier (1768-1830), a French mathematician and physicist, proposed that any complex wave form can be decomposed into a series of simple sinusoidal waves. By the same logic, the complex waveform can be reconstructed by simply adding up the simple sine wave series. Thus the complex waveform in the top graph below can be decomposed into the family of simple sine waves below it. Likewise, these simple waves can be recombined to perfectly reconstruct the complex wave.

Why is this of interest? If we decompose a signal and then alter some of its simple constituents before putting it back together, we can change the signal in spectacular ways. For example, if we can determine the simple waves associated with aircraft noise, we can then create opposite versions where the peaks match the troughs and vice versa. If we then mix these opposite twins with the music we want to hear, we get noise “cancelling” headphones. You hear the music, but the aircraft noise is removed by interaction with the opposite twins inside the headphones!

As another example, notice the horizontal noise pattern in the Landsat MSS image below. It’s not caused by a consistent variation in detector output (which can easily be modeled and removed). Rather, it relates to electrical noise and is slightly irregular. Using IDRISI, the image was decomposed into simple waveforms in X and Y and then the noise frequencies were isolated (using a special graphical tool called DRAWFILT) and removed. The reconstructed image on the right is virtually free of the original noise.

 

Here’s another example using the Earth Trends Modeler. The blue line is a temporal profile of sea surface heights near the Galapagos Islands for the period 1997-1999 extracted from a 5-day interval time series of TOPEX/Poseidon imagery. The red line shows the result of smoothing the data over time using Fourier Analysis. In the initial decomposition a family of simple sine waves was determined (ranging from 1 complete sine wave over the 3 years to 109 sine waves). To smooth the image, only the first 18 waves were used to reconstruct the signal (i.e., the remaining 91 waves were ignored). This implies that any wave with a frequency higher than 6 cycles per year (i.e., a wave length of 2 months) has been removed.

 
So how does Fourier Analysis figure out the simple waves that form a complex wave? If you are familiar with a stringed instrument such as a guitar, you know that if a musical note is played that corresponds to the pitch of one of the strings, then that string will start to vibrate – it resonates. Thus if an E note is played, the E-string resonates. Now imagine having a harp with MANY strings. With a harp you could listen to a sound and see which strings were vibrating to know which notes made up the sound you hear. The different strings have different frequencies and the degree to which a string vibrates expresses the amplitude of that wave.


Fourier Analysis is thus a kind of mathematical harp. A series of test waves (i.e., the strings) is created (mathematically) and each is correlated (using a simple multiply and summation operation known as a discrete spot correlation) with the original signal. If a test wave is present in the original, the correlation will yield a strong result (a high amplitude).

What if our test wave is out of phase with the true wave in the signal? With a regularly oscillating wave it is possible to shift it (exactly a quarter cycle) so that it is perfectly uncorrelated with the original. If we were to encounter such a wave, our mathematical harp would have a problem, because it would conclude that the wave was not present. But it was! Thus Fourier Analysis uses two versions of each wave that are uncorrelated with each other – a sine wave and a cosine wave. If one doesn’t detect the true wave because of the phase, the other will. Thus the test waves are a family of wave pairs – sine waves and their corresponding cosine waves.

That’s all there is to it. Based on this mathematical harp, we can determine which waves are present, their relative strength and their phase (by comparing the relative strengths of each sine and cosine pair). Once this breakdown has been completed we have only to isolate the waves we want to modify and then to alter them before reconstruction. Waves that contain noise are usually very obvious – they really stand out as being unusual compared to waves of similar frequency. The image filtering utility called DRAWFILT in IDRISI uses this principle. Alteration is done by changing their amplitude (such as setting the amplitude to 0 to completely remove them). And the reconstruction? It’s a simple linear combination of waves modified by their altered amplitudes – the same as evaluating a regression equation. Of course, this is all done for you automatically in IDRISI.


Try it out!


New to Clark Labs software? Haven’t upgraded to IDRISI Selva yet? Try out a free evaluation copy today.