Keywords: front-page

## Lab: DFT of Simple Images

[Exercises] [Workspace]

Purpose: The purpose this experiments is demostrate some DFT of Simple Images.

Activities:

1. Sinusoidal

   1. Create a sinusoidal image with the Sinusoid operator. Normalize it with the Normalize operator. Extract its FFT seting Unity scaling and Log (Magnitude + 1) using FFT and Magnitudes operators, normalize this result. Inset the two results normalized and display using Inset and Display Image operators.

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

         - Parameters:

                         Width:  128
                         Height: 128
                         Num. along Width : 8
                         Num. along Height: 8

      2. Glyphs:Data Manip:Data Conversion:Normalize
      3. Glyphs:Arithmetic:Linear Transforms:FFT

         - Parameters:

                         Scaling Options: Unity scaling

      4. Glyphs:Arithmetic:Complex Operators:Magnitudes
      5. Glyphs:Data Manip:Size & Region Operators:Inset

         - Parameters:

                         Width Coordinate: 129

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

2. Rectangle

   1. Use the Constant and the Pad operators to create a square object Then proceed as in the previous item to take its FFT and diplay the original and FFT together. You can duplicate several glyphs simultaneously.

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

         - Parameters:

                         Width : 8
                         Height: 8
                         Real Constant level: 1

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

         - Parameters:

                         Padded Width : 128
                         Padded Height: 128
                         Width  Offset: (128-8)/2
                         Height Offset: (128-8)/2

3. Gaussian

   1. Use the 2D Gaussian operator and generate gaussian function. Then repeat the same procedure to display its DFT and original images.

      1. Glyphs:Input/Output:Generate Data:2D Gaussian

         - Parameters:

                         Width : 128
                         Height: 128
                         Peak Location (X): 64
                         Peak Location (Y): 64
                         Variance along Width : 4 * 4
                         Variance along Height: 4 * 4

4. Impulses

   1. Use the Impulse operator:

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

         - Parameters:

                         Width : 128     Num. along Width : 128/8
                         Height: 128     Num. along Height: 128/8
                         Width Spacing : 8
                         Height Spacing: 8

Khoros Workspace
Execute the visual program c5s4dft-simple-images.wk