June 10, 2004
Flatten Illumination using
FFT Low Cut Filtering
(Medium and High Pass Filtering)
Flattening background illumination can also be done in the spatial domain.
(See Flatten Illumination exercise).
This exercise illustrates how to do it in the Fourier Domain.
- Open Sample Images / Betsy shipwreck.tiff with the File ->
- Since the FFT requires square images where the sides are a power of two,
make a 512x512 image with the File -> New menu.
- Click on the paint tool .
Select a medium gray level by clicking near the middle of the LUT window,
then click in the new blank image window to make the image a uniform gray.
This is to minimize the brightness step at the boundary of the Betsy image.
|In ImageJ, double-click on the color
select a medium gray from the ramp on the left, of the palette, click
on the blank image, then use Edit / Fill. The
512x512 image will now be uniform gray. Click on the image again
to cancel the selection.
- Paste the Betsy image into the middle of the blank image:
- Click on the Betsy Image
- Edit -> Select All menu
- Click on the blank image
- Edit -> Paste menu.
(Image reduced x2 for printing).
For ImageJ, skip this section. Use Process /
FFT / Bandpass Filter, as described below.
- Take the FFT with the Process -> FFT -> FFT menu.
- 'Cut' a hole right in the middle of the FFT (eliminating the lower
frequency components of the image.
- Click on the oval selection tool .
- With the shift key down, mouse a circle about this big: , where this
is shown actual size. Move the selection (the marching ants circle) to
the middle of the FFT image by dragging with the mouse (as shown here).
- If necessary, make the eraser tool white (as shown
here) by clicking on it, and then clicking on the white bar in the LUT
- Cut out the selection with the Edit -> Cut Selection menu.
(or by using the Delete key - Mac only) or
by using the command-x (control-X) key.
The center of the FFT should look like this:
- Take the inverse transform (Process -> FFT -> Inverse FFT) to
show the filtered image.
- Click on the rectangle (or oval) selection
tool , and select a representative part of the
image having the gray levels of interest:
- Use the Process -> Enhance Contrast menu to enhance the contrast
using only the range of gray within the selection.
Flatten the 512x512 image in ImageJ using Process / FFT
/ Bandpass Filter,
(Result not shown). Then use Image / Adjust
/ Brightness/Contrast / Auto.