[Exercises]
[Workspace]
Purpose:
The purpose of this experiment is to visualize the effects
on an object when we perform translation, rotation, and scaling
operations.
Activities:
-
Perform geometric rotation, scaling, and translation on the image
the image $DIP/data/drawing.kdf.
-
Display $DIP/data/drawing.kdf and get size information about the
data object using the following operators and expand the image
with
Expand operators:
-
Glyphs:Input/Output:Data Files:
User defined
-
Glyphs:Visualization:Non-Interactive Display:
Display Image
-
Glyphs:Input/Output:Information:
Data Object Info
-
Glyphs:Input/Output:Information:
File Viewer
-
Glyphs:Data Manip:Size & Region Operators:
Expand
-
Rotate the original object by 45 degrees. Use the following
operator:
-
Glyphs:Image Proc:Geometric Operators:
Rotate
-
Display the results
-
Geometrically scale the object by a factor of three. Consider the
origin as the center of the image. The operator to use is:
-
Glyphs:Data Manip:Size & Region Operators:
Resample
-
When using the
Resample operator, if you wish to keep the output
image the same size as the input image, set the "Resize dimensions?"
parameter to "No".
-
Display the results.
-
Translate the object by an offset of 32 in both the width and
height dimensions using the "Translate" operator.
-
Glyphs:Data Manip:Reorganize Data:
Translate
-
Display the results
-
Do a periodic translation of the object by an offset of 32 in the
width and height dimensions. To mimic the periodic or wrap
translation, use the
Inset operator two times to build a tile of
four images. Perform the translation and finally use the
Extract
operator to get the resultant image. Use cantata variables to
implement this procedure. Select the following operators from the
cantata menus:
-
Glyphs:Data Manip:Size & Region Operators:
Inset (2 of these)
-
Glyphs:Data Manip:Reorganize Data:
Translate
-
Glyphs:Data Manip:Size & Region Operators:
Extract
-
Connect the output of
Expand to both inputs of
Inset.
Set the "Width Coordinate" to the width size of the input
object.
-
Connect the output of the
Inset in step iv. to both inputs of the
next
Inset. Set the "Width Coordinate" to zero, and the "Height
Coordinate" to the height size of the original input object.
-
Use the
Translate operator to translate by an offset of in
the width and height dimensions.
-
Extract the center of the image. Use width and height offsets
of 1/2 the original image size, and region sizes equal to the original
image size.
-
Display the results
Exercises
-
Perform the same experiment with different objects. Experiment by
modifying the width and/or height of your objects.
-
Create an encapsulated workspace to create the periodic translation
operator.
Khoros Workspace
Execute the visual program c2s9geo-transformations.wk
Main DIP Menu
DIP Feedback Form
Copyright © 1997-1995 KRI, ISTEC, Ramiro Jordán, Roberto Lotufo. All Rights Reserved