Image Processing Reference
In-Depth Information
[22] used weighted distance functions (refer to Section 2.3.3 of Chapter 2) in
defining the masks, which are very convenient in expressing the distances of
neighboring pixels around the central pixel. However, in our discussion, we
restrict ourselves to octagonal distances, as their digital disks are easily com-
putable using Theorems 2.26 and 2.27. We also restrict our discussion to 2-D,
as it could be trivially extended to 3-D.
6.1.2.1
Designing Masks
For a neighborhood sequence of length p, a mask should be taken of size
(2p+ 1)×(2p+ 1). This is to ensure that all possible paths of length p around
the neighborhood of a point are considered in the computation. Let us denote
a mask as M and the distance value of a pixel x ∈ M as d(x;B). A typical
mask formed for the octagonal distance function {112} is shown in Fig. 6.2.
In the figure, distance values from the center mask using the distance function
{112} are shown. For pixels that are at a distance greater than p, values are
marked as ∗, as they are irrelevant in the computation.
*
*
3
3
3
*
*
*
3
3
2
3
3
*
3
3
2
1
2
3
3
3
2
1
0
1
2
3
3
3
2
1
2
3
3
*
3
3
2
3
3
*
*
*
3
3
3
*
*
FIGURE 6.2: Chamfering mask of {112}.
6.1.3 Forward and Reverse Scans
Initially, all the object points are set to a very high distance value (at least
more than D max ) and all the background points are assigned to 0. In the
forward scan, the mask is placed at every pixel (say, q) while scanning from
left to right and top to bottom. Hence the visited neighboring pixels around
q belong to the unshaded zone of Fig. 6.3(a). Let the set of visited pixels be
 
Search WWH ::




Custom Search