Last updated on Saturday, October 7, 1995 at 6:00 PM.
We've also seen how different image features affect the frequency domain: slowly varying areas have low frequencies, rapid transitions from object edges have high frequencies, white noise spans the entire spectrum (but most affects high frequencies), etc.
Sometimes, its useful for us to shape the frequency spectrum of an image ourselves explicitly: we can smooth the image by lowpass filtering it, we can enhance edges by highpsss filtering it, and we can enhance specific frequency ranges by bandpass filtering it.
An ideal lowpass filter is

where
is a cutoff frequency.
In two dimensions (images), it is

where
.
An ideal lowpass filter cuts off all frequencies greater than the cutoff frequency and passes perfectly all frequencies less than the cutoff frequency. While no physical device has a transfer function that is an ideal lowpass filter, we can computationally apply one.
Take a look at Fig. 4.32 in your textbook. The more lower the cutoff frequency, the more high frequencies are removed and the more smoothing is done.
Ideal lowpass filters have a nasty side-effect, though. Remember that filters multiply the frequency spectrum of the image by the filter. According to the convolution theorem, this is the same as convolving the image with the Inverse Fourier Transform of the filter.
But what is the IFT of an ideal low-pass filter? It is a sinc
function,
.
If the image contains strong transitions, these ring
with each oscilation of the sinc function--not a good thing.
What causes the ringing of ideal lowpass filters is the sharp cutoff in the frequency domain. We can avoid (or minimize) ringing by not cutting off the frequencies so sharply.
One filter that does this is the Butterworth filter:

When
,
.
When
,
.
When
,
.
When
,
.
As
goes towards infinity,
decreases
to 0.0.
The sharpness of the transition across
is controlled by the
n exponent. As n increases, the transition becomes sharper.
As n goes to infinity, the Butterworth filter approaches an ideal
lowpass filter.
Just as one can define an ideal lowpass filter, one can define a
similar highpass filter:

where
is a cutoff frequency.
In two dimensions (images), it is

where
.
Notice that the ideal highpass filter is identical to the ideal lowpass filter, with only a change in the direction of the inequality.
Just as ideal lowpass filters suffer from ringing effects, so to do ideal high-pass filters.
Just as we used a gradual transition to avoid ringing in lowpass filters, so too can we use gradual transitions to avoid problems with higpass filters.
A highpass Butterworth filter is:

Notice that all we've done is to invert the ratio of the frequency to
the cutoff frequency.
The highpass Butterworth filter thus behaves like the lowpass
version but in reverse.
Sharpening followed by histogram equalization (to take advantage of the full output range) is a useful and common combination.
This type of filtering is called homomorphic filtering.
It looks like

A good example of this is shown in Fig.4-42 of your text.
Although frequency-domain filtering is a nice analytical tool for designing filters, it is often more efficient to use spatial convolution to do the actual filtering.
As already discussed, though, this is only more efficient for small kernels. So, if we can design small spatial kernels that approximate desired frequency-domain filters, we can more efficiently perform the filtering.
One way to approach this is to take the Inverse Fourier Transform of the desired filter and then to approximate that. However, this isn't the most effective way.
A better way is to find the smaller kernel whose Fourier Transform most closely approximates the filter, not the kernel that best approximates the IFT of the filter. Do you see the difference?
Section 4.5 of your text gives mathematical details of how to do this, but we won't discuss it here. Just be aware of this important distinction in case you ever need to do this.
© Bryan S. Morse, 1995