Beyond Intensity Gradients: A Lightweight Client-Side Morphological Framework for Robust Binary Image Segmentation

Authors

  • Gregorius Ananta Sinaga Universitas Harapan Medan
  • Haida Dafitri Universitas Harapan Medan

DOI:

https://doi.org/10.69916/comtechno.v4i1.408

Keywords:

Image Segmentation, Edge Detection, Morphological Gradient, Binary Image, Performance Metrics

Abstract

Edge detection in binary images frequently suffers from contour fragmentation when utilizing conventional gradient operators (e.g., Sobel, Canny), as they inherently rely on continuous intensity variations absent in discrete binary data. To address this, this study proposes a lightweight, client-side morphological gradient framework designed to structurally and topologically extract object boundaries based purely on spatial geometry. A modular web-based computational pipeline was developed using a PHP-JavaScript architecture, integrating adaptive Otsu binarization, dynamic kernel configurations, and core morphological computations. For rigorous algorithmic and engineering validation, the system was benchmarked against the conventional Canny detector using a dataset of 50 botanical images, supplemented by comprehensive white-box and black-box software testing involving 20 participants across 20 distinct test cases. Experimental results demonstrate that the proposed morphological framework achieves superior topological fidelity and boundary continuity. It secured an optimal F1-score of 0.9006 using a 3×3 disk structuring element, significantly outperforming the Canny detector’s F1-score of 0.7761. Furthermore, the method exhibits highly parallelizable efficiency, executing edge extraction at a mean runtime of 18.2 ms, more than twice as fast as the multi-stage Canny operator (42.5 ms). Software evaluations confirmed exceptional system reliability, yielding a 97.4% functional success rate, 95% overall module coverage, and an excellent usability score of 4.58/5.0. Ultimately, this research proves that shifting the paradigm from intensity differentiation to mathematical morphology offers a highly precise, robust, and computationally lightweight solution for real-time, web-native binary image segmentation.

References

S. Chen, H. Tang, Y. Huang, L. Zhang, and X. Hu, “S2DiNet: Towards lightweight and fast high-resolution dichotomous image segmentation,” Pattern Recognit., vol. 164, p. 111506, 2025, doi: 10.1016/j.patcog.2025.111506.

R. E. Rian, E. L. Utari, and L. Listyalina, “Implementasi Deteksi Tepi Iris Mata pada Citra Mata Normal dan Kolesterol,” J. Tek. Elektro Uniba (JTE UNIBA), vol. 9, no. 1, pp. 474–481, 2024, doi: 10.36277/jteuniba.v9i1.301.

Y. Wu and Q. Li, “The Algorithm of Watershed Color Image Segmentation Based on Morphological Gradient.,” Sensors (Basel)., vol. 22, no. 21, Oct. 2022, doi: 10.3390/s22218202.

P. B. N. Simangunsong, T. Andriani, and M. J. F. Sirait, “Gradient Magnitude Based Image Classification and Edge Detection for Pattern Recognition in Grayscale Images,” J. Comput. Networks, Archit. High Perform. Comput., vol. 6, no. 4, pp. 1729–1735, 2024, doi: 10.47709/cnahpc.v6i4.4611.

G. Hu, “A Mathematical Survey of Image Deep Edge Detection Algorithms : From Convolution to Attention,” Mathematics, vol. 13, no. 2462, 2025, doi: 10.3390/math13152464.

I. Kurniastuti, T. Herlambang, T. D. Wulan, and D. B. Magfira, “Improved Edge Detection using Morphological Operation to Segmentation of Fingernail Images,” J. Electron. Electromed. Eng. Med. Informatics, vol. 7, no. 1, pp. 165–175, 2025, doi: 10.35882/jeeemi.v7i1.589.

Y. Li, J. Wang, Y. Zhang, and Z. Li, “Edge Detection and Quantitative Analysis Based on Binary Mathematical Morphology and Its Application to Signature Recognition,” in 2024 IEEE 18th International Conference on Anti-counterfeiting, Security, and Identification (ASID), 2024, pp. 76–80. doi: 10.1109/ASID63618.2024.10839682.

L. Liang, J. Chen, J. Shi, K. Zhang, and X. Zheng, “Noise-Robust image edge detection based on multi-scale automatic anisotropic morphological Gaussian Kernels,” PLoS One, vol. 20, no. 5, pp. 1–23, 2025, doi: 10.1371/journal.pone.0319852.

