[Exercises]
[Workspace]
Purpose:
The purpose of this lab exercise is to experiment with a
few basic feature extraction and image analysis techniques. This lab
focuses on determination of the area distribution of cells in an image
using labeling and histogram operations.
Activities:
-
Determine the area distribution of cells in the $DIP/data/blobs.kdf
image based on the area of each cell. Use labeling and histogram
techniques for this exercise.
-
Read and display the image $DIP/data/blobs.kdf. Use
operators User defined and Display Image:
-
Glyphs:Input/Output:Data Files:User defined
-
Glyphs:Visualization:Non-Interactive Display:Display Image
-
Run to display the image
-
Label the image and display it. Use the Labeling (mmach) operator of
the MMACH toolbox. After labeling, each region will have a unique
grey-level value.
-
Glyphs:MMACH:Connected Filters:Labeling (mmach) (mmach)
-
Connect the output of User defined to the input of Labeling (mmach)
(mmach).
-
Duplicate the Display Image operator from step A and connect
the output of Labeling (mmach) (mmach) to the input of Display Image.
-
Run this sequence
-
Use the Statistics operator to determine the maximum pixel
value. This gives the total number of regions in the image.
-
Glyphs:Data Manip:Analysis & Information:Statistics
-
Glyphs:Input/Output:Information:File Viewer
-
Connect the ASCII output of the Statistics operator to
the File Viewer.
-
Run these operators to determine the maximum pixel value.
-
Calculate and plot the Histogram of the labeled image.
-
Glyphs:Data Manip:Histogram Operators:Histogram
-
Glyphs:Visualization:Plot Display:Display 2D Plot
-
For the Histogram operator, use a "Bin width" of 1 and set the
"Number of bins" to the number of regions determined by the Labeling (mmach)
operator. Since the background region (grey-level value 0) has an area
much larger than the other regions, and since the background
information should not be included in this analysis, calculate the
histogram starting from 1 ("Minimum") to the total number of regions.
-
Connect the output of Labeling (mmach) (mmach) to the input of Histogram.
-
Connect the output of Histogram to the input of Display 2D Plot.
-
Run the cantata network, and observe the maximum value along the
vertical axis in the plot (set the "Plot Type" to "Discrete"). This is
the region with the largest area.
-
Calculate the Histogram of the histogram.
-
Duplicate the Histogram operator from step D.
-
Glyphs:Input/Output:Information:Print Data
-
Glyphs:Input/Output:Information:File Viewer
-
Set up the Histogram operator to use a "Bin width" of 400, and
set "Number of bins" to 4. This will allow you to group the regions
into four different categories.
-
Connect the output of the first Histogram operator to the
second Histogram operator
-
Connect the output of the second Histogram operator to Print Data
and the output of that to File Viewer.
-
Running this part of the network will print the contents of the
histogram using Print Data. Interpret the meaning of this table.
Exercises
-
Experiment with the parameters "Bin width" and "Number of bins" in
the Histogram operator. Varying these parameters will allow you to
group the regions into different categories.
-
Experiment with the "Connectivity" parameter of the Labeling (mmach)
operator. What will this do?
Khoros Workspace
Execute the visual program c2s13label-histo-histo.wk
Main DIP Menu
DIP Feedback Form
Copyright © 1997-1995 KRI, ISTEC, Ramiro Jordán, Roberto Lotufo. All Rights Reserved