Graphics Reference
In-Depth Information
Because of the difference between 4- and 8-connected, note the difference between
a 4-component and an 8-component. It is easy to show that every 8-component is the
union of 4-components (Exercise 2.2.2). A similar comment holds for the components
of sets in
Z
3
.
Some Definitions.
We assume that the sets
S
below are subsets of some fixed set
P
in
Z
n
. In practice,
P
is usually a large but finite solid rectangular set representing the
whole
picture
for a scene, but it could be all of
Z
n
.
The
complement
of
S
in
P
, denoted by
S
c
, is,
P
-
S
.
The
border
of
S
, B(
S
), consists of those points of
S
that have neighbors belonging
to
S
c
if
S
π
P
or neighbors in
Z
n
-
P
if
S
=
P
.
The
background
of
S
is the union of those components of
S
c
that are either
unbounded in
Z
n
or that contain a point of the border of the picture
P
.
The
holes
of
S
are all the components of
S
c
that are not contained in the back-
ground of
S
.
S
is said to be
simply connected
if
S
is connected and has no holes.
The
interior
of
S
, i
S
, is the set
S
- B(
S
).
An
isolated point
of
S
is a point of
S
that has no neighbors in
S
.
If
S
is a finite set, then the
area
of
S
is the number of points in
S
.
See Figure 2.4 for some examples.
Definition.
There are several ways to define the
distance
d between two points (i,j)
and (k,l) in
Z
2
, or, more generally, between points
p
and
q
in
Z
n
:
2
2
(
)
(
)
(a)
Euclidean distance
:
di
=-
k j
+-
l
or d =|
pq
|.
n
Â
1
(b)
taxicab distance
:
d =|k - i|+|j - l| or
d
=
q
-
p
.
i
i
i
=
This distance function gets its name from the fact that a taxi driving from one
location to another along orthogonal streets would drive that distance.
{
}
(c)
max distance
:
d = max (|k - i|,|j - l|) or
d
=
max
q
-
p
.
i
i
1
££
in
Figure 2.4.
Examples of discrete
concepts.