Next Article in Journal
Synchronization of Julia Sets in Three-Dimensional Discrete Financial Models
Previous Article in Journal
Chance or Chaos? Fractal Geometry Aimed to Inspect the Nature of Bitcoin
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Otsu Image Segmentation Algorithm Based on Hybrid Fractional-Order Butterfly Optimization

Department of Electrical and Electronic Engineering, Ningxia University, Yinchuan 750021, China
*
Author to whom correspondence should be addressed.
Fractal Fract. 2023, 7(12), 871; https://doi.org/10.3390/fractalfract7120871
Submission received: 15 November 2023 / Revised: 28 November 2023 / Accepted: 28 November 2023 / Published: 8 December 2023

Abstract

:
To solve the drawbacks of the Otsu image segmentation algorithm based on traditional butterfly optimization, such as slow convergence speed and poor segmentation accuracy, this paper proposes hybrid fractional-order butterfly optimization with the Otsu image segmentation algorithm. G-L-type fractional-order differentiation is combined with the algorithm’s global search to improve the position-updating method, which enhances the algorithm’s convergence speed and prevents it from falling into local optima. The sine-cosine algorithm is introduced in the local search step, and Caputo-type fractional-order differentiation is used to avoid the disadvantages of the sine-cosine algorithm and to improve the optimization accuracy of the algorithm. By dynamically converting the probability, the ratio of global search to local search is changed to attain high-efficiency and high-accuracy optimization. Based on the 2-D grayscale gradient distribution histogram, the trace of discrete matrices between classes is chosen as the fitness function, the best segmentation threshold is searched for, image segmentation is processed, and three categories of images are chosen to proceed with the segmentation test. The experimental results show that, compared with traditional butterfly optimization, the convergence rate of hybrid fractional-order butterfly optimization with the Otsu image segmentation algorithm is improved by about 73.38%; meanwhile, it has better segmentation accuracy than traditional butterfly optimization.

1. Introduction

Image segmentation is a key component of image processing aimed at separating important or relevant localized areas within an image region. Only by segmenting the target area accurately can the features of the target image be extracted, analyzed, and measured. Image segmentation has many applications, including license plate recognition, medical image segmentation, object defect detection, and so on. Image thresholding segmentation is a simple and efficient method, and it is one of the most commonly used methods. The Otsu image segmentation algorithm is widely used because it has low computational complexity, high stability, and good segmentation effects. The one-dimensional Otsu algorithm has less histogram information, and the image segmentation effect is poor, so researchers proposed the 2-D Otsu algorithm, which enhances the segmentation effects significantly, although the computation of the 2-D Otsu algorithm was intensive. Reddi et al. [1] combined the differential evolutionary algorithm with the 2-D Otsu algorithm, which reduced the computational complexity and improved the speed of the algorithm. Zhang et al. [2] improved the neighborhood mean algorithm by using 2-D gray and gradient histograms and introduced the separation information between classes to improve the threshold function, which was simplified to reduce the computational complexity; however, the threshold vector was calculated directly, requiring a lot of time.
The key to the 2-D Otsu image segmentation algorithm is to find the threshold vector that best maximizes the dispersion between classes, and group intelligence algorithms are gradually applied to threshold selection. The group intelligence algorithm significantly improves the effect of threshold segmentation, making it better than other methods. Huang et al. [3] proposed the Otsu image segmentation algorithm based on the Fruit Fly Optimization Algorithm (FOA), which was a fast image segmentation algorithm with high real-time capability. Liu et al. [4] suggested a multi-threshold Otsu image segmentation method, using a cell membrane and adaptive step size to improve the Firefly Algorithm (FA), which solved the problem of the local optimum and achieved a higher convergence speed and better segmentation results. The researchers in [5,6] used some methods to enhance the whale optimization algorithm (WOA) and proposed a hybrid whale optimization algorithm for Otsu multi-threshold image segmentation, which improved the efficiency and accuracy of image segmentation. However, the convergence rate of the above algorithm was slow, reaching convergence only after many iterations. Therefore, the algorithm convergence rate needed to improve.
The Butterfly Optimization Algorithm (BOA) is an intelligent algorithm [7] that simulates the behavior of butterflies, such as their search for food and mate selection. It is used to solve global optimization problems, and it has a simple principle, few parameters, and good results for optimal searches. It is also widely used in path planning, particle filtering, photovoltaic power generation, and so on. However, the traditional BOA algorithm has some shortcomings, such as low optimization accuracy and slow convergence speed. Therefore, there is considerable scope for enhancing its optimization stability and accuracy. Wu et al. [8] proposed a revised BOA algorithm that combines refractive opposition learning and adaptive inertia weights and used it to achieve multi-threshold image segmentation. This method improved the image segmentation accuracy and segmentation efficiency, but the convergence speed was slow.
Fractional-order calculus is a part of high-level mathematics and can be used in a wide range of fields, including engineering, artificial intelligence, and medicine. Pu et al. [9] illustrated the physical significance and an algorithm for implementing the fractional order in signal processing, which set the stage for using the fractional order in image processing. Micael et al. [10] enhanced the Particle Swarm Optimization algorithm through fractional-order differentiation and suggested that the convergence speed of an algorithm is related to the fractional order. The adaptive order of fractional-order differentiation was proposed by Wei [11], and she used fractional-order differentiation to improve the Particle Swarm Optimization (PSO) algorithm. This method improved the convergence speed of the algorithm and prevented it from falling into the local optimum; further, it introduced a symmetric particle distribution to improve the algorithm’s optimization accuracy. Fractional-order calculus can improve the convergence rate of group intelligence algorithms, but few people use the fractional order to solve the disadvantages of traditional algorithms. Only several researchers have used fractional-order and intelligence algorithms to process image segmentation [12,13].
Therefore, this paper introduces fractional-order differentiation and other methods to avoid the shortcomings of the traditional BOA algorithm, and it proposes the hybrid fractional-order butterfly optimization algorithm (HFBOA), which uses fractional-order differentiation and adaptive flavor perception strength to improve the global position search of the BOA algorithm. At the local stage, it combines fractional-order differentiation with the sine-cosine algorithm as the position from which the local search is updated, improving the convergence speed and optimal search accuracy. This paper introduces dynamic conversion probability so that the algorithm performs a more intensive global search in the early stage and an enhanced local search in the later stage, preventing the BOA algorithm from falling into a local optimum. Finally, this paper proposes a 2-D Otsu image segmentation algorithm based on the HFBOA and demonstrates the use of this algorithm to perform image segmentation, improving the efficiency of the process.

2. The 2-D Otsu Threshold Segmentation Algorithm

