
Image Topology 319
FIGURE 11.9: Comparison of three metrics
As with the Euclidean distance, the first two properties are immediate; to prove the triangle
inequality takes a little effort. The metric d
4
is sometimes known as the taxicab metric, as
it gives the length of the shortest taxicab route through a rectangular grid of streets.
The Distance Transform
In many applications, it is necessary to find the distance of every pixel from a region
R. This can be done using the standard Euclidean distance defined previously. However,
this means that to calculate the distance of (x, y) to R, we need to determine all possible
distances from (x, y) to pixels in