Page 136 -
P. 136
110 Chapter 3 ■ Digital Morphology
Evaluate the expression. This is mainly useful for input and output.
message expression
Print a message to standard output. If the expression is a string constant,
that string is printed on the screen. Integers and pixels can also be printed, and
images will be printed as a two-dimensional array of integers as if they were
structuring elements.
assignment
The assignment operator is :=. The type of the variable on the left of the
assignment operator must agree with the expression on the right of it. If the
expression is an image, the result of the assignment is a copy of that image.
For a small language, MAX has quite an array of operators, many of which
can operate on all three possible data types. The following table is a convenient
summary of all the legal MAX operators. Note that LEFT is the name of the
structuring element specific to the left of the operator, and RIGHT is the
structuring element to the right.
OPERATOR LEFT RIGHT RESULT DESCRIPTION
++ image image image Dilate LEFT by RIGHT (for
example, A++B).
-- image image image Erode LEFT by RIGHT (for
example, EG A--B).
<= image image int Subset: Is LEFT a subset of
RIGHT?
<= int int int Less than or equal to
(integer).
>= image image int Subset: Is RIGHT a subset of
LEFT?
>= int int int Greater or equal (integer).
> image image int Proper subset.
> int int int Greater than.
< image image int Proper subset.
< int int int Less than.
<> image image int Images not the same.
<> int int int Not equal.