beginning gif up gif contents news

Next: Color Image Processing
Up: Lectures
Previous: Image Enhancement: Spatial Methods

 

Image Enhancement: Frequency-Domain Methods

Last updated on Saturday, October 7, 1995 at 6:00 PM.


Reading

Gonzalez and Woods, 4.4-4.5.


Introduction

We've already seen that imaging systems have a transfer function that we can analyze in the frequency domain.

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.

 


Lowpass Filters for Smoothing

 

Ideal Lowpass Filters

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.

 

Gradual Lowpass Filters

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.

 


Highpass Filters for Sharpening

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.

 

Gradual Highpass 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.

Enhancement with Highpass Filters

The ideal highpass or highpass Butterworth filters both fall to zero for zero frequencies. This means that all of this low-frequency information is removed. Sometimes, we only want to enhance the high frequencies, not to remove the low frequencies altogether. We can do this by adding a constant value to the ideal highpass or highpass Butterworth filters. This causes some of the low frequency content to pass through while amplifying the high-frequency content, much like unsharp masking. This sharpens edges and other places of contrast.

Sharpening followed by histogram equalization (to take advantage of the full output range) is a useful and common combination.


Homomorphic Filters

If we preceed highpass filtering by a logarithmic intensity transform, we can compresses the dynamic range of the image before filtering. This means that places of high glare, that normally suppress the contrast in dimmer places, are allowed to affect the image less. This causes enhancement of both brighter and dimmer parts of the image, essentially filtering based on the local contrast changes and (at least partially) ignoring the effects of lighting. (We, of course, need to reverse the logarithmic encoding after the filtering.)

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.

Designing Spatial Kernels that Approximate Frequency-Domain Filters

 

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.


Vocabulary



beginning gif up gif contents news

Next: Color Image Processing
Up: Lectures
Previous: Image Enhancement: Spatial Methods

© Bryan S. Morse, 1995