|
Part 2: Math, Math, Math
by James Antonakos
Start ý Blob
Analysis ý Edge DetectionýBehind the Mask
ý A Helping Hand from Fourier ý Please
Sir, May I Have Some More? ý Sources and
PDF
A HELPING HAND FROM FOURIER
Most engineering and technology students
are familiar with the Fourier transform:

by way of its applications in signal
processing. For example, the Fourier transform of a square wave yields
the spectrum of odd sinewave harmonics that actually compose the square
wave. The Fourier transform converts information from the time domain
into the complex frequency domain.
When the Fourier transform is applied
to an image, you get the same conversion and end up with a set of
frequency components that represent the image. Photo 3 shows the two-dimensional
Fourier transform of the original image (Photo 1a). The center of
the image represents the DC level of the image, and as you move away
from the center (in any direction), the pixels represent the increasing
frequency components of the image (both real and imaginary). The brighter
the pixel, the higher the amplitude of the associated frequency component.
|
|
| Photo 3ýThe center of the image
is the DC origin. The frequency components increase as you move
away from the center. High-amplitude frequency components have
an associated high intensity. |
What happens if you throw out some of
the frequency information? As indicated in Photo 4, all information
outside the small circle has been eliminated. In effect, you have
run the frequency information through a low-pass filter.
|
|
| Photo 4ýMost of the high-frequency
components have been eliminated. |
Now, using the inverse Fourier transform,
convert the remaining frequency components back into the time domain.
The results are shown in Photo 5. Can you see how blurry the image
has become? The distinct edges and other sharp details of the image
have disappeared. This confirms that you can use low-pass Fourier
filtering to smooth an image. This would be especially helpful if
you had a grainy image or one with a small amount of noise in it.
|
|
| Photo 5ýThe result of an inverse
Fourier transform on the information found in Photo 3b can be
seen here. Notice the blurring in the image. |
Photo 6 shows the results of high-pass
Fourier filtering the image. Now the low-frequency Fourier components
have been thrown out, leaving only the high-frequency components.
The only details that remain in the image are the edges (edges represent
high-frequency components because of their step response). If you
throw out too much frequency information, you may end up with an entirely
black or white image, so care and experimentation must be used to
find the right filtering method. It is fascinating to examine the
Fourier spectrum of different images, for they typically bear little
resemblance to the original image.
|
|
|
Photo 6ýOnly the edges in
the image stand out now.
|
PREVIOUS
NEXT
Circuit Cellar provides up-to-date information for engineers. Visit
www.circuitcellar.com for
more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com
or subscribe online.
ýCircuit Cellar, the Magazine for Computer Applications. Posted with
permission. |