[Exercises]
[Workspace]
Purpose:
The purpose of this lab is to gain a practical
understanding the visual phenomena known as simultaneous contrast
effect. The lab uses the Constant, Inset, and Pad operators to build
an image that exhibits this phenomena.
Activities:
-
Create the image described below. This image exhibits the
simultaneous contrast effect.
IMAGE: The image is a square image with 4 quadrants. Each quadrant is
composed of a 32x32 pixel region of constant value 160 centered in a
64x64 pixel region of constant value (Upper left quadrant = 30, Upper
right quadrant = 60, Lower left quadrant = 120, Lower right quadrant =
240). There are several ways to build an image to demonstrate the
simultaneous contrast effect. Described below is a procedure using
the Pad and Inset operators.
-
Create a constant image with dimensions 32x32 with grey-level
value 160, using the operator Constant.
-
Glyphs:Input/Output:Generate Data:Constant
-
Open the Constant pane and set "Width" and "Height" to 32, and
"Real Constant Level" to 160.
-
Create four images, each one having dimensions 64x64 with values
30, 60, 120, and 240 respectively, with the image created in part A
placed at its center. Use the Pad operator as follows.
-
Glyphs:Data Manip:Size & Region Operators:Pad (just get 1)
-
Set up the Pad operator to create a 64x64 pixel image, with the
pad value of 30. Set the offsets so that the 32x32 pixel input image
is centered.
-
Use the duplicate feature in cantata to duplicate the Pad
operator 3 times.
-
Change the "Real Pad Value" in the other three Pad operators to
60, 120, and 240.
-
Connect the output of the Constant operator to the inputs of
the Pad operators.
-
Use three Inset operators and the four images created in part B
to create a new square image that contains all four images. Display
the final image.
-
Glyphs:Data Manip:Size & Region Operators:Inset
-
Glyphs:Visualization:Non-Interactive Display:Display Image
-
Set the Inset "Width Coordinate" to 64.
-
Duplicate the Inset operator.
-
Connect the output of the first and second Pad operators to the
inputs of the first Inset operator.
-
Connect the output of the third and fourth Pad operators to the
inputs of the second Inset operator.
-
Duplicate an Inset operator and change the "Width Coordinate" to
0 and the "Height Coordinate" to 64.
-
Connect the output from the first and second Inset operators to
the third "Inset" operator.
-
Connect the output of the third Inset operator to the Display Image
operator and run the workspace.
Exercises
-
Create your Pad operator using the operators Constant and Inset
-
Propose two ways of using the Inset operator to combine four
images into a larger square.
-
Experiment with the simultaneous contrast phenomena by changing
the intensity values of the centered box and the background.
Khoros Workspace
Execute the visual program c2s6contrast-hvs.wk
Main DIP Menu
DIP Feedback Form
Copyright © 1997-1995 KRI, ISTEC, Ramiro Jordán, Roberto Lotufo. All Rights Reserved