Abstract
In this paper, we present a general framework for digital distance functions, defined as minimal cost paths, on the square grid. Each path is a sequence of pixels, where any two consecutive pixels are adjacent and associated with a weight. The allowed weights between any two adjacent pixels along a path are given by a weight sequence, which can hold an arbitrary number of weights. We build on our previous results, where only two or three unique weights are considered, and present a framework that allows any number of weights. We show that the rotational dependency can be very low when as few as three or four unique weights are used. Moreover, by using n weights, the Euclidean distance can be perfectly obtained on the perimeter of a square with side length 2n. A sufficient condition for weight sequences to provide metrics is proven.
Similar content being viewed by others
References
Borgefors, G.: Distance transformations in digital images. Comput. Vis. Graph. Image Process. 34, 344–371 (1986). https://doi.org/10.1016/S0734-189X(86)80047-0
Breu, H., Kirkpatrick, D., Werman, M.: Linear time Euclidean distance transform algorithms. IEEE Trans. Pattern Anal. Mach. Intell. 17(5), 529–533 (1995). https://doi.org/10.1109/34.391389
Celebi, M.E., Celiker, F., Kingravi, H.A.: On Euclidean norm approximations. Pattern Recognit. 44(2), 278–283 (2011). https://doi.org/10.1016/j.patcog.2010.08.028
Coeurjolly, D., Vacavant, A.: Separable distance transformation and its applications. In: Digital Geometry Algorithms. Theoretical Foundations and Applications to Computational Imaging, Lecture Notes in Computational Vision and Biomechanics, vol 2, pp. 189–214 (2012). https://doi.org/10.1007/978-94-007-4174-4_7
Danielsson, P.E.: Euclidean distance mapping. Comput. Graph. Image Process. 14(3), 227–248 (2008). https://doi.org/10.1016/0146-664X(80)90054-4
Das, P.P., Chakrabarti, P.P.: Distance functions in digital geometry. Inf. Sci. 42, 113–136 (1987). https://doi.org/10.1016/0020-0255(87)90019-3
Denev, A.: Digital distance functions defined by sequence of weights, Bachelor Thesis, Dept. of Information Technology. Uppsala University (2011)
Fabbri, R., da Costa, L.F., Torelli, J.C., Bruno, O.M.: 2D Euclidean distance transform algorithms: a comparative survey. ACM Comput. Surv. 40(1), 1–44 (2008). https://doi.org/10.1145/1322432.1322434
Mukherjee, J.: Linear combination of weighted t-cost and chamfering weighted distances. Pattern Recognit. Lett. 40, 72–79 (2014). https://doi.org/10.1016/j.patrec.2013.12.012
Nagy, B.: Distance functions based on neighbourhood sequences. Publ. Math. Debrecen 63(3), 483–493 (2003)
Nagy, B.: Metric and non-metric distances on \({\mathbb{Z}}^n\) by generalized neighbourhood sequences. In: IEEE Proceedings of 4th International Symposium on Image and Signal Processing and Analysis (ISPA 2005), Zagreb, Croatia, pp. 215–220 (2005). https://doi.org/10.1109/ISPA.2005.195412
Nagy, B.: Distance with generalized neighbourhood sequences in \(nD\) and \(\infty D\). Discrete Appl. Math. 156(12), 2344–2351 (2008). https://doi.org/10.1016/j.dam.2007.10.017
Nagy, B., Strand, R., Normand, N.: A weight sequence distance function. In: ISSM 2013—11th International Symposium on Mathematical Morphology, LNCS, vol. 7883, pp. 292–301 (2013). https://doi.org/10.1007/978-3-642-38294-9_25
Ragnemalm, I.: The Euclidean distance transform in arbitrary dimensions. Pattern Recognit. Lett. 14(11), 883–888 (1993). https://doi.org/10.1016/0167-8655(93)90152-4
Rosenfeld, A., Pfaltz, J.L.: Sequential operations in digital picture processing. J. ACM 13(4), 471–494 (1966). https://doi.org/10.1145/321356.321357
Sethian, J .A.: Level Set Methods and Fast Marching Methods: Evolving Interfaces in Computational Geometry, Fluid Mechanics, Computer Vision, and Materials Science. Cambridge university press, Cambridge (1999)
Strand, R.: Distance Functions and Image Processing on Point-Lattices: with focus on the 3D face- and body-centered cubic grids. Ph.D. thesis, Uppsala University, Sweden (2008). http://urn.kb.se/resolve?urn=urn:nbn:se:uu:diva-9312
Strand, R.: Weighted distances based on neighbourhood sequences. Pattern Recognit. Lett. 28(15), 2029–2036 (2007). https://doi.org/10.1016/j.patrec.2007.05.016
Strand, R., Nagy, B.: A weighted neighborhood sequence distance function with three local steps. In: IEEE Proceedings of 8th International Symposium on Image and Signal Processing and Analysis (ISPA 2011), Dubrovnik, Croatia, pp. 564–568 (2011)
Strand, R., Nagy, B., Borgefors, G.: Digital distance functions on three-dimensional grids. Theor. Comput. Sci. 412, 1350–1363 (2011). https://doi.org/10.1016/j.tcs.2010.027
Strand, R., Normand, N.: Distance transform computation for digital distance functions. Theor. Comput. Sci. 448, 80–93 (2012). https://doi.org/10.1016/j.tcs.2012.05.010
Yamashita, M., Ibaraki, T.: Distances defined by neighborhood sequences. Pattern Recognit. 19(3), 237–246 (1986). https://doi.org/10.1016/0031-3203(86)90014-2
Acknowledgements
Some part of this paper was presented in the conference ISMM 2013: 11th International Symposium on Mathematical Morphology, in Uppsala [13].
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Nagy, B., Strand, R. & Normand, N. Distance Functions Based on Multiple Types of Weighted Steps Combined with Neighborhood Sequences. J Math Imaging Vis 60, 1209–1219 (2018). https://doi.org/10.1007/s10851-018-0805-1
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10851-018-0805-1