[Exercises]
[Workspace]
Purpose:
The purpose of this lab is to demonstrate the use of
autocoloring techniques to artificially assign colors to a grey scale
image.
Activities:
-
Input a data set.
-
Read and display the image $DIP/data/retina.kdf using
operators User defined and Display Image .
-
Glyphs:Input/Output:Data Files:User defined
-
Glyphs:Visualization:Non-Interactive Display:Display Image
-
Inset a ramp grey scale into the image.
-
Use operator Piecewise Linear to generate a 10 x 128
grey-level downward ramp, with values ranging from 0 to 255.
-
Glyphs:Khoros 1:Generate Data:Piecewise Linear
-
Open the Piecewise Linear operator and set the following
parameters.
Number Rows: 128
Number Cols: 10
Sampling Freq: 1
Maximum Value: 255
Y Period: 128
Y Rise Time: 128
-
Use the Flip operator to vertically flip the object
("Reflection Direction" = Height) so that the ramp has increasing
values from bottom to top.
-
Glyphs:Data Manip:Reorganize Data:Flip
-
Use operator Convert Type to make the values "unsigned byte".
-
Glyphs:Data Manip:Data Conversion:Convert Type
-
Use operator Pad to create a border of width 1 pixel and of
value 255 around the grey-scale image.
-
Glyphs:Data Manip:Size & Region Operators:Pad
-
Open the Pad operator and set the following parameters.
Padded Width: 10+2
Padded Height: 128+2
Width Offset: 1
Height Offset: 1
Real Pad Value: 255
-
Use operator Inset to overlay the ramp scale on the original
image. Set the offset values so that the ramp scale does not obstruct
critical areas in the image.
-
Glyphs:Data Manip:Size & Region Operators:Inset
-
Display the resultant image using the Display Image operator.
-
Glyphs:Visualization:Non-Interactive Display:Display Image
-
Use the Autocolor operator to pseudocolor the image. Note
that Autocolor adds a map to the image file and that the pixel contents
displayed under the mouse in the Display Image operator show each
pixel as an index. In this manner, although the image has been
pseudocolored, the pixel index still contains the original grey value.
-
Glyphs:Visualization:Map Display & Manip:Autocolor
-
Open the Autocolor pane and select the "SA PSeudo" option
Exercises
-
Experiment with the different colortables. Some will enhance
certain features more than others.
-
The "SA-Pseudo" colortable was published in Scientific
American. What is its main feature?
Khoros Workspace
Execute the visual program c4s9pseudo-color.wk
Main DIP Menu
DIP Feedback Form
Copyright © 1997-1995 KRI, ISTEC, Ramiro Jordán, Roberto Lotufo. All Rights Reserved