Lab: Thresholding

[Exercises] [Workspace]

Purpose: The purpose of this lab exercise is to use thresholding techniques to perform image segmentation.

Activities:

  1. Select the file $DIP/data/angio.kdf using the User defined operator, and display it using the Display Image operator.

    1. Glyphs:Input/Output:Data Files:User defined
    2. Glyphs:Visualization:Non-Interactive Display:Display Image

  2. Use the > (greater than) operator to produce three thresholded images. Use the following threshold values: 118, 128 and 138. Display the results.

    1. Glyphs:Arithmetic:Comparison Operators:>
    2. Glyphs:Visualization:Non-Interactive Display:Display Image
    3. Duplicate > two times.
    4. Open the > panes and set the "Constant" parameter in each operator to one of the values given above.
    5. Run the operators and display the results.

  3. Measure the area of the thresholded images using the Statistics operator.

    1. Glyphs:Data Manip:Analysis & Information:Statistics
    2. Glyphs:Input/Output:Information:File Viewer
    3. So that only the area is calculated and printed, open the Statistics operator and select the "positive points" option.

  4. You can interactively select the threshold using the Edit Image glyph.

    1. Glyphs:Visualization:Interactive Display:Edit Image
    2. Click on the "Threshold" option to show the threshold pane
    3. Select "Pixel Threshold" in the Threshold window
    4. Drag with the mouse the "Lower" horizontal scrooling bar to dinamically change the threshold level applied to the image.


Exercises

  1. Try to segment the image $DIP/data/musc1.kdf into three components: background, cell type I, and cell type II. Use thresholding techniques.
  2. Overlay the original and thresholded images to show the accuracy of the segmentation.


Khoros Workspace
Execute the visual program c4s2threshold.wk



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