[Exercises]
[Workspace]
Purpose:
The purpose of this lab exercise is to implement a wiener
filter by directly implementing the wiener filter equation using
Khoros operators, and then implementing it using the
Wiener operator
provided in Khoros.
The steps in this lesson are similar to those that you followed in Lab
2, the "Pseudo-Inverse Filtering" lesson.
Activities:
-
Read the float type blurred
image $DIP/data/lenina-blur-float.kdf and convert it to unsigned byte
using the
Convert Type operator. Display the result using
Display Image.
-
Glyphs:Input/Output:Data Files:
User defined
-
Glyphs:Data Manip:Data Conversion:
Convert Type
-
Glyphs:Visualization:Non-Interactive Display:
Display Image
-
Restore the "Inverse Filter" procedure that you saved from Lab 1,
the "Inverse Filter" session.
-
Change the name of the procedure to "Wiener Filter"
-
Connect the output of
Convert Type to the input of the
"Wiener Filter" procedure.
-
Implement the Wiener filter, R(u), within the "Wiener Filter"
procedure.
Replace the
Divide Into operator with an implementation the Wiener
filter equation: R(u) = [H(u)* / (|H(U)|**2 + K)]. Use the following
operators:
Magnitudes,
Add,
Divide, and
Conjugate. Set the
value of K to 0.005.
-
Open the "Wiener Filter" by clicking on the "Open Procedure"
icon.
-
Glyphs:Arithmetic:Complex Operators:
Magnitudes
-
Glyphs:Arithmetic:Two Operand Arithmetic:
Add
-
Glyphs:Arithmetic:Two Operand Arithmetic:
Divide
-
Glyphs:Arithmetic:Complex Operators:
Conjugate
-
Run this procedure to find the restored image using a wiener
filter.
-
Iconify the procedure by selecting the "Close" button in the
upper right hand corner of the procedure workspace.
-
Use operator
Wiener to implement wiener filtering, and display
the results. Calculate the DFT of the unsigned byte image, and pad and
calculate the DFT of the Gaussian kernel $DIP/data/gauss-kernel-21x1.ascii.
Use these spectra as input to the
Wiener
operator. Calculate the magnitude of the inverse DFT of the
Wiener
output and display it.
-
Glyphs:Input/Output:Data Files:
User defined
-
Glyphs:Data Manip:Size & Region Operators:
Pad
-
Glyphs:Arithmetic:Linear Transforms:
FFT
-
Glyphs:Data Manip:Frequency Filters:
Wiener
-
Open the
Wiener and set the "Wiener parameter" to the value
you used in the "Wiener Filter" procedure.
-
Glyphs:Arithmetic:Linear Transforms:
FFT
-
Glyphs:Arithmetic:Complex Operators:
Magnitudes
-
Glyphs:Visualization:Non-Interactive Display:
Display Image
Exercises
-
Modify the Wiener parameter in the
Wiener operator, visualize
its effects and comment on the results.
Khoros Workspace
Execute the visual program c7s3wiener.wk
Main DIP Menu
DIP Feedback Form
Copyright © 1997-1995 KRI, ISTEC, Ramiro Jordán, Roberto Lotufo. All Rights Reserved