C. J. J. Sheela and G. Suganthi, “Morphological edge detection and brain tumor segmentation in Magnetic Resonance (MR) images based on region growing and performance evaluation of modified Fuzzy C-Means (FCM) algorithm,” Multimed. Tools Appl., vol. 79, no. 25, pp. 17483–17496, 2020, doi: 10.1007/s11042-020-08636-9.

Y. Ge, Q. Zhang, Y. Sun, Y. Shen, and X. Wang, “Grayscale medical image segmentation method based on 2D&3D object detection with deep learning,” BMC Med. Imaging, vol. 22, no. 1, p. 33, 2022, doi: 10.1186/s12880-022-00760-2.

A. M. Ashir, “Multilevel Thresholding for Image Segmentation Using Mean Gradient,” J. Electr. Comput. Eng., vol. 2022, no. 1, p. 1254852, 2022, doi: 10.1155/2022/1254852.

F. Xiong, Z. Zhang, Y. Ling, and J. Zhang, “Image thresholding segmentation based on weighted Parzen-window and linear programming techniques,” Sci. Rep., vol. 12, no. 1, p. 13635, 2022, doi: 10.1038/s41598-022-17818-4.

T. Li and H.-J. Li, “Development and Exploration of Serious Games for Anti-bullying Education : ——The Experience of Developing the Software of Anti-bullying Serious Games,” in 2022 3rd International Conference on Education, Knowledge and Information Management (ICEKIM), 2022, pp. 376–380. doi: 10.1109/ICEKIM55072.2022.00091.

J. Song, W. Jiao, K. Lankowicz, Z. Cai, and H. Bi, “A two-stage adaptive thresholding segmentation for noisy low-contrast images,” Ecol. Inform., vol. 69, p. 101632, 2022, doi: 10.1016/j.ecoinf.2022.101632.

H. Ren, Y. Wang, and X. Dong, “Binarization Algorithm Based on Side Window Multidimensional Convolution Classification.,” Sensors (Basel)., vol. 22, no. 15, Jul. 2022, doi: 10.3390/s22155640.

G. A. B. Anthony Aidoo Frank Arthur, “A Morphological Pyramids Approach to Grayscale Image Enhancement,” Int. J. Comput. Appl., vol. 184, no. 31, pp. 1–10, Oct. 2022, doi: 10.5120/ijca2022922363.

H.-C. Xi, B. Li, W.-H. Mai, X. Xu, and Y. Wang, “Feature Extraction for Evaluating the Complexity of Electromagnetic Environment Based on Adaptive Multiscale Morphological Gradient and Nonnegative Matrix Factorization,” J. Electr. Comput. Eng., vol. 2022, no. 1, p. 4891411, 2022, doi: 10.1155/2022/4891411.

M. Zakariah, M. Al-Razgan, and T. Alfakih, “Dual vision Transformer-DSUNET with feature fusion for brain tumor segmentation,” Heliyon, vol. 10, no. 18, p. e37804, 2024, doi: 10.1016/j.heliyon.2024.e37804.

Z. Mutaqin, B. Imran, and S. Rosida, “SISTEM INFORMASI PENJUALAN ONLINE (E-COMMERCE) BERBASIS WEB PADA TOKO MATAHARI PRAYA,” J. Comput. Technol., vol. 1, no. 2, pp. 29–36, 2023, doi: 10.69916/comtechno.v1i2.46.

Y. Lu, S. Young, H. Wang, and N. Wijewardane, “Robust plant segmentation of color images based on image contrast optimization,” Comput. Electron. Agric., vol. 193, p. 106711, 2022, doi: 10.1016/j.compag.2022.106711.

S. Minaee, Y. Boykov, F. Porikli, A. Plaza, N. Kehtarnavaz, and D. Terzopoulos, “Image Segmentation Using Deep Learning: A Survey,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 44, no. 7, pp. 3523–3542, 2022, doi: 10.1109/TPAMI.2021.3059968.

Downloads

Published

2026-07-22

PlumX Metrics

Scite Metrics

Altmetric

How to Cite

Gregorius Ananta Sinaga, & Haida Dafitri. (2026). Beyond Intensity Gradients: A Lightweight Client-Side Morphological Framework for Robust Binary Image Segmentation. Journal Computer and Technology, 4(1), 61–75. https://doi.org/10.69916/comtechno.v4i1.408

Issue

Section

Articles