Skip to main content
Log in

Handling gaps for vector graphics coloring

  • Original article
  • Published:
The Visual Computer Aims and scope Submit manuscript

Abstract

In computer-assisted 2D vector drawing systems, due to the precision of stroke representation, a stroke endpoint may not precisely connect to another stroke or endpoint during drawing so that the stroke endpoints become dangling. We call such dangling endpoints, gap points. With the presence of gaps on the region boundaries, regions formed by strokes frequently cannot be correctly colored using the standard ‘flood fill’ algorithm. In this paper, we propose a stroke-based technique to handle gaps in a vector drawing. The main contribution of our work is automatic computation of gap sizes of gap points without a predefined gap size and using a least energy method to handle gap points by estimating their relationship with surrounding strokes. Our approach consists of two major steps. Firstly, we cluster gap points in a drawing using Minimum Spanning Tree. Secondly, for each endpoint cluster, we use a least energy method together with predefined gap handling priority to estimate the connection of gap points. We demonstrate the effectiveness of our approach by applying it to line drawings with unresolved gap points.

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
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18

Similar content being viewed by others

Notes

  1. https://www.toonboom.com/.

  2. https://krita.org/en/.

  3. https://gmic.eu/.

References

  1. Asente, P., Schuster, M., Pettit, T.: Dynamic planar map illustration. In: ACM Transactions on Graphics (TOG), vol. 26, p. 30. ACM (2007)

  2. Chen, Q., Tian, F., Seah, H.S., Wu, Z., Qiu, J., Konstantin, M.: DBSC-based animation enhanced with feature and motion. Comput. Animat. Virtual Worlds 17(3–4), 189–198 (2006)

    Article  Google Scholar 

  3. Comaniciu, D., Meer, P.: Mean shift analysis and applications. In: Proceedings of the Seventh IEEE International Conference on Computer Vision, vol. 2, pp. 1197–1203. IEEE (1999)

  4. Dalstein, B., Ronfard, R., Van De Panne, M.: Vector graphics complexes. ACM Trans. Graph. (TOG) 33(4), 133 (2014)

    Article  Google Scholar 

  5. Jain, A.K., Dubes, R.C.: Algorithms for clustering data Prentice-Hall, Inc., USA (1988)

  6. Fišer, J., Asente, P., Schiller, S., Sỳkora, D.: Advanced drawing beautification with shipshape. Comput. Graph. 56, 46–58 (2016)

    Article  Google Scholar 

  7. Fourey, S., Tschumperlé, D., Revoy, D.: A fast and efficient semi-guided algorithm for flat coloring line-arts. In: International Symposium on Vision, Modeling and Visualization (2018)

  8. Fu, H., Zhou, S., Liu, L., Mitra, N.J.: Animated construction of line drawings. In: ACM Transactions on Graphics (TOG), vol. 30, p. 133. ACM (2011)

  9. Gangnet, M., Van Thong, J.M., Fekete, J.D.: Automatic gap closing for freehand drawing. In: ACM SIGGRAPH, vol. 94 (1994)

  10. Hati, Y., Jouet, G., Rousseaux, F., Duhart, C.: Paintstorch: a user-guided anime line art colorization tool with double generator conditional adversarial network. In: European Conference on Visual Media Production, pp. 1–10 (2019)

  11. Huang, H., Yin, K., Gong, M., Lischinski, D., Cohen-Or, D., Ascher, U.M., Chen, B.: “mind the gap”: tele-registration for structure-driven image completion. ACM Trans. Graph. 32(6), 174–1 (2013)

  12. Kruskal, J.B.: On the shortest spanning subtree of a graph and the traveling salesman problem. Proc. Am.Math. Soc. 7(1), 48–50 (1956)

    Article  MathSciNet  Google Scholar 

  13. Liu, S., Wang, X., Wu, Z., Seah, H.S.: Shape correspondence based on Kendall shape space and rag for 2d animation. Vis. Comput. 36(10), 2457–2469 (2020)

    Article  Google Scholar 

  14. Liu, S., Zhang, X.: Automatic grayscale image colorization using histogram regression. Pattern Recogn. Lett. 33(13), 1673–1681 (2012)

    Article  Google Scholar 

  15. Madeira, J.S., Stork, A., Groß, M.H.: An approach to computer-supported cartooning. Vis. Comput. 12(1), 1–17 (1996)

    Article  Google Scholar 

  16. Mahdiraji, A.R.: Clustering data stream: a survey of algorithms. Int. J. Knowl. Based Intell. Eng. Syst. 13(2), 39–44 (2009)

    Google Scholar 

  17. Parakkat, A.D., Madipally, P., Gowtham, H.H., Cani, M.P.: Interactive flat coloring of minimalist neat sketches. In: Eurographics 2020 Short Paper Proceedings (2020)

  18. Parakkat, A.D., Methirumangalath, S., Muthuganapathy, R.: Peeling the longest: a simple generalized curve reconstruction algorithm. Comput. Graph. 74, 191–201 (2018)

    Article  Google Scholar 

  19. Sander, J., Ester, M., Kriegel, H.P., Xu, X.: Density-based clustering in spatial databases: The algorithm gdbscan and its applications. Data Min. Knowl. Disc. 2(2), 169–194 (1998)

    Article  Google Scholar 

  20. Sandhya, B., Agarwal, A., Rao, C.R., Wankar, R.: Automatic gap identification towards efficient contour line reconstruction in topographic maps. In: 2009 Third Asia International Conference on Modelling and Simulation, pp. 309–314. IEEE (2009)

  21. Sasaki, K., Iizuka, S., Simo-Serra, E., Ishikawa, H.: Learning to restore deteriorated line drawing. Vis. Comput. 34(6), 1077–1085 (2018)

    Article  Google Scholar 

  22. Seah, H.S., Chua, B.C.: A skeletal line joining algorithm. Insight Through Comput. Graph. Proc. Comput. Graph. Int. 1994(Cg194), 62 (1997)

    Google Scholar 

  23. Sỳkora, D., Dingliana, J., Collins, S.: Lazybrush: Flexible painting tool for hand-drawn cartoons. In: Computer Graphics Forum, vol. 28, pp. 599–608. Wiley Online Library (2009)

  24. Wang, S., Zhang, Q., Wang, S., Jing, X., Gao, M.: Endpoint fusing method of online freehand-sketched polyhedrons. Vis. Comput. 36(2), 291–303 (2020)

    Article  Google Scholar 

  25. Zhang, L., Li, C., Wong, T.T., Ji, Y., Liu, C.: Two-stage sketch colorization. ACM Trans. Graph. (TOG) 37(6), 1–14 (2018)

    Article  Google Scholar 

Download references

Funding

No funding was received for conducting this study.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jie Jiang.

Ethics declarations

Conflict of interest

The authors declare that they have no conflict of interest.

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

Jiang, J., Seah, H.S. & Liew, H.Z. Handling gaps for vector graphics coloring. Vis Comput 37, 2473–2484 (2021). https://doi.org/10.1007/s00371-021-02235-x

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00371-021-02235-x

Keywords

Navigation