Optimal conditions for connectedness
of discretized sets
Constructing a discretization of a given set is a major problem in various theoretical and applied disciplines. An offset discretization of a set is obtained by taking the integer points inside a closed neighborhood of of a certain radius. In this note we determine a minimum threshold for the offset radius, beyond which the discretization of a disconnected set is always connected. The results hold for a broad class of disconnected and unbounded subsets of , and generalize several previous results. Algorithmic aspects and possible applications are briefly discussed.
Keywords: discrete geometry, geometrical features and analysis, connected set, discrete connectivity, connectivity control, offset discretization
Constructing a discretization of a set is a major problem in various theoretical and applied disciplines, such as numerical analysis, discrete geometry, computer graphics, medical imaging, and image processing. For example, in numerical analysis, one may need to transform a continuous domain of a function into its adequate discrete analogue. In raster/volume graphics, one looks for a rasterization that converts an image described in a vector graphics format into a raster image built by pixels or voxels. Such studies often elucidate interesting relations between continuous structures and their discrete counterparts.
Some of the earliest ideas and results for set discretization belong to Gauss (see, e.g., ); Gauss discretization is still widely used in theoretical research and applications. A number of other types of discretization have been studied by a large number of authors (see, e.g., [1, 2, 10, 14, 18, 19, 20, 27, 28, 32] and the bibliographies therein). These works focus on special types of sets to be discretized, such as straight line segments, circles, ellipses, or some other classes of curves in the plane or on other surfaces.
An important requirement for any discretization is to preserve certain topological properties of the original object. Perhaps the most important among these is the connectedness or disconnectedness of the discrete set obtained from a discretization process. This may be crucial for various applications ranging from medicine and bioinformatics (e.g. organ and tumor measurements in CT images, beating heart or lung simulations, protein binding simulations) to robotics and engineering (e.g. motion planning, finite element stress simulations). Most of the works cited above address issues related to the connectedness of the obtained discretizations. To be able to perform a reliable study of the topology of a digital object by means of shrinking, thinning and skeletonization algorithms (see, e.g. [4, 7, 21, 29, 31] and the bibliography therein), one needs to start from a faithful digitization of the original continuous set.
Perhaps the most natural and simple type of discretization of a set is the one defined by the integer points within a closed neighborhood of of a certain radius . This will be referred to as an -offset discretization. Several authors have studied properties of offsets of certain curves and surfaces [3, 5, 11, 17], however without being concerned with the properties of the integer set of points enclosed within the offset. In [12, 15] results are presented on offset-like conics discretizations. Conditions for connectedness of offset discretizations of bounded path connected or connected sets are presented in [8, 9, 30].
While all related works study conditions under which connectedness of the original set is preserved upon discretization, in the present paper we determine minimum thresholds for the offset radius, beyond which disconnectedness of a given original set is never preserved, i.e., the obtained discretization is always connected. The results hold for a broad class of disconnected subsets of , which are allowed to be unbounded. The technique we use is quantizing the (possibly uncountable and unbounded) set by the minimal countable (possibly infinite) set of voxels containing , which makes the use of induction feasible. To our knowledge, these are the first results concerning offset discretizations of disconnected sets. They extend a result from  which gives best possible bounds for an offset radius to guarantee 0- and -connectedness of the offset discretization of a bounded path-connected set; they also generalize a result from  to unbounded connected sets.
All considerations take place in with the Euclidean norm. By we denote the Euclidean distance between points . Given two sets , the number is called the gap111The function itself, defined on the subsets of is called a gap functional. See, e.g.,  for more details. between the sets and . is the closed -ball of radius and center (dependence on will be omitted when it is clear from the context). Given a set , is its cardinality. The closed -neighborhood of , which we will also refer to as the -offset of , is defined by . is the closure of , i.e., the union of and the limit points of . is connected if it cannot be presented as a union of two nonempty subsets that are contained in two disjoint open sets. Equivalently, is connected if and only if it cannot be presented as a union of two nonempty subsets each of which is disjoint from a closed superset of the other.
In a discrete geometry setting, considerations take place in the grid cell model. In this model, the regular orthogonal grid subdivides into -dimensional unit hypercubes (e.g., unit squares for or unit cubes for ). These are regarded as -cells and are called hypervoxels, or voxels, for short. The -cells, -cells, and -cells of a voxel are referred to as facets, edges, and vertices, respectively.
Given a set , is its Gauss discretization, while is its discretization of radius , which we will also call the -offset discretization of .
Two integer points are -adjacent for some , , iff no more than of their coordinates differ by 1. A -path (where ) in a set is a sequence of integer points from such that every two consecutive points of the path are -adjacent. Two points of are -connected (in ) iff there is a -path in between them. is -connected iff there is a -path in connecting any two points of . If is not -connected, we say that it is -disconnected. A maximal (by inclusion) -connected subset of is called a -(connected) component of . Components of nonempty sets are nonempty and any union of distinct -components is -disconnected. Two voxels are -adjacent if they share a -cell. Definitions of connectedness and components of a set of voxels are analogous to those for integer points.
In the proof of our result we will use the following well-known facts (see ).
Any closed -ball with a radius greater than or equal to contains at least one integer point.
Let and be sets of integer points, each of which is -connected. If there are points and that are -adjacent, then is -connected.
If and are sets of integer points, each of which is -connected, and , then is -connected.
Given a closed -ball with , is -connected.
3 Main Result
In this section we prove the following theorem.
Let , , be a disconnected set such that is connected. Then the following hold:
is -connected for all .
is at least 0-connected for all .
These bounds are the best possible which always respectively guarantee and 0 connectedness of .
The proof of the theorem is based on the following fact.
Let be an arbitrary disconnected set (possibly infinite), such that is connected. Let denote the (possibly infinite) set of voxels intersected by . Then can be ordered in a sequence with the following property:
To simplify the notation, let stand for the union of a family of sets . Let be a maximal by inclusion subset of satisfying Property (1). Note that always exists, no matter if is finite or infinite. Assume for contradiction that . By the maximality of it follows that does not intersect the closed set , and does not intersect the closed set . Then we have that is the union of the nonempty sets and , and each of them is disjoint from a closed superset of the other ( and , respectively), which is impossible if is connected. ∎
For the proof of both parts of the theorem we use induction on to establish the claimed connectedness of .
Let , i.e. the set consists of a single voxel and . By Fact 1 we have that . Denote for brevity and assume for contradiction that has at least two -connected components. Let be one of these components. Denote and define the sets and . Then we have that . To see why, assume that there is , . By Fact 1, contains an integer point . Then and . Then , a contradiction.
Since is bounded, it follows that is finite, and therefore , , and are closed. Hence,
Next, we observe that . Otherwise, we would have
where and , as is disjoint from and is disjoint from ; thus would be a union of two nonempty sets, each of which is disjoint from a closed set containing the other (since and are closed), which contradicts the connectedness of . Then there exist points , , such that
Hence, there is a point , such that , which is possible only if and . Thus it follows that . Since is a limit point of , there is a point , such that , provided that the radius is strictly greater than . Since , we also have that . Then Fact 4 implies that points and are -connected in , which contradicts the assumption that is an -connected component of with .
Now suppose that is -connected for some . We have
Since the closed -neighborhood of a union of two sets equals the union of their -neighborhoods, it follows that
Let us denote by a common face of voxel and the polyhedral complex composed by the voxels , i.e., . W.l.o.g., we can consider the case where is a facet of (i.e., a cell of topological dimension ), the cases of lower dimension faces being analogous. Let be the hyperplane in which is the affine hull of . Let be the subset of the set of grid-points contained in .
By Claim 3, there is a point . Consider the -ball . Then is an -ball with the same center and radius. Applying Fact 1 to in the -dimensional hyperplane , we obtain that contains at least one grid point , which is a vertex of facet . Since is a limit point of , there exists a point , such that the ball contains , too. By construction, is common for the sets and . The former is -connected by the same argument used in the induction basis, while the latter is -connected by the induction hypothesis. Then by Fact 3, their union is -connected, as well. This establishes Part 1.
Part 2. The proof of this part is similar to the one of Part 1. Note that in the base case (i.e. when is contained in a single voxel ), if then it is possible to have (e.g., if consists of a single point that is the center of ). If that is the case, the statement follows immediately. Thus, suppose that . By definition, . For any , is -connected by Fact 4. We also have that any of the nonempty sets contains a vertex of . Since any two vertices of a grid cube are at least 0-adjacent, it follows that any subset of vertices of is at least 0-connected. Then by Fact 2, is at least 0-connected.
The rest of the proof parallels the one of Part 1, with the only difference that point is common for the sets and , each of which is 0-connected (the former by an argument used in the induction basis, and the latter by the induction hypothesis). Then Fact 3 implies that their union is 0-connected, as stated.
Figure 1 illustrates that the obtained bounds for are the best possible: if equals (resp. ), then may not be -connected (resp. 0-connected). This completes the proof of the theorem. ∎
The proof of Theorem 3.1 implies the following corollary.
If () is connected, then is -connected for all , and is at least 0-connected for all .
The above in turn implies:
If () is disconnected but is connected for some , then is -connected, and is at least 0-connected.
4 Algorithmic aspects and applications
Let be a closed disconnected subset of where . Denote by , or , the minimum value of an offset radius for which is -connected. Let be the smallest offset radius for which is connected. Knowing the exact value of or having a bound on it, one can easily estimate with the help of Corollary 2.
Let be a bounded set with closed components and be the gap between and for . It is not hard to see that , where . Given the values , can be found in time. Another upper bound on is given by the radius of the minimal bounding sphere for . Recall that, given a non-empty family of bounded sets in , a minimal bounding sphere for that family is the sphere of minimum radius such that the closed ball bounded by the sphere contains all sets of the family. Corollary 2 implies that and are -connected, while and are -connected. For the special case where is a set of points in , can be computed in linear time for any fixed dimension by Megiddo’s “prune and search” minimal bounding sphere algorithm [24, 25]. In that case we also have the following relation.
Let be a set of points in . Then .
Let be the minimum bounding sphere of with center and radius . If , then and are end-points of a diameter of and .
Now suppose that . Suppose that contains two points and from , which are endpoints of a diameter of . Let be another point from . If , then it is easy to see that at least one of the inequalities or holds. If , then . Thus we have that that , as equality holds if and only if a point from is a center of .
Now consider the case where does not contain endpoints of a diameter of . Then contains a set of at least three points, such that the center belongs to the convex hull of (otherwise the sphere would not be minimum enclosing for ). Suppose that contains no point at the center . Then there are points with , which once again implies . To see why, assume for contradiction that the diameter of satisfies . Then, if , the polytope cannot contain which is at a distance from any of its vertices that are elements of . If , then must be among the vertices of , since equals the diameter of and is achieved for a pair of its vertices. If contains a point that coincides with , then we clearly have . ∎
It was shown in  that, given an array of gap values , can be computed in time. Here we observe that this can be performed much more efficiently in time by constructing a minimum spanning tree of a complete graph on vertices, for which the array is the adjacency matrix of edge weights. This can be done, e.g., by Prim’s algorithm  with arithmetic operations. Then is the value of the maximum edge weight in the obtained spanning tree (recall that the (multi)set of weights is unique for all minimum spanning trees of a graph).
In the Introduction we briefly discussed the theoretical and practical worth of results like those presented in this article. We conclude by adding one more comment. Suppose that a connected set (e.g., a continuous image) to be discretized is partially “flawed” and made noisy by discarding some isolated points or lines from the image, whose removal makes it disconnected. Nonetheless, Theorem 3.1 guarantees that one can get a faithful connected digitization of by choosing an offset size specified by the theorem.
In this note we obtained theoretical conditions for connectedness of offset discretizations of sets in higher dimensions. An important future task is seen in computer implementation and testing the topological properties and visual appearance of offset discretizations of varying radius. It would also be interesting to study similar properties of other basic types of discretization.
-  E. Andres, Discrete linear objects in dimension : the standard model, Graphical Models 65(1-3) (2003) 92–111.
-  E. Andres, Discrete circles, rings and spheres, Computers & Graphics 18(5) (1994) 695–706.
-  F. Anton, I. Emiris, B. Mourrain, M. Teillaud, The offset to an algebraic curve and an application to conics, In: O. Gervasi et al. (Eds.), ICCSA 2005, LNCS, vol. 3480, Springer, Heidelberg, 2005, pp. 683–696.
-  C. Arcelli, G. Sanniti di Baja, Skeletons of planar patterns, in: T.Y. Kong, A. Rosenfeld (Eds.), Topological Algorithms for Digital Image Processing, Elsevier, Amsterdam, 1996, pp. 99â143.
-  E. Arrondo, J. Sendra, J.R. Sendra, Genus formula for generalized offset curves, J. Pure and Applied Algebra 136(3) (1999) 199–209.
-  G. Beer, Topologies on Closed and Closed Convex Sets, Mathematics and its Applications, vol. 268, Kluwer Acad. Publisher, 1993.
-  G. Borgefors, G. Ramella, G. Sanniti di Baja, Shape and topology preserving multi-valued image pyramids for multi-resolution skeletonization, Pattern Recognition Letters 22(6/7) (2001) 741–751
-  V.E. Brimkov, Connectedness of offset digitizations in higher dimensions, LNCS vol. 6026, Springer, Berlin Heidelberg, 2010, 36–46.
-  V.E. Brimkov, R.P. Barneva, B. Brimkov, Connected distance-based rasterization of objects in arbitrary dimension, Graphical Models (2011) 73 323–334.
-  D. Cohen-Or, A. Kaufman, 3D line voxelization and connectivity control, IEEE Computer Graphics & Applications 17 (1997) 80–87.
-  D. Cox, J. Little, D. O’Shea, Using Algebraic Geometry, Springer-Verlag, New York, 1998.
-  I. Debled-Rennesson, E. Domenjoud, D. Jamet, Arithmetic discrete parabolas, In: Bebis, G. et al. (Eds.) 2nd Internat. Symposium on Visual Computing, LNCS, vol. 4292, Springer, Heidelberg, 2006, pp. 480–489.
-  R. Engelking, General Topology. Revised and Completed Edition, Heldermann Verlag, Berlin, 1989.
-  O. Figueiredo, J.-P. Reveillès, New results about 3D digital lines, In: R.A. Melter et al. (Eds.), Internat. Conference “Vision Geometry V.” SPIE, vol. 2826, 1996, pp. 98–108.
-  Ch. Fiorio, D. Jamet, J.-L. Toutant, Discrete circles: An arithmetical approach based on norms, In: Internat. Conference “Vision-Geometry XIV” SPIE, vol. 6066, pp. 60660C, San Jose, CA, 2006.
-  R.W. Hall, T.Y. Kong, A. Rosenfeld, Shrinking binary images, in: T.Y. Kong, A. Rosenfeld (Eds.), Topological Algorithms for Digital Image Processing, Elsevier, Amsterdam, 1996, pp. 31â98.
-  C.M. Hoffmann, P.J. Vermeer, Eliminating extraneous solutions for the sparse resultant and the mixed volume, J. Symbolic Geom. Appl. 1(1) (1991) 47–66.
-  A. Jonas, N. Kiryati, Digital representation schemes for 3D curves, Pattern Recognition 30(11) (1997) 1803–1816.
-  A. Kaufman, D. Cohen, R. Yagel, Volume graphics, Computer 26 (1993) 51–64.
-  C.E. Kim, Three dimensional digital line segments, IEEE Transactions on Pattern Analysis and Machine Intelligence 5(2) (1983) 231–234.
-  R. Klette, A. Rosenfeld, Digital Geometry – Geometric Methods for Digital Picture Analysis, Morgan Kaufmann, San Francisco, 2004.
-  T.Y. Kong, Digital topology, In: Davis, L.S. (Ed.), Foundations of Image Understanding, pp. 33–71, Kluwer, Boston, Massachusetts, 2001.
-  E. Krätzel, Zahlentheorie, Berlin, VEB Deutscher Verlag der Wissenschaften, 1981.
-  Linear-time algorithms for linear programming in and related problems, SIAM J. Computing 12 (1983) 759–776.
-  N. Megiddo, Linear programming in linear time when the dimension is fixed, Journal of the ACM 31 (1984) 114–127.
-  R.C. Prim, Shortest connection networks and some generalizations, Bell System Technical Journal 36 (1957) 1389–1401.
-  A. Rosenfeld, Connectivity in digital pictures, Journal of the ACM 17 (1970) 146–160.
-  A. Rosenfeld, Arcs and curves in digital pictures, Journal of the ACM 20(1) (1973) 81–87.
-  P.K. Saha, G. Borgefors, G. Sanniti di Baja, A survey on skeletonization algorithms and their applications, Pattern Recognition Letters 76 (2016) 3–12
-  P. Stelldinger, Image Digitization and its Influence on Shape Properties in Finite Dimensions, IOS Press, Amsterdam, 2008.
-  S. Svensson, G. Sanniti di Baja, Simplifying curve skeletons in volume images, Computer Vision and Image Understanding 90(3) (2003) 242–257
-  M. Tajine, C. Ronse, Topological properties of Hausdorff discretization, and comparison to other discretization schemes, Theoretical Computer Science 283 (2002) 243–268.