Abstract
A generalized iterative scanline fill algorithm intended for use in real-time applications and its highly optimized machine code implementation are presented in this paper. The algorithm uses the linear image representation in order to achieve the fast memory access to the pixel intensity values. The usage of the linear image representation is crucial for achieving the highly optimized low-level machine code implementation. A few generalization features are also proposed, and discussion about the possible real-time applications is given. The proposed efficient machine code implementation is tested on several PC machines, and a set of numerical results is provided. The machine routine is compared with standard and optimized implementations of the 4-way flood fill algorithm and scanline fill algorithm. The machine code implementation performs approximately 2 times faster than the optimized scanline fill algorithm implementation and 6 times faster than standard iterative scanline fill algorithm implementation on two-dimensional image data structure. Furthermore, the machine routine proved to perform even more than 15 times faster than the optimized flood fill algorithm implementations. Provided results prove the efficiency of the proposed generalized scanline fill algorithm and its advantage over the state-of-the-art algorithms, and clearly show that optimized machine routine is capable of performing the real-time tasks.








Similar content being viewed by others
References
Albert, T.A., Slaaf, D.W.: A rapid regional filling technique for complex binary images. Comput. Graph. 19(4), 541–549 (1995)
Arquè, D., Grange, O.: A fast scan-line algorithm for topological filling of well-nested objects in 2.5D digital pictures. Theor. Comput. Sci. 147(1–2), 211–248 (1995)
Bhargava, N., Trivedi, P., Toshniwal, A., Swarnkar, H.: Iterative region merging and object retrieval method using mean shift segmentation and flood fill algorithm. In: 3rd International Conference on Advances in Computing and Communications (ICACC) (2013)
Burger, W., Burge, M.J.: Principles of digital image processing: core algorithms, 1st edn. Springer, London (2009)
Cai, Z., Ye, L., Yang, A.: FloodFill maze solving with expected toll of penetrating unknown walls for micromouse. In: IEEE 14th International Conference on High Performance Computing and Communication and 2012 IEEE 9th International Conference on Embedded Software and Systems (HPCC-ICESS) (2012)
Dang, H., Song, J., Guo, Q.: An efficient algorithm for robot maze-solving. In: 2nd International Conference on Intelligent Human-Machine Systems and Cybernetics (IHMSC) (2010)
Duo-le, F., Ming, Z.: A new fast region filling algorithm based on cross searching method. In: Zhou M., Tan H. (eds) Advances in Computer Science and Education Applications. Communications in Computer and Information Science, p. 202. Springer, Berlin, Heidelberg (2011)
Elshamarka, I., Saman, A.: Design and implementation of a robot for maze-solving using flood-fill algorithm. Int. J. Comput. Appl. 56(5), 8–13 (2012)
Fanfeng, Z., Wei, F.: Hole filling algorithm based on contours information. In: 2nd International Conference on Information Science and Engineering (ICISE) (2010)
Fathi, M., Hiltner, J.: A new fuzzy based flood-fill algorithm for 3D NMR brain segmentation. In: IEEE International Conference on Systems, Man, and Cybernetics, IEEE SMC ‘99 Conference Proceedings (1999)
Fellah, S.E., Rziza, M., Haziti, M.E.: An efficient approach for filling gaps in landsat 7 satellite images. IEEE Geosci. Remote Sens. Lett. 14(1), 62–66 (2016)
Fukukawa, T., Maeda, Y., Sekiyama, K., Fukuda, T.: Road detection method corresponded to multi road types with flood fill and vehicle control. In: 2nd International Conference on Robot, Vision and Signal Processing (RVSP) (2013)
Golda, A.F., Aridha, S., Elakkiya, D.: Algorithmic agent for effective mobile robot navigation in an unknown environment. In: International Conference on Intelligent Agent and Multi-Agent Systems, IAMA (2009)
Henrich, D.: Space-efficient region filling in raster graphics. Vis. Comput. 10(4), 205–215 (1994)
Hersch, R.D.: Descriptive contour fill of partly degenerated shapes. IEEE Comput. Graph. Appl. 6(7), 61–70 (1986)
Jou, S., Tsai, M.: A fast 3D seed-filling algorithm. Vis. Comput. 19(4), 243–251 (2003)
Ju, Z., Chen, Y.: New filling algorithm based on chain code. Comput. Eng. 17(33), 211–215 (2007)
Kang, H., Lee, S., Lee, J.: Image segmentation based on fuzzy flood fill mean shift algorithm. In: Annual Meeting of the North American Fuzzy Information Processing Society (NAFIPS) (2010)
Khudeev, R.: A new flood-fill algorithm for closed contour. In: IEEE International Siberian Conference on Control and Communications, SIBCON ‘05 (2005)
Law, G.: Quantitative comparison of flood fill and modified flood fill algorithms. Int. J. Comput. Theory Eng. 5(3), 503–508 (2013)
Li, X., Huang, L.: New region filling algorithm based on chain codes description. In: 3rd International Congress on Image and Signal Processing (CISP) (2010)
Li, X., Li, X.: Filling the holes of 3D body scan line point cloud. In: 2nd International Conference on Advanced Computer Control (ICACC) (2010)
Liu, S., Ma, W.: Seed-growing segmentation of 3-D surface from CT-contour data. Comput. Aided Des. 31(8), 517–536 (1999)
Mishra, S., Bande, P.: Maze solving algorithms for micro mouse. In: IEEE International Conference on Signal Image Technology and Internet Based Systems, SITIS ‘08 (2008)
Mohammed, F.G.: Satellite image gap filling technique. Int. J. Adv. Res. Technol. 2(4), 348–351 (2013)
Nosal, E.M.: Flood-fill algorithms used for passive acoustic detection and tracking. In: New Trends for Environmental Monitoring Using Passive Systems, pp. 1–5 (2008)
Oikarinen, J.: Using 2- and 2½-dimensional seed filling in view lattice to accelerate volumetric rendering. Comput. Graph. 22(6), 745–757 (1998)
Oikarinen, J.T., Jyrkinen, L.J.: Maximum intensity projection by 3-dimensional seed filling in view lattice. Comput. Netw. ISDN Syst. 30, 2003–2014 (1998)
Patel, A., Dubey, A., Pandey, A., Choubey, S.D.: Vision guided shortest path estimation using floodfill algorithm for mobile robot applications. In: 2nd International Conference on Power, Control and Embedded Systems (ICPCES) (2012)
Pavlidis, T.: Filling algorithms for raster graphics. Comput. Graph. Image Process. 10(2), 126–141 (1979)
Pavlidis, T.: Algorithms for Graphics and Image Processing. Computer Science Press, Rockville (1982)
Ren, M., Yang, W., Yang, J.: A new and fast contour-filling algorithm. Pattern Recogn. 38(12), 2564–2577 (2005)
Sarpate, G.K., Guru, S.K.: Image inpainting on satellite image using texture synthesis and region filling algorithm. In: International Conference on Advances in Communication and Computing Technologies (ICACACT) (2014)
Tang, G.Y., Lien, B.: Region filing with the use of the discrete green theorem. Comput. Vis. Graph. Image Process. 42(3), 297–305 (1988)
Thapaliya, K., Kwon, G.R.: Extraction of brain tumor based on morphological operations. In: 8th International Conference on Computing Technology and Information Management (ICCM) (2012)
Torbert, S.: Applied Computer Science, 2nd edn, p. 158. Springer, Berlin (2016)
Vučković, V., Arizanović, B.: Efficient character segmentation approach for machine-typed documents. Expert Syst. Appl. 80, 210–231 (2017)
Vučković, V., Arizanović, B.: Automatic document skew pre-processor for character segmentation algorithm. Facta Univ. Electron. Energ. 30(4), 611–625 (2017)
Vučković, V., Arizanović, B., Le Blond, S.: Ultra-fast basic geometrical transformations on linear image data structure. Expert Syst. Appl. 91, 322–346 (2018)
Wayalun, P., Chomphuwiset, P., Laopracha, N., Wanchanthuek, P.: Images enhancement of G-band chromosome using histogram equalization, OTSU thresholding, morphological dilation and flood fill techniques. In: 8th International Conference on Computing and Networking Technology (ICCNT) (2012)
Yu, W., He, F., Xi, P.: A rapid 3D seed-filling algorithm based on scan slice. Comput. Graph. 34(4), 449–459 (2010)
Yu, Y., Wang, J.: Image segmentation based on region growing and edge detection. In: IEEE International Conference on Systems, Man, and Cybernetics, 1999. IEEE SMC ’99 Conference Proceedings, vol. 6 (1999). doi:10.1109/ICSMC.1999.816653
Zhu, H., Zhang, G., Liu, G., Sun, Q.: Flotation bubble seed image filling algorithm based on boundary point features. Int. J. Min. Sci. Technol. 22(3), 289–293 (2012)
Acknowledgements
This paper is supported by the Ministry of Education, Science and Technological Development of the Republic of Serbia (Project III44006-10) and Mathematical Institute of Serbian Academy of Science and Arts (SANU).
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Vučković, V., Arizanović, B. & Le Blond, S. Generalized N-way iterative scanline fill algorithm for real-time applications. J Real-Time Image Proc 16, 2213–2231 (2019). https://doi.org/10.1007/s11554-017-0732-1
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11554-017-0732-1