Graphics Reference
In-Depth Information
2 y j =2 aq 2
and
y j +2 +2 y j +1 + y j =2 aq 2 ,
r ll j
0 .
y 0 +2 aq 2 which involves
just three additions to get the next value from two preceding values at hand.
Therefore, we see that one does not need to store all the points on the curve.
This leads to the recurrence formula y 2 =2 y 1
1.6.4 Implementation Strategies
After approximating a contour of single pixel width, we get a set of key pixels
with some labels. The labels indicate the geometrical entity between any two
key pixels. We can use this set of key pixels in many applications. When we
pay attention to regeneration of the contour, we immediately see that it results
in its approximated version (output). During regeneration of a closed contour,
only the outer contour is traced using Freeman's chain code (clockwise sense),
assuring the positions of the key pixels on it. In other words, key pixels are
considered to be the guiding pixels (important for preserving the input shape)
during regeneration.
Note that due to the approximation scheme, sometimes the following un-
desirable situations may arise:
The regenerated contour may not have single-pixel width.
The key pixel may become an interior pixel of the contour.
To overcome these situations, the contours can be traced from the ordered
regenerated data set, keeping the following operations in mind.
Deletion of Pixels
While tracing a contour with the enclosed region lying on the right, if a pixel
on the contour finds more than one neighbor in its eight-neighborhood domain,
that neighbor is selected as the contour pixel for which the other neighboring
pixels become interior pixels, and they are then deleted. But, if there is a
key pixel falling in such a neighborhood, then the key pixel is retained as the
contour pixel and the rest are deleted. This enables us to keep the key pixel
always on the contour, and thus, improves approximation of the input. Figures
1.12(a) and (b) depict the situation. Considering “c” to be current pixel and
“p” the previous pixel, the contour (clockwise) is “a” for the situation as
shown in Figure 1.12(a), but if the situation is as in Figure 1.12(b), the next
pixel on the contour is then k (the key pixel).
Search WWH ::




Custom Search