[Exercises]
[Workspace]
Purpose:
The purpose of this lab is to experiment with interpolation
by using filtering techniques and several types of low pass filters to
produce different quality interpolations.
Activities:
-
Display the image $DIP/data/map-roi.kdf and its Fourier
Transform.
-
Glyphs:Input/Output:Data Files:User defined
-
Glyphs:Visualization:Non-Interactive Display:Display Image
-
Glyphs:Arithmetic:Linear Transforms:FFT
-
Create the image expanded by 4, without any interpolation. Khoros
does not have an operator that does this, so the idea is to expand
the image using zero order interpolation and then multiply by a
grid image:
-
Resample the image by 4 using a "pixel replication" interpolation
method available in the Resample operator.
-
Glyphs:Data Manip:Size & Region Operators:Resample
-
Create a grid image with impulses of value 1 spaced by 4, using
the Impulse operator.
-
Glyphs:Input/Output:Generate Data:Impulse
-
Multiply the grid image with the expanded image to obtain the desired
image, geometrically expanded by 4, with no interpolation. Display the
result.
-
Glyphs:Arithmetic:Two Operand Arithmetic:Multiply
-
Glyphs:Visualization:Non-Interactive Display:Display Image
-
Calculate the DFT of the expanded image and display the spectrum.
-
Glyphs:Arithmetic:Linear Transforms:FFT
-
Glyphs:Visualization:Non-Interactive Display:Display Image
-
Implement the spatial domain interpolation of the expanded image
using convolution and the following kernels, and display the
results. Also, perform the DFT of the results and display those
spectra.
-
Zero order interpolation with average 4x4 filter: use
the Constant operator to build a 4x4 kernel with constant value 1.
-
Glyphs:Input/Output:Generate Data:Constant
-
Glyphs:Arithmetic:Linear Transforms:LinearOp (Linear Operator)
-
Glyphs:Arithmetic:Linear Transforms:FFT
-
Glyphs:Visualization:Non-Interactive Display:Display Image
-
Bilinear interpolation: To create the kernel, multiply the output
of two Piecewise Linear operators, both generating an image of
size 9x9, of values ranging from 0 to 1, and with the following
parameters
Period: 9
Rise Time: 4
Fall Time: 4
Pulse Width: 0
for X in one image and for Y in the other
Visualize the kernel you created by expanding it and
displaying it. Use the Expand and Display Image operators.
-
Glyphs:Khoros 1:Generate Data:Piecewise Linear
-
Glyphs:Data Manip:Size & Region Operators:Expand
-
Glyphs:Visualization:Non-Interactive Display:Display Image
-
Glyphs:Arithmetic:Two Operand Arithmetic:Multiply
-
Glyphs:Arithmetic:Linear Transforms:LinearOp (Linear Operator)
-
Glyphs:Arithmetic:Linear Transforms:FFT
-
Implement frequency domain interpolation using the FFT operator
and the following frequency filters, which you can create using the
operator Low-Pass. It is necessary to filter the image with a cutoff
period of 8.
-
Create an ideal filter.
-
Glyphs:Image Proc:Frequency Filter:Low-Pass
-
Create a Butterworth filter of order 3.
-
Glyphs:Image Proc:Frequency Filter:Low-Pass
-
In the frequency domain, multiply the two filter spectra with the
spectrum from the expanded image.
-
Glyphs:Arithmetic:Two Operand Arithmetic:Multiply
-
Display the resulting spectra.
-
Glyphs:Visualization:Non-Interactive Display:Display Image
-
Calculate the inverse Fourier transform and display the results.
-
Glyphs:Arithmetic:Linear Transforms:FFT
-
Glyphs:Visualization:Non-Interactive Display:Display Image
Exercises
-
What is the cutoff frequency of the filters as function of the
scaling factor?
-
What is the result if we expand the DFT of the original image using
pixel replication algorithm and take the inverse DFT? Use the expand
property of the DFT and the convolution theorem to explain the
results.
Khoros Workspace
Execute the visual program c6s6interpolation.wk
Main DIP Menu
DIP Feedback Form
Copyright © 1997-1995 KRI, ISTEC, Ramiro Jordán, Roberto Lotufo. All Rights Reserved