• Gonzalo Urcid Ph.D., Optics Department, INAOE, Tonantzintla 72840, Mexico
  • José-Angel Nieves-Vázquez Ph.D., Engineering Division, ITSSAT, Matacapan 95804, Mexico
  • Rocío Morales-Salgado Ph.D., Information and Data Science Department, UPAEP, Puebla 72410, Mexico



Binary Image Processing, Hole Filling Algorithms Performance, Mathematical Morphology


The presence of holes, cracks or scratches in one or more object regions in a binary image usually results from quantizing or thresholding a gray scale image. However, for further processing or quantitative binary image analysis, those artifacts must be removed by filling the corresponding object regions. In this paper, a computational performance analysis is realized for the class of hole filling algorithms based on mathematical morphology. Two fundamental techniques, supervised and unsupervised, are described in detail based on marker images that may be composed of pixel subsets chosen within an object region artifact, formed by external near by points to object regions, or from selected background pixel subsets. A mathematical description spanning the different variants is given on how this kind of algorithms converge to the desired result. In addition, illustrative examples using representative binary images are provided to test and compare the computational performance in terms of the number of iterations corresponding to each morphological hole filling algorithm for binary images.


Download data is not yet available.


Beucher, N. & Beucher, S. (2012). Mamba: Mathematical Morphology Library Image for Python Programming Language.

Bloch, I., Heijmans, H., & Ronse, C. (2007). Mathematical Morphology. In M. Aiello, I. Pratt-Hartmann, & J. Van Benthem (Eds.), Handbook of Spatial Logic. (Ch. 14, 857-875). Springer.

Dougherty, E. R. (1992). An Introduction to Morphological Image Processing. SPIE Tutotial Texts in Optical Engineering, Bellingham, Washington, USA, 9, 39-42.

Fanfeng, Z. & Wei, F. (2010). Hole Filling Algorithm Based on Contours Information. In Proceedings of 2nd International Conference on Information Science and Engineering, Hangzhou, China. IEEE Xplore,

Gonzalez, R.C. & Woods R.E. (2018). Morphological Image Processing. In Digital Image Processing, 4th Global ed. (Ch. 9, 653-655 & 667-674). Pearson, New York, NY, USA.

Gonzalez, R.C., Woods, R.E., & Eddins S.L. (2020). Morphological Image Processing. In Digital Image Processing Using MATLAB, 3rd ed. (Ch. 10, 614-618). Gatesmark Publishing.

Géraud, T., Talbot, H., & Van Droogenbroeck, M. (2010). Algorithms for Mathematical Morphology. In L. Najman & H. Talbot (Eds.), Mathematical Morphology: From Theory to Application. (Ch.12, 323-352). ISTE/Wiley & Sons, UK/USA.

Haralick, R.M., Sternberg, S.R., & Zhuang X. (1987). Image Analysis Using Mathematical morphology. IEEE Trans. on Pattern Analysis and Machine Intelligence, PAMI-9(4), 532-550,

Hasan, M.M. & Mishra, P.K. (2012). Improving Morphology Operation for 2D Hole Filling Algorithm. International Journal of Image Processing (IJIP), 6(1), 1-12.

He, Y., Hu, T., & Zeng, D. (2019). Scan-Flood Fill (SCAFF): An Efficient Automatic Precise Region Filling Algorithm for Complicated Regions, 761-769. 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), Long Beach, CA, USA. IEEE Xplore,

Maragos, P. (1987). Tutorial on Andvances in Mophological Image Processing and analysis. Optical Engineering, 26(7), 623-632,

Najman, L. & Talbot, H. (2010). Introduction to Mathematical Morphology. In L. Najman and H. Talbot (Eds.), Mathematical Morphology: From Theory to Application. (Ch. 1, 3-33). ISTE/Wiley, Great Britain/USA,

Pitas, I. (2000). Shape Description. In Digital Image Processing Algorithms and Applications, 361-369. John Wiley & Sons, New York, USA.

Rivest, J-F., Soille P., & Beucher S. (1993). Morphological Gradients. Journal of Electronic Imaging, 2(4), 326-336. https:/

Serra, J. (1986). Introduction to Mathematical Morphology. Computer Vision, Graphics, and Image Processing, 35, 283-305,

Soille, P. (2004). Geodesic Transformations. In Morphological Image Analysis: Principles and Aplications, 2nd ed. (Ch. 6, 183-216). Springer-Verlag, Berlin-Heidelberg, Germany.

Valdiviezo-N., J.C., Urcid, G., & Edwin, L. (2017). Digital Restoration of Damaged Color Documents Based on Hyperspectral Imaging and Lattice Associative Memories. Signal, Image and Video Processing (SIViP), 11, 937-944.

Van Droogenbroeck, M. (1994). On the Implementation of Morphological Operations. In J. Serra & P. Soille (Eds.), Mathematical Morphology and Its Applications to Image Processing, 241-248. Kluwer Academics, The Netherlands.

Vincent, L. (1992). Morphological Algorithms. In E.R. Dougherty (Ed.), Mathematical Morphology in Image Processing, 255-288. CRC-Press, Boca Raton, FL, USA.

Vincent, L. (1993). Morphological Grayscale Reconstruction in Image Analysis: Applications and Efficient Algorithms. IEEE Transactions on Image Processing, 2(2), 176-201.




How to Cite

Urcid, G., Nieves-Vázquez, J.-A., & Morales-Salgado, R. (2024). COMPUTATIONAL PERFORMANCE OF HOLE FILLING MORPHOLOGICAL ALGORITHMS FOR BINARY IMAGES. International Journal of Engineering Science Technologies, 8(1), 1–21.