Beyond the Hausdorff Metric in Digital Topology

07/05/2021 ∙ by Laurence Boxer, et al. ∙ Niagara University 0

Two objects may be close in the Hausdorff metric, yet have very different geometric and topological properties. We examine other methods of comparing digital images such that objects close in each of these measures have some similar geometric or topological property. Such measures may be combined with the Hausdorff metric to yield a metric in which close images are similar with respect to multiple properties.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

A key question in digital image processing is whether two digital images and represent the same object. If, after magnification or shrinking and translation, copies and of the respective images have been scaled to approximately the same size and are located in approximately the same position, a Hausdorff metric may be employed: if is small, then perhaps and represent the same object; if is large, then and probably do not represent the same object. However, the Hausdorff metric is very crude as a measure of similarity. In this paper, we consider other comparisons of digital images.

2 Preliminaries

Much of this section is quoted or paraphrased from [10].

We use to indicate the set of natural numbers, for the set of integers, and for the set of real numbers.

2.1 Adjacencies

A digital image is a graph , where is a subset of for some positive integer , and is an adjacency relation for the points of . The -adjacencies are commonly used. Let , , where we consider these points as -tuples of integers:

Let , . We say and are -adjacent if

  • There are at most indices for which .

  • For all indices such that we have .

Often, a -adjacency is denoted by the number of points adjacent to a given point in using this adjacency. E.g.,

  • In , -adjacency is 2-adjacency.

  • In , -adjacency is 4-adjacency and -adjacency is 8-adjacency.

  • In , -adjacency is 6-adjacency, -adjacency is 18-adjacency, and -adjacency is 26-adjacency.

We write , or when is understood, to indicate that and are -adjacent. Similarly, we write , or when is understood, to indicate that and are -adjacent or equal.

A subset of a digital image is -connected [17], or connected when is understood, if for every pair of points there exists a sequence such that , , and for .

2.2 Digitally continuous functions

The following generalizes a definition of [17].

Definition 2.1.

[5] Let and be digital images. A single-valued function is -continuous if for every -connected we have that is a -connected subset of .

When the adjacency relations are understood, we will simply say that is continuous. Continuity can be expressed in terms of adjacency of points:

Theorem 2.2.

[17, 5] A function is continuous if and only if in implies . ∎

See also [11, 12], where similar notions are referred to as immersions, gradually varied operators, and gradually varied mappings.

2.3 Pseudometrics and metrics

Definition 2.3.

[13] Let be a nonempty set. Let be a function such that for all ,

  • ;

  • ;

  • ; and

  • .

Then is a pseudometric for . If, further, implies then is a metric for .

Pseudometrics that can be applied to pairs of nonempty subsets of a digital image include the absolute values of the differences in their

  • deviations from convexity. Several such deviations are discussed in [18, 4], for each of which it was shown that two objects can be “close” in the Hausdorff metric yet quite different with respect to the deviation from convexity. These can be adapted to digital images with respect to digital convexity as defined in [7].

  • Euler characteristics. I.e., the function

    where is the Euler characteristic of , is a pseudometric for digital images in . An improper definition of the Euler characteristic for digital images was given in [15]. An appropriate definition is given in [8].

  • Lusternik-Schnirelman category  [1]. I.e., the function

    where is the Lusternik-Schnirelman category of , is a pseudometric for digital images in .

  • diameters. This is discussed below.

The following is easily verified and extends an assertion of [4].

Lemma 2.4.

Let be a pseudometric, . Then is a pseudometric. Further, if at least one of the is a metric, then is a metric.

Here we mention metrics we use in this paper for or . Let , .

  • Let . The metric for is given by

    The special case gives the Manhattan or city block metric , given by

    The special case gives the Euclidean metric , given by

  • The shortest path metric [14]: Let be a connected digital image. For , let

  • The Hausdorff metric based on a metric  [16]: Let be a metric where . The Hausdorff metric for nonempty bounded and closed subsets and of (hence, in the case , finite subsets of ) based on is

We make the following modification of the Hausdorff metric based on as presented in [20].

Definition 2.5.

Let , , . Let be an adjacency on . Then

In the version of the Hausdorff metric based on in [20], . We show below that we can get very different results for the more general situation .

We use the notations for the Hausdorff metric based on the metric , for the Hausdorff metric based on the metric (i.e., ), and for the Hausdorff metric based on for subsets of (i.e., ).

Another metric from classical topology that is easily adapted to digital topology is Borsuk’s metric of continuity [2, 3] based on a metric which is typically, but not necessarily, the Euclidean metric. For digital images and in , define the metric of continuity as the greatest lower bound of numbers such that there are -continuous and with

Proposition 2.6.

