Image Processing Reference
In-Depth Information
Corollary 2.11. ∀n, B, and r, x
1
= r, and 0 ≤x
i
≤ r, ∀i,1 ≤ i≤ n.
€
We now illustrate examples in 2-D and 3-D.
Example 2.17. Let n = 2, B = {1,1,2,1,2}, p = |B| = 5 and r = 4. Hence,
the vertices of H({1,1,2,1,2}; 4) are given as:
B
2
= {1,1,2,1,2},B
1
= {1,1,1,1,1}and
F
2
= {1,2,4,5,7},F
1
= {1,2,3,4,5}
x
1
= ⌊r/5⌋·(f
1
(5)−f
0
(5)) + f
1
(r mod 5)−f
0
(r mod 5)
= ⌊r/5⌋·(5−0) + (r mod 5− 0)
= r
x
2
= ⌊r/5⌋·(f
2
(5)−f
1
(5)) + f
2
(r mod 5)−f
1
(r mod 5)
= ⌊r/5⌋·(7−5) + (f
2
(r mod 5)−r mod 5)
= ⌊2r/5⌋
With r = 4, the vertices are {(±4,±1),(±1,±4)}.
€
Example 2.18. Let n = 3, B = {1,1,3}, p = |B| = 3 and r = 4. Hence, the
vertices of H({1,1,3}; 4) are given as:
B
3
= {1,1,3},B
2
= {1,1,2},B
1
= {1,1,1}and
F
3
= {1,2,5},F
2
= {1,2,4},F
1
= {1,2,3}
x
1
= ⌊r/3⌋·(f
1
(3)−f
0
(3)) + f
1
(r mod 3)−f
0
(r mod 3)
= ⌊r/3⌋·(3 −0) + (r mod 3−0)
= r
x
2
= ⌊r/3⌋·(f
2
(3)−f
1
(3)) + f
2
(r mod 3)−f
1
(r mod 3)
= ⌊r/3⌋·(4 −3) + (r mod 3−r mod 3)
= ⌊r/3⌋
x
3
= ⌊r/3⌋·(f
3
(3)−f
2
(3)) + f
3
(r mod 3)−f
2
(r mod 3)
= ⌊r/3⌋·(5 −4) + (r mod 3−r mod 3)
= ⌊r/3⌋
With r = 4, the vertices are {(±4,±1,±1),(±1,±4,±1),(±1,±1,±4)}.
€
Now we consider two special cases:
• Hyperoctagonal distances specialize to m-neighbor distance when p = 1.
Hence, ∀n,n ≥ 1, ∀m,1 ≤ m ≤ n and B = {m}
x = (r,r,··· ,r
m
,0,0,··· ,0
n−m
).
This was presented earlier in Theorem 2.20 for d
m
(over Z
n
) and in
Theorem 2.23 for δ
m
(over R
n
). Hence, the above theorem is a true
generalization of the same.
• Hyperoctagonal distances specialize to octagonal distance when n = 2.
Hence, for x ∈ Z
2
: x
1
= r and x
2
= ⌊r/p⌋· (f(p) −p) + f(r mod p) −
(r mod p).
This was presented earlier in Theorem 2.16.