Functions > Image Processing > Transform Domain > Example: Centering a Transformed Image
  
Example: Centering a Transformed Image
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.
For information on using this example, refer to About Image Processing Examples.
1. Use the READ_IMAGE function to read in an image.
Click to copy this expression
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.
Click to copy this expression
Click to copy this expression
3. Use the scale function to rescale the image to a grayscale intensity scale.
Click to copy this expression
4. Use the equalize function to adjust the grayscale.
Click to copy this expression
5. Use the WRITEBMP function to write the result to an external file.
Click to copy this expression
6. Use the center function to recenter the DC components and write the result to an external file.
Click to copy this expression
Click to copy this expression
The higher frequency components are placed outside the image.
7. Compare the original image, transform, and recentered transform.
(astrsk.bmp)
(astrsk_equalized.bmp)
(astrsk_center.bmp)