TY - JOUR AU - LiNa, Wang AB - 1. Introduction Due to human activities, natural disasters, and other negative impacts on the atmospheric environment, such as air pollution caused by exhaust emissions, as well as personal bad habits such as long-term smoking and excessive drinking, etc. There has been a notable increase in the prevalence and mortality rates of pulmonary diseases [1]. Moreover, the emergence of highly contagious pulmonary diseases, such as novel coronaviruses, has further compounded the situation. Complicating matters, pulmonary diseases often exhibit subtle early symptoms, which can lead to their inadvertent neglect. Consequently, the timely detection and assessment of pulmonary diseases have become formidable challenges. Computed Tomography (CT), also known as electronic computed X-ray tomography, is currently the prevailing and efficacious modality for lung cancer detection and diagnosis [2]. Earlier iterations of CT scans yielded indistinct images that failed to delineate detailed pathological regions. Technological advancements have resulted in the production of significantly higher-resolution thinner CT slices, but have also increased the diagnostic burden. Integrating computer graphics technology for supportive diagnosis requires clear visualization of complex data. Through interactive modes, this technology aids physicians in detecting pathological areas, thus enhancing diagnostic accuracy. A retrospective analysis of the developmental history of image segmentation techniques illustrates a progressive transition from manual segmentation to semi-automated segmentation and ultimately to fully automated segmentation. Image segmentation serves as a critical step in the realm of image analysis and has garnered significant utilization across numerous pertinent domains. Image segmentation can be broadly categorized into four major classes: region-based segmentation methods, comprising seed region growing and watershed algorithms; energy functional methods, including Snake models [3] and their derivatives; edge-based segmentation, including Roberts gradient operator [4], Sobel gradient operator, etc; and thresholding methods, such as the application of Two-dimensional(2D)OTSU in moon rocks and craters segmentation [5]. Image segmentation is essentially the foremost and elementary procedure to examine and construe the acquired image in innumerable computer vision applications wherein thresholding is considered enormously imperative in this domain [6], it can be mathematically modeled as an optimization problem, where swarm intelligence algorithms demonstrate excellent global search capability and rapid convergence speed, making them well-suited for addressing this problem. Consequently, an increasing number of scholars have started integrating these two approaches. The development of swarm intelligence algorithms has given rise to an increasing number of algorithms, such as the Island Algorithm (IA) [7], Particle Swarm Optimization (PSO) [8], Genetic Algorithm (GA) [9], Cuckoo Search (CS) [10], Firefly Algorithm (FA) [11], Grey Wolf Optimizer [12]. Researchers have applied various swarm intelligence optimization algorithms to the problem of image segmentation. For instance, in reference [13], a concise Binary Particle Swarm Optimization (BPSO) algorithm was proposed. This algorithm eliminates all parameters and directly obtains particle positions through Gaussian sampling. It combines with the OTSU method and is applied to parking space segmentation in the HSV color space. In reference [14], modifications were made to the original genetic algorithm by incorporating tournament selection procedure as the selection operator. Additionally, quantum bit mutation and quantum crossover operators were employed. In cases where the iterative performance was unsatisfactory, a catastrophe operation was initiated to ensure consistent convergence towards the optimal solution. The improved algorithm was then applied to multi-level image segmentation in the context of hyperspectral imagery [15, 16]. In order to tackle the challenges posed by weak inter-pixel correlations and ambiguous regions in satellite imagery, reference [17] integrates the Adaptive Cuckoo Search [18] algorithm with OTSU for image segmentation. The proposed algorithm enhances convergence towards optimal values by replacing Levy flight control step sizes with adaptive step sizes that are inversely proportional to the reproductive generation. This adaptive control mechanism effectively addresses the aforementioned issues. This paper proposes a novel hybrid algorithm: SAOBL-IA, a fusion of the Simulated Annealing(SA) principles, Opposition-based Learning(OBL)ideas and Island Algorithm(IA). The SAOBL-IA approach is designed to increase the algorithm’s ability to escape local optima and accelerate convergence speed. Furthermore, it is combined with an improved 2D OTSU algorithm to overcome the slow segmentation speed and misclassification of background and peripheral target pixels. The proposed method is applied to medical image processing of lung images, and simulation results indicate that the combination of SAOBL-IA and adaptive 2D OTSU has faster image segmentation speed and higher accuracy. 2. Island algorithm The Island Algorithm (IA) is a novel metaheuristic algorithm that mimics the adaptive survival of plants on islands in response to changes in sea level in nature. The algorithm continuously raises the sea level, while the total number of surviving plants remains constant, in order to search for the most suitable location for survival. The Island Algorithm consists of three stages: Elimination stage, Sea level rising stage, and Equilibrium stage. 2.1 Elimination stage The primary objective of the elimination stage is to determine the number of individuals to be eliminated in the current iteration based on the variation in the island range, denoted as h. To defining a range necessitates the establishment of upper and lower bounds, requiring a minimum of two plants to delineate the extent of the island. Consequently, the maximum elimination count should be less than the total number of plants minus 2. Simultaneously, when the variation in the island range is significant, the algorithm is prone to getting trapped in local optimum. Therefore, it is necessary to reduce the number of eliminations in the next iteration to decrease the range variation in subsequent iterations. Conversely, when the variation in the island range is small, the algorithm exhibits slower convergence. In such cases, increasing the number of eliminations can be employed to amplify the range variation in the next iteration. Hence, the elimination function adheres to the following two criteria: When the range variation is minimal (i.e., when the range variation is 0), the maximum number of individuals to be eliminated is required (i.e., the total number of plants minus 2). The overall elimination function is a decreasing function. Therefore, a negative exponential function that meets the above two criteria and is relatively straightforward can be used: (1) In Eq (1): h represents the range variation with an initial value of 1, Amax denotes the maximum number of eliminations, and Amin corresponds to the minimum number of eliminations. 2.2 Sea level rise stage During the phase of rising sea levels, plant elimination is carried out based on the number of eliminations generated in the preceding stage. This elimination process is characterized by a concomitant reduction in the island range due to the ascending sea levels. The primary objective of this stage is to generate novel island ranges and corresponding range variations. The new island range serves as input for the subsequent equilibrium phase, whereas the newly obtained range variation is utilized in the elimination phase of the ensuing iteration. The determination of the new island range is based on the maximum and minimum values of non-eliminated plants, where Xmax and Xmin denote the maximum and minimum values for each dimension, respectively. To avoid premature convergence of the algorithm, it is essential to extend the maximum and minimum values of the range using Formulas (2) and (3): (2) (3) The formula for the variation in island range is given as Formula (4): (4) Among them: Xmax represents the maximum value for each dimension in the current iteration, while Xmin represents the minimum value for each dimension. On the other hand, and represent the maximum and minimum values for each dimension in previous iteration. The function "norm" is used to calculate the 2-norm between vectors. 2.3 Equilibrium stage During the equilibrium phase, the main task is to shrink the island range while preserving the total number of plants. This is achieved by eliminating old plants and simultaneously introducing an equal number of new plants. The non-eliminated old plants remain unchanged in their original positions, while the newly generated plants strive towards optimal global positions. At the conclusion of the equilibrium phase, fitness values are compared and sorted. The formula for generating new plants is expressed as Formula (5). (5) In Eq (5): x(j,:) represents the position of the j-th new plant within the new range; x(1,:) denotes the globally optimal position; and D signifies the dimensionality. 2.1 Elimination stage The primary objective of the elimination stage is to determine the number of individuals to be eliminated in the current iteration based on the variation in the island range, denoted as h. To defining a range necessitates the establishment of upper and lower bounds, requiring a minimum of two plants to delineate the extent of the island. Consequently, the maximum elimination count should be less than the total number of plants minus 2. Simultaneously, when the variation in the island range is significant, the algorithm is prone to getting trapped in local optimum. Therefore, it is necessary to reduce the number of eliminations in the next iteration to decrease the range variation in subsequent iterations. Conversely, when the variation in the island range is small, the algorithm exhibits slower convergence. In such cases, increasing the number of eliminations can be employed to amplify the range variation in the next iteration. Hence, the elimination function adheres to the following two criteria: When the range variation is minimal (i.e., when the range variation is 0), the maximum number of individuals to be eliminated is required (i.e., the total number of plants minus 2). The overall elimination function is a decreasing function. Therefore, a negative exponential function that meets the above two criteria and is relatively straightforward can be used: (1) In Eq (1): h represents the range variation with an initial value of 1, Amax denotes the maximum number of eliminations, and Amin corresponds to the minimum number of eliminations. 2.2 Sea level rise stage During the phase of rising sea levels, plant elimination is carried out based on the number of eliminations generated in the preceding stage. This elimination process is characterized by a concomitant reduction in the island range due to the ascending sea levels. The primary objective of this stage is to generate novel island ranges and corresponding range variations. The new island range serves as input for the subsequent equilibrium phase, whereas the newly obtained range variation is utilized in the elimination phase of the ensuing iteration. The determination of the new island range is based on the maximum and minimum values of non-eliminated plants, where Xmax and Xmin denote the maximum and minimum values for each dimension, respectively. To avoid premature convergence of the algorithm, it is essential to extend the maximum and minimum values of the range using Formulas (2) and (3): (2) (3) The formula for the variation in island range is given as Formula (4): (4) Among them: Xmax represents the maximum value for each dimension in the current iteration, while Xmin represents the minimum value for each dimension. On the other hand, and represent the maximum and minimum values for each dimension in previous iteration. The function "norm" is used to calculate the 2-norm between vectors. 2.3 Equilibrium stage During the equilibrium phase, the main task is to shrink the island range while preserving the total number of plants. This is achieved by eliminating old plants and simultaneously introducing an equal number of new plants. The non-eliminated old plants remain unchanged in their original positions, while the newly generated plants strive towards optimal global positions. At the conclusion of the equilibrium phase, fitness values are compared and sorted. The formula for generating new plants is expressed as Formula (5). (5) In Eq (5): x(j,:) represents the position of the j-th new plant within the new range; x(1,:) denotes the globally optimal position; and D signifies the dimensionality. 3. Improved island algorithm Although the original island algorithm boasts advantages such as fast convergence speed and robustness, it encounters certain issues during the equilibrium phase. Specifically, the algorithm’s utilization of a fixed plant position iteration method leads to incomplete exploration of the current search space. Furthermore, when confronted with overly flat regions or sharp peak functions, the original island algorithm may struggle to explore optimal solutions effectively. Hence, this paper introduces an opposition-based learning approach to iteratively update excellent plants and combines it with a simulated annealing algorithm to comprehensively explore local space and enhance the exploration of global optimal solutions. 3.1 Opposition-based learning The thought of Opposition-based Learning [19] is to evaluate the opposition-based learning solution based on the current feasible solution, and select the better feasible solution [20]. Fig 1 provides an illustration of this process. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 1. Opposition-based learning. https://doi.org/10.1371/journal.pone.0307278.g001 In the Fig 1, MAX and MIN represent the range of values for the independent variable. X-new corresponds to the opposition-based learning point of X, and its value is calculated as MAX + MIN—X. Therefore, when generating new positions in the algorithm, the opposition-based learning position is simultaneously selected and compared with the fitness value of the original position, to choose the optimal solution. In reference [21], the opposition-based learning technique is integrated into the Particle Swarm Optimization algorithm. When the optimal value of the iteration remains unchanged for an extended period, a reverse search is conducted by selecting suboptimal particles and maximizing their flight velocity, thereby effectively avoiding premature convergence. Additionally, in reference [22], the concept of antagonistic learning is incorporated into the Hybrid Jumping Frog Algorithm, whereby reverse learning is applied to the elite group. This entails recalculating the positions of the best-performing frog group in the entire solution space in a reverse manner. Such an approach expands the search algorithm’s neighborhood search capability, enabling it to circumvent local optima and achieve enhanced precision. The iCSPM2 [23] algorithm improves the cuckoo search algorithm by initially dividing particles into four islands using an island strategy [24], followed by employing different evolutionary strategies for each of the four islands, resulting in four improved versions of the cuckoo search algorithm. Finally, the elite reverse learning strategy is incorporated at the end of each round to retain better particles. Similarly, DiCSPM [25] also enhances the cuckoo search algorithm, specifically its parallel version iCSPM, using the reverse learning method, albeit applied to the island strategy where each island contains the opposite population of another island, unlike the aforementioned literature. In contrast, IBSCA3 [26] primarily enhances the Binary Sine Cosine Algorithm (SCA) starting from the IBSCA1 version. While IBSCA1 improves through reverse learning, IBSCA2 additionally utilizes the VNS method and the Laplace distribution. IBSCA3 further incorporates refraction learning during iteration to enhance exploration capabilities. Although these papers employ reverse learning algorithms, the underlying algorithms and application areas differ, differing from the focus of our study. 3.2 Simulated annealing The Simulated Annealing method was originally used to solve combinatorial optimization problems [27]. It is primarily based on simulating the annealing process of objects, where the object is heated to increase molecular activity and induce disorder, and then gradually cooled down to reach an equilibrium state. The algorithm primarily utilizes the temperature parameter to regulate its progression towards local or global optima. At the outset, when the temperature is sufficiently high, the algorithm can tolerate suboptimal deteriorations. As the annealing process unfolds, the temperature gradually decreases, causing the algorithm to selectively favor superior solutions. Eventually, at a temperature of 0, only the most optimal solutions are accepted, leading to the eventual attainment of either a local or global optimum. The selection method employed in the Simulated Annealing Algorithm is elucidated as follows: (6) In Eq (6), p represents the probability of accepting a new solution, while E denotes the fitness value associated with the solution. When E2 < E1, the new solution is accepted due to its superior fitness value. However, when E2 is greater than or equal to E1, there exists a certain probability of accepting deteriorating solutions, thus facilitating more effective global exploration. Furthermore, literature has integrated simulated annealing with Gaussian mutation in the Particle Swarm Optimization algorithm to select mutated particles, thereby enhancing convergence speed and precision. Reference [28] leverages the early non-convergence advantage of simulated annealing and integrates it with genetic algorithms to overcome the issue of premature convergence, thereby enhancing the overall capability of the algorithm. 3.3 The SA and OBL island algorithm (SAOBL-IA) During the iteration phase of the equilibrium stage in the Island Algorithm, not all plant positions are updated. Instead, only inferior plants are eliminated while retaining the existing superior plants. Although this approach reduces the computational burden to some extent, it results in incomplete exploration of the search space and slower convergence speed, thus impacting the algorithm’s search capability. Hence, the present study incorporates the idea of opposition-based learning to tackle the aforementioned challenges by updating the positions of the existing retained plants through opposition-based learning. The selection of preserved plants is based on a comparison between the fitness values of original plant positions and their corresponding counterparts derived from opposition-based learning. This method not only retains superior plants but also introduces novel ones, thereby speeding up the overall convergence rate of the algorithm. The formula for generating new positions is expressed as Eq (7). (7) In Eqion (7), xnew corresponds to the selected position after opposition-based learning, xold represents the original solution, and (a+b−xold) denotes the opposition-based learning positions within the island range. For instance, when the island range is between 0 and 10, with a being 0 and b being 10, if the old position of a plant is xold = 3, then its opposition-based learning position would be (a+b−xold) = 7. Here, a and b represent the upper and lower bounds on the island, respectively. The function f denotes the fitness function. If the fitness value of the new position is superior to that of the old position, a replacement is performed. In addition, the Island Algorithm often encounters slow convergence or difficulty in exploring the optimal solution when dealing with excessively flat regions or sharp peaks. The present study incorporates the concept of simulated annealing in the selection of newly generated plants. When the Island Algorithm generates new island ranges during the ascent phase, the 90th percentile position of the non-eliminated plants is selected as the threshold for the annealing process. If the annealing energy is lower than the energy at this position, the new position is adopted; otherwise, a certain probability-based judgment is made according to temperature conditions. When the conditions are not met, the new position is replaced with the plant position at the threshold (as shown in Fig 2). At the beginning of the iteration, energy levels are accepted regardless of their values; however, as the iteration progresses and the temperature decreases, only better solutions are accepted. Therefore, this approach can more comprehensively search the solution space and accelerate the convergence speed. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 2. The generation process of new solutions during the equilibrium phase. https://doi.org/10.1371/journal.pone.0307278.g002 3.4 Algorithm steps The steps of the Island Algorithm based on SA and OBL are as follows. Step 1 Initialize the island algorithm with a random set of solutions, population size N = 100, dimension D, maximum number of iterations T = 1500, maximum number of evaluations E, The maximum and minimum number of eliminations Amax = 50, Amin = 2, island range h = 1, simulated annealing initial temperature t = 100(The maximum elimination count is typically determined based on the population size, while the selection of the initial temperature and the cooling coefficient are derived from multiple experimental tests.). Step 2 Compute individual fitness values and sort them, while selecting the best fitness value and its corresponding position. Step 3 During the iteration process, the elimination procedure is executed according to Formula 1, generating the required number of individuals to be eliminated. Step 4 In the sea level rise phase, new island ranges are generated and expanded according to Formulas 2 and 3, and the variation of island range is calculated based on Formula 4. Step 5 In the balancing phase, the retained plants are subjected to opposition-based learning as per Formula 7. The resulting fitness values are then compared, and the more favorable plants are selected for replacement. Step 6 The novel vegetation obtained from Formula 5 is subjected to the simulated annealing algorithm, utilizing Formula 6 for selection purposes. The enhanced vegetation generated from the integration of the two methods is then used to create the succeeding generation, with annealing being carried out subsequently. Step 7 Check if the algorithm meets the termination criteria. Reaching the maximum number of iterations or attaining the theoretical optimum value of the optimization function during the iterative process. If the termination criteria are met, output the results and end the algorithm. Otherwise, continue looping by executing step 3. The pseudo-code for the algorithm is shown below: SAOBL-IA pseudo-code Input: Initialization N, Amax, Amin, h, D, T, E, t.  Island location: Plant location:  Calculating and ranking the fitness values for each plant,     Output: Optimum value location:x(1,:x), Optimal fitness value:fit(1); while (termination condition) elimination phase:   Calculate the number of eliminated individuals using Formula 1 sea level rise phase:    Expand the range according to Formulas 2 and 3. Using Formula 4 to calculate the change in island range h.    Balancing phase: Opposition-based Learning is performed on the old plants,   the reverse position xopp is calculated according to Formula 7,    and the fitness value fitopp is calculated.   for (All the old plants)    if (fitopp0)  if (Decide whether to accept worse solutions according to Formula 6) Replace the poorer solution with mid.     end    end   end  t = t*0.99;  if (reaching the maximum evaluation times) Produce the output and terminate the algorithm.  else increment the evaluation count.  end ;  end 3.1 Opposition-based learning The thought of Opposition-based Learning [19] is to evaluate the opposition-based learning solution based on the current feasible solution, and select the better feasible solution [20]. Fig 1 provides an illustration of this process. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 1. Opposition-based learning. https://doi.org/10.1371/journal.pone.0307278.g001 In the Fig 1, MAX and MIN represent the range of values for the independent variable. X-new corresponds to the opposition-based learning point of X, and its value is calculated as MAX + MIN—X. Therefore, when generating new positions in the algorithm, the opposition-based learning position is simultaneously selected and compared with the fitness value of the original position, to choose the optimal solution. In reference [21], the opposition-based learning technique is integrated into the Particle Swarm Optimization algorithm. When the optimal value of the iteration remains unchanged for an extended period, a reverse search is conducted by selecting suboptimal particles and maximizing their flight velocity, thereby effectively avoiding premature convergence. Additionally, in reference [22], the concept of antagonistic learning is incorporated into the Hybrid Jumping Frog Algorithm, whereby reverse learning is applied to the elite group. This entails recalculating the positions of the best-performing frog group in the entire solution space in a reverse manner. Such an approach expands the search algorithm’s neighborhood search capability, enabling it to circumvent local optima and achieve enhanced precision. The iCSPM2 [23] algorithm improves the cuckoo search algorithm by initially dividing particles into four islands using an island strategy [24], followed by employing different evolutionary strategies for each of the four islands, resulting in four improved versions of the cuckoo search algorithm. Finally, the elite reverse learning strategy is incorporated at the end of each round to retain better particles. Similarly, DiCSPM [25] also enhances the cuckoo search algorithm, specifically its parallel version iCSPM, using the reverse learning method, albeit applied to the island strategy where each island contains the opposite population of another island, unlike the aforementioned literature. In contrast, IBSCA3 [26] primarily enhances the Binary Sine Cosine Algorithm (SCA) starting from the IBSCA1 version. While IBSCA1 improves through reverse learning, IBSCA2 additionally utilizes the VNS method and the Laplace distribution. IBSCA3 further incorporates refraction learning during iteration to enhance exploration capabilities. Although these papers employ reverse learning algorithms, the underlying algorithms and application areas differ, differing from the focus of our study. 3.2 Simulated annealing The Simulated Annealing method was originally used to solve combinatorial optimization problems [27]. It is primarily based on simulating the annealing process of objects, where the object is heated to increase molecular activity and induce disorder, and then gradually cooled down to reach an equilibrium state. The algorithm primarily utilizes the temperature parameter to regulate its progression towards local or global optima. At the outset, when the temperature is sufficiently high, the algorithm can tolerate suboptimal deteriorations. As the annealing process unfolds, the temperature gradually decreases, causing the algorithm to selectively favor superior solutions. Eventually, at a temperature of 0, only the most optimal solutions are accepted, leading to the eventual attainment of either a local or global optimum. The selection method employed in the Simulated Annealing Algorithm is elucidated as follows: (6) In Eq (6), p represents the probability of accepting a new solution, while E denotes the fitness value associated with the solution. When E2 < E1, the new solution is accepted due to its superior fitness value. However, when E2 is greater than or equal to E1, there exists a certain probability of accepting deteriorating solutions, thus facilitating more effective global exploration. Furthermore, literature has integrated simulated annealing with Gaussian mutation in the Particle Swarm Optimization algorithm to select mutated particles, thereby enhancing convergence speed and precision. Reference [28] leverages the early non-convergence advantage of simulated annealing and integrates it with genetic algorithms to overcome the issue of premature convergence, thereby enhancing the overall capability of the algorithm. 3.3 The SA and OBL island algorithm (SAOBL-IA) During the iteration phase of the equilibrium stage in the Island Algorithm, not all plant positions are updated. Instead, only inferior plants are eliminated while retaining the existing superior plants. Although this approach reduces the computational burden to some extent, it results in incomplete exploration of the search space and slower convergence speed, thus impacting the algorithm’s search capability. Hence, the present study incorporates the idea of opposition-based learning to tackle the aforementioned challenges by updating the positions of the existing retained plants through opposition-based learning. The selection of preserved plants is based on a comparison between the fitness values of original plant positions and their corresponding counterparts derived from opposition-based learning. This method not only retains superior plants but also introduces novel ones, thereby speeding up the overall convergence rate of the algorithm. The formula for generating new positions is expressed as Eq (7). (7) In Eqion (7), xnew corresponds to the selected position after opposition-based learning, xold represents the original solution, and (a+b−xold) denotes the opposition-based learning positions within the island range. For instance, when the island range is between 0 and 10, with a being 0 and b being 10, if the old position of a plant is xold = 3, then its opposition-based learning position would be (a+b−xold) = 7. Here, a and b represent the upper and lower bounds on the island, respectively. The function f denotes the fitness function. If the fitness value of the new position is superior to that of the old position, a replacement is performed. In addition, the Island Algorithm often encounters slow convergence or difficulty in exploring the optimal solution when dealing with excessively flat regions or sharp peaks. The present study incorporates the concept of simulated annealing in the selection of newly generated plants. When the Island Algorithm generates new island ranges during the ascent phase, the 90th percentile position of the non-eliminated plants is selected as the threshold for the annealing process. If the annealing energy is lower than the energy at this position, the new position is adopted; otherwise, a certain probability-based judgment is made according to temperature conditions. When the conditions are not met, the new position is replaced with the plant position at the threshold (as shown in Fig 2). At the beginning of the iteration, energy levels are accepted regardless of their values; however, as the iteration progresses and the temperature decreases, only better solutions are accepted. Therefore, this approach can more comprehensively search the solution space and accelerate the convergence speed. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 2. The generation process of new solutions during the equilibrium phase. https://doi.org/10.1371/journal.pone.0307278.g002 3.4 Algorithm steps The steps of the Island Algorithm based on SA and OBL are as follows. Step 1 Initialize the island algorithm with a random set of solutions, population size N = 100, dimension D, maximum number of iterations T = 1500, maximum number of evaluations E, The maximum and minimum number of eliminations Amax = 50, Amin = 2, island range h = 1, simulated annealing initial temperature t = 100(The maximum elimination count is typically determined based on the population size, while the selection of the initial temperature and the cooling coefficient are derived from multiple experimental tests.). Step 2 Compute individual fitness values and sort them, while selecting the best fitness value and its corresponding position. Step 3 During the iteration process, the elimination procedure is executed according to Formula 1, generating the required number of individuals to be eliminated. Step 4 In the sea level rise phase, new island ranges are generated and expanded according to Formulas 2 and 3, and the variation of island range is calculated based on Formula 4. Step 5 In the balancing phase, the retained plants are subjected to opposition-based learning as per Formula 7. The resulting fitness values are then compared, and the more favorable plants are selected for replacement. Step 6 The novel vegetation obtained from Formula 5 is subjected to the simulated annealing algorithm, utilizing Formula 6 for selection purposes. The enhanced vegetation generated from the integration of the two methods is then used to create the succeeding generation, with annealing being carried out subsequently. Step 7 Check if the algorithm meets the termination criteria. Reaching the maximum number of iterations or attaining the theoretical optimum value of the optimization function during the iterative process. If the termination criteria are met, output the results and end the algorithm. Otherwise, continue looping by executing step 3. The pseudo-code for the algorithm is shown below: SAOBL-IA pseudo-code Input: Initialization N, Amax, Amin, h, D, T, E, t.  Island location: Plant location:  Calculating and ranking the fitness values for each plant,     Output: Optimum value location:x(1,:x), Optimal fitness value:fit(1); while (termination condition) elimination phase:   Calculate the number of eliminated individuals using Formula 1 sea level rise phase:    Expand the range according to Formulas 2 and 3. Using Formula 4 to calculate the change in island range h.    Balancing phase: Opposition-based Learning is performed on the old plants,   the reverse position xopp is calculated according to Formula 7,    and the fitness value fitopp is calculated.   for (All the old plants)    if (fitopp0)  if (Decide whether to accept worse solutions according to Formula 6) Replace the poorer solution with mid.     end    end   end  t = t*0.99;  if (reaching the maximum evaluation times) Produce the output and terminate the algorithm.  else increment the evaluation count.  end ;  end 4. Lung image segmentation based on SAOBL-IA In response to the slow processing speed of traditional two-dimensional Otsu segmentation and the potential misclassification of pixels along the diagonal during segmentation, this study introduces an enhanced version of the island algorithm. The enhanced algorithm aims to improve both the speed and accuracy of finding the optimal threshold value, and enhances the two-dimensional Otsu method by employing a bifurcation approach, thereby strengthening its ability to segment pixels along the diagonal. 4.1 Traditional 2D OTSU algorithm The traditional 2D maximum inter-class variance algorithm utilizes pixel grayscale and its neighborhood grayscale mean to construct a 2D histogram for threshold segmentation. Due to the lack of utilization of pixel local spatial neighborhood information, one-dimensional(1D)OTSU cannot achieve ideal results or even result in incorrect segmentation when the grayscale difference between the background and the target is not significant [29]. The added 1D data compensates for the correlation information between pixels, which is beneficial for restraining noise and improving segmentation accuracy. However, the additional incorporation of local grayscale value information necessitates the calculation of the mean for each pixel’s surroundings, thereby augmenting the algorithm’s time complexity. This poses significant challenges to computational resources and utilization efficiency. As pointed out in reference [30], the current application of swarm intelligence algorithms in image segmentation still faces numerous challenges. For instance, the efficiency of the objective function largely depends on both the swarm intelligence algorithm employed and the type of image being segmented. By combining the global search of particle swarm optimization algorithm with the local search of bat algorithm, the 2D OTSU threshold is optimized, which improves the computational speed and storage space [31]. By focusing on the average of pixel grayscale values and neighborhood grayscale values in the central region of the image, the optimal threshold is found, and the binary quantum particle swarm optimization algorithm is integrated to improve the quality of segmented images [32]. A threshold point is determined by intersecting the diagonal and perpendicular lines on the 2D histogram, which considers the pixels along the diagonal but also introduces redundant pixels [33]. In reference [34], The main approach employs the ES-WOA algorithm, which itself utilizes the strategy of Evolution Strategies (ES). This strategy involves conducting a global search using Levy flights initially, forming a new population of better solutions. Subsequently, techniques such as Firefly Algorithm (FA), Differential Evolution (DE), and Particle Swarm Optimization (PSO), among others, are employed as local optimizers to update and iterate over the new population. Conversely, this paper adopts the Cauchy distribution for global search and the Whale Optimization Algorithm (WOA) as the local search mechanism. Moreover, the improved algorithm is integrated into various image segmentation algorithms, including the application of Otsu in multi-level color hematology image segmentation. In reference [35, 36], claimed to achieve better optimization capabilities by employing the Hybrid Equilibrium Optimization Algorithm (HEOA) in 3D Otsu segmentation of standard color images and color satellite images from the CEC2015 dataset for multi-level image segmentation. However, the 3D segmentation algorithm also requires significant computational resources, resulting in substantial time consumption. In reference [37], an improved adaptive differential evolution algorithm is combined with the 2D maximum inter-class variance algorithm to efficiently obtain the threshold value. The principle of the 2D OTSU algorithm is: Let M*M be the size of the image with L levels of gray scale for its pixels, and the same L levels for its neighborhood gray scale average. The total number of pixels is N, where f(x,y) represents a pixel with gray scale i and neighborhood gray scale average j, and they form a tuple. The number of occurrences of a certain tuple is denoted by fij and its probability by Pij.then: (8) (9) Choosing a threshold vector (s, t) divides the two-dimensional histogram of Fig 3 into four regions, A, B, C, and D. A and C respectively represent the background and object parts of the image, while B and D represent the edge and noise. The probabilities of occurrence of the background and object are then given by: (10) Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 3. Two-dimensional histogram plane. https://doi.org/10.1371/journal.pone.0307278.g003 The mean vectors for the background and target are: (11) (12) The total mean vector of the two-dimensional histogram is: (13) In the 2D maximum inter-class variance algorithm, it is common to ignore the probabilities of regions B and D due to their relatively low values. Therefore, they can be set as negligible: ω1+ω2 = 1 and . Inter-class variance is defined as: (14) Therefore, the optimal threshold is the value of (s, t) when σ reaches its maximum value. 4.2 A modified adaptive bifurcation 2D OTSU method For the traditional 2D maximum inter-class variance algorithm, when the threshold selection is near the main diagonal, the probability in the main diagonal region can be approximated to 1. However, when the threshold is far from the main diagonal and near the secondary diagonal, the approximation of the probability to 1 no longer holds, as the probability is affected by noise and edge interference. If the segmentation is still performed according to the traditional method, segmentation errors will occur, affecting accuracy and preventing the attainment of the optimal threshold. In order to solve this problem, we propose a modified Adaptive Bifurcation 2D OTSU(AB2D-OTSU) technique as follows. In actual experiments, we found that there are still many non-zero tuples in the binary tuples close to the background and object regions, which may be due to noise interference resulting in deviation and should be included in the background or object regions. Therefore, the bivariate histogram plane is divided by two lines, l1 and l2, passing through the threshold point (s, t), where the angle between line l1 and the line x = s, and the angle between line l2 and the line y = t, are both α and (0°≤α≤5°). The expression is: (15) (16) According to Fig 4, the four regions (designated as one, two, three, and four) are enclosed by the two lines and the background and object regions. The zero-element tuples within the enclosed area are denoted as N0, while the non-zero-element tuples are denoted as Nα, and Nα proportion is denoted as Pα. When Pα = 0.75, α is fixed. Through this approach, pixels along the diagonal, which are susceptible to misclassification as either background or foreground, are systematically classified, thereby enhancing the accuracy of image segmentation. If there are no suitable angles in 0°≤α≤5°, the enclosed region is abandoned as the background and object and the calculation is performed on the original region. among: (17) Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 4. Adaptive bifurcation histogram plane. https://doi.org/10.1371/journal.pone.0307278.g004 The updated probabilities for the foreground and background are as follows: (18) (19) The updated mean vectors for the two categories are as follows: (20) (21) The updated equation for inter-class variance in two dimensions is as follows: (22) 4.3 Image segmentation algorithm based on SAOBL-IA To address the issue of high computational complexity and long processing time of the improved two-dimensional maximum inter-class variance algorithm, we propose to use the SAOBL-IA to enhance image segmentation algorithm speed and obtain the optimal threshold for segmentation. The main steps of the algorithm are as follows: Setp1 Read the lung image to be segmented, initialize the algorithm parameters: population size N, dimensionality D, maximum number of iterations T, maximum number of evaluations E, maximum number of eliminations Amax, minimum number of eliminations Amin, and initial temperature t of the simulated annealing. Setp2 Calculate the initial maximum two-dimensional inter-class variance corresponding to the threshold, and sort to select the maximum variance value. Setp3 Perform opposition-based learning on the segmentation threshold, select a better solution, and eliminate some of the poorer solutions. Setp4 Supplement the eliminated solutions through simulated annealing. Setp5 Iterate to optimize according to Steps 3 and 4, determine whether the algorithm meets the termination conditions, output the optimal solution, that is, the optimal threshold binary tuple, if yes, otherwise continue iterating. Setp6 Segment the image based on the optimal threshold binary tuple and output the image. 4.1 Traditional 2D OTSU algorithm The traditional 2D maximum inter-class variance algorithm utilizes pixel grayscale and its neighborhood grayscale mean to construct a 2D histogram for threshold segmentation. Due to the lack of utilization of pixel local spatial neighborhood information, one-dimensional(1D)OTSU cannot achieve ideal results or even result in incorrect segmentation when the grayscale difference between the background and the target is not significant [29]. The added 1D data compensates for the correlation information between pixels, which is beneficial for restraining noise and improving segmentation accuracy. However, the additional incorporation of local grayscale value information necessitates the calculation of the mean for each pixel’s surroundings, thereby augmenting the algorithm’s time complexity. This poses significant challenges to computational resources and utilization efficiency. As pointed out in reference [30], the current application of swarm intelligence algorithms in image segmentation still faces numerous challenges. For instance, the efficiency of the objective function largely depends on both the swarm intelligence algorithm employed and the type of image being segmented. By combining the global search of particle swarm optimization algorithm with the local search of bat algorithm, the 2D OTSU threshold is optimized, which improves the computational speed and storage space [31]. By focusing on the average of pixel grayscale values and neighborhood grayscale values in the central region of the image, the optimal threshold is found, and the binary quantum particle swarm optimization algorithm is integrated to improve the quality of segmented images [32]. A threshold point is determined by intersecting the diagonal and perpendicular lines on the 2D histogram, which considers the pixels along the diagonal but also introduces redundant pixels [33]. In reference [34], The main approach employs the ES-WOA algorithm, which itself utilizes the strategy of Evolution Strategies (ES). This strategy involves conducting a global search using Levy flights initially, forming a new population of better solutions. Subsequently, techniques such as Firefly Algorithm (FA), Differential Evolution (DE), and Particle Swarm Optimization (PSO), among others, are employed as local optimizers to update and iterate over the new population. Conversely, this paper adopts the Cauchy distribution for global search and the Whale Optimization Algorithm (WOA) as the local search mechanism. Moreover, the improved algorithm is integrated into various image segmentation algorithms, including the application of Otsu in multi-level color hematology image segmentation. In reference [35, 36], claimed to achieve better optimization capabilities by employing the Hybrid Equilibrium Optimization Algorithm (HEOA) in 3D Otsu segmentation of standard color images and color satellite images from the CEC2015 dataset for multi-level image segmentation. However, the 3D segmentation algorithm also requires significant computational resources, resulting in substantial time consumption. In reference [37], an improved adaptive differential evolution algorithm is combined with the 2D maximum inter-class variance algorithm to efficiently obtain the threshold value. The principle of the 2D OTSU algorithm is: Let M*M be the size of the image with L levels of gray scale for its pixels, and the same L levels for its neighborhood gray scale average. The total number of pixels is N, where f(x,y) represents a pixel with gray scale i and neighborhood gray scale average j, and they form a tuple. The number of occurrences of a certain tuple is denoted by fij and its probability by Pij.then: (8) (9) Choosing a threshold vector (s, t) divides the two-dimensional histogram of Fig 3 into four regions, A, B, C, and D. A and C respectively represent the background and object parts of the image, while B and D represent the edge and noise. The probabilities of occurrence of the background and object are then given by: (10) Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 3. Two-dimensional histogram plane. https://doi.org/10.1371/journal.pone.0307278.g003 The mean vectors for the background and target are: (11) (12) The total mean vector of the two-dimensional histogram is: (13) In the 2D maximum inter-class variance algorithm, it is common to ignore the probabilities of regions B and D due to their relatively low values. Therefore, they can be set as negligible: ω1+ω2 = 1 and . Inter-class variance is defined as: (14) Therefore, the optimal threshold is the value of (s, t) when σ reaches its maximum value. 4.2 A modified adaptive bifurcation 2D OTSU method For the traditional 2D maximum inter-class variance algorithm, when the threshold selection is near the main diagonal, the probability in the main diagonal region can be approximated to 1. However, when the threshold is far from the main diagonal and near the secondary diagonal, the approximation of the probability to 1 no longer holds, as the probability is affected by noise and edge interference. If the segmentation is still performed according to the traditional method, segmentation errors will occur, affecting accuracy and preventing the attainment of the optimal threshold. In order to solve this problem, we propose a modified Adaptive Bifurcation 2D OTSU(AB2D-OTSU) technique as follows. In actual experiments, we found that there are still many non-zero tuples in the binary tuples close to the background and object regions, which may be due to noise interference resulting in deviation and should be included in the background or object regions. Therefore, the bivariate histogram plane is divided by two lines, l1 and l2, passing through the threshold point (s, t), where the angle between line l1 and the line x = s, and the angle between line l2 and the line y = t, are both α and (0°≤α≤5°). The expression is: (15) (16) According to Fig 4, the four regions (designated as one, two, three, and four) are enclosed by the two lines and the background and object regions. The zero-element tuples within the enclosed area are denoted as N0, while the non-zero-element tuples are denoted as Nα, and Nα proportion is denoted as Pα. When Pα = 0.75, α is fixed. Through this approach, pixels along the diagonal, which are susceptible to misclassification as either background or foreground, are systematically classified, thereby enhancing the accuracy of image segmentation. If there are no suitable angles in 0°≤α≤5°, the enclosed region is abandoned as the background and object and the calculation is performed on the original region. among: (17) Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 4. Adaptive bifurcation histogram plane. https://doi.org/10.1371/journal.pone.0307278.g004 The updated probabilities for the foreground and background are as follows: (18) (19) The updated mean vectors for the two categories are as follows: (20) (21) The updated equation for inter-class variance in two dimensions is as follows: (22) 4.3 Image segmentation algorithm based on SAOBL-IA To address the issue of high computational complexity and long processing time of the improved two-dimensional maximum inter-class variance algorithm, we propose to use the SAOBL-IA to enhance image segmentation algorithm speed and obtain the optimal threshold for segmentation. The main steps of the algorithm are as follows: Setp1 Read the lung image to be segmented, initialize the algorithm parameters: population size N, dimensionality D, maximum number of iterations T, maximum number of evaluations E, maximum number of eliminations Amax, minimum number of eliminations Amin, and initial temperature t of the simulated annealing. Setp2 Calculate the initial maximum two-dimensional inter-class variance corresponding to the threshold, and sort to select the maximum variance value. Setp3 Perform opposition-based learning on the segmentation threshold, select a better solution, and eliminate some of the poorer solutions. Setp4 Supplement the eliminated solutions through simulated annealing. Setp5 Iterate to optimize according to Steps 3 and 4, determine whether the algorithm meets the termination conditions, output the optimal solution, that is, the optimal threshold binary tuple, if yes, otherwise continue iterating. Setp6 Segment the image based on the optimal threshold binary tuple and output the image. 5. Experiments and analysis of experimental results This chapter aims to test the overall performance of the improved island algorithm. By employing seven benchmark test functions, we will evaluate the algorithm’s robustness, ability to escape local optima, and global search capabilities. Additionally, we will examine the effectiveness of integrating the improved algorithm with the bifurcation-based two-dimensional Otsu algorithm, and validate the superiority of the improved algorithm through metrics such as segmentation accuracy. 5.1 Experimentation and analysis of the SAOBL-IA 5.1.1 Experimental design for the performance of the SAOBL-IA. In order to verify the overall performance improvement of the Island Algorithm, we selected seven typical benchmark functions to test the algorithm’s performance. The specific information of the functions is shown in Table 1. Here f1 is a spherical multidimensional single-peak function with multiple local minima besides the global minimum, and its main purpose is to test the algorithm’s optimization ability. f2 is a multi-modal function with a valley-like shape and multiple local minima, and f6 has multiple global minima, mainly designed to test the global search ability of the algorithm. f3 is a highly multimodal function and, similar to f4, has many regularly distributed local minima, which are used to test the algorithm’s ability to escape from local optima. The main purpose of testing function f5 and unimodal function f7 is to evaluate the algorithm’s convergence ability. The experiment compared Particle Swarm Optimization algorithm (PSO), Beetle Antennae Search algorithm (BAS), Island Algorithm (IA), Grey Wolf Optimizer(GWO) and Island Algorithm based on Simulated Annealing and opposition-based learning (SAOBL-IA). The five algorithms were independently run 30 times on 30-dimensional and 50-dimensional problems for comparison. The best, worst, average, and standard deviation of the optimal error values obtained from 30 independent runs of PSO, BAS, IA, GWO and SAOBL-IA on 30 and 50 dimensions were used as the evaluation criteria for algorithm performance, and the bold font in the table represents the best performance. All five algorithm parameters are set as follows: population size 100, The algorithms are all in Matlab R2016a software for Windows 10 with an i7-11800H 2.3GHz CPU and 16GB of RAM. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 1. Specific information on the 7 benchmark functions. https://doi.org/10.1371/journal.pone.0307278.t001 5.1.2 Experimental results and analysis. Tables 2 and 3 present the performance results of four algorithms with dimensions of 30 and 50, respectively. The evaluation metrics of algorithm accuracy and robustness are measured by the optimal value, worst value, average value, and variance. When the test dimension is 30, it can be observed from the data in the table that the SAOBL-IA algorithm outperforms the other three algorithms in various metrics when applied to functions f1, f2, f4, f5, f7. Among them, for the single-peak function f1 on a sphere, the improvement in performance is particularly evident, and the algorithm’s ability to seek the optimal solution among many local minima is demonstrated by achieving the theoretically best value for function f4. Although the SAOBL-IA algorithm is able to find a relatively optimal solution on function f3, it did not achieve the best results in terms of worst-case value and variance, proving that the improved algorithm has a better ability to escape local optima. And in function f6, SAOBL-IA, IA, and PSO algorithms all achieved the relatively optimal value, but PSO had the best performance according to other standards, which also reflects the potential for improvement in the convergence ability of the SAOBL-IA algorithm. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 2. Results of 7 benchmarking functions in 30 dimensions. https://doi.org/10.1371/journal.pone.0307278.t002 Download: PPT PowerPoint slide PNG larger image TIFF original image Table 3. Results of 7 benchmarking functions in 50 dimensions. https://doi.org/10.1371/journal.pone.0307278.t003 As the test dimension increases to 50, table data shows that SAOBL-IA algorithm performs better than other algorithms in terms of various indicators in functions f1, f2, f3, f4, f5 and f7. This demonstrates that with the increase in dimension, the improved algorithm has stronger global exploration ability. However, in function f6, both SAOBL-IA and PSO algorithms achieve the best value, but the other criteria are still optimized by the PSO algorithm. Therefore, based on the experimental data in Tables 2 and 3, although SAOBL-IA algorithm has errors in individual function data, it shows overall better accuracy and robustness compared to the other four algorithms. On the basis of inheriting the advantages of IA algorithm, SAOBL-IA algorithm enhances the global search ability, and reduces the perturbation as the number of iterations increases, which is conducive to local search. The convergence curves of seven test functions in the comparative algorithm experiments are depicted in Figs 5 and 6 below. Notably, the BAS algorithm is excluded from the plots owing to its distinctive computational approach. Upon analysis of the Fig, it becomes apparent that SAOBL-IA exhibits a slower convergence rate during the early stages compared to the other two algorithms. This phenomenon can be attributed to the simulated annealing algorithm’s inclination to accept suboptimal solutions in the initial phases, thereby facilitating a more thorough exploration of local space. Despite the slower initial convergence, the algorithm accelerates in later stages. Upon scrutiny of the magnified final images, it becomes evident that the enhanced algorithm achieves superior convergence accuracy. Nevertheless, the images also unveil certain limitations of the improved algorithm, particularly in scenarios where obtaining the optimal solution in the initial iterations is imperative, suggesting that the enhancement approach may not be universally applicable. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 5. Image segmentation result. https://doi.org/10.1371/journal.pone.0307278.g005 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 6. Image segmentation result. https://doi.org/10.1371/journal.pone.0307278.g006 We visualized a part of the statistical data in Tables 2 and 3 (see Figs 7 and 8). For a detailed analysis of these statistical data, please refer to the "Experimental results and analysis" section. Figs 7 and 8 visually demonstrate the comparison results of the SAOBL-IA algorithm proposed in this paper and GWO algorithm, IA algorithm on 7 test functions. This provides a clearer explanation of the convergence and robustness of the SAOBL-IA algorithm on various test functions. These visual comparisons can provide a intuitive understanding of their performance under different conditions. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 7. Visualization comparison chart of SAOBL-IA algorithm, and GWO algorithm, IA algorithm (30 dimensions). https://doi.org/10.1371/journal.pone.0307278.g007 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 8. Visualization comparison chart of SAOBL-IA algorithm, and GWO algorithm, IA algorithm (50 dimensions). https://doi.org/10.1371/journal.pone.0307278.g008 5.2 Experimentation and analysis of lung image segmentation algorithm To verify the performance of the Adaptive bifurcation 2D OTSU Lung Image Segmentation based on SAOBL-IA algorithm. The open source COVID-CT Dataset was selected as the dataset to test on CT images of COVID-19 pneumonia, the algorithms are all in Matlab R2016a software for Windows 10 with an i7-11800H 2.3GHz CPU and 16GB of RAM. 5.2.1 Experimental results and analysis. To assess the performance of the proposed method, we conducted a comparative analysis with the traditional 2D OTSU method and the approach described in reference [33] when evaluating the image segmentation capability. Furthermore, for the assessment of segmentation speed, we integrated an algorithm combining Particle Swarm Optimization (PSO) with the traditional 2D OTSU method, both of which are intelligent algorithms. To ensure experimental fairness, we maintained uniformity in the basic parameters across all four algorithms. The experimental results of the segmentation are shown in Fig 9 from left to right: original image, traditional 2D OTSU, reference [33], and the proposed algorithm. From top to bottom: uninfected individual A, uninfected individual B, and infected individual C with COVID-19. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 9. Image segmentation result. https://doi.org/10.1371/journal.pone.0307278.g009 From Fig 9, it can be observed that although the traditional 2D OTSU method provides finer segmentation, it still fails to handle certain types of noise adequately. On the other hand, the approach described in reference [33] takes into account background and noise considerations more comprehensively, but its segmentation is still significantly affected. In contrast, our proposed algorithm demonstrates finer details while disregarding noise interference. However, the segmentation results for the infected individual C with COVID-19 are consistent with the traditional 2D OTSU method. This can be attributed to the fact that the neighborhood grayscale mean values in that region are too close to the boundary, making it difficult to achieve a clear bifurcated. To provide a more intuitive representation of the performance differences, this study employed the Peak Signal Noise Ratio (PSNR) [38] as an objective measure of image quality evaluation. PSNR is defined based on the Mean Square Error (MSE) as follows: (23) (24) Here, the original image I has a size of m*n, K represents the segmented image, MAXI is the maximum pixel value of the image, and PSNR is measured in dB. If each pixel is represented by 8 bits in binary, then the value is calculated as follows: 28−1 = 255. The data in Table 4 indicates that our algorithm exhibits superior performance in terms of PSNR compared to the traditional 2D OTSU method and the approach outlined in reference [33], thereby revealing more detailed information from the original images. Additionally, Table 5 presents a comparison of the runtime among the algorithms, clearly demonstrating a significant advantage of our proposed algorithm. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 4. Segmented image PSNR value. https://doi.org/10.1371/journal.pone.0307278.t004 Download: PPT PowerPoint slide PNG larger image TIFF original image Table 5. Segmented image running time. https://doi.org/10.1371/journal.pone.0307278.t005 5.1 Experimentation and analysis of the SAOBL-IA 5.1.1 Experimental design for the performance of the SAOBL-IA. In order to verify the overall performance improvement of the Island Algorithm, we selected seven typical benchmark functions to test the algorithm’s performance. The specific information of the functions is shown in Table 1. Here f1 is a spherical multidimensional single-peak function with multiple local minima besides the global minimum, and its main purpose is to test the algorithm’s optimization ability. f2 is a multi-modal function with a valley-like shape and multiple local minima, and f6 has multiple global minima, mainly designed to test the global search ability of the algorithm. f3 is a highly multimodal function and, similar to f4, has many regularly distributed local minima, which are used to test the algorithm’s ability to escape from local optima. The main purpose of testing function f5 and unimodal function f7 is to evaluate the algorithm’s convergence ability. The experiment compared Particle Swarm Optimization algorithm (PSO), Beetle Antennae Search algorithm (BAS), Island Algorithm (IA), Grey Wolf Optimizer(GWO) and Island Algorithm based on Simulated Annealing and opposition-based learning (SAOBL-IA). The five algorithms were independently run 30 times on 30-dimensional and 50-dimensional problems for comparison. The best, worst, average, and standard deviation of the optimal error values obtained from 30 independent runs of PSO, BAS, IA, GWO and SAOBL-IA on 30 and 50 dimensions were used as the evaluation criteria for algorithm performance, and the bold font in the table represents the best performance. All five algorithm parameters are set as follows: population size 100, The algorithms are all in Matlab R2016a software for Windows 10 with an i7-11800H 2.3GHz CPU and 16GB of RAM. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 1. Specific information on the 7 benchmark functions. https://doi.org/10.1371/journal.pone.0307278.t001 5.1.2 Experimental results and analysis. Tables 2 and 3 present the performance results of four algorithms with dimensions of 30 and 50, respectively. The evaluation metrics of algorithm accuracy and robustness are measured by the optimal value, worst value, average value, and variance. When the test dimension is 30, it can be observed from the data in the table that the SAOBL-IA algorithm outperforms the other three algorithms in various metrics when applied to functions f1, f2, f4, f5, f7. Among them, for the single-peak function f1 on a sphere, the improvement in performance is particularly evident, and the algorithm’s ability to seek the optimal solution among many local minima is demonstrated by achieving the theoretically best value for function f4. Although the SAOBL-IA algorithm is able to find a relatively optimal solution on function f3, it did not achieve the best results in terms of worst-case value and variance, proving that the improved algorithm has a better ability to escape local optima. And in function f6, SAOBL-IA, IA, and PSO algorithms all achieved the relatively optimal value, but PSO had the best performance according to other standards, which also reflects the potential for improvement in the convergence ability of the SAOBL-IA algorithm. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 2. Results of 7 benchmarking functions in 30 dimensions. https://doi.org/10.1371/journal.pone.0307278.t002 Download: PPT PowerPoint slide PNG larger image TIFF original image Table 3. Results of 7 benchmarking functions in 50 dimensions. https://doi.org/10.1371/journal.pone.0307278.t003 As the test dimension increases to 50, table data shows that SAOBL-IA algorithm performs better than other algorithms in terms of various indicators in functions f1, f2, f3, f4, f5 and f7. This demonstrates that with the increase in dimension, the improved algorithm has stronger global exploration ability. However, in function f6, both SAOBL-IA and PSO algorithms achieve the best value, but the other criteria are still optimized by the PSO algorithm. Therefore, based on the experimental data in Tables 2 and 3, although SAOBL-IA algorithm has errors in individual function data, it shows overall better accuracy and robustness compared to the other four algorithms. On the basis of inheriting the advantages of IA algorithm, SAOBL-IA algorithm enhances the global search ability, and reduces the perturbation as the number of iterations increases, which is conducive to local search. The convergence curves of seven test functions in the comparative algorithm experiments are depicted in Figs 5 and 6 below. Notably, the BAS algorithm is excluded from the plots owing to its distinctive computational approach. Upon analysis of the Fig, it becomes apparent that SAOBL-IA exhibits a slower convergence rate during the early stages compared to the other two algorithms. This phenomenon can be attributed to the simulated annealing algorithm’s inclination to accept suboptimal solutions in the initial phases, thereby facilitating a more thorough exploration of local space. Despite the slower initial convergence, the algorithm accelerates in later stages. Upon scrutiny of the magnified final images, it becomes evident that the enhanced algorithm achieves superior convergence accuracy. Nevertheless, the images also unveil certain limitations of the improved algorithm, particularly in scenarios where obtaining the optimal solution in the initial iterations is imperative, suggesting that the enhancement approach may not be universally applicable. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 5. Image segmentation result. https://doi.org/10.1371/journal.pone.0307278.g005 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 6. Image segmentation result. https://doi.org/10.1371/journal.pone.0307278.g006 We visualized a part of the statistical data in Tables 2 and 3 (see Figs 7 and 8). For a detailed analysis of these statistical data, please refer to the "Experimental results and analysis" section. Figs 7 and 8 visually demonstrate the comparison results of the SAOBL-IA algorithm proposed in this paper and GWO algorithm, IA algorithm on 7 test functions. This provides a clearer explanation of the convergence and robustness of the SAOBL-IA algorithm on various test functions. These visual comparisons can provide a intuitive understanding of their performance under different conditions. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 7. Visualization comparison chart of SAOBL-IA algorithm, and GWO algorithm, IA algorithm (30 dimensions). https://doi.org/10.1371/journal.pone.0307278.g007 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 8. Visualization comparison chart of SAOBL-IA algorithm, and GWO algorithm, IA algorithm (50 dimensions). https://doi.org/10.1371/journal.pone.0307278.g008 5.1.1 Experimental design for the performance of the SAOBL-IA. In order to verify the overall performance improvement of the Island Algorithm, we selected seven typical benchmark functions to test the algorithm’s performance. The specific information of the functions is shown in Table 1. Here f1 is a spherical multidimensional single-peak function with multiple local minima besides the global minimum, and its main purpose is to test the algorithm’s optimization ability. f2 is a multi-modal function with a valley-like shape and multiple local minima, and f6 has multiple global minima, mainly designed to test the global search ability of the algorithm. f3 is a highly multimodal function and, similar to f4, has many regularly distributed local minima, which are used to test the algorithm’s ability to escape from local optima. The main purpose of testing function f5 and unimodal function f7 is to evaluate the algorithm’s convergence ability. The experiment compared Particle Swarm Optimization algorithm (PSO), Beetle Antennae Search algorithm (BAS), Island Algorithm (IA), Grey Wolf Optimizer(GWO) and Island Algorithm based on Simulated Annealing and opposition-based learning (SAOBL-IA). The five algorithms were independently run 30 times on 30-dimensional and 50-dimensional problems for comparison. The best, worst, average, and standard deviation of the optimal error values obtained from 30 independent runs of PSO, BAS, IA, GWO and SAOBL-IA on 30 and 50 dimensions were used as the evaluation criteria for algorithm performance, and the bold font in the table represents the best performance. All five algorithm parameters are set as follows: population size 100, The algorithms are all in Matlab R2016a software for Windows 10 with an i7-11800H 2.3GHz CPU and 16GB of RAM. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 1. Specific information on the 7 benchmark functions. https://doi.org/10.1371/journal.pone.0307278.t001 5.1.2 Experimental results and analysis. Tables 2 and 3 present the performance results of four algorithms with dimensions of 30 and 50, respectively. The evaluation metrics of algorithm accuracy and robustness are measured by the optimal value, worst value, average value, and variance. When the test dimension is 30, it can be observed from the data in the table that the SAOBL-IA algorithm outperforms the other three algorithms in various metrics when applied to functions f1, f2, f4, f5, f7. Among them, for the single-peak function f1 on a sphere, the improvement in performance is particularly evident, and the algorithm’s ability to seek the optimal solution among many local minima is demonstrated by achieving the theoretically best value for function f4. Although the SAOBL-IA algorithm is able to find a relatively optimal solution on function f3, it did not achieve the best results in terms of worst-case value and variance, proving that the improved algorithm has a better ability to escape local optima. And in function f6, SAOBL-IA, IA, and PSO algorithms all achieved the relatively optimal value, but PSO had the best performance according to other standards, which also reflects the potential for improvement in the convergence ability of the SAOBL-IA algorithm. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 2. Results of 7 benchmarking functions in 30 dimensions. https://doi.org/10.1371/journal.pone.0307278.t002 Download: PPT PowerPoint slide PNG larger image TIFF original image Table 3. Results of 7 benchmarking functions in 50 dimensions. https://doi.org/10.1371/journal.pone.0307278.t003 As the test dimension increases to 50, table data shows that SAOBL-IA algorithm performs better than other algorithms in terms of various indicators in functions f1, f2, f3, f4, f5 and f7. This demonstrates that with the increase in dimension, the improved algorithm has stronger global exploration ability. However, in function f6, both SAOBL-IA and PSO algorithms achieve the best value, but the other criteria are still optimized by the PSO algorithm. Therefore, based on the experimental data in Tables 2 and 3, although SAOBL-IA algorithm has errors in individual function data, it shows overall better accuracy and robustness compared to the other four algorithms. On the basis of inheriting the advantages of IA algorithm, SAOBL-IA algorithm enhances the global search ability, and reduces the perturbation as the number of iterations increases, which is conducive to local search. The convergence curves of seven test functions in the comparative algorithm experiments are depicted in Figs 5 and 6 below. Notably, the BAS algorithm is excluded from the plots owing to its distinctive computational approach. Upon analysis of the Fig, it becomes apparent that SAOBL-IA exhibits a slower convergence rate during the early stages compared to the other two algorithms. This phenomenon can be attributed to the simulated annealing algorithm’s inclination to accept suboptimal solutions in the initial phases, thereby facilitating a more thorough exploration of local space. Despite the slower initial convergence, the algorithm accelerates in later stages. Upon scrutiny of the magnified final images, it becomes evident that the enhanced algorithm achieves superior convergence accuracy. Nevertheless, the images also unveil certain limitations of the improved algorithm, particularly in scenarios where obtaining the optimal solution in the initial iterations is imperative, suggesting that the enhancement approach may not be universally applicable. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 5. Image segmentation result. https://doi.org/10.1371/journal.pone.0307278.g005 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 6. Image segmentation result. https://doi.org/10.1371/journal.pone.0307278.g006 We visualized a part of the statistical data in Tables 2 and 3 (see Figs 7 and 8). For a detailed analysis of these statistical data, please refer to the "Experimental results and analysis" section. Figs 7 and 8 visually demonstrate the comparison results of the SAOBL-IA algorithm proposed in this paper and GWO algorithm, IA algorithm on 7 test functions. This provides a clearer explanation of the convergence and robustness of the SAOBL-IA algorithm on various test functions. These visual comparisons can provide a intuitive understanding of their performance under different conditions. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 7. Visualization comparison chart of SAOBL-IA algorithm, and GWO algorithm, IA algorithm (30 dimensions). https://doi.org/10.1371/journal.pone.0307278.g007 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 8. Visualization comparison chart of SAOBL-IA algorithm, and GWO algorithm, IA algorithm (50 dimensions). https://doi.org/10.1371/journal.pone.0307278.g008 5.2 Experimentation and analysis of lung image segmentation algorithm To verify the performance of the Adaptive bifurcation 2D OTSU Lung Image Segmentation based on SAOBL-IA algorithm. The open source COVID-CT Dataset was selected as the dataset to test on CT images of COVID-19 pneumonia, the algorithms are all in Matlab R2016a software for Windows 10 with an i7-11800H 2.3GHz CPU and 16GB of RAM. 5.2.1 Experimental results and analysis. To assess the performance of the proposed method, we conducted a comparative analysis with the traditional 2D OTSU method and the approach described in reference [33] when evaluating the image segmentation capability. Furthermore, for the assessment of segmentation speed, we integrated an algorithm combining Particle Swarm Optimization (PSO) with the traditional 2D OTSU method, both of which are intelligent algorithms. To ensure experimental fairness, we maintained uniformity in the basic parameters across all four algorithms. The experimental results of the segmentation are shown in Fig 9 from left to right: original image, traditional 2D OTSU, reference [33], and the proposed algorithm. From top to bottom: uninfected individual A, uninfected individual B, and infected individual C with COVID-19. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 9. Image segmentation result. https://doi.org/10.1371/journal.pone.0307278.g009 From Fig 9, it can be observed that although the traditional 2D OTSU method provides finer segmentation, it still fails to handle certain types of noise adequately. On the other hand, the approach described in reference [33] takes into account background and noise considerations more comprehensively, but its segmentation is still significantly affected. In contrast, our proposed algorithm demonstrates finer details while disregarding noise interference. However, the segmentation results for the infected individual C with COVID-19 are consistent with the traditional 2D OTSU method. This can be attributed to the fact that the neighborhood grayscale mean values in that region are too close to the boundary, making it difficult to achieve a clear bifurcated. To provide a more intuitive representation of the performance differences, this study employed the Peak Signal Noise Ratio (PSNR) [38] as an objective measure of image quality evaluation. PSNR is defined based on the Mean Square Error (MSE) as follows: (23) (24) Here, the original image I has a size of m*n, K represents the segmented image, MAXI is the maximum pixel value of the image, and PSNR is measured in dB. If each pixel is represented by 8 bits in binary, then the value is calculated as follows: 28−1 = 255. The data in Table 4 indicates that our algorithm exhibits superior performance in terms of PSNR compared to the traditional 2D OTSU method and the approach outlined in reference [33], thereby revealing more detailed information from the original images. Additionally, Table 5 presents a comparison of the runtime among the algorithms, clearly demonstrating a significant advantage of our proposed algorithm. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 4. Segmented image PSNR value. https://doi.org/10.1371/journal.pone.0307278.t004 Download: PPT PowerPoint slide PNG larger image TIFF original image Table 5. Segmented image running time. https://doi.org/10.1371/journal.pone.0307278.t005 5.2.1 Experimental results and analysis. To assess the performance of the proposed method, we conducted a comparative analysis with the traditional 2D OTSU method and the approach described in reference [33] when evaluating the image segmentation capability. Furthermore, for the assessment of segmentation speed, we integrated an algorithm combining Particle Swarm Optimization (PSO) with the traditional 2D OTSU method, both of which are intelligent algorithms. To ensure experimental fairness, we maintained uniformity in the basic parameters across all four algorithms. The experimental results of the segmentation are shown in Fig 9 from left to right: original image, traditional 2D OTSU, reference [33], and the proposed algorithm. From top to bottom: uninfected individual A, uninfected individual B, and infected individual C with COVID-19. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 9. Image segmentation result. https://doi.org/10.1371/journal.pone.0307278.g009 From Fig 9, it can be observed that although the traditional 2D OTSU method provides finer segmentation, it still fails to handle certain types of noise adequately. On the other hand, the approach described in reference [33] takes into account background and noise considerations more comprehensively, but its segmentation is still significantly affected. In contrast, our proposed algorithm demonstrates finer details while disregarding noise interference. However, the segmentation results for the infected individual C with COVID-19 are consistent with the traditional 2D OTSU method. This can be attributed to the fact that the neighborhood grayscale mean values in that region are too close to the boundary, making it difficult to achieve a clear bifurcated. To provide a more intuitive representation of the performance differences, this study employed the Peak Signal Noise Ratio (PSNR) [38] as an objective measure of image quality evaluation. PSNR is defined based on the Mean Square Error (MSE) as follows: (23) (24) Here, the original image I has a size of m*n, K represents the segmented image, MAXI is the maximum pixel value of the image, and PSNR is measured in dB. If each pixel is represented by 8 bits in binary, then the value is calculated as follows: 28−1 = 255. The data in Table 4 indicates that our algorithm exhibits superior performance in terms of PSNR compared to the traditional 2D OTSU method and the approach outlined in reference [33], thereby revealing more detailed information from the original images. Additionally, Table 5 presents a comparison of the runtime among the algorithms, clearly demonstrating a significant advantage of our proposed algorithm. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 4. Segmented image PSNR value. https://doi.org/10.1371/journal.pone.0307278.t004 Download: PPT PowerPoint slide PNG larger image TIFF original image Table 5. Segmented image running time. https://doi.org/10.1371/journal.pone.0307278.t005 6. Conclusions and future works The main work of this paper includes the following three parts: Presents an improved Island Algorithm based on the Simulated Annealing and Opposition-based Learning (SAOBL-IA). By incorporating opposition-based learning during the balancing phase to enhance the algorithm’s search breadth and speed; introducing simulated annealing during iteration to prevent convergence to local optima while further narrowing the search space and increasing the convergence rate. The improved algorithm has addressed the issues of incomplete local search and susceptibility to local optimal solutions compared to the original algorithm. Experimental results also demonstrate that the improved algorithm exhibits better search capabilities for global optimal solutions and enhanced robustnes. To address the issue of misclassified pixels in noise and background regions on the conventional 2D OTSU histogram, proposes a modified Adaptive Bifurcation 2D OTSU approach, the AB2D-OTSU incorporates two line segments at the threshold points and adaptively adjusts the slope of the lines based on the proportion of misclassified pixels, thereby achieving a reasonable classification of the background and target regions. In response to the slow segmentation speed of the original algorithm, proposes an image segmentation method combining the SAOBL-IA and the AB2D-OTSU, and apply it to lung image segmentation. The comparative analysis of experimental results shows that the new image segmentation algorithm avoids the tedious search process of traditional methods, significantly accelerates the speed of image segmentation, and achieves higher segmentation accuracy. Overall, the island algorithm based on simulated annealing and opposition-based learning has made significant progress in experimental results. However, the introduction of two improvement methods has enhanced the complexity of the algorithm compared to the original island algorithm, resulting in issues such as increased computation time. Additionally, due to the algorithm’s characteristics, it may be difficult to find the global optimal solution when faced with test functions and industrial optimization problems with a valley shape characterized by high sides and a low middle. To address these issues, future research will consider using optimization methods with lower complexity to improve the island algorithm, aiming to reduce algorithm complexity and enhance overall efficiency. Furthermore, individual studies will be conducted for specific test functions. Meanwhile the deep integration of technologies such as big data and artificial intelligence with healthcare will greatly improve the efficiency of diagnosis, surgery, and public health management [39]. Therefore, in later stages, we also consider introducing the Q-learning method from reinforcement learning, treating each plant as an independent agent, and conducting personalized evolution based on its position and reward mechanism to better harness the algorithm’s usability and optimization accuracy. Acknowledgments Thanks to the team members for their mutual help and joint experimentation, everyone can work together to complete this paper. TI - Medical image segmentation based on simulated annealing and opposition-based learning island algorithm JF - PLoS ONE DO - 10.1371/journal.pone.0307278 DA - 2024-07-24 UR - https://www.deepdyve.com/lp/public-library-of-science-plos-journal/medical-image-segmentation-based-on-simulated-annealing-and-opposition-Uxr22TPJsL SP - e0307278 VL - 19 IS - 7 DP - DeepDyve ER -