Next: CSED Algorithm
Up: Signed Euclidean DT with
Previous: Signed EDT and Voronoi
Once we know where the corners of the digital Voronoi diagram are,
we can correct all errors done by the approximate signed Euclidean
DT algorithm by checking if the real corner of the VP contains any
pixel.
Figure 5.2:
Neighbors to
consider during error correction.
 |
In figure
, p1 is a corner pixel,
neighbored by
p2 = p1+(0,1) and
p3 = p1+(1,0). The nearest
object pixels of p1, p2 and p3 are q1, q2 and
q3, respectively. The signed distances are
SD(p1)=(dpx1,dpy1),
SD(p2)=(dpx2,dpy2) and
SD(p3)=(dpx3,dpy3). With that knowledge, we can actually
compute the limits of the corner of the continuous Voronoi diagram
analytically, since lines L12 and L13 are the
mid-perpendicular of q1q2 and q1q3 respectively.
Using pixel p1 as the center of our coordinate system, we have
L12 is the mid-perpendicular of q1q2, so that
and L13 is the mid-perpendicular of q1q3, so that
Finally, we are interested in the location of the true
corner of the Voronoi diagram, i.e. the intersection of L12
and L13. The true corner,
(cx,cy), gives us the
maximum values of (nx,ny) to consider. In particular, for
nx, there is no need to go further than
 |
(5.13) |
Equations (
), (
) and (
)
require some more attention. In (
), a singularity
could occur if
dpy1 = dpy2-1. Fortunately this never
happens with
.
In (
), there is a
singularity if
dpy1 = dpy3. When this happens, it means
that L13 is a vertical line, for which
is an appropriate slope. Finally, in (
), a
singularity occurs when
.
This means
that L12 and L13 are parallels, which only occurs for
.
In that case, the pixels in
the diagonal direction should be tested until the first one that
does not change value.
Next: CSED Algorithm
Up: Signed Euclidean DT with
Previous: Signed EDT and Voronoi
Olivier Cuisenaire
1999-10-05