Given finite digital images and in and a metric for , .

Proof.

This is largely the argument of the analogous assertion in [2]. Let . Since and are finite, without loss of generality, there exists such that . Then for all -continuous , . Therefore, . ∎

An example for which the inequality of Proposition 2.6 is strict is given in the following.

Theorem 2.7.

Let . Let . Then, using the Manhattan metric for and , we have and .

Proof.

It is clear that .

Notice there is an isomorphism to a subset of . Let be -continuous. By [6], there is a pair of antipodal points such that . Since is an isomorphism, we must have . We will show that either or , as follows.

If then . Then:

  • If then , so .

  • Note so cannot equal .

  • If for then , so .

The cases , , and are similar. Thus . ∎

We say the diameter of a nonempty bounded set with respect to a metric is

We will use the notations for , and for .

We define a function for pairs of nonempty bounded sets in by

We use notations for , and for .

The following is easily verified.

Lemma 2.8.

The function is a pseudometric.

3 Comparing (pseudo)metrics on digital images

In this section, we compare the use of some of the (pseudo)metrics discussed above.

Theorem 3.1.

Let and be nonempty, bounded subsets of . Let be the Hausdorff metric based on the metric and suppose . Then .

Proof.

There exist such that . There exist such that and . So

Similarly, . The assertion follows. ∎

Figure 1: Left: (here, ).
Right:

(here, ).
and are within 1 with respect to the Hausdorff metric based on the Manhattan metric; however, they differ considerably with respect to diameter in the shortest path metric.

By contrast, we have the following.

Example 3.2.

Let such that is even. Let . Let

(See Figure 1.) Then , but while , we have . Thus .

Proof.

It is easy to see that both and have diagonally opposed points that are maximally distant in the metric. Therefore, , so .

Diagonally opposed points of are maximally separated with respect to , so . Maximally separated points of with respect to are

In either case, the unique shortest -path between maximally separated points requires horizontal steps. The number of vertical steps is computed as follows. There are vertical line segments that must be traversed, each of length , so the number of vertical steps is . Thus the number of steps between maximally separated members of is .

Hence for we have . ∎

We do not get an analog of Theorem 3.1 by using the Hausdorff metric based on an adjacency instead of . This is shown in the following example.

Example 3.3.

Let . Let . (See Figure 2.) Then . However, we have the following.

  • For , and , so .

  • For , and , so .

Figure 2: Digital images (left) and (right) for Example 3.3, using . Using the shortest path metric and either or , maximally distant points in are and , and maximally distant points in are and .
Theorem 3.4.

Let and be finite, nonempty -connected subsets of a -connected subset of , where . Suppose we have for some . Then .

Proof.

By hypothesis, given and , there exist , , and -paths from to and from to in such that each of and has length of at most . Since each -adjacency corresponds to a Euclidean distance of at most , it follows that and . It follows that . ∎

We do not get a converse for Theorem 3.4, as the following shows.

Example 3.5.

Let as in Example 3.3. (See Figure 2.) Let . Then . However, and .

Proof.

It is easy to see that .

Since , finding a Hausdorff distance between and comes down to considering a furthest point of from . With respect to and also with respect to , the furthest point of from in the shortest path metric is and its closest point of is . Since and , the assertion follows. ∎

Roughly, it appears that the great differences found in Examples 3.3 and 3.5, between measures based in metrics and measures based on the shortest path metric, are due to significant deviations from convexity. If we consider for a set such as a digital cube, we may find and are more alike, as we see below.

Proposition 3.6.

Let , . Then .

Proof.

Let . Let . Then there exists such that . By definition of , it follows that there is a -path in of length at most from to . Similarly, given in , there is a -path in of length at most from to a point . Therefore, .

Now let . Then given , there is a -path in of length at most from to some . Similarly, given , there is a -path in of length at most from to some . Since every adjacency represents a distance of 1, it follows that and . Thus . The assertion follows. ∎

Using the observation that a -adjacency in , , represents a distance between the adjacent points that is between and , we can generalize the argument used to prove Proposition 3.6, getting the following.

Theorem 3.7.

Let , . Then for , .

4 Further remarks

The Hausdorff metric is often used to compare objects and . It is easy to compute efficiently [19, 9] and gives a good indication of how well each of its arguments approximates the other with respect to location.

However, two objects may be close in the Hausdorff metric and yet have very different geometric or topological properties. Lemma 2.4 tells us that by adding other pseudometrics or metrics, such as those we have discussed, to the Hausdorff metric, we can get another metric in which closeness is more likely to validate the parameters as digital images representing the same physical object.

The suggestions and corrections of an anonymous reviewer are gratefully acknowledged.

References