Interactive Java Tutorials
Fourier Transform Filtering Techniques
Fourier transformation belongs to a class of digital image processing algorithms that can be utilized to transform a digital image into the frequency domain. After an image is transformed and described as a series of spatial frequencies, a variety of filtering algorithms can then be easily computed and applied, followed by retransformation of the filtered image back to the spatial domain. This technique is useful for performing a variety of filtering operations that are otherwise very difficult to perform with a spatial convolution.
This interactive tutorial explores the Fourier transform as a tool for filtering digital images. The tutorial initializes with a randomly selected specimen image appearing in the left-hand window entitled Specimen Image. Each specimen name includes, in parentheses, an abbreviation designating the contrast mechanism employed in obtaining the image. The following nomenclature is used: (FL), fluorescence; (BF), brightfield; (DF), darkfield; (PC), phase contrast; (DIC), differential interference contrast (Nomarski); (HMC), Hoffman modulation contrast; and (POL), polarized light. Visitors will note that specimens captured using the various techniques available in optical microscopy behave differently during image processing in the tutorial.
Positioned to the immediate right of the Specimen Image window is the Power Spectrum window, which displays the Fourier power spectrum created from the Specimen Image. A variety of adjustable filter masks that appear in red can be superimposed on the Power Spectrum window in order to filter desired frequencies. To the right of the Power Spectrum window is the Reconstructed Image window that displays the image obtained through inverse Fourier transformation of the filtered Fourier transform image. To operate the tutorial, select an image from the Choose A Specimen pull-down menu, and select a high-pass, low-pass, or free-hand filter from the Filter Type radio button panel. The Cutoff Frequency slider, which is activated when the Low Pass and High Pass filter checkboxes are selected, may be used to vary the range of the frequencies that are passed by the filter (causing a change in the size of the red filter mask). Selecting the Invert Spectrum checkbox will invert the gray-level intensity values used to display the Power Spectrum image. Selecting the Invert Filter Sense checkbox will reverse the operation of the current filter, in effect, from blocking the frequencies indicated in red to passing those frequencies and blocking all others. The Gray Level Cutoff checkbox and slider enable visitors to perform a binary segmentation operation on the power spectrum image in order to more easily identify peaks (or "spikes") in the power spectrum. Visitors should explore the effects of filtering the Fourier spectrum on the Reconstructed Image with the low-pass, high-pass, and free-hand filters.
Each of the specimen images has been modified to include noise and/or other artifacts that commonly occur in digital optical microscopy, as indicated in the pull-down menu. The artifacts include video signal noise, interlacing, CCD dark noise, aliasing, JPEG compression noise, halftone patterns, and various types of interference. Proper utilization of Fourier transform power spectrum filtering techniques will enable visitors to dramatically improve the quality of these images.
In the tutorial, the free-hand filter enables visitors to filter the fourier transform of the specimen image using as many elliptical or circular filter masks as desired. A free-hand filter is created by dragging the mouse over the desired region of the Power Spectrum window until the filter mask is of the appropriate size. Due to the symmetry of the power spectrum, when a free-hand filter mask is created, a non-interactive mirror image of the filter mask will appear on the opposite diagonal of the power spectrum. Clicking and dragging a free-hand filter mask will move the mask (and its mirror), while pressing the Delete key while a free-hand filter mask is highlighted (in cyan) will remove that free-hand filter mask from the power spectrum window. Figure 1 illustrates the use of the free-hand filter to remove a halftone pattern from a scanned photomicrograph of a mouse embryo captured with a video camera system.
Fourier transformation algorithms are based on a mathematical theorem, which states that it is possible to represent any function as a summation of a series of sine and cosine terms having varying frequency, amplitude, and phase. Applying the Fourier transform to an image yields a representation of the spatial information contained in the image in terms of frequency and phase data. Phase information is usually difficult or impossible to display visually, but the power spectrum offers a means of displaying the frequency component of the Fourier transform. The power spectrum is produced by taking each pixel intensity value from the scaled magnitude of the image frequency information and diplaying it as a two-dimensional map, resulting in a diffraction-like pattern that is typically symmetrical about the origin. In the frequency transform and the power spectrum, low frequencies lie closer to the origin, while high frequencies lie closer to the edges of the image. Spatial filtering can be employed to delete high- or low-spatial-frequency information from an image by designing a Fourier filter that is nontransmitting in the appropriate frequency range. In the tutorial, low-pass and high-pass filters are included to remove high- and low-spatial-frequency information, respectively, from the Fourier transform of the image. The regions of the Power Spectrum window covered by a red mask in the tutorial represent the frequency range that is blocked by the selected filter. When the image is reconstructed, the selected frequencies are deleted from the reconstructed image.
Filtering an image in the frequency (Fourier) domain is an alternative to spatial domain filtering with a convolution operation. A decision of whether to use Fourier transformation filtering or a convolution operation depends on the image processing application. Fourier transformation is a computationally expensive algorithm that takes more time and memory to compute than a convolution operation with a small mask. When the convolution mask is large, however, the Fourier transform operation is usually faster and computationally more economical. The Fourier filtering technique is especially useful for removing harmonic noise from an image, since harmonic patterns are typically found in localized discrete parts of the Fourier transform. When these periodic patterns are removed from the Fourier transform, the image obtained is essentially unaltered except that the harmonic noise is eliminated. An example of harmonic noise is the "herringbone" pattern sometimes seen in video images. For removing most types of periodic noise, the use of a convolution operation would require a prohibitively large and complicated mask. In such cases, Fourier transform filtering is preferable to the alternative convolution operation.
Kenneth R. Spring - Scientific Consultant, Lusby, Maryland, 20657.
John C. Russ - Materials Science and Engineering Department, North Carolina State University, Raleigh, North Carolina, 27695.
Matthew J. Parry-Hill, Thomas J. Fellers, and Michael W. Davidson - National High Magnetic Field Laboratory, 1800 East Paul Dirac Dr., The Florida State University, Tallahassee, Florida, 32310.
Questions or comments? Send us an email.
© 1998-2013 by Michael W. Davidson and The Florida State University. All Rights Reserved. No images, graphics, scripts, or applets may be reproduced or used in any manner without permission from the copyright holders. Use of this website means you agree to all of the Legal Terms and Conditions set forth by the owners.
This website is maintained by our