Applied Sciences (Oct 2024)
Fully Automatic Grayscale Image Segmentation: Dynamic Thresholding for Background Adaptation, Improved Image Center Point Selection, and Noise-Resilient Start/End Point Determination
Abstract
As the requirement for image uploads in various systems continues to grow, image segmentation has become a critical task for subsequent operations. Balancing the efficiency and accuracy of image segmentation is a persistent challenge. This paper focuses on threshold-based grayscale image segmentation methods and proposes a fully automated approach. The approach begins with the implementation of an improved OTSU algorithm to determine the optimal dynamic threshold, enabling the segmentation process to adjust adaptively to varying image backgrounds. A novel method for selecting image center points is introduced to address the issue of poor segmentation when the center point falls outside the segmentation foreground area. To further enhance the algorithm’s generalization capability and accuracy, a continuity detection-based method is developed to determine the start and end points of the segmentation foreground. Compared with traditional algorithms, tests on sample images of four different scales revealed that the proposed algorithm achieved average improvements in accuracy, precision, and recall rates of 14.97%, 1.28%, and 17.33%, respectively, with processing speed remaining largely unaffected. Ablation experiments further validated the effectiveness of using different strategy combinations, with the combination of all three strategies resulting in significant improvements in accuracy and recall rates by 15.51% and 16.72%, respectively.
Keywords