The 2-D Otsu image segmentation algorithm adds the distribution of the difference between the original pixel gray level and the average gray level of the domain pixel to the pixel gray level distribution and produces a 2-D distribution histogram. The segmentation principle of the 2-D Otsu image segmentation algorithm is as follows: for a digital image f ( x , y ) whose size is M × N, the total pixel gray level is L, so the average gray value in the k × k neighborhood centered on (x, y) is g ( x , y ) :
g ( x , y ) = 1 k × k l = k k q = k k f ( x + l , y + q )
where k, l, and q are integer numbers, meaning that f ( x , y ) and g ( x , y ) will take integer values.
The neighborhood grayscale gradient of the pixel is f ( x , y ) g ( x , y ) . When the pixel’s gray value f ( x , y ) = i and the neighborhood grayscale gradient of the pixel f ( x , y ) g ( x , y ) = j, then i, j are taken as a binary group ( i , j ) . The appearance frequency of the pixel point (i,j) is n i j , and the corresponding point probability density p i j is defined as follows:
p i j = n i j M × N
Assuming the binary group threshold ( s , t ) of the segmented image, where s is the grayscale threshold and the gradient threshold is t, the image can be segmented into four parts: the planar 2-D histogram is shown in Figure 1, where I and III represent the background and the target, respectively, and the II and IV parts represent the edge and the noise, respectively.
Because the target and the background cover a relatively large area of the whole image, the edge and the noise parts can be ignored when calculating the probability of every part. The probability of the background class is P A , and the appearance probability of the target class is P B . The calculations are as follows:
P A ( s , t ) = i = 1 s j = 1 t p i j , P B ( s , t ) = i = s + 1 L j = t + 1 L p i j
The mean vectors of the background class μ A and target class μ B are
μ A ( s , t ) = ( μ A i , μ A j ) T = ( i = 1 s j = 1 t i p i j P A , i = 1 s j = 1 t j p i j P A ) T
μ B ( s , t ) = ( μ B i , μ B j ) T = ( i = 1 s j = 1 t i p i j P B , i = 1 s j = 1 t j p i j P B ) T
The total mean vector μ of the pixels is
μ ( s , t ) = ( μ i , μ j ) T = ( i = 1 L j = 1 L i p i j , i = 1 L j = 1 L j p i j ) T
The inter-class dispersion matrix between the background class and the target class is
S ( s , t ) = P A × ( μ A μ ) × ( μ A μ ) T + P B × ( μ B μ ) × ( μ B μ ) T
The inter-class dispersion value means the difference between the background class and the target class. The larger the value, the larger the difference between the background and the target, and the better the image segmentation. To measure the dissimilarity, the trace of the dispersion matrix is used as the fitness function:
tr ( S ( s , t ) ) = P A ( μ A i μ i ) 2 + ( μ A j μ j ) 2 + P B ( μ B i μ i ) 2 + ( μ B j μ j ) 2
When the trace of the dispersion matrix is the maximum, the best segmentation threshold ( s * , t * ) is obtained.
tr ( S ( s * , t * ) ) = max ( tr ( S ( s , t ) ) )

3. Hybrid Fractional Butterfly Optimization Algorithm

3.1. Butterfly Optimization Algorithm

Butterflies use their senses of smell, sight, taste, touch, and hearing to find food, seek mates, and move from place to place. One of the most important senses is smell, which helps butterflies find food, and butterflies use it to locate the source of flavor; meanwhile, they can isolate different smells and perceive their intensity. In the BOA algorithm, when a butterfly senses the flavor of another butterfly, it will move toward it; when a butterfly is unable to sense the flavor of other butterflies, it will move randomly. Thus, the characteristics of the ideal butterfly population are as follows:
All of the butterflies can emit fragrance so that they can attract each other;
Each butterfly moves randomly or toward the best-flavored butterfly and emits more fragrance;
The stimulus intensity of the butterflies is influenced by the fitness function.
Butterflies are affected by the fragrance intensity during movement, and the fragrance can be formulated as follows:
f = c I θ
where f is the perceived intensity of fragrance, c is the sensory modality, and I is the stimulus intensity. θ is the fragrance factor, which reflects the absorption degree of the fragrance; when θ = 1, it is an ideal environment, and the fragrance of each butterfly can be perceived anywhere in the area, and when θ = 0, no butterfly can perceive the fragrance of another butterfly. According to the literature [8], this paper sets the initial values of c to 0.01 and θ to 0.1.
The movement of the butterfly can be divided into a “global search” and a “local search”. When the butterfly perceives another butterfly that has the best fragrance, the butterfly will move to the best one: this behavior is called a global search. It can be calculated as follows:
x i ( t + 1 ) = x i ( t ) + [ g * × r 1 2 x i ( t ) ] × f i
where x i ( t ) represents the position of butterfly i in generation t, and g * is the optimal position in the current iteration.
When the butterfly does not perceive the fragrance of the other butterflies, it will move randomly: this behavior is called a local search, and its formula is as follows:
x i ( t + 1 ) = x i ( t ) + [ r 1 2 × x j ( t ) x k ( t ) ] × f i
where x i ( t ) , x j ( t ) , and x k ( t ) are the positions of butterflies i, j, and k in generation t, respectively, and r 1 in Equations (11) and (12) is a random number within [0, 1].
A butterfly that seeks food and mates can exhibit behavior in the global stage or the local stage. The BOA algorithm uses the conversion probability p to complete the switch between the global search and the local search; p usually takes a value of 0.8.
The BOA algorithm pseudocode is shown in Algorithm 1.
Algorithm 1. The BOA algorithm.
1Initialize the population, set butterflies x i , initialize the sensory modality c, fragrance factor θ, switch probability p, and number of iterations T;
2Define fitness function f ( x i ) and calculate the value of the fitness function for each butterfly;
3Calculate stimulus intensity I using the fitness function;
4while t < T
5 for i = 1 : n
6  Calculate perceived intensity of fragrance using Equation (10);
7  if  r 1 < p
8   Update position using Equation (11);
9  else
10   Update position using Equation (12);
11  end if
12  Update the optimal position g * ;
13end for
14 Update the value of sensory modality c;
15end while
16Output the global optimal solution.

3.2. Fractional-Order Calculus

Fractional-order calculus is the differentiation and integration of fraction order, and unlike integer-order calculus, its definition takes different forms according to the perspective of the problem being studied [14]. The most commonly used definitions are the Grünwald–Letnikov-type (G-L) definition, Riemann–Liouville-type (R-L) definition, and Caputo-type definition. The G-L definition is obtained by finding the limit of the difference approximation formula in integer-order calculus, where the positive and negative values of the order represent the fractional differential and the fractional integral. The Caputo-type definition can be regarded as a generalization form of the G-L-type definition, which is a form of the realization integral, and it can solve some engineering problems effectively [15].

3.2.1. G-L-Type Definition

The G-L-type definition extends the calculus from the integer order to the fractional order. According to the literature [9], it is defined as follows: function x(t) ∈ [ a , t ] ( a < t , a R , t R ) has an m + 1 ( m Z ) -order continuous derivative; when v > 0 , the v-order derivative of the function x(t) is
D t v a G x ( t ) = Δ lim h 0   x h ( v ) ( t ) = Δ lim h 0 n h = t a h v r = 0 n v r x ( t r h )
where v is the order ( v R ) , v r = ( v ) ( v + 1 ) ( v + r 1 ) r ! . To make x h ( v ) ( t ) achieve the non-zero limit, when h→0, we take n . When h = t a n , n = t a h , and by using the mathematical induction method to arrange Formula (13), followed by integration by parts, Equation (13) becomes the following:
D t v a G x ( t ) = k = 0 m x ( k ) ( a ) ( t a ) v + k Γ ( v + k + 1 ) + 1 Γ ( v + m + 1 ) a t ( t τ ) v + m s ( m + 1 ) ( τ ) d τ
where the Gamma function Γ ( α ) = 0 e x x α 1 d x = ( α 1 ) ! . If the continuous interval between a and t of the function x(t) is divided into equal intervals, and the equal interval ∆h = 1, then n = t a Δ h = Δ h = 1 t a , and the fractional-order differential discrete expression x(t) is
d v x ( t ) d t v x ( t ) + ( v ) x ( t 1 ) + ( v ) ( v + 1 ) 2 x ( t 2 ) + ( v ) ( v + 1 ) ( v + 2 ) 6 x ( t 3 ) + + Γ ( v + 1 ) n ! Γ ( v + n + 1 ) x ( t n )

