Advertisement

The Visual Computer

, Volume 35, Issue 6–8, pp 1041–1052 | Cite as

Density-based label placement

  • Antoine Lhuillier
  • Mereke van GarderenEmail author
  • Daniel Weiskopf
Original Article
  • 147 Downloads

Abstract

We introduce a versatile density-based approach to label placement that aims to put labels in uncluttered areas of an underlying 2D visualization. Our novel, image-space algorithm constructs a density map by applying kernel density estimation to the input features, i.e., the locations of the points to be labeled. In order to find a suitable position for a label where it does not overlap any features or other labels, we move it following the gradient descent of this density map. This guides labels toward nearby areas of low feature density, resulting in a layout where labels are spread around feature-dense areas. The gradient descent trajectory can be used to draw curved leaders that connect the point features to their labels. Additionally, our approach supports prioritized label placement, user-defined label-to-label and label-to-feature margins, obstacle-constrained labeling, and arbitrarily shaped labels. The proposed method is conceptually simple and can easily be implemented using OpenCV and image-processing libraries.

Keywords

Automated label placement Image-based information visualization Kernel density estimation 

Notes

Acknowledgements

MvG was funded by the European Research Council (ERC) under the European Union’s Seventh Framework Programme (FP7/2007-2013) / ERC Grant agreement No. 319209 (project NEXUS 1492).

Compliance with ethical standards

Conflict of interest

The authors declare that they have no conflict of interest.

