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 2adjacency.

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

In , adjacency is 6adjacency, adjacency is 18adjacency, and adjacency is 26adjacency.
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 singlevalued 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:
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].

LusternikSchnirelman category [1]. I.e., the function
where is the LusternikSchnirelman 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. ∎
By contrast, we have the following.
Example 3.2.
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 .
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.
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

[1]
A. Borat and T. Vergili,
Digital LusternikSchnirelmann category,
Turkish Journal of Mathematics 42 (2018), 18451852
https://journals.tubitak.gov.tr/math/issues/mat18424/mat42423180194.pdf 
[2]
K. Borsuk,
On some metrizations of the hyperspace of compact sets,
Fundamenta Mathematicae 41 (1954), 168202
http://matwbn.icm.edu.pl/ksiazki/fm/fm41/fm41121.pdf  [3] K. Borsuk, Theory of Retracts, Polish Scientific Publishers, Warsaw, 1967.

[4]
L. Boxer, Computing Deviations from Convexity in Polygons,
Pattern Recognition Letters 14 (1993), 163167
https://www.sciencedirect.com/science/article/abs/pii/016786559390067N 
[5]
L. Boxer,
A classical construction for the digital fundamental group,
Journal of Mathematical Imaging and Vision 10 (1999), 5162
https://link.springer.com/article/10.1023/A:1008370600456 
[6]
L. Boxer, Continuous maps on digital simple closed curves,
Applied Mathematics 1 (2010), 377386.
http://purple.niagara.edu/boxer/res/papers/10am.pdf 
[7]
L. Boxer,
Convexity and freezing sets in digital topology,
Applied General Topology 22 (1) (2021), 121  137
https://polipapers.upv.es/index.php/AGT/article/view/14185/13716 
[8]
L. Boxer, I. Karaca, and A. Oztel, Topological Invariants in Digital Images,
Journal of Mathematical Sciences: Advances and Applications 11(2), 2011, 109140.
http://scientificadvances.co.in/admin/imgdata/678/images/B
JMSAALaurenceBoxeretal.
D.pdf 
[9]
L. Boxer and R. Miller,
Coarse grained gather and scatter operations
with applications,
Journal of Parallel and Distributed Computing 64 (2004), 12971320
https://www.sciencedirect.com/science/article/abs/pii/S0743731504001285 
[10]
L. Boxer and P.C. Staecker,
Fundamental groups and Euler characteristics of spherelike digital images,
Applied General Topology 17(2), 2016, 139158.
https://polipapers.upv.es/index.php/AGT/article/view/4624/6671 
[11]
L. Chen, Gradually varied surfaces and its optimal uniform approximation,
SPIE Proceedings 2182 (1994), 300307.
https://spie.org/Publications/Proceedings/Paper/10.1117/12.171078
?originid=x4325startvolumenumber=02100  [12] L. Chen, Discrete Surfaces and Manifolds, Scientific Practical Computing, Rockville, MD, 2004
 [13] J. Dugundji, Topology, Allyn and Bacon, Boston, 1966

[14]
SE Han,
Nonproduct property of the digital fundamental group,
Information Sciences 171 (2005), 7391
https://www.sciencedirect.com/science/article/abs/pii/S0020025504001008 
[15]
S.E. Han, Digital fundamental group and Euler characteristic of a connected sum of
digital closed surfaces,
Information Sciences 177 (2007), 33143326
https://www.sciencedirect.com/science/article/abs/pii/S0020025507000096  [16] S.B. Nadler, Jr., Hyperspaces of Sets, Marcel Dekker, New York, 1978

[17]
A. Rosenfeld,
‘Continuous’ functions on digital images,
Pattern Recognition Letters 4 (1987), 177184
https://www.sciencedirect.com/science/article/abs/pii/0167865586900176 
[18]
H.I. Stern,
Polygonal entropy: a convexity measure,
Pattern Recognition Letters 10 (4) (1989), 229235
https://www.sciencedirect.com/science/article/abs/pii/0167865589900937 
[19]
R. Shonkwiler,
An image algorithm for computing the Hausdorff
distance efficiently in linear time,
Information Processing Letters 30 (2) (1989), 8789
https://www.sciencedirect.com/science/article/abs/pii/0020019089901142
?via3Dihub 
[20]
T. Vergili,
Digital Hausdorff distance on a connected digital image,
Communications Faculty of Sciences University of Ankara Series A1 Mathematics and Statistics 69 (2)
(2020), 7688
https://dergipark.org.tr/en/download/articlefile/1189720
Comments
There are no comments yet.