3.2.2. Caputo-Type Definition

Applying the Laplace transform to the G-L-type definition is simpler. The Caputo-type definition is obtained by improving the G-L-type definition. The Caputo-type differential form of function x(t) ∈ [a, t] is [16]
D t v a C x ( t ) = 1 Γ ( m v ) a t 1 ( t ξ ) v m + 1 x ( m ) ( ξ ) d ξ
where v is the differential order, and m is an integer within m − 1 < v < m.
When 0 < m 1 < v < m , T > a , the function x(t) ∈ [a, t] has an m + 1(mZ)-order continuous and bounded derivative, and lim D t v a C x ( t ) = x ( m ) ( t ) . When m = 1, order v ∈ (0,1), the Caputo-type differential is defined as follows:
D t v a C x ( t ) = 1 Γ ( 1 v ) 0 t 1 ( t ξ ) v f ( ξ ) d ξ
Generally, a = 0, and the value range of the function is between 0 and t, dividing the value range into N parts, where each part is Δ t = t N . According to the forward differential formula of the first order, the differential expression of the Caputo-type definition with respect to the function x(t), which is shown in Equation (18), is obtained when ∆t = 1 and t k = k t N = k .
D t v a C x ( t ) 1 Γ ( 2 v ) k = 0 N 1 [ x ( t t k + 1 ) x ( t t k ) ] × [ ( k + 1 ) 1 v k 1 v ] = d e f k = 0 N 1 c k x ( t t k )
where ck values are as follows:
c 0 = 1 Γ ( 2 v ) c 1 = 2 2 1 v Γ ( 2 v ) c k = 2 ( n k ) 1 v ( n k + 1 ) 1 v ( n k 1 ) 1 v Γ ( 2 v ) c N = N 1 v ( N 1 ) 1 v Γ ( 2 v )

3.3. Hybrid Fractional Butterfly Optimization Algorithm

In order to solve the problems of the BOA algorithm, such as low accuracy, slow convergence speed, and the fact that it easily falls into local optima, this paper mainly improves the BOA algorithm from three aspects: firstly, fractional-order differentiation is combined with the global update method of the BOA algorithm, increasing the algorithm convergence rate; secondly, the local position update method is improved by using fractional-order differentiation and the sine-cosine algorithm, increasing the accuracy of optimization; thirdly, a dynamic conversion probability is introduced to prevent the BOA algorithm from falling into local optima. The improved algorithm is called the hybrid fractional-order butterfly optimization algorithm (HFBOA).

3.3.1. Fractional-Order Differentiation Improves the Global Search

The global search of the BOA algorithm does not consider the butterfly’s previous positional state. Therefore, the search result and convergence rate are largely determined by the perceived intensity of fragrance f. The BOA algorithm has poor stability and slow convergence. Fractional-order differentiation has memory and heredity; when using it to improve the global position update method of the BOA algorithm, the butterfly’s position update is affected by the historical state, and it will improve the convergence speed of the algorithm.
According to Equation (11), the global position update formula of the BOA algorithm can be described as follows:
x i ( t + 1 ) x i ( t ) = [ g * × r 1 2 x i ( t ) ] × f i
The left side of Equation (20) can be regarded as the difference form of the first order in the G-L-type definition, for example, D v [ x ( t + 1 ) ] ; when n = 4 in Equation (15), D v [ x ( t + 1 ) ] becomes the following:
D v [ x ( t + 1 ) ] x ( t + 1 ) v x ( t ) + 1 2 v ( v 1 ) x ( t 1 ) 1 6 v ( v 1 ) ( v 2 ) x ( t 2 ) + 1 24 v ( v 1 ) ( v 2 ) ( v 3 ) x ( t 3 )
Combining Equations (20) and (21), the global position update method of the BOA algorithm is
x i ( t + 1 ) = v x i ( t ) 1 2 v ( v 1 ) x i ( t 1 ) + 1 6 v ( v 1 ) ( v 2 ) x i ( t 2 ) 1 24 v ( v 1 ) ( v 2 ) ( v 3 ) x i ( t 3 ) + [ g * × r 1 2 x i ( t ) ] × f i
According to the above equation, it can be seen that the butterfly position update is affected by the fractional order. To achieve better results, evolutionary factors f y are introduced, and the fractional order is adjusted adaptively according to the position information of the butterflies [11].
The average distance between butterfly i and other butterflies is
d i x = 1 N 1 j = 1 , j i N k = 1 D ( x i k x j k ) 2
where N is the number of butterflies, and D is the spatial dimension.
The evolutionary factor f y can be described as follows:
f y = d g d min d max d min
where d g is the average distance between the global optimal butterfly position and other butterflies, and d max and d min are the maximum and minimum values among d i x . When v [ 0.5 , 0.8 ] , the algorithm convergence is faster, and it can be calculated as v ( f y ) = 1 2 e 0.47 f y .
In the BOA algorithm, the initial value of the sensory modality c and the fragrance factor θ will affect the convergence speed and optimization accuracy. They are usually set based on manual experience and may introduce some ambiguity and randomness. If the initial parameter values are not suitable, the algorithm will fall into the local optimum and have a slow convergence rate. Therefore, this paper introduces the adaptive fragrance perception intensity [17], and in the initial search stage, the fragrance perception intensity is large. With the increase in iterations t, the fragrance perception intensity gradually decreases, which will ensure high search ability in the early stage and high accuracy in the later stage. The adaptive fragrance perception intensity can be calculated as follows:
f i = μ × ( 1 t T )
where μ is a random number between 0 and 1 and follows a normal distribution, which ensures a balanced distribution of the fragrance perception intensity. t is the number of current iterations, and T is the maximum number of iterations.

3.3.2. Fractional-Order Sine-Cosine Algorithm Improves Local Search

In the local search stage of the BOA algorithm, butterflies have a small movement range and lack the ability to communicate information with each other. So, it is easy to fall into the local optimum, which leads to low optimization accuracy. While the sine-cosine algorithm can achieve a global search due to the oscillatory nature of the cosine function [18], this paper introduces the sine-cosine algorithm into the local search stage, meaning that every butterfly can play a full role in optimization and enhance the local optimization ability. The sine-cosine algorithm can be formulated as follows:
x i ( t + 1 ) = x i ( t ) + r 2 × sin ( r 3 ) × r 4 g * x i ( t ) r 5 < 0.5 x i ( t ) + r 2 × cos ( r 3 ) × r 4 g * x i ( t ) r 5 0.5
where r 2 = 2 2 t / T , and r 3 , r 4 , r 5 are random numbers within [ 0 , 2 π ] .
However, the sine-cosine algorithm still has slow convergence speed and low optimization accuracy when it deals with complex problems, so fractional-order differentiation is used to improve the sine-cosine algorithm. The Caputo-type definition can be regarded as an improvement of the G-L-type definition, and it has memory effects and nonlinear properties. Combining the Caputo-type fractional-order differentiation with the sine-cosine algorithm to achieve global optimization will improve the algorithm’s optimization accuracy and increase its convergence speed. When N = 3, according to Equation (18), the difference form of Caputo-type fractional-order differentiation with respect to the function x(t) is shown as follows. The difference form of D v [ x ( t + 1 ) ] is shown in Equation (28):
D v [ x ( t ) ] = c 0 x ( t ) + c 1 x ( t 1 ) + c 2 x ( t 2 )
D v [ x ( t + 1 ) ] = c 0 x ( t + 1 ) + c 1 x ( t ) + c 2 x ( t 1 )
According to Equations (26) and (28), the position update formula combining fractional-order differentiation and the sine-cosine algorithm is obtained, and it is used as the local position update method of the BOA algorithm.
x i ( t + 1 ) = c 1 x i ( t ) + c 2 x i ( t 1 ) sin ( r 3 ) × ( r 4 g * x i ( t ) ) c 0 r 5 < 0.5 c 1 x i ( t ) + c 2 x i ( t 1 ) cos ( r 3 ) × ( r 4 g * x i ( t ) ) c 0 r 5 0.5
where c 0 = 1 / Γ ( 2 v ) , c 1 = ( 2 2 1 v ) / Γ ( 2 v ) , and c 2 = ( 2 × 2 1 v 3 1 v 1 ) / Γ ( 2 v ) .

