Abstract
Image segmentation is a critical task in image processing with applications in various domains, including industry and medicine. However, multilevel thresholding, a widely used segmentation technique, suffers from high computational complexity due to the exhaustive search for optimal thresholds. This paper addresses this challenge by proposing a hybrid Genetic Algorithm-Archimedes Optimization Algorithm (GAAOA), further enhanced with a Lévy flight function (GAAOA-Lévy), to improve efficiency and accuracy in multilevel thresholding. The integration of GA’s crossover mechanism strengthens local search capabilities, leading to optimal segmentation with fewer iterations. The proposed algorithm is evaluated using standard benchmark images and compared against well-known optimization techniques. Experimental results demonstrate that GAAOA-Lévy outperforms existing methods in terms of Peak Signal-to-Noise Ratio (PSNR), computational efficiency, and convergence speed, particularly excelling in three-level thresholding while reducing computational costs for higher thresholds.
Similar content being viewed by others
Introduction
Image processing has recently found use in a variety of fields, including industry, agriculture, and medicine. The most crucial stage of image processing is thought to be image segmentation1. According to the intensity magnitude of the pixel, image segmentation categorizes the pixel in an image. Different approaches have been put forth in the literature for segmenting images, such as edge-based techniques2, neural network techniques3, watershed techniques4, clustering techniques5, and artificial threshold techniques6.
The threshold approach is a quick and efficient way to separate interesting elements from the background. It is used for a number of traditional tasks, for instance, document image analysis, which seeks to detect lines, legends, and letters7, as well as map processing, which seeks to locate logos, graphical information, or musical scores. In order to detect and mark objects, the threshold approach is also employed in scene processing8. Similarly, it has been used to conduct quality checks on materials before tossing out faulty components9. The image is divided into couple (bi-level) or extra (RGB) using thresholding algorithms. Using only one threshold value (t), the binary level thresholding tests each pixel’s intensity magnitude and, if it is maximum, classifies the threshold magnitude (t) as the first category and the other pixel’s intensity value as the second class. The pixels in the image are separated into multiple classes during multilayer thresholding, and each class is given a different threshold magnitude10,11,12. To find the ideal threshold magnitude, one can essentially choose between parametric and nonparametric methods11. For the purpose of classifying the various image classes using a parametric technique, some probability density function parameters should be computed. However, compared to the nonparametric method, this approach requires more time and more processing resources to optimize a number of factors, including the deviation rate and entropy, to obtain the accurate threshold values. However, Otsu’s and Kapur’s approaches were employed for binary level thresholding. The Otsu technique maximizes the variation between classes13. To assess the homogeneity of the classes, the Kapur technique maximizes entropy14. With each subsequent threshold, the two multilayer thresholding algorithms’ computing complexity rises15. Whale Optimization Algorithm (WOA)16, Ant Colony Optimization (ACO)17, Particle Swarm Optimization (PSO)18, Moth Flame Optimization (MFO)16, Genetic Algorithm (GA)19, and Moth Flame Optimization (MFO) are just a few optimization algorithms that segment images with multilayer thresholding. The Ensemble Genetic Algorithm Explainer (EGAE), which recognizes and displays to the viewer the informative portions of the image automatically for the identification of melanoma cancer, has been discussed and investigated20. Three phases make up EGAE. First, a heuristic method is used to determine the hromosomal sparsity in GAs. Then, several GAs are run one after the other. However, these GAs differ from one another in that the input image contains a varied amount of super-pixels, which causes the chromosomal lengths to vary. Finally, majority and consensus voting are used to combine the outcomes of GAs. According to experimental findings on a melanoma dataset, EGAE efficiently enhances explanation accuracy when compared to LIME and discovers informative lesions automatically.
Multilevel genetic algorithms-based segmentation approaches for medical images were suggested in21. While the Quantum Genetic Algorithm (QGA) uses the qubit encoding of people, the GA uses binary coding. To efficiently optimize Rényi, Masi, and Shannon entropies for the purpose of segmenting multiple objects in medical imaging, two evolutionary techniques are used. For comparison, the PSO was also implemented21. The three most widely used segmentation indices, PSNR, Structural Similarity Index Measure (SSIM), and FSIM, were used to evaluate the segmentation accuracy of the nine proposed methodologies. Twenty medical images were chosen as a sample for the numerical results and comparison investigation. Finally, it was discovered that the Rényi entropy is better suited for multilevel thresholding in medical images21. Its purpose was to assess the growth of small enterprises in the Russian Far Eastern District with respect to sustainability’s environmental, social, and economic dimensions22. International regulators expect national governments to establish a digital asset regulatory framework akin to that which is now in place for traditional finance23. To look into the connection between the cost and demand of Bored Ape NFT assets, data from OpenSea, SuperRare, and Nifty Gateway were used. The cross-quantilogram method is used to examine the relationship between the Bored Ape NFT Collection’s popularity and price24. Another study25 looked at South Korea’s approach to the world oil market.
Genetic crossover operation and smart inertia weight (SGA-BA) were suggested to select the best thresholds26. Additionally, the Otsu method’s between-class variance and Kapur’s entropy are used as objective functions. According to the number of iterations and fitness values, the smart inertia weight in the innovative SGA-BA balances the SGA-BA’s exploration and exploitation. Furthermore, the crossover operation of the genetic algorithm strengthens the capacity to search locally the SGA-BA. The beta distribution takes the place of the random vector in the interim, smartly updating the frequency of bats. An assortment of benchmark photos with varied threshold levels was used to assess the proposed SGA-BA. PSO, GA, GSA, WOA, and LSSA were all put up against each other. The experimental findings demonstrate that the suggested SGA-BA offers superior results to the other algorithms26.
The automatic clustering of unlabeled pixels from MR images into various homogenous groups using a segmentation approach based on a GA was investigated27. This approach does not call for knowledge of the ideal number of segments or the underlying pixel distribution prior to segmentation. The fuzzy inter-cluster hostility index classifies the centroid of various segments as active or passive. The images used as a test are then divided up by the chosen active centroids. This method yields the accurate number of segments and their corresponding centroids. With the aid of two real-world MR images, a behavior comparison is shown between the fuzzy inter-cluster hostility index-based GA approach, the renowned automated clustering utilizing differential evolution (ACDE) methodology, and one non-automatic algorithm.
Histogram-based methods lack the spatial intricacies of contextual information necessary to determine the ideal threshold values. To address this, a unique approach called the Energy Curve is proposed, which uses Otsu’s method and the Harmony Search Algorithm to compute optimum gray levels instead of a histogram. The suggested approach was tested on a number of benchmark photos, and the outcomes were compared using a histogram and several optimization algorithms. The comparison of the SD Index, mean of fitness, and PSNR makes it clear that the suggested approach outperforms histogram-based techniques28. In medical image analysis, picture segmentation is essential, especially for precisely identifying tumors and lesions. Efficient segmentation enhances the accuracy of diagnosis and streamlines quantitative analysis29. However, multilevel thresholding presents a challenge to typical segmentation techniques because of the resulting computing complexity. As a result, choosing the ideal threshold set is an NP-hard task, underscoring the urgent need for effective optimization techniques to get beyond these obstacles29. We explored and studied HADECO, a hybrid strategy combining Differential Evolution (DE) and the Crayfish Optimization Algorithm (COA) for multi-threshold image segmentation (MTIS). By employing a two-dimensional (2D) histogram and 2D Kapur’s entropy, this technique seeks to improve the effectiveness and precision of subsequent picture processing and diagnosis29. The Harris Hawks Optimizer (HHO) and Archimedes Optimization Algorithm (AOA) were combined to enhance AOA during the exploitation phase and produce the ideal threshold vector for MTIS. As a result, the hybrid AOA-HHO algorithm outperforms both AOA and HHO algorithms as well as a few other MH algorithms in solving the MTIS problem. It also achieves better thresholds than AOA and HHO, which improve the MTIS system’s performance. HHO is powerful during the exploitation phase, and AOA is powerful during the exploration phase3.
In terms of image segmentation accuracy, fitness function value, PSNR, SSIM, and execution time, experiments demonstrate that the AOA-HHO technique outperforms the other algorithms and even HHO and AOA30. The direct and useful application of MTIS in medical image segmentation is well known. To improve image segmentation accuracy, an improved version of the Whale Optimization Algorithm (CVWOA) was created. By combining vortex rotation and convex local directed search, the CVWOA greatly enhances the algorithm’s overall optimization performance. This technique performed segmentation on the Berkeley Segmentation using non-local means 2D histograms and Renyi’s entropy31. It was created to increase cuckoo search’s (CS) efficacy. Enhancing exploration, exploiting possibly novel solutions, and preventing local optima are the objectives. In order to increase the core CS framework’s exploration and exploitation capabilities, we introduce three new algorithms—the grey wolf optimizer (GWO), red panda optimization (RPO), and naked mole rat algorithm (NMRA)32. The selection of a threshold is a major issue as the number of threshold segmentations increases, so an optimization approach for random collision whales was proposed to optimize OTSU for dependable picture segmentation33. Using CNNs and vision transformers, a novel deep learning architecture was shown for medical image segmentation. Using biconvolutional long-short-term memory (LSTM) networks and vision transformers (ViT), this model, called TBConvL-Net, is a hybrid network that combines the local properties of a CNN encoder–decoder architecture with long-range and temporal dependencies34. A review of current picture segmentation techniques that have undergone thorough algorithmic categorization was given. Several assessment criteria were examined in order to compare the outcomes of various segmentation methods. Additionally, a thorough explanation of the various application domains for picture segmentation was given35.
The comparison showed that the GA automatic image segmentation approach utilizing the fuzzy inter-cluster hostility index was superior to the other two algorithms4. To identify huge tumor sizes for diagnostic and therapy planning, medical picture segmentation is often done manually by a doctor36. Medical professionals manually segment organs using their prior knowledge of their locations and forms; however, this method is vulnerable to reader subjectivity and inconsistent results. Due to the poor tissue contrast and hazy organ/tissue borders in medical pictures, automating the process is difficult. In order to accomplish automatic three-dimensional segmentation, this research introduces a genetic method for merging illustrations of learnt information, like recognized forms, regional attributes, and the objects’ relative positions within a unified framework. Both magnetic resonance imaging and pelvic computed tomography have been used to test the algorithm’s prostate segmentation capabilities36.
A hybrid GAAOA technique is suggested for use in multilayer thresholding for image segmentation in this paper. The suggested method is validated using two standard images and compared to other renowned optimization methods such as electromagnetic optimization-based Lévy function (EMO Lévy), EMO, CS, Sine Cosine Algorithm (SCA), MFO, and WOA. The results show that the suggested algorithm produces better multilevel segmentation of digital images in comparison with other known algorithms, with fewer iterations and quick calculation times.
The document is structured in the manner described below. The hybrid GAAOA is illustrated in Section “Hybrid GAAOA”. The implementation of the hybrid GAAOA algorithm for developing the image segmentation-based multilevel thresholding problem is shown in Section “Image segmentation using GAAOA”. Section “Results and discussions” provides the simulation results and discussions and compares the created algorithm’s comprehensive results with those from other approaches. The advantages and drawbacks of the suggested algorithm are provided in Section “Advantages and drawbacks of the suggested hybrid GAAOA”. Finally, Section “Conclusions” illustrates the paper’s conclusions.
Hybrid GAAOA
Genetic algorithm (GA)
GA is a search technique used by computers to locate precise or actual response to search and optimization issues. Worldwide search algorithms are a category that includes GAs. There are various evolutionary algorithms that use mechanisms evolutionary biology serves as a model for concepts like heredity, mutation, selection, and crossover. Figure 1 depicts the GA method.
Genetic algorithm technique 37.
In a simulation using genetic approaches, a population of abstract models for potential solutions to an optimization problem—referred to as phenotypes, animals, or people—becomes closer to superior answers—referred to as chromosomes, genotypes. Typically, solutions are stated as binary strings of 0s and 1s; however, other encodings are also possible. Generational evolution starts primarily with a population that is initialized at random. Every generation, the fitness of each group member is determined. To create a new population, a number of individuals are chosen at random from the existing population (based on their fitness magnitude) and altered (recombined, or even mutated). The next iteration of the algorithm then makes use of the new population38,39,40. The flow chart for the GA is shown in Fig. 2.
Flowchart for a genetic algorithm 37.
Solution steps of GA
Step one (Initialization): Put t = 0 in the time counter.
Step two: Create a population of n response or chromosomes at random.
Step three (Evaluation): For each chromosome that is a section of the population, compute the fitness function. The major population’s chromosomes are examined to determine which one is best. The best chromosome among them all is Xbest, which generates the best objective function.
Step four (Keep track of the time): As time passes, it gets longer (t = t + 1).
Step five: a new population is added and created in accordance with the following rules.
Based on their potential to produce accurate response for the following generation, choose a few solutions.
Crossover: To produce new offspring, the parents are crossed.
Mutation: Depending on the capacity for mutation, the new chromosomes may change.
Acceptance: Transfer of the new generation of the new populace.
Step six: Replace the freshly created solutions with ones that were chosen at random in step five.
Step seven: If a termination condition is met, quit; otherwise, go back to step two.
Archimedes optimization algorithm (AOA)
AOA stands out for being simple to employ and requiring fewer regulating factors (population size and ending criteria)41. The essential statements of Archimedes serve as the foundation for this optimizer. AOA describes the behavior when it is just partially or fully immersed in a fluid, with the fluid exerting pressure on an upward force on the object proportionate to the displacement the object causes with respect to the fluid. A buoyant force, which is equivalent to the weight of the displaced fluids, is applied to an object when it is submerged in a liquid (see Fig. 3)42.
(a) object submerged in fluid, and (b) The volume of fluid expended 37.
Pressure vessel design, speed reducer design difficulties, and welded beam architecture have all been addressed successfully using the AOA43. It has the potential to handle complex optimization issues while offering faster, more accurate global optimization. However, there is a lack of research on how AOA44 handles difficulties with DG creation and network resiliency. AOA is a population-based metaheuristic method making use of a population of things (possible solutions) with a range of volumes, accelerations, and densities. It initiates the search at random. Each object is now dispersed randomly across the fluid. The optimization procedure continues until the termination condition is satisfied or until all iterations have been completed. Each iteration alters the density and volume of every object. Whether or not an object’s acceleration changes depends on its propensity to collide with nearby objects. The updated location of an item will take new density, volume, and acceleration into account. Below is a comprehensive mathematical simulation of the AOA stages.
AOA solution steps
Initialization:
Set the algorithmic parameters C1, C2, C3, C4, u, and I, where C1, C2, C3, and C4 are constants with values of 2, 6, 2, and 0.5, respectively. The normalization’s maximum and minimum bounds (u and I) are changed to 0.9 and 0.1, respectively.
N is the upper limit number of objects, i is the number of objects, and x indicates the item. The bottom and top boundaries of the search space are denoted by lbi and ubi, respectively. Set the volume (vol), acceleration (acc), and density (den) initial values for each ith number.
rand is a vector of randomly generated values in the range [0, 1].
The fitness value can be calculated from the following:
To select the best item in terms of fitness value, fobj is a function that computes first population estimate. Xbest, denbest, accbest, and volbest should be assigned, with denbest, accbest, and volbest. The best object yet discovered is connected with the volume, acceleration, and density.
The transfer operator is calculated by
The density factor is calculated by.
The following equations update the density and volume:
If TF is less than 0.5, an object collides with another. Use the following equation to modify the acceleration of a random-material object (mr) for iteration t + 1:
Phase of exploitation (no collision):
If TF > 0.5, use the following formula to update object acceleration for iteration t + 1:
Normalize acceleration.
The formula used to determine the percentage change is
Each agent’s step will vary based on the percentage of (\(acc_{i,norm}^{t + 1}\)). For objects outside of the ideal global zone, the acceleration value is high meaning. In the same way, the search changes from discovery to application.
Update position.
The ith item location for iteration t + 1 applies Eq. (13) if TF 0.5 (exploration phase):
Otherwise, the objects update their positions using Eq. (14).
If TF > 0.5 (exploitation phase),
where F is changing the direction of motion with the flag,
Evaluation:
Consider each object in light of objective function (f), and then keep the top result thus far. Determine the following parameters’ values:\({ }X_{best} ,den_{best} { },vol_{best} { }and{ }acc_{best}\)
Hybrid GAAOA technique
The flowchart discussing the implementation of hybrid GAAOA algorithm is depicted in Fig. 4. As was already said, GA has a number of drawbacks, like the possibility that can be obtained through many generations to get the ideal. As a result, it is quite expensive and takes a long time to compute the performance overall and product quality improved in order to overcome this limitation and lessen the amount of time required to analyze a function. A hybrid approach has been suggested. When utilizing programming languages like C++, a hybrid algorithm selects one (depending on the input) or switches between them throughout the process, mixing different algorithms to address the same problem. This is typically done to combine the beneficial aspects of each component so that the overall strategy performs better than the sum of the parts.
In this article, a novel hybrid method that combines the Archimedes Optimization method with the Genetic Algorithm is proposed, that is, GAAOA. The suggested approach has a number of distinctive qualities. First, because AOA can be faster and provide accurate solution compared to GA, it is used to avoid the local minimum solution. Because AOA can quickly determine the appropriate DG size and position, it has a considerable effect on the search procedures. Second, the algorithm’s performance is improved by dividing the optimization population. The GA algorithm is applied on the initialized population’s first half, and each time the GA operators make a decision, this half of the population is steadily improved.
Image segmentation using GAAOA
Thresholding is an efficient technique for segmenting images. According to the parameters of the image’s intensity level (L), this approach is utilized to categorize binary level images and multilevel images. The image is changed into (mn) pixels throughout this process. Each pixel carries a value for its intensity level (L), which is categorized according to the class to which it belongs.
In case of greyscale image, the thresholding technique divides it into couple classes, R1 and R2, using simply a threshold value (th). As a result, if a pixel’s intensity level parameter is greater than th, it can be placed in class R1; otherwise, it will be placed in class R2.
Since there are more than two classes in a multilayer image, each class having its own threshold value, the classes in the multilayer image \({\text{TH}} = \left( {{\text{th1}},{\text{th2}},{\text{th3}}, \ldots {\text{th}}\;{\text{L}} - {1}} \right)\;{\text{are}}\;\left( {{\text{R1}},{\text{R2}}, \ldots {\text{RN}}} \right)\) N is the quantity of classes.
The challenge with thresholding is choosing the th parameters that accurately categorize the classes for bi-level and multi-level thresholding. The methods of Otsu and Kapur are well-known techniques for calculating such values. For calculating the best threshold response, the goal functions proposed by the two methods must be maximized, as detailed below.
Otsu’s technique
One technique for segmenting an image is the Otsu approach, which maximizes variance between classes before determining the magnitude of the objective function as follows:
To achieve a greater threshold intensity level that increases (20), the optimization issue is reduced. Because it has one threshold (th), the prior aim is utilized for grey rate images. To apply to RGB pictures, Eq. (20) can be modified as follows:
where \(0 < th_{i} < {\text{L}} - 1 = 1, \ldots ,{\text{k}}\)
TH = (\(th_{1} ,th_{2} , \ldots th_{k - 1}\)) and k is number of class
where, i → identifies a specific class, and k is the number of classes, r → refers to a fixed value in a greyscale image that is equal to 1. (r = 1,2,3 in RGB image), \({\sigma }_{i}^{r}\)→ refers to the variation between classes R (also known as Ottu’s variance),\(m_{i}^{r}\)→ refers to a class’s mean.
where \(w_{1}^{r}\)→ refers to the likelihood of something happening,
\(ph_{i}^{r}\) is the probability distribution, which may be calculated as
The number of pixels that correspond to the i intensity level are shown by the histogram distribution values \(h_{i}^{r}\) where N represents all of the image’s pixels. The segmentation problem’s threshold is utilized in electromagnetic optimization to choose the best decision variable, which can be found as follows:
Maximize \(f{ }\left( {TH} \right)_{ostu}\)
Subject to TH \(\in\) x, \({\text{TH}} = (th_{1} ,th_{2} , \ldots th_{k}\))
0 < \(th_{i}\). <255; this is minimum and maximum bounded of threshold i = \({1}, \ldots {\text{k}}\) and k is the different thresholds.
Kapur technique
Kapur42 has suggested another nonparametric approach for identifying the ideal threshold values. It is fnded on the probability distribution and entropy of the image histogram. This approach seeks to identify the ideal th that maximizes total entropy. The compactness and class separability of a picture are measured by its entropy. Entropy is at its highest level in this meaning when the optimal th value adequately divides the classes. The objective function of Kapur’s issue for the bi-level example is
H1 and H2 are determined by the following formula:
\(ph_{i}^{c}\) is the intensity levels’ probability distribution, which can be found using (26).
\(w_{0}^{\prime }\) and \(w_{i}^{\prime }\) are, respectively, the probability distributions for C1 and C2. The entropy-based strategy, which is similar to Otsu’s method, is extended to include multiple threshold magnitude; in this instance, the image must be divided into k classes implementing the same number of thresholds. In such cases, the following is the definition of the new objective function:
where
Figure 5 illustrates the image segmentation solution process using the suggested hybrid optimization technique.
Results and discussions
Two test images are implemented to validate the suggested GAAOA. Camera man and Peppers45 are implemented to verify the impact of the suggested hybrid GAAOA technique.
Figure 6 shows the histogram distributions for these test images, which describe the number of pixels present at all intensity values. The impact of the suggested GAAOA is compared between algorithm-based multilevel thresholding and other known optimization algorithms such as EMO-Lévy46, EMO45, CS42,43, MFO16, WOA16, and SCA44,47. The identical stop criterion of 100 iterations and 25 populations was used to test all methods. The PSNR is calculated at the conclusion of each test as
The precision of a segmented image in comparison to the original image is measured by the PSNR, which is a significant value.
According to the type of image, ro is the number of rows and co is the number of columns in an image. RGB image r = 1, 2, 3, \(I_{th}^{r}\) refers to the segmented image, and \(I_{o}^{r}\) is based on the original image.
The stop threshold is at 100 iterations for each trial. At the conclusion of each test, the standard deviation (STD) is calculated (34) in order to confirm the stability. The algorithms become unstable as the STD value rises.
Table 1 identifies the GAAOA parameters. The optimization process’s stop criterion is represented by the upper limit of iterations, which is set at 100. The number of times the accurate fitness values remain unchanged is what is considered the stop criterion, though.
Iter local = 100 is the quantity of local searches the algorithm does with a 25-person population each external iteration.
Test images
The experiments conducted on three benchmark test photos, including Camera Man, Peppers, and Baboon, are utilized to evaluate the efficacy of the optimization technique. The photos are sourced from the USC-SIPI image library, each measuring 512 × 512 pixels48. Figure 6 illustrates the test photos with their histogram distributions, which represent the pixel count at each distinct intensity value included in the images. All algorithms were evaluated under identical stopping criteria: 100 iterations and a population of 25.
Optimal threshold and fitness values
The Otsu thresholding approach, which is based on the least squares principle, is used in all trials. It is a function of classification category. The entire image pixel will be divided into foreground and background when the value of this classification function reaches its maximum and it becomes clear that threshold k is the best one to utilize for image segmentation. By choosing the ideal threshold, the likelihood of misclassification is reduced and the difference between the foreground and background is greatest. The results of the accurate fitness function and the threshold magnitude for three photos generated by all methods utilizing Otsu’s function are displayed in Tables 2 and 3. Table 3 shows that when TH = 2,3,4,5, the suggested method (GAAOA) outperforms other algorithms in terms of fitness. The segmented picture results are shown in Figs. 7, 8 and 9 after applying the four best thresholds (TH = 2,3,4,5) related to Otsu’s objective function.
The segmentation results of the suggested algorithms and the other algorithms with various threshold values (TH = 2,3,4,5) are displayed in Figs. 10 and 11. These numbers allow us to draw the conclusion that higher-level images have more details than lower-level images.
Table 4 demonstrates that when weighed against additional multilayer algorithms (GAAOA, CS, MFO, WOA, SCA), the proposed method typically has the highest values for PSNR. Also take note that the PSNR value for all algorithms grows any time the number of threshold magnitudes does. When comparing a segment image’s performance and accuracy to the original image, the PSNR is a crucial metric to consider.
The CPU time for all techniques when used to solve the multilevel thresholding problem is shown in Table 5. On a computer with an Intel(R) Core(TM) i7-4770 CPU i5 processor running at 3.40GHz and 16 GB of RAM, experiments were carried out using MATLAB R2014. The created technique uses less CPU time than the conventional EMO and CS algorithm, as can be seen from the table.
In Table 6, the two multilevel segmentations based on thresholding techniques Otsu and Kapur are contrasted. This table shows that, in comparison to the Kapur approach, the Otsu thresholding approach produces segmented images with great precision and maximum magnitude of PSNR and STD.
Minimum and maximum contrast test image
To indicate the impact of the suggested GAAOA technique, low- and high-contrast are implemented to camera man image for different threshold values (Th = 2, 3, 4, 5). Figure 12 shows the application of the suggested hybrid GAAOA for low-contrast image. Figure 13 depicts the implementation of the suggested GAAOA for high-contrast image. Table 6 shows the comparative study between fitness value, thresholds, and PSNR for low-contrast image (Camera man) for different optimization techniques and the suggested GAAOA technique in low-contrast image. The results show the accuracy of the suggested technique in comparison with the published technique. Table 7 shows the comparative study between fitness value, thresholds, and PSNR for low-contrast image (Camera man) for different optimization techniques and the suggested GAAOA technique. The results show the accuracy of the suggested technique in comparison with the published technique in high-contrast image. Also, we concluded that the suggested hybrid GAAOA has better performance in comparison with other techniques in terms of threshold, PSNR, and fitness value.
According to the results, the suggested algorithm has a strong computing capability, outperforms, and converges quickly while using low time and less energy. The suggested algorithm’s threshold and fitness function values are considered a disadvantage since they are frequently not optimal for the instances under study.
Code availability
The custom code used in this study is part of ongoing research and is currently not publicly available. However, it can be provided by the authors upon reasonable request for academic and non-commercial use. Interested readers may contact the corresponding author to obtain access.
Advantages and drawbacks of the suggested hybrid GAAOA
According to the responses, the proposed algorithm, which is shown in Table 4, provides the maximum PSNR values in the majority of the analyzed scenarios when compared to other algorithms.
When TH = 2, 3, 4, 5, as shown in Table 2, the suggested method (GAAOA) provides the accurate fitness magnitudes in the majority of cases compared to the other optimization techniques.
As depicted in Table 5, the computation time of the suggested algorithm is shorter than that of the results obtained by the other optimization strategies.
The suggested algorithm’s dependability has been demonstrated utilizing a variety of high- and low-contrast images.
Conclusions
This work proposed a hybrid GAAOA combining Genetic Algorithm (GA), Archimedes Optimization Algorithm (AOA), and Lévy flight to enhance multilevel thresholding for image segmentation. The method was evaluated on standard benchmark images and demonstrated superior performance over state-of-the-art and recent hybrid optimizers like AOA-HHO, HADECO, and CVWOA, achieving higher PSNR, faster convergence, and lower computation time.22,
The improved results stem from the synergy between GA crossover (enhancing local search) and Lévy flight (enhancing global exploration). Although this paper does not include ablation analysis due to space constraints, we are currently conducting such studies to assess the individual contributions of each component, with results to be published separately.
Advantages and limitations of the method are outlined in Section “Advantages and drawbacks of the suggested hybrid GAAOA”. While GAAOA performs robustly across various test cases, its effectiveness may vary in real-time or highly textured scenarios, which are proposed for future research.
Finally, the method holds strong potential for practical applications in medical imaging, industrial inspection, and remote sensing, with planned future extensions including real-time processing and integration with deep learning.
Data availability
The authors confirm that the data supporting the findings of this study are available within online in https://sipi.usc.edu/database/.
References
Nawaz, M. et al. Unraveling the complexity of optical coherence tomography image segmentation using machine and deep learning techniques: A review. Comput. Med. Imaging Gr. 108, 102269 (2023).
Elmi, S. & Elmi, Z. A robust edge detection technique based on Matching Pursuit algorithm for natural and medical images. Biomed. Eng. Adv. 4, 100052 (2022).
Ma, R., Zhang, Z., Ma, Y., Hu, X., Ngai, E. C., & Leung, V. C. (2024). An improved pulse coupled neural networks model for semantic IoT. Digit. Commun. Netw., 10(3), 557–567. https://doi.org/10.1016/j.dcan.2023.06.010 (2024).
Kakehbaraei, S., Arvanaghi, R., Seyedarabi, H., Esmaeili, F. & Zenouz, A. T. 3D tooth segmentation in cone-beam computed tomography images using distance transform. Biomed. Signal Process. Control 79, 104122 (2023).
Zhao, F., Fan, J. & Liu, H. Optimal-selection-based suppressed fuzzy c-means clustering algorithm with self-tuning non local spatial information for image segmentation. Expert Syst. Appl. 41, 4083–4093 (2014).
Engelke, K. et al. Magnetic resonance imaging techniques for the quantitative analysis of skeletal muscle: State of the art. J. Orthop. Transl. 42, 57–72 (2023).
Ashraf, M. H., Jabeen, F., Alghamdi, H., Zia, M. S. & Almutairi, M. S. HVD-Net: A hybrid vehicle detection network for vision-based vehicle tracking and speed estimation. J. King Saud Univ. Comput. Inf. Sci. 35, 101657 (2023).
Onim, M. S. et al. BLPnet: A new DNN model and Bengali OCR engine for automatic licence plate recognition. Array 15, 100244 (2022).
Bazi, Y., Bruzzone, L. & Melgani, F. Image thresholding based on the EM algorithm and the generalized Gaussian distribution. Pattern Recognit. 40, 619–634 (2007).
Lei, Bo. & Fan, J. Multilevel minimum cross entropy thresholding: A comparative study. Appl. Soft Comput. J. 96, 106588 (2020).
Cheng, H. D. & Chen, Y. H. Fuzzy partition of two-dimensional histogram and its application to thresholding. Pattern Recognit. 32, 825–843 (1999).
Wang, C., Jiao, S., Li, Y. & Zhang, Q. Capacity optimization of a hybrid energy storage system considering wind-solar reliability evaluation based on a novel multi-strategy snake optimization algorithm. Expert Syst. Appl. 231, 120602 (2023).
Faragallah, O. S., El-Hoseny, H. M. & El-sayed, H. S. Efficient brain tumor segmentation using OTSU and K-means clustering in homomorphic transform. Biomed. Signal Process. Control 84, 104712 (2023).
Rey, A. & Delrieux, C. Multithresholding techniques in SAR image classification. Remote Sens. Appl. Soc. Environ. 23, 100540 (2021).
Chen, X. et al. An efficient multilevel thresholding image segmentation method based on the slime mould algorithm with bee foraging mechanism: A real case with lupus nephritis images. Comput. Biol. Med. 142, 105179 (2022).
Wang, J., Bei, J., Song, H., Zhang, H. & Zhang, P. A whale optimization algorithm with combined mutation and removing similarity for global optimization and multilevel thresholding image segmentation. Appl. Soft Comput. 137, 110130 (2023).
Chen, J. et al. Dynamic mechanism-assisted artificial bee colony optimization for image segmentation of COVID-19 chest X-ray. Displays 79, 102485 (2023).
Huan, S. A novel interval decomposition correlation particle swarm optimization-extreme learning machine model for short-term and long-term water quality prediction. J. Hydrol. 625, 130034 (2023).
Deb, I. & Gupta, R. K. A genetic algorithm based heuristic optimization technique for solving balanced allocation problem involving overall shipping cost minimization with restriction to the number of serving units as well as customer hubs. Results Control Optim. 11, 100227 (2023).
Nematzadeh, H., García-Nieto, J., Navas-Delgado, I. & Aldana-Montes, J. F. Ensemble-based genetic algorithm explainer with automized image segmentation: A case study on melanoma detection dataset. Comput. Biol. Med. 155, 106613 (2023).
Hilali-Jaghdam, I., Ishak, A. B., Abdel-Khalek, S. & Jamal, A. Quantum and classical genetic algorithms for multilevel segmentation of medical images: A comparative study. Comput. Commun. 162, 83–93 (2020).
Tang, K., Yuan, X., Sun, T., Yang, J., & Gao, S. An improved scheme for minimum cross entropy threshold selection based on genetic algorithm. Knowledge-Based Systems, 24(8), 1131–1138 (2011)
Manic, K. S., Priya, R. K., Rajinikanth, V. Image multithresholding based on Kapur/Tsallis entropy and firefly algorithm. Indian Journal of Science and Technology, 9. https://doi.org/10.17485/ijst/2016/v9i14/90391 (2016).
Wang, C., Jiao, S., Li, Y., & Zhang, Q. Capacity optimization of a hybrid energy storage system considering Wind-Solar reliability evaluation based on a novel Multi-strategy snake optimization algorithm. Expert Systems with Applications, 231, 120602. https://doi.org/10.1016/j.eswa.2023.120602 (2023).
Mostafa, R. R., Khedr, A. M., Aghbari, Z. A., Afyouni, I., Kamel, I., & Ahmed, N. Medical image segmentation approach based on hybrid adaptive differential evolution and crayfish optimizer. Computers in Biology and Medicine, 180, 109011 https://doi.org/10.1016/j.compbiomed.2024.109011 (2024)
Yue, X. & Zhang, H. Modified hybrid bat algorithm with genetic crossover operation and smart inertia weight for multilevel image segmentation. Appl. Soft Comput. J. 90, 106157 (2020).
De, S., Bhattacharyya, S. & Dutta, P. Automatic magnetic resonance image segmentation by fuzzy intercluster hostility index based genetic algorithm: An application. Appl. Soft Comput. 47, 669–683 (2016).
Ghosh, P., Mitchell, M., Tanyi, J. A. & Hung, A. Y. Incorporating priors for medical image segmentation using a genetic algorithm. Neurocomputing 195, 181–194 (2016).
Hemeida, A. M., et al. Impact of loading capability on optimal location of renewable energy systems distribution networks. Accepted for publication at Ain Shams Engineering Journal.
Long, Q., Li, G. & Jiang, L. A novel solver for multi-objective optimization: Dynamic non-dominated sorting genetic algorithm (DNSGA). Soft. Comput. 26, 725–747 (2022).
Costa-Carrapiço, I., Raslan, R. & González, J. N. A systematic review of genetic algorithm-based multi-objective optimisation for building retrofitting strategies towards energy efficiency. Energy Build. 210, 109690 (2020).
Srikanth, R. & Bikshalu, K. Multilevel thresholding image segmentation based on energy curve with harmony search algorithm. Ain Shams Eng. J. 12, 1–20 (2021).
Mostafa, R. R. et al. Medical image segmentation approach based on hybrid adaptive differential evolution and crayfish optimizer. Comput. Biol. Med. 180, 109011 (2024).
Qiao, L., Liu, K., Xue, Y., Tang, W. & Salehnia, T. A multi-level thresholding image segmentation method using hybrid arithmetic optimization and Harris hawks optimizer algorithms. Expert Syst. Appl. 241, 122316 (2024).
Shi, J. et al. Multi-threshold image segmentation based on an improved whale optimization algorithm: A case study of Lupus Nephritis. Biomed. Signal Process. Control 96, 106492 (2024).
Salgotra, R., Mittal, N., Almazyad, A. S. & Mohamed, A.W. RGN: A triple hybrid algorithm for multi-level image segmentation with type II fuzzy sets. Ain Shams Engineering Journal.
Zhu, D. et al. Fundus image segmentation based on random collision whale optimization algorithm. J. Comput. Sci. 80, 102323 (2024).
Iqbal, S., Khan, T. M., Naqvi, S. S., Naveed, A. & Meijering, E. TBConvL-Net: A hybrid deep learning architecture for robust medical image. Pattern Recogn. 158, 111028 (2025).
Brar, K. K. et al. Image segmentation review: Theoretical background and recent advances. Inf. Fusion 114, 102608 (2025).
Tarique, T. A., Zamee, M. A. & Khan, M. I. A new approach for pattern recognition with neuro-genetic system using microbial genetic algorithm. In The 2014 IEEE International Conference on Electrical Engineering and Information & Communication Technology 10–12 (2014).
Fathy, A., Alharbi, A. G., Alshammari, S. & Hasanien, H. M. Archimedes optimization algorithm based maximum power point tracker for wind energy generation system. Ain Shams Eng. J. 13, 101548 (2022).
Rorres, C. Completing book II of Archimedes’s on floating bodies. Math. Intell. 26, 32–42 (2004).
Fang, L., Yao, Y. & Liang, X. New binary Archimedes optimization algorithm and its application. Expert Syst. Appl. 230, 120639 (2023).
Milovanovi, M., Radosavljevi, J. & Perovi, B. A backward/forward sweep power flow method for harmonic polluted radial distribution systems with distributed generation unit. Int. Trans. Electr. Energy Syst. https://doi.org/10.1002/2050-7038.12310 (2019).
Martin, D., Fowlkes, C., Tal, D. & Malik, J. A. database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics. In Computer Vision, 2001. ICCV 2001. Proceedings. Eighth IEEE International Conference on 2001 Vol. 2 416–423. (IEEE, 2004). 13(1):146–66.
Hemeida, A. M., Mansour, R. & Hussein, M. E. Multilevel thresholding for image segmentation using an improved electromagnetism optimization algorithm. Int. J. Interact. Multimed. Artif. Intell. Spec. Issue Artif. Intell. Appl. 5(4), 102–112. https://doi.org/10.9781/ijimai.2018.09.001 (2019).
Manic, K. S., Priya, R. K. & Rajinikanth, V. Image multithresholding based on Kapur/Tsallis entropy and firefly algorithm. Indian J. Sci. Technol. 1, 9 (2016).
Martin D., Fowlkes C., Tal D., Malik J. A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics. In Computer Vision, 2001. ICCV 2001. Proceedings. Eighth IEEE International Conference on 2001 (Vol. 2, pp. 416–423). (IEEE, 2001).
Acknowledgments
The Researchers would like to thank the Deanship of Graduate Studies and Scientific Research at Qassim University for financial support (QU-APC-2025)
Author information
Authors and Affiliations
Contributions
E. A, S.A. and A. H. wrote main manuscript T.S. and M.F. reviewed the manuscript. G. A. reviewed text, figures and final presentation.
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Mahmoud, E., Alkhalaf, S., Senjyu, T. et al. GAAOA-Lévy: a hybrid metaheuristic for optimized multilevel thresholding in image segmentation. Sci Rep 15, 27232 (2025). https://doi.org/10.1038/s41598-025-12142-z
Received:
Accepted:
Published:
Version of record:
DOI: https://doi.org/10.1038/s41598-025-12142-z















