In this class, we use image algebra notation to simplify the expression of various algorithms. The summary of image algebra notation can be found in Summary of Symbols and Notation.
In Class #2 (Wed 28 Aug 96), we concluded our brief review of image algebra notation. Here follow a few exercises that we strongly recommend you work through. Answers will be given in class, and problems like this might appear on a homework assignment or exam.
Problem 1. Pointwise unary and binary arithmetic operations:
Answer: c = (1+4,2+6,4+8) = (5,8,12).
Answer: c = (2+4-1,2+6-2,2+8-4) = (5,6,6).
Answer: c = (2 · 4, 2 · 6, 2 · 8) = (8,12,16).
Answer: From Problem 1.1, we already know a + b = (5,8,12). So, c = (3 · 5, 3 · 8, 3 · 12) = (15,24,36).
Answer: The domain of a is any three discrete symbols, for example, {1,2,3} or Z3.
Answer: The range of b is the set of its
pixel values, i.e.,
range(b) = {4,6,8}. If
b = (4,4,6,8), range(b) would still
equal {4,6,8}.
Answer: No, because the image domains must be equal for images to be added pointwise. Here, |domain(a)| = 3 and |domain(b)| = 4. That is, the domain sizes are unequal. Hence the domains are unequal and the images cannot be operated upon by a binary pointwise operation.
Problem 3. Unary image operations:
Answer: The domain of a is any set of six discrete symbols, for example, Z6.
Answer: The range of a is the set of its pixel values, which is {1,2,3,4,5,7}.
Answer: Recall the definition of the characteristic
function, which places a one in the output whenever the test
S = "> 4" is met, and a zero otherwise. Since 1, 2, 3, and
4 are not greater than 4,
>4(a)
= (0,0,0,0,1,1).
Answer: The sum of a is given by a(1) + a(2) + ... + a(6) = 1+2+4+3+5+7 = 22.
Answer: The notation c :=
[3,5](a)
implies that a one will appear in c wherever
3
a(x)
5,
where x
domain(a). Thus, c = (0,0,1,1,1,0).