[Exercises]
[Workspace]
Purpose:
The purpose of this lab is to illustrate the discrete Fourier
transform properties of rotation, linear combination, translation,
and expansion.
Activities:
-
Create a centered white rectangle on a black background using the
operators Constant and Pad. Display it.
-
Glyphs:Input/Output:Generate Data:Constant
-
Glyphs:Data Manip:Size & Region Operators:Pad
-
Glyphs:Visualization:Non-Interactive Display:Display Image
-
Set the Constant glyph parameters to:
Width: 4
Height: 32
Real Constant Level: 1
-
Set the Pad glyph parameters to:
Padded Width : 128
Padded Height: 128
Width Offset: 64-(4/2)
Height Offset: 64-(32/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.
-
Glyphs:Arithmetic:Linear Transforms:FFT
-
Glyphs:Arithmetic:Complex Operators:Phase
-
Glyphs:Visualization:Non-Interactive Display:Display Image
-
Rotate the object using the operator Rotate and
display it. Take its DFT and display it.
Set the rotation angle to 45 degrees.
-
Glyphs:Image Proc:Geometric Operators:Rotate
-
Glyphs:Arithmetic:Linear Transforms:FFT
-
Glyphs:Visualization:Non-Interactive Display:Display Image
-
Combine the centered rectangle and the rotated rectangle using the
operator Blend Data with a blending factor of 0.25.
Display the combined image. Then take the
forward DFT and display the result.
-
Glyphs:Arithmetc:Two Operand Arithmetc:Blend Data
-
Glyphs:Arithmetic:Linear Transforms:FFT
-
Glyphs:Visualization:Non-Interactive Display:Display Image
-
Translate the original object 32 pixels to the right and 32 pixels down
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.
-
Glyphs:Data Manip:Reorganize Data:Translate
-
Glyphs:Arithmetic:Linear Transforms:FFT
-
Glyphs:Arithmetic:Complex Operators:Phase
-
Glyphs:Visualization:Non-Interactive Display:Display Image (2)
-
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.
-
Glyphs:Data Manip:Size & Region Operators:Resample
-
Glyphs:Input/Output:Generate Data:Impulse
-
Glyphs:Arithmetic:Two Operand Arithmetic:Multiply
-
Glyphs:Visualization:Non-Interactive Display:Display Image
-
Calculate the DFT of the expanded image and display it.
-
Glyphs:Arithmetic:Linear Transforms:FFT
-
Glyphs:Visualization:Non-Interactive Display:Display Image
Exercises
-
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.
-
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