3.3.3. Dynamic Conversion Probability

In the BOA algorithm, the conversion probability p is a constant. The global search or the local search is chosen depending on the size relationship of p and r 1, and the search process is random and easily falls into local optima. To achieve better optimization accuracy, a dynamic conversion probability p [19] that balances the ratio of the global stage to the local stage is introduced. So, in the early stage, the range of the global optimal butterfly is determined quickly, and with the increase in iterations t, the local stage capability is enhanced for high-precision optimization.
p t = 0.8 0.3 sin ( t T ) 2 π 2

3.4. Improved Algorithm Evaluation of Benchmark Functions

To verify the improvement effects of the BOA algorithm, 12 benchmark functions were selected to test its optimization performance. The detailed descriptions of all benchmark functions are listed in Table 1. F1~F4 are single-mode benchmark functions that have only one global optimal solution, and they can test the convergence rate of the algorithm. F5~F12 are multi-mode benchmark functions that have some local optimal solutions, and they test the global optimization ability and optimization accuracy of the algorithm. In the experiment, the HFBOA algorithm was compared with four other algorithms, namely, the BOA algorithm, the Fractional Firefly Algorithm (FFA), the Fractional Particle Swarm Optimization (FPSO) algorithm, and the Particle Swarm Optimization (PSO) algorithm. For all algorithms, the population size is 30, and the total number of iterations is 500.
To reduce errors during the experiment, each benchmark function was run 30 times independently. The optimal fitness value (BEST), the average fitness value (MEAN), and the standard deviation (STD) are shown in Table 2. In Table 2, the F1~F4 results are shown in the first column to the fourth column. The BEST, the MEAN, and the STD of the HFBOA algorithm are all the theoretical optima (0), which shows that the HFBOA algorithm has good stability and high optimization accuracy. The BEST value of the FPSO algorithm is the theoretical optimum of 0, but the MEAN and the STD are not 0, which means that the optimization results are unstable. Other algorithms do not obtain the theoretical optima (0). According to Figure 2, the convergence speed of the HFBOA algorithm is better than that of other algorithms, so the HFBOA algorithm has some advantages in the optimization problem of the single-mode function.
For the multi-mode functions F5~F8, the optimization ability of the HFBOA algorithm is better than that of the other algorithms. The BEST value, the MEAN value, and the STD value of functions F5, F6, and F8 achieve the theoretical optimum of 0. Although F7 does not reach the theoretical optimal value, the optimization accuracy is still higher than that of the other algorithms. The BOA algorithm has a probability of finding the theoretical optimal value of F6, but the MEAN value and the STD value are not 0, indicating that the BOA algorithm will easily fall into local optima. For functions F5, F7, and F8, the BOA algorithm does not reach the theoretical optimum, which shows that the HFBOA algorithm effectively improves the optimization accuracy of the BOA algorithm and avoids falling into local optima. The FPSO algorithm finds the theoretical optimal value for F5 and F6, indicating that it can solve some optimal problems well. For the fixed-dimensional multi-mode functions F9~F12, five algorithms similarly achieve the theoretical optima, but when combining the MEAN value, the STD value, and the convergence rate, the HFBOA algorithm is still better than the other algorithms.

4. Hybrid Fractional Butterfly Optimization Algorithm for Otsu Image Segmentation

Because the BOA algorithm for 2-D Otsu image segmentation has slow convergence speed and low segmentation accuracy, this paper introduces the HFBOA algorithm into 2-D Otsu image segmentation and proposes the Hybrid Fractional Butterfly Optimization Algorithm—Otsu (HFBOA-Otsu). The specific steps are as follows:
Step 1
Enter the image to be segmented, calculate the 2-D gray-gradient distribution histogram of the image, and choose the trace of the dispersion matrix as the fitness function.
Step 2
Initialize the parameters and the butterfly population. Set the population size to 80 and the total number of iterations to 100.
Step 3
Calculate the fitness function value of each butterfly according to Formula (9) and select the butterfly with the largest fitness value as the current global optimal value.
Step 4
Update the fragrance perception intensity fi and dynamic conversion probability pt according to Equations (25) and (30).
Step 5
When rand < pt , choose the global search and update the butterfly position according to Equation (22). When randpt , choose the local search and update the butterfly location according to Equation (29).
Step 6
Determine whether the total number of iterations T is reached. If reached, output the global optimum; otherwise, return to Step 4.
Step 7
Output the butterfly position that will maximize the fitness function value, use it ( s * , t * ) as the threshold to perform threshold segmentation on the image, and output the segmented image.
The flow chart of the HFBOA-Otsu algorithm is shown in Figure 3.

5. Experimental Results and Analysis

