Use the
center function for rearranging the Fourier transform of an image so that the DC component (image average) is centered and the high frequencies are moved to the edges.
1. Use the
READ_IMAGE function to read in an image.
2. Use the
dft function to take the complex two-dimensional Fourier transform and set the DC component to 0 so that the detail in the rest of the transform is visible.
3. Use the
scale function to rescale the image to a grayscale intensity scale.
4. Use the
equalize function to adjust the grayscale.
5. Use the
WRITEBMP function to write the result to an external file.
6. Use the center function to recenter the DC components and write the result to an external file.
The higher frequency components are placed outside the image.
7. Compare the original image, transform, and recentered transform.