Lab: DFT: Properties

[Exercises] [Workspace]

Purpose: The purpose of this lab is to illustrate the discrete Fourier transform properties of rotation, linear combination, translation, and expansion.

Activities:

  1. Create a centered white rectangle on a black background using the operators Constant and Pad. Display it.

    Try using the Accelerated Routines List, which can be accessed via the "Routines" button on the left side of the cantata workspace. Operators are listed according to categories and subcategories as they are in the cantata menus, but you may be able to browse the menus more quickly. Selecting an operator name and then selecting the "Open" button will create the glyph for that operator.

    Also, this workspace will have a large number of glyphs and connections. It may be easier for you to visualize the connections as spline. To change the connection type, select the "Attributes" but- ton to the left of the workspace, and change "Connection Type" to "Spline"

    1. Glyphs:Input/Output:Generate Data: Constant

    2. Glyphs:Data Manip:Size & Region Operators: Pad

    3. Glyphs:Visualization:Non-Interactive Display: Display Image

  2. Take the forward Fourier transform using the FFT operator and display it. Use the "Unity Scaling" option. Display both the magnitude and phase images (the Display Image operator displays the magnitude image by default). Use the Phase operator to calculate the phase image.

    1. Glyphs:Arithmetic:Linear Transforms: FFT

    2. Glyphs:Arithmetic:Complex Operators: Phase

    3. Glyphs:Visualization:Non-Interactive Display: Display Image

  3. Rotate the object using the operator Rotate and display it. Take its DFT and display it. Set the rotation angle to a value other than 0.

    1. Glyphs:Image Proc:Geometric Operators: Rotate

    2. Glyphs:Arithmetic:Linear Transforms: FFT

    3. Glyphs:Visualization:Non-Interactive Display: Display Image

  4. Combine the centered rectangle and the rotated rectangle using the operator Blend Data. Display the combined image. Then take the forward DFT and display the result.

    1. Glyphs:Arithmetc:Two Operand Arithmetc: Blend Data

    2. Glyphs:Arithmetic:Linear Transforms: FFT

    3. Glyphs:Visualization:Non-Interactive Display: Display Image

  5. Translate the original object using the operator Translate, and display it. Take the DFT of the translated object, and display the phase component as well as the magnitude component.

    1. Glyphs:Data Manip:Reorganize Data: Translate

    2. Glyphs:Arithmetic:Linear Transforms: FFT

    3. Glyphs:Arithmetic:Complex Operators: Phase

    4. Glyphs:Visualization:Non-Interactive Display: Display Image (2)

  6. Expand the original image by a factor of two using the operators Expand, Impulse, and Multiply, and display the image. The image needs to be expanded such that all empty new values are filled with zeros (instead of pixel replication). This can be accomplished by creating an impulse image (impulse value=1, background=0) that is the same size as the expanded image. This image should have an impulse spacing of 2 along each dimension, with the number of impulses being half the size of the image. Multiplying this impulse image with the expanded image will result in an expanded image where the new values are filled with zeros.

    1. Glyphs:Data Manip:Size & Region Operators: Resample

    2. Glyphs:Input/Output:Generate Data: Impulse

    3. Glyphs:Arithmetic:Two Operand Arithmetic: Multiply

    4. Glyphs:Visualization:Non-Interactive Display: Display Image

  7. Calculate the DFT of the expanded image and display it.

    1. Glyphs:Arithmetic:Linear Transforms: FFT

    2. Glyphs:Visualization:Non-Interactive Display: Display Image


Exercises

  1. Translate the DFT by half of the image dimension using the translation property, by multiplying the image by (-1)**(x+y).

    Hint: use operators Piecewise Linear, Add, and And.

  2. Create a small 8x8 pattern and replicate it to generate a 256x256 image using the expansion property.


Khoros Workspace
Execute the visual program c5s3dft-properties.wk



Main DIP Menu
DIP Feedback Form
Copyright © 1997-1995 KRI, ISTEC, Ramiro Jordán, Roberto Lotufo. All Rights Reserved