next up previous contents
Next: Influence of the neighborhood Up: Errors in approximate EDT Previous: Errors in approximate EDT

Errors with a $3 \times 3$ neighborhood

Let us first consider that the approximate EDT was produced using a $3 \times 3$ (8-direct) neighborhood, such as in Danielsson's 8SED [37], Leymarie's [95] and Ragnelmam's [127] algorithms. Either in raster scanning or by increasing distance order, these algorithms propagate the information from sources - the object pixels - to the rest of the image. As illustrated at figure [*], errors occur when the source of a pixel differs from the sources of all its 8-direct neighbors. p(0,0) is closer to q2(x2,y2) than q1(x1,y1) or q3(x3,y3), but pixels p1(1,0) and p3(1,1) are not.

  
Figure 3.2: A typical error made by an approximate EDT using the $3 \times 3$ neighborhood. Object pixel q2 is hidden from pixel p by object pixels q1 and q3, that are closer to p1 and p3, respectively.
\begin{figure}\centerline{\epsfxsize=11cm
\epsfbox{figures/chapter2/typicalerror.eps}}
\end{figure}

In general, since q2 is the source of p, we have

 
x22+y22 < x12+y12 (3.1)

 
x22+y22 < x32+y32 (3.2)

Similarly, since q1 is the source of p1,

 \begin{displaymath}(x_1-1)^2+y_1^2 \leq (x_2-1)^2+y_2^2
\end{displaymath} (3.3)

and q3 the source of p3,

 \begin{displaymath}(x_3-1)^2+(y_3-1)^2 \leq (x_2-1)^2+(y_2-1)^2
\end{displaymath} (3.4)

In [146], Shih restricts these conditions further by setting implicitly x1=x2+1 and x3=x2-1, and considers strict inequalities for eq. [*] and [*]. Therefore he misses many possible errors, including that of Figure [*], with q1(17,1), q2(15,8) and q3(13,11).

  
Figure 3.3: Relative locations (dx,dy) for which it is possible that an error occurs, with $0 \leq dx \leq 200$ and $0 \leq dy
\leq 200$.
\begin{figure}\epsfysize=4cm
\centerline{\epsffile{figures/chapter2/locations.eps}}
\end{figure}

Instead, we find the integer solutions of equations [*] to [*] by exhaustive search. In order to know if an error could occur at the relative location (x2,y2), we check eq. [*] for all integer couples (x1,y1) with

 \begin{displaymath}0 \leq x_1 \leq \sqrt{x_2^2+y_2^2+1}
\end{displaymath} (3.5)

 \begin{displaymath}\sqrt{x_2^2+y_2^2+1-x_1^2} \leq y_1 \leq
\sqrt{x_2^2+y_2^2+1-x_1^2} + 1
\end{displaymath} (3.6)

Equation ([*]) guarantees that ([*]) is fulfilled. If we can find such a couple (x1,y1) satisfying ([*]), and if we find another couple (x3,y3) satisfying ([*]) and ([*]) in a similar way, then it is possible that errors do occur for the relative location (x2,y2).

Applying this exhaustive search for all couples (x2,y2) within a $200 \times 200$ range, we find the result of Figure [*], where black pixels correspond to possible error locations. Defining the possible errors ratio as the percentage of possible error locations among all locations, we obtain the values of Figure [*], i.e. $20\%$ for a $100
\times 100$ image, and more than $50\%$ for images larger than $400 \times 400$. Obviously, possible locations are not uncommon. In particular, it means that an ``error locations lookup table'' approach to detect errors, such as suggested by Shih [146], is not practical.

  
Figure 3.4: Possible errors ratio for various image sizes
\begin{figure}\epsfysize=6cm
\centerline{\epsffile{figures/chapter2/possible_error2.eps}}
\end{figure}


next up previous contents
Next: Influence of the neighborhood Up: Errors in approximate EDT Previous: Errors in approximate EDT
Olivier Cuisenaire
1999-10-05