Medical image segmentation based on simulated annealing and opposition-based learning island algorithm

With the development of society and changes in the human living environment, people are increasingly attaching importance to their own health. Regarding medical imaging examinations of certain parts of the body, the process of medical image segmentation has become extremely important. This paper presents a novel hybrid algorithm: SAOBL-IA, a fusion of the Simulated Annealing(SA), Opposition-based Learning(OBL)and Island Algorithm(IA). The Island Algorithm itself suffers from slow convergence speed and the tendency to get stuck in local optimum. To address these limitations, we introduce opposition-based learning to enhance the search range and avoid local optimum. Furthermore, we leverage the simulated annealing approach to accelerate the convergence of SAOBL-IA. Comparing the experimental results, it can be seen that SAOBL-IA has better comprehensive performance. Subsequently, the SAOBL-IA algorithm is utilized in conjunction with an optimized two-dimensional OTSU fusion segmentation technique for the purpose of medical image processing. This study proposes an application of image segmentation based on the SAOBL-IA. The segmentation of pixels around the background and target regions using the two-dimensional OTSU method faces challenges in terms of accuracy. To address this issue, an adaptive thresholding technique known as Adaptive Forking is employed for optimization. By determining the slope of the fork based on the misclassified pixel ratio, enhanced segmentation accuracy can be achieved. This improved approach is then integrated with the SAOBL-IA algorithm and applied to the segmentation of lung medical images. The experimental findings show that the amalgamation of SAOBL-IA with the adaptive two-dimensional OTSU segmentation approach, as proposed in this study, manifests superior segmentation speed and enhanced precision in the context of medical image segmentation.


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; edgebased 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 multilevel 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.

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.

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: 1.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).
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: In Eq (1): h represents the range variation with an initial value of 1, A max denotes the maximum number of eliminations, and A min corresponds to the minimum number of eliminations.

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 X max and X min 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): The formula for the variation in island range is given as Formula (4): Among them: X max represents the maximum value for each dimension in the current iteration, while X min represents the minimum value for each dimension.On the other hand, X old max and X old min represent the maximum and minimum values for each dimension in previous iteration.The function "norm" is used to calculate the 2-norm between vectors.

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).
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.

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.

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].In the Fig 1, MAX and MIN represent the range of values for the independent variable.Xnew 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 oppositionbased 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.

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: 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 E 2 is greater than or equal to E 1 , 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.

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).
In Eqion (7), x new corresponds to the selected position after opposition-based learning, x old represents the original solution, and (a+b−x old ) 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 x old = 3, then its opposition-based learning position would be (a+b−x old ) = 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.

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 A max = 50, A min = 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: Island location: X max ¼ 100 � onesð1; DÞ; X min ¼ À 100 � onesð1; DÞ Plant location: x ¼ onesðN; 1Þ � X min þ onesðN; 1Þ � ðX max À X min Þ � randðN; DÞ Calculating and ranking the fitness values for each plant, ½fitness; index� ¼ sortðfitÞ; x ¼ xðindex; :Þ 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: X max ¼ maxðxð1 : N À tt; :ÞÞ; X min ¼ minðxð1 : N À tt; :ÞÞ 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 x opp is calculated according to Formula 7, and the fitness value fit opp is calculated.for (All the old plants) if (fit opp <fit old ) Replace with the corresponding reverse position and fitness value.end end Generating new plant locations according to Formula 5. Perform simulated annealing on the new plant and select mid = round((N−out)*0.9)as the annealing critical point.
for (All the new plants) if (E>0) 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 ½fit; index� ¼ sortðfitÞ; x ¼ xðindex; :Þ; end

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.

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 f ij and its probability by P ij .then: The mean vectors for the background and target are: The total mean vector of the two-dimensional histogram is: 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: Inter-class variance is defined as: Therefore, the optimal threshold is the value of (s, t) when σ reaches its maximum value.

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, l 1 and l 2 , passing through the threshold point (s, t), where the angle between line l 1 and the line x = s, and the angle between line l 2 and the line y = t, are both α and (0˚�α�5˚).The expression is: 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 N 0 , 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: The updated probabilities for the foreground and background are as follows: The updated mean vectors for the two categories are as follows: The updated equation for inter-class variance in two dimensions is as follows:

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 A max , minimum number of eliminations A min , 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.

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.

Experimentation and analysis of the SAOBL-IA
5.1.1Experimental 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 f 1 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.f 2 is a multi-modal function with a valley-like shape and multiple local minima, and f 6 has multiple global minima, mainly designed to test the global search ability of the algorithm.f 3 is a highly multimodal function and, similar to f 4 , 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 f 5 and unimodal function f 7 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 SAO-BL-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. 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 f 1 , f 2 , f 4 , f 5 , f 7 .Among them, for the single-peak function f 1 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 f 4 .Although the SAOBL-IA algorithm is able to find a relatively optimal solution on function f 3 , 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 f 6 , 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.

Experimental results and analysis. Tables
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 f 1 , f 2 , f 3 , f 4 , f 5 and f 7 .This demonstrates that with the increase in dimension, the improved algorithm has stronger global exploration ability.However, in function f 6 , 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.
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.

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.

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  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: Here, the original image I has a size of m*n, K represents the segmented image, MAX I 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: 2 8 −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.

Conclusions and future works
The main work of this paper includes the following three parts: 1. 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.
Fig 1 provides an illustration of this process.

Fig 2 .
Fig 2. The generation process of new solutions during the equilibrium phase.https://doi.org/10.1371/journal.pone.0307278.g002 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: