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.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Asente, P., Schuster, M., Pettit, T.: Dynamic planar map illustration. In: ACM Transactions on Graphics (TOG), vol. 26, p. 30. ACM (2007)
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)
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)
Dalstein, B., Ronfard, R., Van De Panne, M.: Vector graphics complexes. ACM Trans. Graph. (TOG) 33(4), 133 (2014)
Jain, A.K., Dubes, R.C.: Algorithms for clustering data Prentice-Hall, Inc., USA (1988)
Fišer, J., Asente, P., Schiller, S., Sỳkora, D.: Advanced drawing beautification with shipshape. Comput. Graph. 56, 46–58 (2016)
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)
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)
Gangnet, M., Van Thong, J.M., Fekete, J.D.: Automatic gap closing for freehand drawing. In: ACM SIGGRAPH, vol. 94 (1994)
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)
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)
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)
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)
Liu, S., Zhang, X.: Automatic grayscale image colorization using histogram regression. Pattern Recogn. Lett. 33(13), 1673–1681 (2012)
Madeira, J.S., Stork, A., Groß, M.H.: An approach to computer-supported cartooning. Vis. Comput. 12(1), 1–17 (1996)
Mahdiraji, A.R.: Clustering data stream: a survey of algorithms. Int. J. Knowl. Based Intell. Eng. Syst. 13(2), 39–44 (2009)
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)
Parakkat, A.D., Methirumangalath, S., Muthuganapathy, R.: Peeling the longest: a simple generalized curve reconstruction algorithm. Comput. Graph. 74, 191–201 (2018)
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)
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)
Sasaki, K., Iizuka, S., Simo-Serra, E., Ishikawa, H.: Learning to restore deteriorated line drawing. Vis. Comput. 34(6), 1077–1085 (2018)
Seah, H.S., Chua, B.C.: A skeletal line joining algorithm. Insight Through Comput. Graph. Proc. Comput. Graph. Int. 1994(Cg194), 62 (1997)
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)
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)
Zhang, L., Li, C., Wong, T.T., Ji, Y., Liu, C.: Two-stage sketch colorization. ACM Trans. Graph. (TOG) 37(6), 1–14 (2018)
Funding
No funding was received for conducting this study.
Author information
Authors and Affiliations
Corresponding author
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
About this article
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
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00371-021-02235-x