[Exercises]
[Workspace]
Purpose:
The purpose of this lab is to experiment with two widely
used square grid topologies for Labeling objects belonging to the same
connected regions. Different results can be obtained, depending on the
definition of a "connected region". This lab experiments with the
4-con- nected and 8-connected neighbor connectivity grids.
Activities:
-
Label the $DIP/data/drawing.kdf image using the 4- and
8-neighborhood grids and compare the results. Use pseudo coloring to
better visualize the results.
-
Select the file $DIP/data/drawing.kdf using the User defined
operator.
-
Glyphs:Input/Output:Data Files:User defined
-
To be able to properly visualize this small image, use the
operator Expand with a zoom factor of 4 or more, and display it using
the Display Image operator.
-
Glyphs:Data Manip:Size & Region Operators:Expand
-
Glyphs:Visualization:Non-Interactive Display:Display Image
-
Use the Labeling (mmach) operator of the MMACH toolbox.
-
Glyphs:MMACH:Connected Filters:Labeling (mmach) (get 2 of these)
-
Process the original image using the 4- and 8-neighborhood grids.
-
Expand and display both labeled images using a random colormap. Use
the Autocolor operator.
-
Glyphs:Visualization:Map Display & Manip:Autocolor
-
Open the Autocolor pane and select the "Random" colormap.
-
Duplicate the Autocolor operator.
-
Connect the outputs of the Labeling (mmach) (mmach) operators to the
inputs of the Autocolor operators.
-
Select the Expand and Display Image" operators from step B and
duplicate twice.
-
Connect the outputs of the Autocolor operators to the inputs of
the new Expand operators
-
Run the workspace and compare the results of using 4 and 8
neighbor connectivity grids.
Exercises
-
How can you determine the number of regions in the labeled image?
Khoros Workspace
Execute the visual program c2s12labeling.wk
Main DIP Menu
DIP Feedback Form
Copyright © 1997-1995 KRI, ISTEC, Ramiro Jordán, Roberto Lotufo. All Rights Reserved