To verify the convergence speed and the segmentation accuracy of the HFBOA-Otsu algorithm, different types of images were chosen to perform threshold segmentation. The HFBOA-Otsu algorithm was compared with the 2-D Otsu image threshold segmentation based on the BOA algorithm (BOA-Otsu), the 2-D Otsu image threshold segmentation based on the PSO algorithm (PSO-Otsu), the 2-D Otsu image threshold segmentation based on Fractional PSO (Im-FpsoOtsu) [11], and the 2-D Otsu image threshold segmentation based on the Fractional Firefly Algorithm (FFA-Otsu) [20]. The experimental hardware environment was Intel(R) Core(TM) i5-8265U CPU 1.80 GHz, with 8 GB of memory, and the software environment was MATLAB R2017a.
Three types of images were selected for the segmentation experiment: human images, scenery images, and medical images. The image segmentation effects were objectively evaluated on the basis of five indexes: the fitness function value, iterations, Peak-Signal-to-Noise Ratio (PSNR), mean square error (MSE), and Structural Similarity Index (SSIM). The larger the fitness function value, the greater the gap between the background class and the target class, and the better the segmentation effects. The number of iterations reflects the algorithm convergence rate, and the smaller the value, the faster the algorithm convergence rate. The PSNR value reflects the noise performance of the algorithm, and the greater the value, the higher the quality of the segmented image. The MSE value represents the mean square errors between the original image and the segmented image, and the smaller the value, the higher the segmentation accuracy. The SSIM value measures the similarity between the original image and the segmented image, and the larger the value, the lower the image distortion.
There are four human images: the Lena image, the Pirate image, the Woman-blonde image, and the Kodim image. The segmentation results of human images are shown in Figure 4. The first column of Figure 4 is the original images, and the second column to the sixth column are the segmentation results of the five image segmentation algorithms. From the subjective visual perspective, in the Lena image segmentation results, the HFBOA-Otsu algorithm generates more detailed segmentation results in the hat and window areas. In the Pirate image, the HFBOA-Otsu algorithm retains more details than other algorithms. In the Woman-blonde image segmentation results, the HFBOA-Otsu algorithm segments a clear and complete hand. For the Kodim image, the segmentation results of the HFBOA-Otsu algorithm largely retain the texture at the collar. Therefore, the HFBOA-Otsu algorithm has greater advantages in human image segmentation. The differences in image segmentation results between the five algorithms are highlighted by the red squares.
The objective evaluation indexes of the human segmentation images are shown in Table 3, and Figure 5 shows the fitness curves of the human images. For the Lena image, combining Table 3 and the fitness curve indicates that the HFBOA-Otsu algorithm finds the best segmentation threshold in 10 iterations, while the BOA-Otsu algorithm reaches convergence at 30 iterations, with the FFA-Otsu algorithm, the Im-FpsoOtsu algorithm, the PSO-Otsu algorithm converging at 19, 48, and 88, respectively. This shows that the convergence rate of the HFBOA-Otsu algorithm is faster. Moreover, the fitness function value and the SSIM value of the HFBOA-Otsu algorithm are higher than those of the other algorithms, indicating that the HFBOA-Otsu algorithm not only improves the convergence speed but also has a better segmentation effect. The PSNR value of the HFBOA-Otsu algorithm is also higher than those of the other algorithms, and the MSE value is smaller, so the HFBOA-Otsu algorithm can guarantee a high segmentation accuracy.
For the Pirate image, the number of iterations with the HFBOA-Otsu is five. As can be seen in Figure 5b, the HFBOA-Otsu algorithm reaches convergence earlier, and it has a higher fitness function value and better segmentation effects. The PSNR value and the SSIM value of the HFBOA-Otsu algorithm are higher than those of other algorithms, and the MSE value is smaller, which shows that the segmentation accuracy and anti-noise performance of the HFBOA-Otsu algorithm are better than those of the other algorithms.
For the Woman-blonde image, the convergence of the HFBOA-Otsu algorithm, compared with the BOA-Otsu algorithm, the FFA-Otsu algorithm, the Im-FpsoOtsu algorithm, and the PSO-Otsu algorithm, is accelerated by 89.28%, 80%, 75%, and 89.65%, respectively. The fitness function value, the PSNR value, and the SSIM value are higher, indicating that the segmentation effects and anti-noise performance of the HFBOA-Otsu algorithm are improved. For the Kodim image, the convergence rate of the HFBOA-Otsu algorithm is faster, and the objective evaluation indexes are better than those of the other algorithms, which shows the HFBOA-Otsu algorithm has higher segmentation accuracy and better effects.
The scenery images include the Wall image, the Gorge image, the Butterfly image, and the Mandril image. The original images and the segmented images are shown in Figure 6. And the first column is the original images, the second column is the images segmented by the BOA-Otsu algorithm, and the third column to sixth column are the images segmented by the FFA-Otsu algorithm, the Im-FpsoOtsu algorithm, the PSO-Otsu algorithm, and the HFBOA-Otsu algorithm, respectively. By comparison, for the segmented image of the Wall, the HFBOA-Otsu algorithm provides more details of the bricks. In the Gorge image, the HFBOA-Otsu algorithm can segment a clear line for the distant snow mountains, and the details of the segmentation effects are better than the other algorithms. In the segmentation of the Butterfly image, the HFBOA-Otsu algorithm can completely segment the petals at the edge of the image. For the Mandril image, the HFBOA-Otsu algorithm attains more details of the whiskers and hairs. Compared to the other algorithms, the HFBOA-Otsu algorithm can segment a clear scenery image and retain more details.
Table 4 show the objective evaluation indexes of the scenery segmentation images, and Figure 7 shows the fitness curves of the scenery images.
According to Table 4 and the fitness curve of the Wall image, the convergence rate of the HFBOA-Otsu algorithm is faster, and the fitness function value is slightly higher than that of the Im-FpsoOtsu algorithm; the fitness function value is about 12 times higher than the BOA-Otsu algorithm, and the HFBOA-Otsu algorithm greatly improves the segmentation effects of the Wall image. The PSNR value and the SSIM value are higher than those of the other algorithms, and the average PSNR value has risen by 0.1604, while the SSIM value has risen by 0.0276. Moreover, the MSE value is lower than those of the other algorithms, indicating that the segmentation accuracy and anti-noise resistance performance of the HFBOA-Otsu algorithm are improved.
For the Gorge image, the HFBOA-Otsu algorithm reaches convergence after 14 iterations, and the other four algorithms reach convergence after 18 iterations, 30 iterations, 42 iterations, and 67 iterations. The fitness curve of the Gorge image shows that the HFBOA-Otsu algorithm has a higher fitness function value than the other algorithms. Compared with the other algorithms, the PSNR value and the SSIM value of the HFBOA-Otsu algorithm are higher, and the MSE value is smaller. Therefore, the segmentation accuracy and anti-noise performance of the HFBOA-Otsu algorithm are better than those of the other algorithms.
For the segmentation results of the Butterfly image, the PSNR value of the HFBOA-Otsu algorithm is higher, and the MSE value is lower compared with the other algorithms; the SSIM value and the fitness function value are also higher, so the segmentation accuracy of the HFBOA-Otsu algorithm is higher and the segmentation effect is better. According to the fitness curve of the Butterfly image, the convergence of the HFBOA-Otsu algorithm is faster. For the Mandril image, the HFBOA-Otsu algorithm reaches convergence at 13 iterations, which is slightly smaller than that obtained with the FFA-Otsu algorithm, but its fitness function value is higher than that of the FFA-Otsu algorithm, about 4.2896, which shows that the HFBOA-Otsu algorithm ensures good image segmentation effects and has a faster convergence rate. The PSNR value, MSE value, and SSIM value of the HFBOA-Otsu algorithm are better than those of the other algorithms; therefore, the segmentation accuracy of the HFBOA-Otsu algorithm is higher and better.
There are four medical images: the Lung1 image, the Lung2 image, the Thorax image, and the Brain image. Figure 8 shows the original images and the medical images’ segmentation results. From the first row, it can be seen that the HFBOA-Otsu algorithm has better segmentation effects and clearly segments the lung tissue. In the segmentation results of the Lung2 image, the BOA-Otsu algorithm cannot fully segment the lung tissue. The FFA-Otsu algorithm and the Im-FpsoOtsu algorithm are able to segment the lung tissue completely; however, there are some shortcomings in the details, whereas the segmentation results of the HFBOA-Otsu algorithm are clearer and have more details. For the Thorax image, the HFBOA-Otsu algorithm enabled the precise segmentation of organ tissue, and the lesion tissue is clear and complete. For the segmentation of the Brain image, the HFBOA-Otsu algorithm ensures the organ tissues are clearer and more complete. Therefore, the HFBOA-Otsu algorithm provides better segmentation results of medical images.
The objective evaluation indexes of the medical segmentation images are shown in Table 5, which clearly shows the results of the medical segmentation images using the five algorithms, and it also shows the performance of each image threshold segmentation algorithm. The fitness curves of the medical images are shown in Figure 9, comparing the convergence speed of the five algorithms.
As shown in Table 5, for the Lung1 image, the number of iterations with the HFBOA-Otsu algorithm is four: compared with the BOA-Otsu algorithm, it is 92.72% faster. The FFA-Otsu algorithm, the Im-FpsoOtsu algorithm, and the PSO-Otsu algorithm find the optimal value after 13 iterations, 12 iterations, and 73 iterations, respectively. Therefore, the convergence rate of the HFBOA-Otsu algorithm is faster. The fitness function value, the SSIM value, the PSNR value, and the MSE value are better than those of the other algorithms. From the fitness curve of the Lung2 image, the HFBOA-Otsu algorithm has faster convergence, a higher fitness function value, and better segmentation effects. The MSE value and the SSIM value of the HFBOA-Otsu algorithm are better, indicating that the segmentation accuracy of the HFBOA-Otsu algorithm is higher. The PSNR value is also higher, and the segmentation results of the HFBOA-Otsu algorithm are least affected by noise.
According to the fitness curve of the Thorax image, the HFBOA-Otsu algorithm finds the optimal threshold after nine iterations. The other algorithms converged after 58 iterations, 14 iterations, 70 iterations, and 96 iterations, respectively. The fitness function value of the HFBOA-Otsu algorithm is larger, and the convergence speed and segmentation effects of the algorithm are improved. The PSNR value and SSIM value of the HFBOA-Otsu algorithm are larger than those of the other algorithms, and the MSE value is smaller, which means that the anti-noise performance of the HFBOA-Otsu algorithm is guaranteed, and the segmentation accuracy is improved. From the objective evaluation indexes of the Brain image segmentation results in Table 5, it can be seen that the indexes of the HFBOA-Otsu algorithm are better than those of the other algorithms, indicating that the segmentation accuracy and anti-noise performance of the HFBOA-Otsu algorithm are improved.

