Purpose: The purpose of this lab is to gain experience with feature extraction. The feature of interest for this exercise is the "first invariant moment" which measures the spread of pixels from the cen- troid of an object.
Activities:
Glyphs:Input/Output:Data Files: User defined
Glyphs:Visualization:Non-Interactive Display: Display Image
Glyphs:MMACH:Basic: Labeling (mmach)
Glyphs:Visualization:Non-Interactive Display: Display Image
Glyphs:Visualization:Map Display & Manip: Autocolor
Glyphs:Visualization:Non-Interactive Display: Display Image
Glyphs:MMACH:Basic: Dilation
Glyphs:MMACH:Basic: Erosion
Glyphs:MMACH:Tools: 3x3 Str.El.
Note that you will want to auto color and display the labeled image as well.
Glyphs:Khoros 1:Feature Extraction: Shape Analysis
Glyphs:Input/Output:Information: File Viewer
Glyphs:Visualization:Map Display & Manip: Autocolor
Glyphs:Visualization:Non-Interactive Display: Display Image
Glyphs:Data Manip:Size & Region Operators: Extract
For "Specify Region Size"
Turn off both "Width" and "Height" parameters
Turn on "Elements" and set the value equal to 1
For "Specify Region Origin"
Turn off both "Width" and "Height" parameters
Turn on "Elements" and set the value equal to 42
Note that specifying the region origin element size to 42 corresponds to extracting the first invariant moment.
Glyphs:Visualization:Plot Display: Display 2D Plot
Khoros Workspace
Execute the visual program c10s1shape.wk