References

  1. 1.
    Abramowitz, M., Stegun, I.A., et al.: Handbook of Mathematical Functions: with Formulas, Graphs, and Mathematical Tables, vol. 55. Dover Publications, New York (1972)zbMATHGoogle Scholar
  2. 2.
    Bekos, M.A., Kaufmann, M., Papadopoulos, D., Symvonis, A.: Combining traditional map labeling with boundary labeling. In: SOFSEM 2011: Theory and Practice of Computer Science, pp. 111–122. Springer, Berlin (2011)Google Scholar
  3. 3.
    Bekos, M.A., Kaufmann, M., Symvonis, A., Wolff, A.: Boundary labeling: models and efficient algorithms for rectangular maps. Comput. Geom. 36(3), 215–236 (2007)MathSciNetCrossRefzbMATHGoogle Scholar
  4. 4.
    Benkert, M., Haverkort, H.J., Kroll, M., Nöllenburg, M.: Algorithms for multi-criteria boundary labeling. J. Graph Algorithms Appl. 13(3), 289–317 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Bradski, G., Kaehler, A.: Learning OpenCV: Computer Vision with the OpenCV Library. O’Reilly Media, Newton (2008)Google Scholar
  6. 6.
    Christensen, J., Marks, J., Shieber, S.: An empirical study of algorithms for point-feature label placement. ACM Trans. Graph. 14(3), 203–232 (1995)CrossRefGoogle Scholar
  7. 7.
    Dwyer, T., Marriott, K., Stuckey, P.J.: Fast node overlap removal. In: Proceedings of 13th International Symposium on Graph Drawing (GD’05), pp. 153–164. Springer, Berlin (2006)Google Scholar
  8. 8.
    Epanechnikov, V.A.: Non-parametric estimation of a multivariate probability density. Theory Prob. Appl. 14(1), 153–158 (1969)MathSciNetCrossRefGoogle Scholar
  9. 9.
    Ersoy, O., Hurter, C., Paulovich, F., Cantareiro, G., Telea, A.: Skeleton-based edge bundling for graph visualization. IEEE Trans. Vis. Comput. Graph. 17(12), 2364–2373 (2011)CrossRefGoogle Scholar
  10. 10.
    Fekete, J.D., Plaisant, C.: Excentric labeling: Dynamic neighbourhood labeling for data visualization. In: Proceedings of SIGCHI Conference on Human Factors in Computing Systems (CHI ’99), pp. 512–519 (1999)Google Scholar
  11. 11.
    Formann, M., Wagner, F.: A packing problem with applications to lettering of maps. In: Proceedings of 7th Annual Symposium on Computational Geometry (SoCG’91), pp. 281–288 (1991)Google Scholar
  12. 12.
    Freeman, H.: An expert system for the automatic placement of names on a geographic map. Inf. Sci. 45(3), 367–378 (1988)CrossRefGoogle Scholar
  13. 13.
    Frigo, M., Johnson, S.G.: FFTW: An adaptive software architecture for the FFT. In: Proceedings of 1998 IEEE International Conference on Acoustics, Speech, and Signal Processing, vol. 3, pp. 1381–1384 (1998)Google Scholar
  14. 14.
    Gansner, E.R., Hu, Y.: Efficient node overlap removal using a proximity stress model. In: Tollis, I.G., Patrignani, M. (eds.) Proceedings of 16th International Symposium on Graph Drawing (GD’08), pp. 206–217. Springer, Berlin (2009)Google Scholar
  15. 15.
    Gonzalez, R.C.: Digital Image Processing. Prentice Hall, Englewood Cliffs (2016)Google Scholar
  16. 16.
    Hurter, C., Ersoy, O., Telea, A.: Graph bundling by kernel density estimation. Comput. Graph. Forum 31, 865–874 (2012)CrossRefGoogle Scholar
  17. 17.
    Iturriaga, C., Lubiw, A.: Elastic labels around the perimeter of a map. J. Algorithms 47(1), 14–39 (2003)MathSciNetCrossRefzbMATHGoogle Scholar
  18. 18.
    Jones, M.C., Marron, J.S., Sheather, S.J.: A brief survey of bandwidth selection for density estimation. J. Am. Stat. Assoc. 91(433), 401–407 (1996)MathSciNetCrossRefzbMATHGoogle Scholar
  19. 19.
    Kallenbach, R.L., Bishop-Hurley, G.J.: Dairy grazing: growth of pasture plants, vol. M182. University of Missouri Extensions, Columbia (2012)Google Scholar
  20. 20.
    Kaufmann, M.: On map labeling with leaders. In: Albers, S., Alt, H., Näher, S. (eds.) Efficient Algorithms: Essays Dedicated to Kurt Mehlhorn on the Occasion of His 60th Birthday, pp. 290–304. Springer, Berlin (2009)CrossRefGoogle Scholar
  21. 21.
    Kindermann, P., Niedermann, B., Rutter, I., Schaefer, M., Schulz, A., Wolff, A.: Multi-sided boundary labeling. Algorithmica 76(1), 225–258 (2016)MathSciNetCrossRefzbMATHGoogle Scholar
  22. 22.
    Kouřil, D., Čmolík, L., Kozlíková, B., Wu, H., Johnson, G., Goodsell, D.S., Olson, A., Gröller, M.E., Viola, I.: Labels on levels: labeling of multi-scale multi-instance and crowded 3D biological environments. IEEE Trans. Vis. Comput. Graph. 25(1), 977–986 (2019)CrossRefGoogle Scholar
  23. 23.
    Lampe, O.D., Hauser, H.: Interactive visualization of streaming data with kernel density estimation. In: Proceedings of 2011 IEEE Pacific Visualization Symposium (PacificVis), pp. 171–178 (2011)Google Scholar
  24. 24.
    Lhuillier, A.: Bundling: a clutter reduction technique and its application to Alzheimer study. Ph.D. thesis, Université Paul Sabatier-Toulouse III (2017)Google Scholar
  25. 25.
    Lhuillier, A., Hurter, C., Telea, A.: FFTEB: edge bundling of huge graphs by the fast Fourier transform. In: Proceedings of 2017 IEEE Pacific Visualization Symposium (PacificVis), pp. 190–199 (2017)Google Scholar
  26. 26.
    Löffler, M., Nöllenburg, M., Staals, F.: Mixed map labeling. In: Paschos, V.T., Widmayer, P. (eds.) Algorithms and Complexity, pp. 339–351 (2015)Google Scholar
  27. 27.
    Luboschik, M., Schumann, H., Cords, H.: Particle-based labeling: fast point-feature labeling without obscuring other visual features. IEEE Trans. Vis. Comput. Graph. 14(6), 1237–1244 (2008)CrossRefGoogle Scholar
  28. 28.
    Meng, Y., Zhang, H., Liu, M., Liu, S.: Clutter-aware label layout. In: Proceedings of 2015 IEEE Pacific Visualization Symposium (PacificVis), pp. 207–214 (2015)Google Scholar
  29. 29.
    Misue, K., Eades, P., Lai, W., Sugiyama, K.: Layout adjustment and the mental map. J. Vis. Lang. Comput. 6(2), 183–210 (1995)CrossRefGoogle Scholar
  30. 30.
    Oeltze-Jafra, S., Preim, B.: Survey of labeling techniques in medical visualizations. In: Proceedings of 4th Eurographics Workshop Visual Computing Biology Medicine (VCBM’14), pp. 199–208 (2014)Google Scholar
  31. 31.
    Podlozhnyuk, V.: FFT-Based 2D Convolution. NVIDIA white paper (2007)Google Scholar
  32. 32.
    Sheather, S.J., Jones, M.C.: A reliable data-based bandwidth selection method for kernel density estimation. J. R. Stat. Soc. Ser. B (Methodol.) 53(3), 683–690 (1991)MathSciNetzbMATHGoogle Scholar
  33. 33.
    Silverman, B.W.: Density Estimation for Statistics and Data Analysis. Chapman and Hall, London (1986)CrossRefzbMATHGoogle Scholar
  34. 34.
    Telea, A., van Wijk, J.J.: An augmented fast marching method for computing skeletons and centerlines. In: Proceedings of 2002 Symposium on Data Visualisation, pp. 251–258 (2002)Google Scholar
  35. 35.
    van Liere, R., de Leeuw, W.: GraphSplatting: visualizing graphs as continuous fields. IEEE Trans. Vis. Comput. Graph. 9(2), 206–212 (2003)CrossRefGoogle Scholar
  36. 36.
    van der Zwan, M., Codreanu, V., Telea, A.: CUBu: universal real-time bundling for large graphs. IEEE Trans. Vis. Comput. Graph. 22(12), 2550–2563 (2016)CrossRefGoogle Scholar
  37. 37.
    van Garderen, M.: Automated map labelling. In: Pictures of the past—visualization and visual analysis in archaeological context, chap. 6, pp. 155–174. Doctoral dissertation, University of Konstanz (2018)Google Scholar
  38. 38.
    Wagner, F., Wolff, A.: A combinatorial framework for map labeling. In: Proceedings of 6th International Symposium on Graph Drawing (GD’98), pp. 316–331 (1998)Google Scholar
  39. 39.
    Wolff, A., Strijk, T.: The map-labeling bibliography. i11www.ira.uka.de/map-labeling/bibliography/ (2009)Google Scholar
  40. 40.
    Zinsmaier, M., Brandes, U., Deussen, O., Strobelt, H.: Interactive level-of-detail rendering of large graphs. IEEE Trans. Vis. Comput. Graph. 18(12), 2486–2495 (2012)CrossRefGoogle Scholar
  41. 41.
    Zoraster, S.: Integer programming applied to the map label placement problem. Cartograph. Int. J. Geograp. Inf. Geovis. 23(3), 16–27 (1986)Google Scholar

Copyright information

© Springer-Verlag GmbH Germany, part of Springer Nature 2019

Authors and Affiliations

  • Antoine Lhuillier
    • 1
  • Mereke van Garderen
    • 2
    Email author
  • Daniel Weiskopf
    • 1
  1. 1.University of StuttgartStuttgartGermany
  2. 2.University of KonstanzKonstanzGermany

Personalised recommendations