Image Processing Reference
In-Depth Information
Table 4.5. Examples of values of the function h ( z, β M ).
α 2 (
u
,
v
)=max
{|
p
i
|
+
|
q
j
|
,
|
q
j
|
+
|
r
k
|
,
|
r
k
|
+
|
p
i
|}
Q 2 = F 6 + 2 F 18 + 3 F 26
(4.59)
z 2 (
u
,
v
)=mod( α 2 ,Q 2 )
d 3 (
u
,
v
)= α 3 (
u
,
v
)=max
{|
p
i
|
,
|
q
j
|
,
|
r
k
|}
,
(4.60)
where P = F 6 + F 18 + F 26 , F m is the number of m -neighborhoods in β M ,[]
represents the ceiling function, β M is the neighborhood sequence derived by
replacing all 26-neighborhoods in β M by the 18-neighborhood, and h ( z, β M )
is the function calculated by the following Algorithm 4.4.
Algorithm 4.4 (Calculation of the function h ( z, β M ) ). Calculate a value
of the function h ( z, β M )foragiven z and β M .
β M
: neighborhood sequence, z : integer variable
(1) Initialization: β (0)
=
{
b 0 ,b 1 ,...,b M }
z, t
0 ,Goto(2)
(2) Test of the terminating condition: If β ( t ) > 0 ,thenGoto(3),else
h ( z, β M )
t and Stop.
β ( t )
1 if b t = 6
(3) β ( t + 1 )=
β ( t )
2 if b t = 18
β ( t )
3 if b t = 26
t + 1 .Goto(2).
Note here that for a given neighborhood sequence β , z satisfies 0
t
z<Q 1 ,
where Q 1 is given in Eq. 4.58, and also 0
h ( z, β M ) <P . Therefore, we can
u
v
avoid execution of the algorithm for each
by calculating the values of
h ( z, β M ) for all possible values of z and tabulating them beforehand. Several
examples are shown in Table 4.5.
and
4.9.2 Distance function
As was stated in the last section, the length of the minimal path is not always
the same as the distance measure. A different way to describe the distance
 
Search WWH ::




Custom Search