6. Conclusions

The BOA algorithm has some disadvantages, such as a slow convergence speed and low optimization accuracy, and it easily falls into local optima. This paper introduces the fractional-order differential, sine-cosine algorithm, and adaptive parameters and proposes the HFBOA algorithm to avoid the shortcomings of the BOA algorithm. The proposed algorithm was tested on 12 benchmark functions and compared with four other algorithms, such as the BOA algorithm and the PSO algorithm. The results show that the HFBOA algorithm converges faster and has better optimization accuracy. By combining the HFBOA algorithm with the 2-D Otsu algorithm, the HFBOA-Otsu algorithm is proposed to perform image segmentation. To verify the segmentation effects of the HFBOA-Otsu algorithm, four human images, four scenery images, and four medical images were used to perform the segmentation experiments. The experimental results show that, although there are small differences between indexes, the indexes of the HFBOA-Otsu are better than those of the other algorithms. Generally, the convergence speed and segmentation accuracy of the HFBOA-Otsu are better. Compared with the BOA-Otsu algorithm, the convergence rate of the HFBOA-Otsu algorithm is improved by about 73.38%, and the fitness function value and the SSIM value are increased by about 0.21% and 5.28%, respectively. The MSE value is decreased by approximately 2.32%, and the PSNR value is increased by about 1.18%. Therefore, the HFBOA-Otsu algorithm effectively improves the low segmentation accuracy and slow convergence rate of the BOA-Otsu algorithm.

Author Contributions

Conceptualization, Z.D. and Y.M.; methodology, Z.D. and Y.M.; software, Z.D.; validation, J.Z. and Z.M.; formal analysis, Z.D. and Y.M.; data curation, Z.D. and Y.M.; writing—original draft preparation, Z.D.; writing—review and editing, Z.D., Y.M., J.Z. and Z.M. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by Key Research and Development Projects of Ningxia Autonomous Region (no. 2023BDE03002); and National Natural Science Foundation of China (no. 42361056).

Data Availability Statement

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Reddi, S.S.; Rudin, S.F.; Keshavan, H.R. An optimal multiple threshold scheme for image segmentation. IEEE Trans. Syst. Man Cybern. 1984, 14, 661–665. [Google Scholar] [CrossRef]
  2. Zhang, J.B.; Yang, H.X.; Zhou, T.T.; Tan, Z.H.; Li, M. Improved segmentation method of 2-D Otsu infrared image. Laser Technol. 2014, 38, 713–717. [Google Scholar]
  3. Huang, C.; Li, X.; Wen, Y. AN OTSU image segmentation based on fruitfly optimization algorithm. Alex. Eng. J. 2020, 60, 183–188. [Google Scholar] [CrossRef]
  4. Liu, X.J.; Liu, Y.L.; Xu, X.X. Optimization of multi-thresholding Otsu image segmentation by glowworm swarm algorithm with cell membrane mechanism. J. Chin. Comput. Syst. 2020, 41, 410–415. [Google Scholar]
  5. Ning, G.Y. Two-dimensional Otsu multi-threshold image segmentation based on hybrid whale optimization algorithm. Multimed. Tools Appl. 2022, 82, 15007–15026. [Google Scholar] [CrossRef]
  6. Ma, G.Y.; Yue, X.F. An improved whale optimization algorithm based on multilevel threshold image segmentation using the Otsu method. Eng. Appl. Artif. Intell. 2022, 113, 104960. [Google Scholar] [CrossRef]
  7. Arora, S.; Singh, S. Butterfly optimization algorithm: A novel approach for global optimization. Soft Comput. 2019, 23, 715–734. [Google Scholar] [CrossRef]
  8. Wu, L.; Du, L.B.; Tang, X.F. Multi-level threshold image segmentation based on an improved butterfly optimization algorithm. Chin. Sci. Technol. Pap. 2021, 16, 1174–1180. [Google Scholar]
  9. Pu, Y.F. Research on Application of Fractional Calculus to Latest Signal Analysis and Processing. Master’s Thesis, Sichuan University, Chengdu, China, 2006. [Google Scholar]
  10. Micael, C.; Seenith, S. Novel fractional order particle swarm optimization. Appl. Math. Comput. 2016, 283, 36–54. [Google Scholar]
  11. Wei, J.R.; Ma, Y.; Xia, R. Otsu image segmentation algorithm based on fractional particle swarm. Comput. Eng. Des. 2017, 38, 3284–3290. [Google Scholar]
  12. Dalia, Y.; Mohamed, A.E.; Seyedali, M. Fractional-order calculus-based flower pollination algorithm with local search for global optimization and image segmentation. Knowl.-Based Syst. 2020, 197, 105889. [Google Scholar]
  13. Chen, L.P.; Gao, J.H.; Lopes, A.M.; Zhang, Z.Q.; Chu, Z.B.; Wu, R.C. Adaptive fractional-order genetic-particle swarm optimization Otsu algorithm for image segmentation. Appl. Intell. 2023, 53, 26949–26966. [Google Scholar] [CrossRef]
  14. Wang, X.M.; Zhang, W.Y.; Xing, J.Y. Higher-order Caputo fractional order differential operators and its application in image enhancement. J. Comput. Res. Dev. 2023, 60, 448–464. [Google Scholar]
  15. Nguyen, P.T.; Nguyen, S.H.; Mai, T.V. Finite-time dissipative control design for one-sided Lipschitz nonlinear singular Caputo fractional order systems. Int. J. Syst. Sci. 2023, 54, 1694–1712. [Google Scholar]
  16. Minh, V.T.; Wei, W. Caputo fractional differential variational–hemivariational inequalities involving history-dependent operators: Global error bounds and convergence. Commun. Nonlinear Sci. 2024, 128, 107654. [Google Scholar]
  17. Fan, Y.Q.; Shao, J.P.; Sun, G.T. A Self-Adaption Butterfly Optimization Algorithm for Numerical Optimization Problems. IEEE Access. 2020, 2020, 88026–88041. [Google Scholar] [CrossRef]
  18. Singh, N.; Singh, S. A novel hybrid GWO-SCA approach for optimization problems. Eng. Sci. Technol. 2017, 20, 1586–1601. [Google Scholar] [CrossRef]
  19. Xia, Q.Y.; Ding, Y.M.; Zhang, R.; Liu, M.T.; Zhang, H.T. Blind Source Separation Based on Double-Mutant Butterfly Optimization Algorithm. Sensors 2022, 22, 3979. [Google Scholar] [CrossRef]
  20. Kong, C.Y. Research on Otsu Image Segmentation Algorithm Based on Firefly Algorithm Optimized by Fractional-Order. Master’s Thesis, Ningxia University, Yinchuan, China, 2019. [Google Scholar]
