Skip to main content
Log in

Efficiently Testing Digital Convexity and Recognizing Digital Convex Polygons

  • Published:
Journal of Mathematical Imaging and Vision Aims and scope Submit manuscript

Abstract

A set \(S \subset \mathbb {Z}^2\) of integer points is digital convex if \({{\,\mathrm{conv}\,}}(S) \cap \mathbb {Z}^2 = S\), where \({{\,\mathrm{conv}\,}}(S)\) denotes the convex hull of S. In this paper, we consider the following two problems. The first one is to test whether a given set S of n lattice points is digital convex. If the answer to the first problem is positive, then the second problem is to find a polygon \(P\subset \mathbb {Z}^2\) with minimum number of edges and whose intersection with the lattice \(P\cap \mathbb {Z}^2\) is exactly S. We provide linear-time algorithms for these two problems. The algorithm is based on the well-known quickhull algorithm. The time to solve both problems is \(O(n + h \log r) = O(n + n^{1/3} \log r)\), where \(h = \min (|{{\,\mathrm{conv}\,}}(S)|, n^{1/3})\) and r is the diameter of S.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10

Similar content being viewed by others

References

  1. Klette, R., Rosenfeld, A.: Digital Geometry: Geometric Methods for Digital Picture Analysis. Elsevier, Amsterdam (2004)

    MATH  Google Scholar 

  2. Ronse, C.: A bibliography on digital and computational convexity (1961–1988). IEEE Trans. Pattern Anal. Mach. Intell. 11, 181–190 (1989)

    Article  Google Scholar 

  3. Minkowski, H., Zahlen, Geometrie der.: . No. vol. 2 in Geometrie der Zahlen, B.G. Teubner (1910)

  4. Kim, C.E., Rosenfeld, A.: Digital straight lines and convexity of digital regions. IEEE Trans. Pattern Anal. Mach. Intell. 4(2), 149–153 (1982)

    Article  Google Scholar 

  5. Kim, C.E., Rosenfeld, A.: Convex digital solids. IEEE Trans. Pattern Anal. Mach. Intell. 4(6), 612–618 (1982)

    Article  Google Scholar 

  6. Chassery, J.-M.: Discrete convexity: definition, parametrization, and compatibility with continuous convexity. Comput. Vis. Graph. Image Process. 21(3), 326–344 (1983)

    Article  Google Scholar 

  7. Kishimoto, K.: Characterizing digital convexity and straightness in terms of length and total absolute curvature. Comput. Vis. Image Underst. 63(2), 326–333 (1996)

    Article  Google Scholar 

  8. Chaudhuri, B.B., Rosenfeld, A.: On the computation of the digital convex hull and circular hull of a digital region. Pattern Recogn. 31(12), 2007–2016 (1998)

    Article  Google Scholar 

  9. Debled-Rennesson, I., Rémy, J.-L., Rouyer-Degli, J.: Detection of the discrete convexity of polyominoes. Discrete Applied Mathematics, vol. 125, no. 1, pp. 115 – 133, 2003. In: 9th International Conference on Discrete Geometry for Computer Imagery (DGCI 2000)

  10. Brlek, S., Lachaud, J.-O., Provençal, X., Reutenauer, C.: Lyndon + Christoffel = digitally convex. Pattern Recognition, vol. 42, no. 10, pp. 2239–2246, 2009. Selected papers from the 14th IAPR International Conference on Discrete Geometry for Computer Imagery (2008)

  11. Berg, M.D., Cheong, O., Kreveld, M.V., Overmars, M.: Computational Geometry: Algorithms and Applications, 3rd edn. Springer, Santa Clara (2008)

    Book  Google Scholar 

  12. Yao, A.C.-C.: A lower bound to finding convex hulls. J. ACM 28, 780–787 (1981)

    Article  MathSciNet  Google Scholar 

  13. Preparata, F.P., Hong, S.J.: Convex hulls of finite sets of points in two and three dimensions. Commun. ACM 20, 87–93 (1977)

    Article  MathSciNet  Google Scholar 

  14. Chan, T.M.: Optimal output-sensitive convex hull algorithms in two and three dimensions. Discrete Comput. Geom. 16, 361–368 (1996)

    Article  MathSciNet  Google Scholar 

  15. Kirkpatrick, D., Seidel, R.: The ultimate planar convex hull algorithm? SIAM J. Comput. 15(1), 287–299 (1986)

    Article  MathSciNet  Google Scholar 

  16. Pick, G.: “Geometrisches zur zahlenlehre,” Sitzungsberichte des Deutschen Naturwissenschaftlich-Medicinischen Vereines für Böhmen “Lotos”. Prag 47–48, 1899–1900 (1899)

    Google Scholar 

  17. Ehrhart, E.: Sur les polydères rationnels homothétiques à n dimensions. Technical report, académie des sciences, Paris (1962)

  18. Barvinok, A.I.: A polynomial time algorithm for counting integral points in polyhedra when the dimension is fixed. Math. Oper. Res. 19(4), 769–779 (1994)

    Article  MathSciNet  Google Scholar 

  19. Barvinok, A.I.: Computing the Ehrhart polynomial of a convex lattice polytope. Discrete Comput. Geom. 12, 35–48 (1994)

    Article  MathSciNet  Google Scholar 

  20. Asano, T., Brimkov, V.E., Barneva, R.P.: Some theoretical challenges in digital geometry: a perspective. Discrete Appl. Math. 157(16), 3362–3371 (2009)

    Article  MathSciNet  Google Scholar 

  21. Feschet, F., Tougne, L.: On the min DSS problem of closed discrete curves. Electron. Notes Discrete Math. 12, 325–336 (2003)

    Article  MathSciNet  Google Scholar 

  22. Kim, C.E.: Digital convexity, straightness, and convex polygons. IEEE Trans. Pattern Anal. Mach. Intell. 4, 618–626 (1982)

    Article  Google Scholar 

  23. Gérard, Y.: Recognition of digital polyhedra with a fixed number of faces. In: Normand, N., Guédon, J., Autrusseau, F. (eds.) Discrete Geometry for Computer Imagery, pp. 415–426. Springer International Publishing, Cham (2016)

    Chapter  Google Scholar 

  24. Gerard, Y.: About the decidability of polyhedral separability in the lattice \(\mathbb{Z}^d\). J. Math. Imaging Vis. 59, 52–68 (2017)

    Article  Google Scholar 

  25. Gérard, Y.: Recognition of digital polyhedra with a fixed number of faces is decidable in dimension 3. In: Proceedings of Discrete Geometry for Computer Imagery—20th IAPR International Conference, DGCI 2017, Vienna, Austria, September 19–21, 2017, pp. 279–290 (2017)

  26. Crombez, L., da Fonseca, G.D., Gérard, Y.: Efficient algorithms to test digital convexity. In: Couprie, M., Cousty, J., Kenmochi, Y., Mustafa, N. (eds.) Discrete Geometry for Computer Imagery, pp. 409–419. Springer International Publishing, Cham (2019)

    Chapter  Google Scholar 

  27. Colbourn, C.J., Simpson, R.: A note on bounds on the minimum area of convex lattice polygons. Bull. Aust. Math. Soc. 45(2), 237–240 (1992)

    Article  MathSciNet  Google Scholar 

  28. Žunić, J.: Notes on optimal convex lattice polygons. Bull. Lond. Math. Soc. 30(4), 377–385 (1998)

    Article  MathSciNet  Google Scholar 

  29. Barber, C.B., Dobkin, D.P., Huhdanpaa, H.: The quickhull algorithm for convex hulls. ACM Trans. Math. Softw. 22, 469–483 (1996)

    Article  MathSciNet  Google Scholar 

  30. Greenfield, J.S.: A proof for a quickhull algorithm. Technical report, Syracuse University (1990)

  31. Megiddo, N.: Linear programming in linear time when the dimension is fixed. JACM 31(1), 114–127 (1984)

    Article  MathSciNet  Google Scholar 

  32. Edelsbrunner, H., Preparata, F.: Minimum polygonal separation. Inf. Comput. 77(3), 218–232 (1988)

    Article  MathSciNet  Google Scholar 

  33. Coeurjolly, D., Gérard, Y., Reveillès, J., Tougne, L.: An elementary algorithm for digital arc segmentation. Discrete Appl. Math. 139(1–3), 31–50 (2004)

    Article  MathSciNet  Google Scholar 

  34. Roussillon, T., Lachaud, J.-O.: Delaunay properties of digital straight segments. In: Debled-Rennesson, I., Domenjoud, E., Kerautret, B., Even, P. (eds.) Discrete Geometry for Computer Imagery, pp. 308–319. Springer, Berlin (2011)

    Chapter  Google Scholar 

  35. Andrews, G.E.: A lower bound for the volumes of strictly convex bodies with many boundary points. Trans. Am. Math. Soc. 106, 270–279 (1963)

    Article  MathSciNet  Google Scholar 

  36. Bárány, I.: Extremal problems for convex lattice polytopes: a survey. Contemp. Math. 453, 87–103 (2008)

    Article  MathSciNet  Google Scholar 

Download references

Acknowledgements

This work has been sponsored by the French government research program “Investissements d’Avenir” through the IDEX-ISITE initiative 16-IDEX-0001 (CAP 20-25). A preliminary version of this paper appeared in the 21st International Conference on Discrete Geometry for Computer Imagery (DGCI 2019).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Loïc Crombez.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Crombez, L., Fonseca, G.D.d. & Gerard, Y. Efficiently Testing Digital Convexity and Recognizing Digital Convex Polygons. J Math Imaging Vis 62, 693–703 (2020). https://doi.org/10.1007/s10851-020-00957-6

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10851-020-00957-6

Keywords

Navigation