Lab: Median Filtering

[Exercises] [Workspace]

Purpose: The purpose of this lab is to experiment with the median filter, using different window sizes and numbers of repetitions. Also its performance is compared against that of an averaging fil- ter.

Activities:

  1. Read image $DIP/data/bridge-toledo.kdf and display it using operators User defined and Display Image.

    1. Glyphs:Input/Output:Data Files: User defined

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

  2. Corrupt the image with 10% shot noise by using the operator Shot Noise. Display the result.

    1. Glyphs:Data Manip:Introduce Noise: Shot Noise

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

  3. Filter the corrupted image the using median filter operator Median. Experiment with different window sizes and numbers of repetitions.

    1. Glyphs:Image Proc:Nonlinear Filters: Median

    2. Filter 1: 3x3 window with 1 repetition
    3. Filter 2: 5x5 window with 1 repetition
    4. Filter 3: 3x3 window with 3 repetitions

  4. Filter the corrupted image using a mean filter of size 5 x 5. Use the operators Constant and LinearOp (Linear Operator). Remember that when creating the kernel for an averaging filter, the sum of all pixels should equal 1.

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

    2. Glyphs:Arithmetic:Linear Transforms: LinearOp (Linear Operator)

  5. Display each image after it has been filtered.

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


Exercises

  1. Perform the same experiment with different percentages of noise corruption.
  2. Measure the similarity between the original image and the filtered one using the mean square root metric. Which of the filters used shows better performance? Is this metric a good measurement of the performance of the filter?


Khoros Workspace
Execute the visual program c9s3median-filtering.wk



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