Figure 1. Planar 2−D distribution histogram. I and III represent the background and the target, and the II and IV parts represent the edge and the noise.
Figure 1. Planar 2−D distribution histogram. I and III represent the background and the target, and the II and IV parts represent the edge and the noise.
Fractalfract 07 00871 g001
Figure 2. Convergence curves of 5 algorithms on 12 benchmark functions.
Figure 2. Convergence curves of 5 algorithms on 12 benchmark functions.
Fractalfract 07 00871 g002
Figure 3. The flow chart of HFBOA-Otsu.
Figure 3. The flow chart of HFBOA-Otsu.
Fractalfract 07 00871 g003
Figure 4. Human image segmentation results of five algorithms. The first row is the Lena image, the second row is the Pirate image, the third row is the Woman-blonde image, and the fourth row is the Kodim image. The first column is the original images, and the second column to the sixth column are the segmentation results of the BOA-Otsu algorithm, the FFA-Otsu algorithm, the Im-Fpso Otsu algorithm, the PSO-Otsu algorithm, and the HFBOA-Otsu algorithm, respectively.
Figure 4. Human image segmentation results of five algorithms. The first row is the Lena image, the second row is the Pirate image, the third row is the Woman-blonde image, and the fourth row is the Kodim image. The first column is the original images, and the second column to the sixth column are the segmentation results of the BOA-Otsu algorithm, the FFA-Otsu algorithm, the Im-Fpso Otsu algorithm, the PSO-Otsu algorithm, and the HFBOA-Otsu algorithm, respectively.
Fractalfract 07 00871 g004
Figure 5. The fitness curves of human images. (a) The fitness curve of the Lena image; (b) the fitness curve of the Pirate image; (c) the fitness curve of the Woman-blonde image; (d) the fitness curve of the Kodim image.
Figure 5. The fitness curves of human images. (a) The fitness curve of the Lena image; (b) the fitness curve of the Pirate image; (c) the fitness curve of the Woman-blonde image; (d) the fitness curve of the Kodim image.
Fractalfract 07 00871 g005
Figure 6. Scenery images and segmentation results of five algorithms. The first row is the Wall image, the second row is the Gorge image, the third row is the Butterfly image, and the fourth row is the Mandril image. The first column is the original images, and the second column to the sixth column are the segmentation results of the BOA-Otsu algorithm, the FFA-Otsu algorithm, the Im-Fpso Otsu algorithm, the PSO-Otsu algorithm, and the HFBOA-Otsu algorithm, respectively.
Figure 6. Scenery images and segmentation results of five algorithms. The first row is the Wall image, the second row is the Gorge image, the third row is the Butterfly image, and the fourth row is the Mandril image. The first column is the original images, and the second column to the sixth column are the segmentation results of the BOA-Otsu algorithm, the FFA-Otsu algorithm, the Im-Fpso Otsu algorithm, the PSO-Otsu algorithm, and the HFBOA-Otsu algorithm, respectively.
Fractalfract 07 00871 g006
Figure 7. The fitness curves of scenery images. (a) The fitness curve of the Wall image; (b) the fitness curve of the Gorge image; (c) the fitness curve of the Butterfly image; (d) the fitness curve of the Mandril image.
Figure 7. The fitness curves of scenery images. (a) The fitness curve of the Wall image; (b) the fitness curve of the Gorge image; (c) the fitness curve of the Butterfly image; (d) the fitness curve of the Mandril image.
Fractalfract 07 00871 g007
Figure 8. Medical images and segmentation results of five algorithms. The first row is the Lung1 image, the second row is the Lung2 image, the third row is the Thorax image, and the fourth row is the Brain image. The first column is the original images, and the second column to the sixth column are the segmentation results of the BOA-Otsu algorithm, the FFA-Otsu algorithm, the Im-Fpso Otsu algorithm, the PSO-Otsu algorithm, and the HFBOA-Otsu algorithm, respectively.
Figure 8. Medical images and segmentation results of five algorithms. The first row is the Lung1 image, the second row is the Lung2 image, the third row is the Thorax image, and the fourth row is the Brain image. The first column is the original images, and the second column to the sixth column are the segmentation results of the BOA-Otsu algorithm, the FFA-Otsu algorithm, the Im-Fpso Otsu algorithm, the PSO-Otsu algorithm, and the HFBOA-Otsu algorithm, respectively.
Fractalfract 07 00871 g008
Figure 9. The fitness curves of medical images. (a) The fitness curve of the Lung1 image; (b) the fitness curve of the Lung2 image; (c) the fitness curve of the Thorax image; (d) the fitness curve of the Brain image.
Figure 9. The fitness curves of medical images. (a) The fitness curve of the Lung1 image; (b) the fitness curve of the Lung2 image; (c) the fitness curve of the Thorax image; (d) the fitness curve of the Brain image.
Fractalfract 07 00871 g009
Table 1. Basic information of benchmark functions.
Table 1. Basic information of benchmark functions.
Function ExpressionDimensionRangefmin
F 1 = i = 1 n x i 2 30[−100, 100]0
F 2 = i = 1 n x i + i = 1 n x i 30[−10, 10]0
F 3 = i = 1 n j 1 i x j 2 30[−100, 100]0
F 4 = max x i , 1 i n 30[−100, 100]0
F 5 = i = 1 n x i 2 10 cos ( 2 π x i ) + 10 30[−5.15, 5.12]0
F 6 = 20 exp 0.2 1 n i = 1 n x i 2 exp 1 n i = 1 n cos ( 2 π x i ) + 20 + e 30[−32, 32]0
F 7 = 1 4000 i = 1 n x i 2 i = 1 n cos x i i + 1 30[−600, 600]0
F 8 = i = 1 n | x i sin ( x i ) + 0.1 x i | 30[−10, 10]0
F 9 = 1 500 + j = 1 25 1 j + i = 1 2 ( x i a i j ) 6 1 2[−65, 65]1
F 10 = i = 1 11 a i x 1 ( b i 2 + b 1 x 2 ) b i 2 + b 1 x 3 + x 4 2 2[−5, 5]3.075 × 10−4
F 11 = 4 x 1 2 2.1 x 1 4 + 1 3 x 1 6 + x 1 x 2 4 x 2 2 + 4 x x 4 2[−5, 5]−1.0316
F 12 = [ 1 + ( x 1 + x 2 + 1 ) 2 ( 19 14 x 1 + x 1 2 14 x 2 + 6 x 1 x 2 + 3 x 2 2 ) ] × [ 30 + ( 2 x 1 3 x 2 ) 2 × ( 18 32 x 1 + 12 x 1 2 + 48 x 2 36 x 1 x 2 + 27 x 2 2 ) ] 2[−2, 2]3
Table 2. Comparison of the benchmark function results.
Table 2. Comparison of the benchmark function results.
FunctionIndexBOAFFAFPSOPSOHFBOA
F1BEST1.0888 × 10−115.2955 × 10−200.97440
MEAN1.2853 × 10−116.8202 × 10−218.07631.74490
STD7.9268 × 10−136.2858 × 10−218.58560.57070
F2BEST1.3086 × 10−910.975603.66520
MEAN4.4458 × 10−91.108219.35536.89200
STD1.4377 × 10−95.6678 × 10−212.95181.28640
F3BEST1.0335 × 10−115.8945 × 10−203.96910
MEAN1.2540 × 10−118.2000 × 10−250.718311.12830
STD9.3301 × 10−131.0152 × 10−261.10404.01860
F4BEST5.4100 × 10−98.1970 × 10−200.48590
MEAN6.1565 × 10−99.3128 × 10−21.50250.76590
STD4.6739 × 10−104.8686 × 10−30.98390.15100
F5BEST2.3357 × 10−104.6991 × 10−201.10070
MEAN8.2502 × 10−106.3942 × 10−210.10793.31820
STD7.7165 × 10−105.9537 × 10−36.69261.63930
F6BEST08.9905053.25210
MEAN13.572112.896334.100085.00950
STD51.64861.440852.602218.55410
F7BEST4.9271 × 10−90.25438.8818 × 10−161.99428.8818 × 10−16
MEAN6.0044 × 10−90.30013.71222.53898.8818 × 10−16
STD3.8142 × 10−100.01911.90640.27740
F8BEST1.1319 × 10−122.0533 × 10−32.5146 × 10−24.7492 × 10−20
MEAN4.3214 × 10−122.9130 × 10−30.68188.4649 × 10−20
STD2.2965 × 10−123.0735 × 10−40.28173.0695 × 10−20
F9BEST0.99802.202612.670512.67050.9980
MEAN1.444911.255512.673512.67052.9673
STD0.60963.26628.2600 × 10−21.4254 × 10−133.2104
F10BEST3.2212 × 10−43.1048 × 10−48.6673 × 10−43.0749 × 10−43.1388 × 10−4
MEAN4.3588 × 10−43.2493 × 10−33.7876 × 10−21.1178 × 10−35.6483 × 10−4
STD1.4855 × 10−47.2934 × 10−64.5871 × 10−23.6490 × 10−31.4503 × 10−3
F11BEST−1.0415−0.9507−1.0194−1.0316−1.0316
MEAN−1.0864−0.8073−0.4961−1.0316−1.0309
STD7.6611 × 10−24.1317 × 10−20.35636.4539 × 10−163.8581 × 10−4
F12BEST3.00214.6238333.0004
MEAN3.186159.012933.00273.043
STD0.392932.77701.5139 × 10−154.1661 × 10−30.11328
Table 3. Objective evaluation indexes of human image segmentation results.
Table 3. Objective evaluation indexes of human image segmentation results.
ImageSegmentation AlgorithmIterationsFitness ValuePSNRMSESSIM
LenaBOA-Otsu302990.25798.82068470.08030.3489
FFA-Otsu192982.99608.82448401.18740.3502
Im-FpsoOtsu482994.27938.60998667.38920.2176
PSO-Otsu882994.23788.88168412.45310.1316
HFBOA-Otsu102994.66278.89528386.15210.3676
PirateBOA-Otsu333286.40068.81898534.65280.2631
FFA-Otsu183282.95428.88558448.72130.2809
Im-FpsoOtsu273286.64428.79288632.68220.2629
PSO-Otsu783286.85018.35639493.95680.1106
HFBOA-Otsu53287.40318.88578404.23610.2811
Woman-blondeBOA-Otsu282520.24258.84468484.29540.3604
FFA-Otsu152492.57158.86328448.17380.3561
Im-FpsoOtsu122520.55258.86168451.31930.3544
PSO-Otsu292519.93788.86078453.03290.3550
HFBOA-Otsu32521.42838.87678421.84250.3649
KodimBOA-Otsu221626.22198.30519430.68180.1962
FFA-Otsu131624.84498.30939597.37160.1828
Im-FpsoOtsu151627.04258.35869488.92880.1986
PSO-Otsu291626.53718.37799446.94560.1968
HFBOA-Otsu41627.13488.38689427.64220.1993
Table 4. Objective evaluation indexes of scenery image segmentation results.
Table 4. Objective evaluation indexes of scenery image segmentation results.
ImageSegmentation AlgorithmIterationsFitness ValuePSNRMSESSIM
WallBOA-Otsu552004.39018.13999979.04550.2183
FFA-Otsu62013.91268.32099571.85410.2639
Im-FpsoOtsu242016.48368.32229568.54280.2528
PSO-Otsu742016.17828.34319522.98740.2103
HFBOA-Otsu52016.50508.42149344.19920.2726
GorgeBOA-Otsu183854.22779.49757300.05990.1940
FFA-Otsu303851.22869.46977513.39700.1938
Im-FpsoOtsu423868.62179.51077277.97820.2088
PSO-Otsu673867.98219.48747317.19370.1511
HFBOA-Otsu143868.82719.52097259.63980.2103
ButterflyBOA-Otsu355936.378810.85475340.84210.4591
FFA-Otsu185947.019410.85385341.93180.4579
Im-FpsoOtsu585949.087110.85385341.32580.4579
PSO-Otsu925948.835610.85325342.67220.3361
HFBOA-Otsu355949.293410.85755337.34790.4594
MandrilBOA-Otsu181930.05328.49769190.15440.2482
FFA-Otsu141937.39528.59318996.65440.2664
Im-FpsoOtsu451941.42908.59008996.65440.2664
PSO-Otsu461941.31598.58139014.59570.1704
HFBOA-Otsu131941.68488.59458987.78470.2691
Table 5. Objective evaluation indexes of medical image segmentation results.
Table 5. Objective evaluation indexes of medical image segmentation results.
ImageSegmentation AlgorithmIterationsFitness ValuePSNRMSESSIM
Lung1BOA-Otsu305320.518813.33483017.17460.6448
FFA-Otsu135165.151213.16343138.62460.6389
Im-FpsoOtsu125320.956113.02173242.73620.6433
PSO-Otsu735320.268413.32313025.33800.3078
HFBOA-Otsu45320.991113.36002999.71060.6507
Lung2BOA-Otsu572975.503715.04252036.25530.7309
FFA-Otsu292855.962215.02982042.19710.7324
Im-FpsoOtsu712975.583415.06742024.59060.7192
PSO-Otsu802975.121615.03182041.26650.3484
HFBOA-Otsu152975.630415.07942019.03040.7327
ThoraxBOA-Otsu588731.505711.22234907.48650.4439
FFA-Otsu148729.716511.40044710.21910.4583
Im-FpsoOtsu708731.871511.33414782.64720.4509
PSO-Otsu968731.709311.39254718.73770.0558
HFBOA-Otsu98731.955611.41584693.45670.4584
BrainBOA-Otsu728419.629610.02606463.75970.3173
FFA-Otsu148412.683210.34716003.02550.3236
Im-FpsoOtsu468454.513910.25136136.90370.3213
PSO-Otsu598453.82940610.38365952.84600.1204
HFBOA-Otsu98454.803410.39435938.18940.3239
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Ma, Y.; Ding, Z.; Zhang, J.; Ma, Z. Otsu Image Segmentation Algorithm Based on Hybrid Fractional-Order Butterfly Optimization. Fractal Fract. 2023, 7, 871. https://doi.org/10.3390/fractalfract7120871

AMA Style

Ma Y, Ding Z, Zhang J, Ma Z. Otsu Image Segmentation Algorithm Based on Hybrid Fractional-Order Butterfly Optimization. Fractal and Fractional. 2023; 7(12):871. https://doi.org/10.3390/fractalfract7120871

Chicago/Turabian Style

Ma, Yu, Ziqian Ding, Jing Zhang, and Zhiqiang Ma. 2023. "Otsu Image Segmentation Algorithm Based on Hybrid Fractional-Order Butterfly Optimization" Fractal and Fractional 7, no. 12: 871. https://doi.org/10.3390/fractalfract7120871

Article Metrics

Back to TopTop