Graphics Reference
In-Depth Information
a
a
p
c
b
−→
p
c
b
e
d
e
k
(
a
)
(
b
)
Fig. 1.12.
Deletion of pixels: (a) In absence of key pixel; (b) in presence of key
pixel.
Shifting of Pixels
Suppose a GE is generated, and a key pixel is reached. Now during the gen-
eration of a following GE, its first data point may put the preceding key pixel
on the interior contour. For example, consider the Figure 1.13(a). Here
abk
is a part of the GE already generated. Now generating the next GE
kcd
,
the first move from
k
to
c
makes the key pixel (
k
) lie on the interior of the
contour (assuming the enclosed region is on the right).
In such cases, the data point
c
is shifted as shown in Figure 1.13(b). This
preserves connectedness of the pixel
c
with both the GEs and also ensures
single-pixel width of the contour.
···
d
d
c
c
k
−→
k
b
b
a
a
(
a
)
(
b
)
Fig. 1.13.
Shifting of pixels: (a) Contour before shifting; (b) contour after shifting.
Undesirable Loop
Sometimes in the vicinity of key pixels an undesirable loop (contour with a
single pixel hole) may appear due to the generation procedure. For example,
consider Figure 1.14. Here GEs
ak
1
k
2
k
3
are already generated. The next move
from
k
3
to
b
creates an undesirable loop having a single-pixel hole.
To overcome this situation, the pixel
b
is shifted along with an insertion
of a new pixel
e
(as shown in Figure 1.14(b)). Since the shifting of
b
alone
loses the connectivity property between
k
3
and the subsequent pixels, it ne-
cessitates insertion of a new pixel whose location is governed by the concept
of a minimum connected path.
Search WWH ::
Custom Search