# Image Multithreshold Segmentation Method Based on Improved Harris Hawk Optimization

Authors: Weizhen Dong; Yan Chen; Xiaochun Hu
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

In order to improve the accuracy and performance of traditional image threshold segmentation algorithm, this paper proposes a multithreshold segmentation method named improved Harris hawk optimization (IMHHO). Firstly, IMHHO adopts Tent map and elite opposition-based learning to initialize population and enhance the diversity. Secondly, IMHHO uses quadratic interpolation to generate new individuals and enhance the local search ability. Finally, IMHHO adopts improved Gaussian disturbance method to disturb optimal solution, which coordinates the local and global search ability. Then, the performance of IMHHO is tested based on 14 benchmark functions. In image segmentation, different algorithms are tested to compare the comprehensive performance based on Otsu and Renyi entropy. Experiments show that IMHHO performs better in the three kinds of benchmark functions; the segmentation effect is directly proportional to the number of thresholds; compared with other algorithms, IMHHO has better comprehensive performance.


---

## Body

## 1. Introduction

Image segmentation is the basic prerequisite step of image recognition and target detection [1, 2]. The quality of image segmentation directly affects the effect of subsequent image processing. The traditional threshold segmentation method has bad real-time performance, with large amount of computation. How to accurately and quickly search the best thresholds is the challenge and key of image segmentation.Intelligent optimization algorithm [3–5] has been proved to be effective in solving parameter optimization problems [6–8] and has a good research and development prospect, including Sailed Fish Optimizer (SFO) [9, 10], Butterfly Optimization algorithm (BOA) [11, 12], Equilibrium Optimizer (EO) [13, 14], and Pathfinder Algorithm (PFA) [15, 16].In the field of image segmentation, deep learning [17–19], intelligence optimization algorithm, and other methods [20–22] have been conducted in some research. Due to the excellent characteristics of search range, flexibility, and convergence, intelligence algorithm has a good prospect. Houssein et al. [23] proposed an efficient multithresholding images segmentation approach by an improved Equilibrium Optimizer algorithm and applied it to COVID-19 CT images segmentation. Houssein et al. [24] proposed a novel Black Widow Optimization algorithm in the field of multilevel thresholding image segmentation, which achieved good results. Tran and Wu [25] adopted PSO improved by neighborhood search method and applied it to image segmentation problem. Wang et al. [26] improved Salp Swarm Algorithm (SSAl) by using Levi flight, which enhanced the development ability and search ability. Krishnamoorthy et al. [27] used GWO algorithm and multilevel image thresholding selection method and applied it to image segmentation. Houssein et al. [28] improved Tunicate Swarm Algorithm and applied it in the field of global optimization and image segmentation. Other algorithms [29–31] have also made some results in the field of image segmentation.Based on the foraging behavior of seabirds in nature, Heidari and others proposed a Harris hawk optimization (HHO) [32]. With high accuracy and certain global search ability, HHO simulates the predatory behavior of the Harris hawk population and has been successfully used in solving function optimization problems and other engineering application fields [33]. However, similar to other intelligent optimization algorithms, the single search method of HHO leads to lack of flexibility and mobility, and it is difficult to jump out of the local optimization. Moreover, HHO adopts the way of directly aggregating to the global optimization value, and the overall search is insufficient. In the follow-up research, Heidari et al. [34] compared the performance of HHO with other algorithms and verified the ability of HHO in solving problems such as pressure vessel design and rolling element bearing design. Bao et al. [35] proposed HHO-DE algorithm based HHO in image segmentation, which combined HHO and differential evolution (DE). In HHO-DE, the population was divided into two subpopulations, which will be assigned to HHO and DE. Then, HHO and DE operated to update the positions during the iterative process in parallel.In order to improve the performance of HHO, this paper proposes a new algorithm named IMHHO. Firstly, IMHHO proposes a method of combining Tent map and elite opposition-based learning for population initialization; secondly, IMHHO uses the quadratic interpolation to generate new individuals and enhance the local search ability; thirdly, IMHHO uses improved Gaussian disturbance method to improve the local and global search ability. Then, in this paper, IMHHO is applied in the field of image segmentation. Experiments show that IMHHO can find the best threshold more stably, accurately, and efficiently and has better comprehensive performance.


## 2. Harris Hawk Optimization

The HHO is a swarm intelligence optimization algorithm proposed by Mirjalili in a short time and has novel theory. The algorithm simulates the hunting behavior of Harris hawk, including three stages: search stage, transformation stage, and development stage.In the search stage, the population has a high degree of internal dispersion whose individuals randomly inhabit in some positions, and the strategy of individuals for hunting is given as the following functional equation:(1)Xt+1=Xrandt−r1Xrandt−2r2Xt,q≥0.5,Xrabbitt−Xavet−r3lb+r4ub−lb,q<0.5,where q, r1, r2, r3, and r4 are random numbers within [0,1], t is the number of iterations, Xrandt is a random individual position, ub and lb are the upper and lower limits of the search space, Xrabbitt is the prey position with the best fitness value, Xavet is the average position of all individuals. r3 is a proportional coefficient, and once r4 approaches 1, it will further increase the randomness of the strategy.In the transformation stage, HHO can convert different states according to the escape energy of prey. During the escape of prey, its escape energy will gradually decrease. The functional equation of escape energy is given as follows:(2)E=2E01−tT,where E0 is the initial energy of prey, which is a random number with [−1,1], and will be updated automatically at each iteration. t is the current number of iterations. T is the maximum number of iterations. When E≥1, HHO enters the search stage, and when E<1, HHO enters the development stage.In the development stage, HHO adopts four strategies.R is defined as a random number within [0,1], which is used to select different development strategies.When0.5<E<1 and r≥0.5, HHO uses soft attack strategy to update the position, and the functional equations are given as follows:(3)Xt+1=ΔXt−EJXrabbitt−Xt,ΔXt=Xrabbitt−Xt,where ΔXt is the difference between prey position and individual position and J is a random value between [0,2].WhenE<0.5 and r≥0.5, HHO uses hard attack strategy to update the position. The functional equation is given as follows:(4)Xt+1=Xrabbitt−EΔXt.When0.5≤E<1 and r<0.5, HHO uses the soft encirclement strategy of asymptotically fast subduction to update the position. The functional equations are given as follows:(5)Xt+1=Y,fY<fXt,Z,fZ<fXt,Y=Xrabbitt−EJXrabbitt−XtZ=Y+S∗LF2,where f is the fitness function, S is a 2-dimensional random vector whose elements are random values within [0,1], and LF is the mathematical expression of Lévy flight.WhenE<0.5 and r<0.5, HHO uses the hard encirclement strategy of asymptotically fast subduction to update the position, The functional equations are given as follows:(6)Xt+1=Y,fY<fXt,Z,fZ<fXt,Y=Xrabbitt−EJXrabbitt−Xmt,Z=Y+S∗LF2.The processes of HHO are depicted in Figure1.Figure 1
Processes of HHO.


## 3. Improved Harris Hawk Optimization

### 3.1. Tent Map and Elite Opposition-Based Learning: In the Later Stage of Optimization

The population diversity of HHO decreases, and the probability of falling into the local optimal position increases, resulting in insufficient convergence accuracy. In this paper, a Tent map and elite opposition-based learning method is proposed to initialize the population and enhance the population diversity.Chaotic map is based on nonlinear theory, which means that, in a deterministic system, there is a seemingly random irregular motion. It can traverse all states according to the characteristics in a certain range, with the characteristics of ergodicity, nonlinearity, randomness, and universality.At present, logistic map and Tent map are the most common chaotic map methods. Research [36] shows that Tent map has better ergodicity than logistic map. Tent map is a piecewise linear map in the field of mathematics, with good correlation and uniform distribution function. The chaotic sequence of Tent map has uniform interval distribution and fast iteration speed. The functional equation of Tent map is given as follows:(7)xn+1=xnα,xn∈0,α,1−xn1−α,xn∈α,1,t=0,1,2,3,…,T,where xn is the chaotic value generated during iterations, α is the constant belonging to 0,1, and T is the maximum number of iterations. In this paper, α=0.75.Figure2 depicts the sequence distribution histogram of Tent map, in which the maximum number of iterations is 500, and the number of intervals is 20. As can be seen from Figure 2, the Tent map is evenly distributed.Figure 2
Tent map sequence distribution histogram.The basic idea of opposition-based learning (OBL) [37] is to calculate the opposite value according to the current value and the rules. The research shows that OBL can effectively improve the population diversity and the ability of jumping out of local optimal location.The elite opposition-based learning (EOBL) method further improves OBL. It uses a certain proportion of dominant individuals to create their reverse populations and effectively improves the population diversity. IfXi=xi1,xi2,…,xiD is an ordinary particle, and the corresponding extreme value is elite particle Xie=xi1e,xi2e,…,xiDe, then the functional equation of elite opposite value can be defined as follows:(8)Xie=μ×da+db−xije,where xije∈aj,bj, μ∈0,1 is a random number subject to normal distribution and daj,dbj is the spatial range of the j dimension. The functional equation of daj and dbj is given as follows:(9)daj=minxij,dbj=maxxij.In the functional equation (9), the spatial range boundary is dynamically adjusted according to the search iteration, and the spatial range of the reverse value is gradually reduced, which improves the convergence speed of the algorithm. When the reverse value is outside the boundary range, the reverse value is reset to a random value.This paper proposes a Tent map and EOBL strategy. The new strategy firstly initializes the population according to the Tent map and then generates the reverse population according to EOBL. Then, all individuals of the two populations are ordered according to the fitness values, and the best individuals are selected as the final initialization population, which improves the quality of the whole population. The processes are summarized as follows:(1)
Within the upper and lower limits,N positions are initialized according to the Tent map as the initial population positions(2)
Reverse populations are generated according to EOBL(3)
The initial and reverse populations are merged, the fitness values after merging are reordered, and the firstN individuals are selected as the final initial populations


### 3.2. Quadratic Interpolation

In this paper, quadratic interpolation (QI) is used to improve the local search ability of HHO. QI uses the curve to fit the shape of the quadratic function. It is a local search operator to fit the optimal value of the function with the calculated curve extreme points.SupposingX and Y are the two random positions of the population in the D dimension problem, the current global optimal position is Z, and the functional equation of parabola passing through xq,FX, yq,FY and zq,FZ is as follows:(10)pt=a0+a1t+a2t2,a2≠0.X=x1,x2,…,xD, Y=y1,y2,…,yD, Z=z1,z2,…,zD, the fitness values of X, Y and Z are FX, FY and FZ respectively, and q is the subscript of the dimension.The functional equations of second-order polynomial are as follows:(11)pxq=a0+a1xq+a2xq2=FX,(12)pyq=a0+a1yq+a2yq2=FY,(13)pzq=a0+a1zq+a2zq2=FZ.Based on the functional equations (11), (12), and (13), a0, a1, and a2 are solved, and the functional equation is given as follows:(14)pt=FXt−yqt−zqxq−yqxq−zq+FYt−zqt−xqyq−zqyq−xq+FZt−xqt−yqzq−xqzq−yq.Ifp′t=0, the quadratic interpolation method creates a new position according to the following functional equation:(15)xq=zq2−yq2×FX+xq2−zq2×FY+yq2−xq2×FZ2zq−yq×FX+xq−zq×FY+yq−xq×FZ.Based on the functional equation (15), a new individual X¯=x1¯,x2¯,…,xD¯ is created.After the new population is created by quadratic interpolation, all individuals are reordered according to the fitness values, and the best individuals are left.


### 3.3. Improved Gaussian Disturbance

In this paper, an improved Gaussian disturbance strategy is adopted to disturb the optimal position, which enhances the search ability and convergence accuracy of the algorithm. In the iterations, Gaussian disturbance is applied to the current optimal position. The functional equation of Gaussian disturbance before improvement is as follows:(16)Gbestt=Gbest1+randn1,where Gbest is the current global optimal position, Gbestt is the position after Gaussian disturbance, then the fitness value after disturbance is calculated, and the optimal individual is selected according to the fitness values before and after disturbance.In order to coordinate the global and local search ability of Harris hawk optimization,randn1 in the original functional equation is improved to dynamic Gaussian radius σ. The improved functional equations are as follows:(17)Gbestt=G1+σσ=0.05e1−t/T,where t is the current number of iterations, T is the maximum number of iterations, and σ decreases nonlinearly during the iteration process. In the early stage of the algorithm, σ is large, and the algorithm has strong global exploration ability. In the middle and later stages, σ gradually decreases, and the algorithm will do more sufficient local search.


### 3.4. The Processes of IMHHO

Firstly, after the parameters are set, the initial population is created by Tent map method, and the reverse population is created by EOBL; then, the initial population and reverse population are reordered by fitness values, and the firstD individuals are selected as the final initial population. Secondly, IMHHO is executed based on parameters and initial population, then Quadratic interpolation is adopted to generate new individuals, and the optimal position is disturbed based on the improved Gaussian disturbance method. Thirdly, when the number of iterations is equal to Itermax, the algorithm jumps to the next step; otherwise, it starts the next iteration. Finally, when the maximum number of iterations is reached, the algorithm ends and stores the fitness value and the optimal position. The processes of IMHHO are depicted in Figure 3.Figure 3
The processes of IMHHO.


## 3.1. Tent Map and Elite Opposition-Based Learning: In the Later Stage of Optimization

The population diversity of HHO decreases, and the probability of falling into the local optimal position increases, resulting in insufficient convergence accuracy. In this paper, a Tent map and elite opposition-based learning method is proposed to initialize the population and enhance the population diversity.Chaotic map is based on nonlinear theory, which means that, in a deterministic system, there is a seemingly random irregular motion. It can traverse all states according to the characteristics in a certain range, with the characteristics of ergodicity, nonlinearity, randomness, and universality.At present, logistic map and Tent map are the most common chaotic map methods. Research [36] shows that Tent map has better ergodicity than logistic map. Tent map is a piecewise linear map in the field of mathematics, with good correlation and uniform distribution function. The chaotic sequence of Tent map has uniform interval distribution and fast iteration speed. The functional equation of Tent map is given as follows:(7)xn+1=xnα,xn∈0,α,1−xn1−α,xn∈α,1,t=0,1,2,3,…,T,where xn is the chaotic value generated during iterations, α is the constant belonging to 0,1, and T is the maximum number of iterations. In this paper, α=0.75.Figure2 depicts the sequence distribution histogram of Tent map, in which the maximum number of iterations is 500, and the number of intervals is 20. As can be seen from Figure 2, the Tent map is evenly distributed.Figure 2
Tent map sequence distribution histogram.The basic idea of opposition-based learning (OBL) [37] is to calculate the opposite value according to the current value and the rules. The research shows that OBL can effectively improve the population diversity and the ability of jumping out of local optimal location.The elite opposition-based learning (EOBL) method further improves OBL. It uses a certain proportion of dominant individuals to create their reverse populations and effectively improves the population diversity. IfXi=xi1,xi2,…,xiD is an ordinary particle, and the corresponding extreme value is elite particle Xie=xi1e,xi2e,…,xiDe, then the functional equation of elite opposite value can be defined as follows:(8)Xie=μ×da+db−xije,where xije∈aj,bj, μ∈0,1 is a random number subject to normal distribution and daj,dbj is the spatial range of the j dimension. The functional equation of daj and dbj is given as follows:(9)daj=minxij,dbj=maxxij.In the functional equation (9), the spatial range boundary is dynamically adjusted according to the search iteration, and the spatial range of the reverse value is gradually reduced, which improves the convergence speed of the algorithm. When the reverse value is outside the boundary range, the reverse value is reset to a random value.This paper proposes a Tent map and EOBL strategy. The new strategy firstly initializes the population according to the Tent map and then generates the reverse population according to EOBL. Then, all individuals of the two populations are ordered according to the fitness values, and the best individuals are selected as the final initialization population, which improves the quality of the whole population. The processes are summarized as follows:(1)
Within the upper and lower limits,N positions are initialized according to the Tent map as the initial population positions(2)
Reverse populations are generated according to EOBL(3)
The initial and reverse populations are merged, the fitness values after merging are reordered, and the firstN individuals are selected as the final initial populations


## 3.2. Quadratic Interpolation

In this paper, quadratic interpolation (QI) is used to improve the local search ability of HHO. QI uses the curve to fit the shape of the quadratic function. It is a local search operator to fit the optimal value of the function with the calculated curve extreme points.SupposingX and Y are the two random positions of the population in the D dimension problem, the current global optimal position is Z, and the functional equation of parabola passing through xq,FX, yq,FY and zq,FZ is as follows:(10)pt=a0+a1t+a2t2,a2≠0.X=x1,x2,…,xD, Y=y1,y2,…,yD, Z=z1,z2,…,zD, the fitness values of X, Y and Z are FX, FY and FZ respectively, and q is the subscript of the dimension.The functional equations of second-order polynomial are as follows:(11)pxq=a0+a1xq+a2xq2=FX,(12)pyq=a0+a1yq+a2yq2=FY,(13)pzq=a0+a1zq+a2zq2=FZ.Based on the functional equations (11), (12), and (13), a0, a1, and a2 are solved, and the functional equation is given as follows:(14)pt=FXt−yqt−zqxq−yqxq−zq+FYt−zqt−xqyq−zqyq−xq+FZt−xqt−yqzq−xqzq−yq.Ifp′t=0, the quadratic interpolation method creates a new position according to the following functional equation:(15)xq=zq2−yq2×FX+xq2−zq2×FY+yq2−xq2×FZ2zq−yq×FX+xq−zq×FY+yq−xq×FZ.Based on the functional equation (15), a new individual X¯=x1¯,x2¯,…,xD¯ is created.After the new population is created by quadratic interpolation, all individuals are reordered according to the fitness values, and the best individuals are left.


## 3.3. Improved Gaussian Disturbance

In this paper, an improved Gaussian disturbance strategy is adopted to disturb the optimal position, which enhances the search ability and convergence accuracy of the algorithm. In the iterations, Gaussian disturbance is applied to the current optimal position. The functional equation of Gaussian disturbance before improvement is as follows:(16)Gbestt=Gbest1+randn1,where Gbest is the current global optimal position, Gbestt is the position after Gaussian disturbance, then the fitness value after disturbance is calculated, and the optimal individual is selected according to the fitness values before and after disturbance.In order to coordinate the global and local search ability of Harris hawk optimization,randn1 in the original functional equation is improved to dynamic Gaussian radius σ. The improved functional equations are as follows:(17)Gbestt=G1+σσ=0.05e1−t/T,where t is the current number of iterations, T is the maximum number of iterations, and σ decreases nonlinearly during the iteration process. In the early stage of the algorithm, σ is large, and the algorithm has strong global exploration ability. In the middle and later stages, σ gradually decreases, and the algorithm will do more sufficient local search.


## 3.4. The Processes of IMHHO

Firstly, after the parameters are set, the initial population is created by Tent map method, and the reverse population is created by EOBL; then, the initial population and reverse population are reordered by fitness values, and the firstD individuals are selected as the final initial population. Secondly, IMHHO is executed based on parameters and initial population, then Quadratic interpolation is adopted to generate new individuals, and the optimal position is disturbed based on the improved Gaussian disturbance method. Thirdly, when the number of iterations is equal to Itermax, the algorithm jumps to the next step; otherwise, it starts the next iteration. Finally, when the maximum number of iterations is reached, the algorithm ends and stores the fitness value and the optimal position. The processes of IMHHO are depicted in Figure 3.Figure 3
The processes of IMHHO.


## 4. Image Multithreshold Segmentation Based on IMHHO

### 4.1. Multithreshold Segmentation

In the field of image segmentation, threshold segmentation method is a typical method. In this paper, the threshold segmentation methods based on OTSU and Renyi entropy are extended to multithreshold segmentation method.The principle of multithreshold segmentation is to determine the threshold groupt1,t2,…,tnn>0 according to certain rules, and to divide the image into n+1 part according to the threshold group.For the image with gray level0,1,…,L−1 (L is 256), i is the current gray level, the probability of gray level i is pi, and the total number of pixels is N. If the number of thresholds is n, the image is divided into n+1 parts, whose pixel probabilities of each part are w0 to wn respectively.In 1979, a threshold segmentation method named Otsu [38] was proposed. Otsu dynamically determines the threshold based on the maximum inter class variance. In this paper, a multithreshold segmentation method is realized based on Otsu, and the gray mean value of each part is u0 to un respectively, and then the functional equations are given as follows:(18)u0=∑i=0t1ipiω0,ω0=∑i=0t1pi,u1=∑i=t1+1t2ipiω1,ω1=∑i=t1+1t2pi,un=∑i=tn+1L−1ipiωn,ωn=∑i=tn+1L−1pi.The functional equation of interclass variance of image is given as follows:(19)σ=ω0u0−uT2+ω1u1−uT2+⋯+ωnun−uT2.where uT=∑i=0L−1ipi is the gray mean of image level.The functional equation of optimal threshold vector based on Otsu is given as follows:(20)t1∗,t2∗,…,tn∗=argmaxσ.The Renyi entropy [39] quantifies the value of entropy and maximizes the sum of entropy between segmented target and background. In this paper, a multithreshold segmentation method is realized based on Renyi entropy, and the gray mean value of each part is H0 to Hn respectively, and then the functional equations are given as follows:(21)H0=11−αln∑i=0t1piω0α,H1=11−αln∑i=t1+1t2piω1α,Hn=11−αln∑i=tn+1L−1piωnα,where α is an adjustable value of [0, 1].The functional equation of Renyi entropy is given as follows:(22)ft1,t2,⋯,tn=H0+H1+⋯+Hn.The functional equation of optimal threshold vector based on Renyi entropy is given as follows:(23)t1∗,t2∗,…,tn∗=argmaxft1,t2,…,tn.


### 4.2. Multithreshold Segmentation Algorithm Based on IMHHO

If the threshold vector isT=t1,t2,…,tn, which satisfies 0<t1<t2<⋯<tn<L, and its subvalues are all positive integers, then the image will be segmented according to this vector. In IMHHO, OTSU and Renyi entropy are used as objective functions, respectively; if the vector conforms to the functional equations (20) or (23), then it is the target threshold vector. The processes of multithreshold segmentation method based on IMHHO are depicted in Figure 4.Figure 4
The processes of the multithreshold segmentation method based on IMHHO.


## 4.1. Multithreshold Segmentation

In the field of image segmentation, threshold segmentation method is a typical method. In this paper, the threshold segmentation methods based on OTSU and Renyi entropy are extended to multithreshold segmentation method.The principle of multithreshold segmentation is to determine the threshold groupt1,t2,…,tnn>0 according to certain rules, and to divide the image into n+1 part according to the threshold group.For the image with gray level0,1,…,L−1 (L is 256), i is the current gray level, the probability of gray level i is pi, and the total number of pixels is N. If the number of thresholds is n, the image is divided into n+1 parts, whose pixel probabilities of each part are w0 to wn respectively.In 1979, a threshold segmentation method named Otsu [38] was proposed. Otsu dynamically determines the threshold based on the maximum inter class variance. In this paper, a multithreshold segmentation method is realized based on Otsu, and the gray mean value of each part is u0 to un respectively, and then the functional equations are given as follows:(18)u0=∑i=0t1ipiω0,ω0=∑i=0t1pi,u1=∑i=t1+1t2ipiω1,ω1=∑i=t1+1t2pi,un=∑i=tn+1L−1ipiωn,ωn=∑i=tn+1L−1pi.The functional equation of interclass variance of image is given as follows:(19)σ=ω0u0−uT2+ω1u1−uT2+⋯+ωnun−uT2.where uT=∑i=0L−1ipi is the gray mean of image level.The functional equation of optimal threshold vector based on Otsu is given as follows:(20)t1∗,t2∗,…,tn∗=argmaxσ.The Renyi entropy [39] quantifies the value of entropy and maximizes the sum of entropy between segmented target and background. In this paper, a multithreshold segmentation method is realized based on Renyi entropy, and the gray mean value of each part is H0 to Hn respectively, and then the functional equations are given as follows:(21)H0=11−αln∑i=0t1piω0α,H1=11−αln∑i=t1+1t2piω1α,Hn=11−αln∑i=tn+1L−1piωnα,where α is an adjustable value of [0, 1].The functional equation of Renyi entropy is given as follows:(22)ft1,t2,⋯,tn=H0+H1+⋯+Hn.The functional equation of optimal threshold vector based on Renyi entropy is given as follows:(23)t1∗,t2∗,…,tn∗=argmaxft1,t2,…,tn.


## 4.2. Multithreshold Segmentation Algorithm Based on IMHHO

If the threshold vector isT=t1,t2,…,tn, which satisfies 0<t1<t2<⋯<tn<L, and its subvalues are all positive integers, then the image will be segmented according to this vector. In IMHHO, OTSU and Renyi entropy are used as objective functions, respectively; if the vector conforms to the functional equations (20) or (23), then it is the target threshold vector. The processes of multithreshold segmentation method based on IMHHO are depicted in Figure 4.Figure 4
The processes of the multithreshold segmentation method based on IMHHO.


## 5. Experimental Method, Results, and Analysis

In order to verify the performance of IMHHO, this paper designs the comparative experiments. The benchmark functions can test the general performance of the algorithm, and the comparative experiment of image multithreshold segmentation can test the image segmentation performance of the algorithm. The experiments in this paper are operated on the PC with 1.19 GHz CPU and 16 GB memory, python development language and PyCharm development software. The operating system is windows 10 and 64 bit.


### 5.1. The Experiments of Benchmark Functions

14 benchmark functions [40] were tested in the experiments. The parameters are depicted in Table 1, and the benchmark functions are depicted in Table 2.Table 1
Parameters of the algorithms.
AlgorithmParameter nameParameter valueSFOA4E0.01SFpercent0.3BOAP0.6Power_exponent0.1Sensory_modality0.01EOV1a12a21GP0.5PFAα[0,1]β[0,1]HHOα of Lévy flight0.01Β of Lévy flight1.5HHO-DEα of Lévy flight in HHO0.01β of Lévy flight in HHO1.5F of DE0.5CR of DE0.3IMHHOα of Lévy flight0.01β of Lévy flight1.5Table 2
Benchmark functions.
Function expressionDimensionValue rangeOptimal valueF1x=∑i=1nxi230[−100,100]0F2x=∑i=1nxi+∏i=1nxi30[−10,10]0F3x=∑i=1n∑j=1ixi230[−100,100]0F4x=maxxi,−1≤i≤n30[−100,100]0F5x=∑i=1nixi4+random0,130[−1.28,1.28]0F6x=∑i=1n−xisinxi1/230[−500,500]−12569F7x=∑i=1nxi2−10cos2πx+1030[−5.12,5.12]0F8x=−20exp−0.2∑i=1nxi2/n1/2−exp∑i=1ncos2πxi/n+20+e30[−32,32]0F9x=∑i=1nxi2/4000−∏i=1ncosxi/i1/2+130[−600,600]0F10x=4x12−2.1x14+x16/3+x1x2−4x22+4x242[−5,5]−1F11x=x2−5.1/4π2⋅x12+5/π⋅x1−62+101−1/8πcosx1+102[−5,5]0.3F12x=−∑i=14ciexp−∑j=16aijxj−pij26[0,1]−3F13x=1+x1+x2+1219−14x1+3x12−14x2+6x1x2+3x22×30+2x1−3x22×18−32x1+12x12+48x2−36x1x2+27x22[−2,2]3F14x=1/500+∑j=1251/j+∑i=12xi−aij6−12[−65,65]1In Table2, F1–F5 are unimodal functions, F6–F9 are high-dimensional multimodal functions, and F10–F14 are low-dimensional multimodal functions. The unimodal function can verify the convergence speed and accuracy; the high-dimensional multimodal function can verify the global search ability; and the low dimensional multimodal function can verify the development ability of the algorithm. In the experiment, the population of each algorithm is 100, the number of iterations is 500, and each algorithm runs 20 times independently. The Standard Deviation (STD) and MEAN are selected as the experimental indicators. The STD can reflect the robustness, and the MEAN can reflect the optimization accuracy and exploration ability.The experimental results of IMHHO, HHO-DE, SFO, BOA, EO, PFA, and HHO are depicted in Table3. In unimodal functions, MEAN and STD of IMHHO are several orders of magnitude ahead of other algorithms. In high-dimensional multimodal and low dimensional multimodal functions, the MEAN and STD of IMHHO are all the best. The overall performance of IMHHO is significantly better.Table 3
Comparative results of benchmark functions.
FunctionMetricSFOBOAEOPFAHHOHHO-DEIMHHOF1MEAN2.6227 × 10−98.8775 × 10−121.3923 × 10−5529.85483.4255 × 10−1040.00000.0000STD6.5148 × 10−98.1105 × 10−131.6100 × 10−5512.51241.3627 × 10−1030.00000.0000F2MEAN0.00021.1158 × 1095.2573 × 10−327.73973.2577 × 10−561.3535 × 10−1780.0000STD0.00024.8639 × 1093.3334 × 10−322.29206.7993 × 10−568.7013 × 10−1770.0000F3MEAN2.8761 × 10−67.6887 × 10−127.4146 × 10−164966.45134.1087 × 10−834.7360 × 10−1340.0000STD7.3530 × 10−65.4763 × 10−132.3678 × 10−151188.921131.7909 × 10−823.5249 × 10−1330.0000F4MEAN1.5905 × 10−55.1159 × 10−98.8904 × 10−1618.14158.3787 × 10−541.0293 × 10−870.0000STD3.2407 × 10−53.9235 × 10−101.0528 × 10−153.90041.8989 × 10−538.7706 × 10−880.0000F5MEAN0.00020.00070.00070.18325.2533 × 10−50.00024.9783 × 10−5STD0.00020.00030.00020.07624.4012 × 10−58.0900 × 10−53.4536 × 10−5F6MEAN−4117.4347−4189.3318−9086.4271−12449.3729−12569.4582−12564.3968−12569.4448STD604.8037271.5672540.5657102.71280.04980.06120.0427F7MEAN3.4191 × 10−81.7087 × 10−50.000090.96410.00000.00000.0000STD1.0698 × 10−77.3987 × 10−50.000015.07250.00000.00000.0000F8MEAN−39.9999−39.9999−39.9999−37.9329−39.9999−39.9999−39.9999STD2.3730 × 10−50.00000.00001.09280.00000.00000.0000F9MEAN1.1396 × 10−93.2007 × 10−130.00001.33820.00000.00000.0000STD4.1928 × 10−92.3100 × 10−130.00000.16050.00000.00000.0000F10MEAN−1.0294−1.0316−1.0316−1.0316−1.0316−1.0316−1.0316STD0.00511.7233 × 10−52.2204 × 10−151.9229 × 10−154.5405 × 10−137.3205 × 10−153.5108 × 10−16F11MEAN0.39780.39830.39780.39780.39810.39780.3978Q STD4.9156 × 10−80.00050.00001.2402 × 10−154.7046 × 10−70.00000.0000F12MEAN−2.5964−3.1492−3.2236−3.2625−3.2444−3.3219−3.1043STD0.35030.06270.05110.05940.05672.2598 × 10−133.1401 × 10−16F13MEAN5.31063.00822.99992.99993.00002.99993.0000STD6.72690.00837.1607 × 10−109.0989 × 10−135.7284 × 10−93.1401 × 10−145.2471 × 10−15F14MEAN2.96750.00060.00004.8495 × 10−280.09980.00000.9934STD3.98060.00250.00002.0796 × 10−270.29940.00000.9060In the experiment, except that IMHHO’s STD and MEAN are better than those of HHO-DE, and IMHHO’s actual execution time is much less than that of HHO-DE. Compared with HHO-DE, IMHHO’s comprehensive performance is better.Figure5 depicts the convergence diagram of the benchmark functions. Due to the limited space, the convergence diagrams of F1, F2, F6, F7, F12, and F14 benchmark functions are selected in this paper. In Figure 5, IMHHO performs better about convergence values. In terms of convergence speed, for F1 and F2, compared with IMHHO, although the convergence speed of BOA and SFO is faster, the convergence value is much worse than that of IMHHO, while IMHHO has a fast convergence speed, and the convergence value is obviously better than that of other algorithms; for F6, F7, F13, and F14, the convergence speed and value of IMHHO are the best.Figure 5
The convergence graph of benchmark functions. (a) The convergence graph of unimodal functions. (b) The convergence graph of high-dimensional multimodal functions. (c) The convergence graph of low-dimensional multimodal functions.
(a)(b)(c)


### 5.2. Ablation Experiments

IMHHO combines Tent map and EOBL for population initialization, uses the quadratic interpolation to generate new individuals, and proposes improved Gaussian disturbance method to improve and coordinate the global and local search ability.In this paper, the ablation experiments are designed to verify the effect of each improvement of IMHHO. The bench functions used in ablation experiments are the same as those in Table2. The experimental results are depicted in Table 4. As shown in Table 4, with the addition of every improvement, the MEAN and STD are better and better.Table 4
The results of ablation experiments.
HHO√√√√Tent map and EOBL√√√Quadratic interpolation√√Improved Gaussian disturbance√F1MEAN3.4255 × 10−1048.5709 × 10−1820.00000.0000STD1.3627 × 10−1030.00000.00000.0000F2MEAN3.2577 × 10−564.7572 × 10−874.9594 × 10−1050.0000STD6.7993 × 10−566.8939 × 10−879.8770 × 10−1040.0000F3MEAN4.1087 × 10−832.1805 × 10−1462.1805 × 10−2020.0000STD1.7909 × 10−824.3397 × 10−1460.00000.0000F4MEAN8.3787 × 10−542.2873 × 10−882.5664 × 10−1560.0000STD1.8989 × 10−534.5693 × 10−885.1275 × 10−1550.0000F5MEAN5.2533 × 10−55.0751 × 10−54.9891 × 10−54.9783 × 10−5STD4.4012 × 10−53.2532 × 10−52.5798 × 10−53.4536 × 10−5F6MEAN−12569.4582−12569.4569−12569.4456−12569.4448STD0.04980.04790.04750.0427F7MEAN0.00000.00000.00000.0000STD0.00000.00000.00000.0000F8MEAN−39.9999−39.9999−39.9999−39.9999STD0.00000.00000.00000.0000F9MEAN0.00000.00000.00000.0000STD0.00000.00000.00000.0000F10MEAN−1.0316−1.0316−1.0316−1.0316STD4.5405 × 10−131.8471 × 10−159.3503 × 10−163.5108 × 10−16F11MEAN0.39810.39780.39780.3978STD4.7046 × 10−71.1951 × 10−82.1316 × 10−150.0000F12MEAN−3.2444−3.2268−3.1502−3.1043STD0.05670.04750.02363.1401 × 10−16F13MEAN3.00003.00003.00003.0000STD5.7284 × 10−91.7984 × 10−121.4043 × 10−145.2471 × 10−15F14MEAN0.09980.39920.59800.9934STD0.29940.79700.48890.9060


### 5.3. Comparative Experiments of Different Algorithms

Cameraman, Lena, Baboon, and Peppers in the classical threshold segmentation data set are selected as the detection images. At the same time, in order to further verify the effect of IMHHO on image segmentation, the above experimental images are rotated and translated based on affine transformation, and the better perfect data set is obtained. The functional equation of affine transformation is as follows:(24)abcdef001xy1=x′y′1,where the matrix on the left is the transformation matrix, X and y are the original coordinates, x′ and y′ are transformed coordinates, and a,b,c,d,e,f are constraints of different base transformations. The functional equation of affine transformation of this paper is as follows:(25)cosθ−sinθtxsinθcosθty001xy1=x′y′1,where θ is the angle of counterclockwise rotation, tx is the horizontal coordinate translation, and ty is the vertical coordinate translation.Figure6 depicts the images after being rotated and translated.Figure 6
The images after being rotated and translated.The comparative algorithms are IMHHO, HHO-DE, SFO, EO, and PFA, The population size is 100, the number of iterations is 100, and each algorithm runs independently for 20 times. Peak Signal-to-Noise Ratio (PSNR) and Standard Deviation (STD) are used as experimental indicators, and the functional equations are as follows:(26)PSNR=10lg2552MSE,STD=∑i=1NIbfi−μ2NI,where NI is the number of independent executions; bfi is the best fitness value for the i execution; μ is the average value of the best fitness values; and MSE is the mean square error, and the functional equation is given as follows:(27)MSE=∑i=1m∑j=1nfi,j−gi,j2mn.Table5 depicts the experimental results based on Otsu. Compared other algorithms, IMHHO has better convergence stability and PSNR value. Only when threshold is 3 of Lena, and threshold is 3 of Baboon, the PSNR value is less than that of SFO and EO. The overall performance of IMHHO is better.Table 5
Experimental results based on Otsu.
ImageThreshold numberIMHHOHHO-DESFOEOPFAPSNRMEANSTDPSNRMEANSTDPSNRMEANSTDPSNRMEANSTDPSNRMEANSTDCameraman219.08843650.10.167618.97223649.70.394719.08663649.01.407719.06783648.80.390019.03173648.51.0510320.80023724.11.406020.18083721.92.167820.16123722.82.289520.68803721.21.454520.03963720.22.4159423.69483773.73.933520.97593772.11.081322.07263759.210.457123.56083778.21.062422.07213768.34.0947526.83703805.33.362124.99713797.63.096125.63933803.67.407125.98623802.84.789625.66443794.03.3807Cameraman-transformed220.09976099.90.013920.08816099.70.158819.92186098.90.620920.08596099.50.180919.90426099.30.2296321.66936152.49240.395121.26736147.21.710021.27466146.91.798221.26666148.50.432421.24706147.90.6152423.94186175.41.005422.40526168.63.219922.59056169.31.128423.38346171.61.423123.36896167.01.5290525.51846192.31.359024.50476188.04.497624.91526187.22.038324.23306191.030.630023.73026188.82.3408Lena220.63201963.21.024120.47201961.21.270120.47201959.91.978820.62521960.70.250220.61201961.10.2871323.91872124.53.055723.85292124.02.016424.04072125.31.222123.91872126.81.126723.72562119.214.1791425.46142185.03.056324.88382175.93.932425.44142175.211.655125.04612178.52.023825.04002177.93.9863526.24812211.73.774826.16412203.34.051926.15082202.75.841725.84822198.84.577025.76102197.55.1588Lena-transformed218.43403935.61.199318.38393932.20.584418.36773929.13.084718.43723932.70.333518.42153932.21.5516321.77374177.30.215821.34314176.51.392320.92174168.13.956421.66034176.60.362921.73984175.01.4354425.19004274.22.052524.42324272.25.991024.27784273.83.876224.88394269.84.299024.72274270.67.5703527.16594320.01.101226.35524317.11.244225.71804309.46.237425.82774310.24.896124.68204300.23.9989Baboon220.29591548.30.110220.25661546.20.354720.16151548.10.046920.26721547.60.474120.21911547.40.3930321.93921639.11.588221.62731628.42.185321.89911633.02.869221.98231632.23.554021.80271627.73.1475424.25251685.92.353323.13701683.22.921324.04431663.13.241923.21911683.54.599623.09561674.9910.7087524.95111722.51.823923.53901702.51.084324.37021710.33.311323.11051700.91.866924.69861702.49.7758Baboon-transformed219.20004507.30.158419.11264506.01.081619.13174506.01.657819.11264506.50.741119.14304506.50.9250322.05334704.81.691622.03964702.62.321421.70064698.43.726421.48034697.01.001921.97804699.14.6795423.96584759.21.161223.43624749.81.194022.95584750.81.576723.81154749.72.289822.50264748.03.8166525.58084789.21.393822.99764771.56.270624.07194782.54.000024.43934777.04.477024.84884781.11.5116Peppers219.08472868.30.206719.00782864.11.234519.09412864.11.119619.04151547.40.393019.04872865.60.2040322.10273065.10.867921.68133061.82.766621.64213057.610.292221.97573061.01.683221.263963056.15.1090425.82493149.31.329225.61633125.62.150925.62093144.65.233525.72193146.22.844622.98843119.59.4487527.12133189.21.925627.03563175.02.091226.84103181.92.706825.76333177.11.817226.83483176.94.6343Peppers-transformed219.97523935.70.228919.83713928.40.024019.90023927.80.788819.57003927.50.823219.83673927.80.7707321.96854054.41.762121.17764042.13.574521.29174037.73.210521.17664043.32.331721.72514042.31.3979425.94914099.72.027824.57064090.93.609125.00084081.53.588525.28314088.73.846824.90074089.54.9932526.96724223.42.205125.06194176.93.084325.39314118.95.173925.51284118.95.173926.09134112.47.4139Table6depicts the experimental results based on Renyi entropy. Compared with SFO, EO, and PFA, IMHHO has better experimental indicators.Table 6
Experimental results based on Renyi entropy.
ImageThreshold numberIMHHOHHO-DESFOEOPFAPSNRMEANSTDPSNRMEANSTDPSNRMEANSTDPSNRMEANSTDPSNRMEANSTDCameraman216.82884.98990.001316.48194.98760.002116.52594.95450.001616.65014.98340.003416.74584.98330.0053321.82576.35980.019721.76096.33150.037721.76846.28320.072221.75386.34300.026221.51866.29570.0500426.21617.71240.045725.49537.67260.048425.98437.61550.079326.11777.70070.062525.58577.69850.0768527.55748.88320.044026.76618.79510.046525.86168.87550.054126.05278.83880.049726.50318.76730.0705Cameraman-transformed222.97263.89430.001222.63373.86170.002022.48953.85570.014422.47263.86400.001722.39113.85370.0104325.07085.34910.019024.68925.34880.020424.95215.34060.051024.24885.35840.006623.96755.33180.0306427.30646.80450.011826.69756.76200.064226.48326.77850.017626.38526.79760.010224.63546.56010.0895528.82697.97660.039727.76627.86700.076527.56917.94830.053427.24077.95000.044426.92407.84330.1145Lena221.22285.294380.001321.22215.29190.000821.12285.29330.001421.17825.29200.002221.20255.28930.0037323.99286.56850.006023.88246.55860.004123.65586.55100.011023.74216.55110.006923.81576.55400.0076425.24837.67830.013324.84147.66810.026025.00067.65570.023524.71157.66130.013225.18647.66530.0089526.90778.76090.056526.13038.71960.082025.60088.71930.094325.63748.73030.012625.62068.69160.0605Lena-transformed217.52624.24670.002415.58874.04650.003017.39884.04410.001315.58874.04760.003215.75894.04450.0010321.82725.44510.005421.14235.34330.007521.20425.33310.008321.14815.34870.003221.32145.33460.0151423.29376.61750.007522.52676.56030.039322.86866.50870.010423.07416.57290.015723.04686.55010.0288526.08627.77810.070224.39117.74650.071222.91147.67510.036625.78327.71520.125023.51667.69050.0740Baboon220.33275.21850.000220.22515.21070.000920.22515.21070.000920.22515.21090.000520.21425.20880.0021321.59336.50820.001921.51916.49380.008321.30966.48260.016021.22036.50370.002021.56356.49080.0119422.71007.71220.005122.43367.66340.018522.17017.68260.021222.54187.70590.014823.17177.68060.0116524.24308.82680.022324.03048.77550.046223.55088.81930.038923.92048.81370.025623.17168.73620.0249Baboon-transformed218.58123.80940.000018.38123.80920.000218.44993.80670.002918.38123.80945.577418.38123.80920.0002322.97455.21040.009422.18145.18930.000522.33365.17720.013522.26285.18810.001622.40235.18550.0040423.91766.46040.006223.34776.44010.016423.60156.37240.073523.73486.46430.005123.79466.44630.0115525.12037.61230.021124.24517.60270.028024.35227.59280.032924.42637.60310.001623.86547.58640.0305Peppers220.65985.34820.002120.55315.34430.002920.63855.34720.004020.54325.34857.025020.63895.34530.0056322.49916.74500.028722.41366.69820.037822.14546.72570.064022.23126.75550.019722.41766.75850.0112425.55257.98010.030525.00107.94050.044523.27667.90300.045025.23007.97070.045824.82657.91850.0675526.73359.11530.007726.23909.04260.014626.64689.04380.058126.33259.05750.018526.51899.00190.0486Peppers-transformed218.61604.09670.004018.51684.06770.005818.45614.06710.007518.44114.05900.006418.44114.06220.0069320.02165.49390.017319.82315.46870.029219.57475.42340.022619.35075.42100.047519.84585.42250.0771425.52116.75140.011625.25596.69490.013324.90966.60410.029624.86996.68070.018124.86136.63970.0389528.30267.96000.082227.97417.91790.099727.82867.87860.133827.25987.94050.015427.75137.82860.1122The segmentation effect of IMHHO based on OTSU and Renyi entropy is shown in Figures7 and 8, respectively. As can be seen, the segmentation effect is directly proportional to the number of thresholds. With the number of thresholds increasing, the detailed processing and segmentation quality are better.Figure 7
Segmentation effect based on Otsu.Figure 8
Segmentation effect based on Renyi entropy.


## 5.1. The Experiments of Benchmark Functions

14 benchmark functions [40] were tested in the experiments. The parameters are depicted in Table 1, and the benchmark functions are depicted in Table 2.Table 1
Parameters of the algorithms.
AlgorithmParameter nameParameter valueSFOA4E0.01SFpercent0.3BOAP0.6Power_exponent0.1Sensory_modality0.01EOV1a12a21GP0.5PFAα[0,1]β[0,1]HHOα of Lévy flight0.01Β of Lévy flight1.5HHO-DEα of Lévy flight in HHO0.01β of Lévy flight in HHO1.5F of DE0.5CR of DE0.3IMHHOα of Lévy flight0.01β of Lévy flight1.5Table 2
Benchmark functions.
Function expressionDimensionValue rangeOptimal valueF1x=∑i=1nxi230[−100,100]0F2x=∑i=1nxi+∏i=1nxi30[−10,10]0F3x=∑i=1n∑j=1ixi230[−100,100]0F4x=maxxi,−1≤i≤n30[−100,100]0F5x=∑i=1nixi4+random0,130[−1.28,1.28]0F6x=∑i=1n−xisinxi1/230[−500,500]−12569F7x=∑i=1nxi2−10cos2πx+1030[−5.12,5.12]0F8x=−20exp−0.2∑i=1nxi2/n1/2−exp∑i=1ncos2πxi/n+20+e30[−32,32]0F9x=∑i=1nxi2/4000−∏i=1ncosxi/i1/2+130[−600,600]0F10x=4x12−2.1x14+x16/3+x1x2−4x22+4x242[−5,5]−1F11x=x2−5.1/4π2⋅x12+5/π⋅x1−62+101−1/8πcosx1+102[−5,5]0.3F12x=−∑i=14ciexp−∑j=16aijxj−pij26[0,1]−3F13x=1+x1+x2+1219−14x1+3x12−14x2+6x1x2+3x22×30+2x1−3x22×18−32x1+12x12+48x2−36x1x2+27x22[−2,2]3F14x=1/500+∑j=1251/j+∑i=12xi−aij6−12[−65,65]1In Table2, F1–F5 are unimodal functions, F6–F9 are high-dimensional multimodal functions, and F10–F14 are low-dimensional multimodal functions. The unimodal function can verify the convergence speed and accuracy; the high-dimensional multimodal function can verify the global search ability; and the low dimensional multimodal function can verify the development ability of the algorithm. In the experiment, the population of each algorithm is 100, the number of iterations is 500, and each algorithm runs 20 times independently. The Standard Deviation (STD) and MEAN are selected as the experimental indicators. The STD can reflect the robustness, and the MEAN can reflect the optimization accuracy and exploration ability.The experimental results of IMHHO, HHO-DE, SFO, BOA, EO, PFA, and HHO are depicted in Table3. In unimodal functions, MEAN and STD of IMHHO are several orders of magnitude ahead of other algorithms. In high-dimensional multimodal and low dimensional multimodal functions, the MEAN and STD of IMHHO are all the best. The overall performance of IMHHO is significantly better.Table 3
Comparative results of benchmark functions.
FunctionMetricSFOBOAEOPFAHHOHHO-DEIMHHOF1MEAN2.6227 × 10−98.8775 × 10−121.3923 × 10−5529.85483.4255 × 10−1040.00000.0000STD6.5148 × 10−98.1105 × 10−131.6100 × 10−5512.51241.3627 × 10−1030.00000.0000F2MEAN0.00021.1158 × 1095.2573 × 10−327.73973.2577 × 10−561.3535 × 10−1780.0000STD0.00024.8639 × 1093.3334 × 10−322.29206.7993 × 10−568.7013 × 10−1770.0000F3MEAN2.8761 × 10−67.6887 × 10−127.4146 × 10−164966.45134.1087 × 10−834.7360 × 10−1340.0000STD7.3530 × 10−65.4763 × 10−132.3678 × 10−151188.921131.7909 × 10−823.5249 × 10−1330.0000F4MEAN1.5905 × 10−55.1159 × 10−98.8904 × 10−1618.14158.3787 × 10−541.0293 × 10−870.0000STD3.2407 × 10−53.9235 × 10−101.0528 × 10−153.90041.8989 × 10−538.7706 × 10−880.0000F5MEAN0.00020.00070.00070.18325.2533 × 10−50.00024.9783 × 10−5STD0.00020.00030.00020.07624.4012 × 10−58.0900 × 10−53.4536 × 10−5F6MEAN−4117.4347−4189.3318−9086.4271−12449.3729−12569.4582−12564.3968−12569.4448STD604.8037271.5672540.5657102.71280.04980.06120.0427F7MEAN3.4191 × 10−81.7087 × 10−50.000090.96410.00000.00000.0000STD1.0698 × 10−77.3987 × 10−50.000015.07250.00000.00000.0000F8MEAN−39.9999−39.9999−39.9999−37.9329−39.9999−39.9999−39.9999STD2.3730 × 10−50.00000.00001.09280.00000.00000.0000F9MEAN1.1396 × 10−93.2007 × 10−130.00001.33820.00000.00000.0000STD4.1928 × 10−92.3100 × 10−130.00000.16050.00000.00000.0000F10MEAN−1.0294−1.0316−1.0316−1.0316−1.0316−1.0316−1.0316STD0.00511.7233 × 10−52.2204 × 10−151.9229 × 10−154.5405 × 10−137.3205 × 10−153.5108 × 10−16F11MEAN0.39780.39830.39780.39780.39810.39780.3978Q STD4.9156 × 10−80.00050.00001.2402 × 10−154.7046 × 10−70.00000.0000F12MEAN−2.5964−3.1492−3.2236−3.2625−3.2444−3.3219−3.1043STD0.35030.06270.05110.05940.05672.2598 × 10−133.1401 × 10−16F13MEAN5.31063.00822.99992.99993.00002.99993.0000STD6.72690.00837.1607 × 10−109.0989 × 10−135.7284 × 10−93.1401 × 10−145.2471 × 10−15F14MEAN2.96750.00060.00004.8495 × 10−280.09980.00000.9934STD3.98060.00250.00002.0796 × 10−270.29940.00000.9060In the experiment, except that IMHHO’s STD and MEAN are better than those of HHO-DE, and IMHHO’s actual execution time is much less than that of HHO-DE. Compared with HHO-DE, IMHHO’s comprehensive performance is better.Figure5 depicts the convergence diagram of the benchmark functions. Due to the limited space, the convergence diagrams of F1, F2, F6, F7, F12, and F14 benchmark functions are selected in this paper. In Figure 5, IMHHO performs better about convergence values. In terms of convergence speed, for F1 and F2, compared with IMHHO, although the convergence speed of BOA and SFO is faster, the convergence value is much worse than that of IMHHO, while IMHHO has a fast convergence speed, and the convergence value is obviously better than that of other algorithms; for F6, F7, F13, and F14, the convergence speed and value of IMHHO are the best.Figure 5
The convergence graph of benchmark functions. (a) The convergence graph of unimodal functions. (b) The convergence graph of high-dimensional multimodal functions. (c) The convergence graph of low-dimensional multimodal functions.
(a)(b)(c)


## 5.2. Ablation Experiments

IMHHO combines Tent map and EOBL for population initialization, uses the quadratic interpolation to generate new individuals, and proposes improved Gaussian disturbance method to improve and coordinate the global and local search ability.In this paper, the ablation experiments are designed to verify the effect of each improvement of IMHHO. The bench functions used in ablation experiments are the same as those in Table2. The experimental results are depicted in Table 4. As shown in Table 4, with the addition of every improvement, the MEAN and STD are better and better.Table 4
The results of ablation experiments.
HHO√√√√Tent map and EOBL√√√Quadratic interpolation√√Improved Gaussian disturbance√F1MEAN3.4255 × 10−1048.5709 × 10−1820.00000.0000STD1.3627 × 10−1030.00000.00000.0000F2MEAN3.2577 × 10−564.7572 × 10−874.9594 × 10−1050.0000STD6.7993 × 10−566.8939 × 10−879.8770 × 10−1040.0000F3MEAN4.1087 × 10−832.1805 × 10−1462.1805 × 10−2020.0000STD1.7909 × 10−824.3397 × 10−1460.00000.0000F4MEAN8.3787 × 10−542.2873 × 10−882.5664 × 10−1560.0000STD1.8989 × 10−534.5693 × 10−885.1275 × 10−1550.0000F5MEAN5.2533 × 10−55.0751 × 10−54.9891 × 10−54.9783 × 10−5STD4.4012 × 10−53.2532 × 10−52.5798 × 10−53.4536 × 10−5F6MEAN−12569.4582−12569.4569−12569.4456−12569.4448STD0.04980.04790.04750.0427F7MEAN0.00000.00000.00000.0000STD0.00000.00000.00000.0000F8MEAN−39.9999−39.9999−39.9999−39.9999STD0.00000.00000.00000.0000F9MEAN0.00000.00000.00000.0000STD0.00000.00000.00000.0000F10MEAN−1.0316−1.0316−1.0316−1.0316STD4.5405 × 10−131.8471 × 10−159.3503 × 10−163.5108 × 10−16F11MEAN0.39810.39780.39780.3978STD4.7046 × 10−71.1951 × 10−82.1316 × 10−150.0000F12MEAN−3.2444−3.2268−3.1502−3.1043STD0.05670.04750.02363.1401 × 10−16F13MEAN3.00003.00003.00003.0000STD5.7284 × 10−91.7984 × 10−121.4043 × 10−145.2471 × 10−15F14MEAN0.09980.39920.59800.9934STD0.29940.79700.48890.9060


## 5.3. Comparative Experiments of Different Algorithms

Cameraman, Lena, Baboon, and Peppers in the classical threshold segmentation data set are selected as the detection images. At the same time, in order to further verify the effect of IMHHO on image segmentation, the above experimental images are rotated and translated based on affine transformation, and the better perfect data set is obtained. The functional equation of affine transformation is as follows:(24)abcdef001xy1=x′y′1,where the matrix on the left is the transformation matrix, X and y are the original coordinates, x′ and y′ are transformed coordinates, and a,b,c,d,e,f are constraints of different base transformations. The functional equation of affine transformation of this paper is as follows:(25)cosθ−sinθtxsinθcosθty001xy1=x′y′1,where θ is the angle of counterclockwise rotation, tx is the horizontal coordinate translation, and ty is the vertical coordinate translation.Figure6 depicts the images after being rotated and translated.Figure 6
The images after being rotated and translated.The comparative algorithms are IMHHO, HHO-DE, SFO, EO, and PFA, The population size is 100, the number of iterations is 100, and each algorithm runs independently for 20 times. Peak Signal-to-Noise Ratio (PSNR) and Standard Deviation (STD) are used as experimental indicators, and the functional equations are as follows:(26)PSNR=10lg2552MSE,STD=∑i=1NIbfi−μ2NI,where NI is the number of independent executions; bfi is the best fitness value for the i execution; μ is the average value of the best fitness values; and MSE is the mean square error, and the functional equation is given as follows:(27)MSE=∑i=1m∑j=1nfi,j−gi,j2mn.Table5 depicts the experimental results based on Otsu. Compared other algorithms, IMHHO has better convergence stability and PSNR value. Only when threshold is 3 of Lena, and threshold is 3 of Baboon, the PSNR value is less than that of SFO and EO. The overall performance of IMHHO is better.Table 5
Experimental results based on Otsu.
ImageThreshold numberIMHHOHHO-DESFOEOPFAPSNRMEANSTDPSNRMEANSTDPSNRMEANSTDPSNRMEANSTDPSNRMEANSTDCameraman219.08843650.10.167618.97223649.70.394719.08663649.01.407719.06783648.80.390019.03173648.51.0510320.80023724.11.406020.18083721.92.167820.16123722.82.289520.68803721.21.454520.03963720.22.4159423.69483773.73.933520.97593772.11.081322.07263759.210.457123.56083778.21.062422.07213768.34.0947526.83703805.33.362124.99713797.63.096125.63933803.67.407125.98623802.84.789625.66443794.03.3807Cameraman-transformed220.09976099.90.013920.08816099.70.158819.92186098.90.620920.08596099.50.180919.90426099.30.2296321.66936152.49240.395121.26736147.21.710021.27466146.91.798221.26666148.50.432421.24706147.90.6152423.94186175.41.005422.40526168.63.219922.59056169.31.128423.38346171.61.423123.36896167.01.5290525.51846192.31.359024.50476188.04.497624.91526187.22.038324.23306191.030.630023.73026188.82.3408Lena220.63201963.21.024120.47201961.21.270120.47201959.91.978820.62521960.70.250220.61201961.10.2871323.91872124.53.055723.85292124.02.016424.04072125.31.222123.91872126.81.126723.72562119.214.1791425.46142185.03.056324.88382175.93.932425.44142175.211.655125.04612178.52.023825.04002177.93.9863526.24812211.73.774826.16412203.34.051926.15082202.75.841725.84822198.84.577025.76102197.55.1588Lena-transformed218.43403935.61.199318.38393932.20.584418.36773929.13.084718.43723932.70.333518.42153932.21.5516321.77374177.30.215821.34314176.51.392320.92174168.13.956421.66034176.60.362921.73984175.01.4354425.19004274.22.052524.42324272.25.991024.27784273.83.876224.88394269.84.299024.72274270.67.5703527.16594320.01.101226.35524317.11.244225.71804309.46.237425.82774310.24.896124.68204300.23.9989Baboon220.29591548.30.110220.25661546.20.354720.16151548.10.046920.26721547.60.474120.21911547.40.3930321.93921639.11.588221.62731628.42.185321.89911633.02.869221.98231632.23.554021.80271627.73.1475424.25251685.92.353323.13701683.22.921324.04431663.13.241923.21911683.54.599623.09561674.9910.7087524.95111722.51.823923.53901702.51.084324.37021710.33.311323.11051700.91.866924.69861702.49.7758Baboon-transformed219.20004507.30.158419.11264506.01.081619.13174506.01.657819.11264506.50.741119.14304506.50.9250322.05334704.81.691622.03964702.62.321421.70064698.43.726421.48034697.01.001921.97804699.14.6795423.96584759.21.161223.43624749.81.194022.95584750.81.576723.81154749.72.289822.50264748.03.8166525.58084789.21.393822.99764771.56.270624.07194782.54.000024.43934777.04.477024.84884781.11.5116Peppers219.08472868.30.206719.00782864.11.234519.09412864.11.119619.04151547.40.393019.04872865.60.2040322.10273065.10.867921.68133061.82.766621.64213057.610.292221.97573061.01.683221.263963056.15.1090425.82493149.31.329225.61633125.62.150925.62093144.65.233525.72193146.22.844622.98843119.59.4487527.12133189.21.925627.03563175.02.091226.84103181.92.706825.76333177.11.817226.83483176.94.6343Peppers-transformed219.97523935.70.228919.83713928.40.024019.90023927.80.788819.57003927.50.823219.83673927.80.7707321.96854054.41.762121.17764042.13.574521.29174037.73.210521.17664043.32.331721.72514042.31.3979425.94914099.72.027824.57064090.93.609125.00084081.53.588525.28314088.73.846824.90074089.54.9932526.96724223.42.205125.06194176.93.084325.39314118.95.173925.51284118.95.173926.09134112.47.4139Table6depicts the experimental results based on Renyi entropy. Compared with SFO, EO, and PFA, IMHHO has better experimental indicators.Table 6
Experimental results based on Renyi entropy.
ImageThreshold numberIMHHOHHO-DESFOEOPFAPSNRMEANSTDPSNRMEANSTDPSNRMEANSTDPSNRMEANSTDPSNRMEANSTDCameraman216.82884.98990.001316.48194.98760.002116.52594.95450.001616.65014.98340.003416.74584.98330.0053321.82576.35980.019721.76096.33150.037721.76846.28320.072221.75386.34300.026221.51866.29570.0500426.21617.71240.045725.49537.67260.048425.98437.61550.079326.11777.70070.062525.58577.69850.0768527.55748.88320.044026.76618.79510.046525.86168.87550.054126.05278.83880.049726.50318.76730.0705Cameraman-transformed222.97263.89430.001222.63373.86170.002022.48953.85570.014422.47263.86400.001722.39113.85370.0104325.07085.34910.019024.68925.34880.020424.95215.34060.051024.24885.35840.006623.96755.33180.0306427.30646.80450.011826.69756.76200.064226.48326.77850.017626.38526.79760.010224.63546.56010.0895528.82697.97660.039727.76627.86700.076527.56917.94830.053427.24077.95000.044426.92407.84330.1145Lena221.22285.294380.001321.22215.29190.000821.12285.29330.001421.17825.29200.002221.20255.28930.0037323.99286.56850.006023.88246.55860.004123.65586.55100.011023.74216.55110.006923.81576.55400.0076425.24837.67830.013324.84147.66810.026025.00067.65570.023524.71157.66130.013225.18647.66530.0089526.90778.76090.056526.13038.71960.082025.60088.71930.094325.63748.73030.012625.62068.69160.0605Lena-transformed217.52624.24670.002415.58874.04650.003017.39884.04410.001315.58874.04760.003215.75894.04450.0010321.82725.44510.005421.14235.34330.007521.20425.33310.008321.14815.34870.003221.32145.33460.0151423.29376.61750.007522.52676.56030.039322.86866.50870.010423.07416.57290.015723.04686.55010.0288526.08627.77810.070224.39117.74650.071222.91147.67510.036625.78327.71520.125023.51667.69050.0740Baboon220.33275.21850.000220.22515.21070.000920.22515.21070.000920.22515.21090.000520.21425.20880.0021321.59336.50820.001921.51916.49380.008321.30966.48260.016021.22036.50370.002021.56356.49080.0119422.71007.71220.005122.43367.66340.018522.17017.68260.021222.54187.70590.014823.17177.68060.0116524.24308.82680.022324.03048.77550.046223.55088.81930.038923.92048.81370.025623.17168.73620.0249Baboon-transformed218.58123.80940.000018.38123.80920.000218.44993.80670.002918.38123.80945.577418.38123.80920.0002322.97455.21040.009422.18145.18930.000522.33365.17720.013522.26285.18810.001622.40235.18550.0040423.91766.46040.006223.34776.44010.016423.60156.37240.073523.73486.46430.005123.79466.44630.0115525.12037.61230.021124.24517.60270.028024.35227.59280.032924.42637.60310.001623.86547.58640.0305Peppers220.65985.34820.002120.55315.34430.002920.63855.34720.004020.54325.34857.025020.63895.34530.0056322.49916.74500.028722.41366.69820.037822.14546.72570.064022.23126.75550.019722.41766.75850.0112425.55257.98010.030525.00107.94050.044523.27667.90300.045025.23007.97070.045824.82657.91850.0675526.73359.11530.007726.23909.04260.014626.64689.04380.058126.33259.05750.018526.51899.00190.0486Peppers-transformed218.61604.09670.004018.51684.06770.005818.45614.06710.007518.44114.05900.006418.44114.06220.0069320.02165.49390.017319.82315.46870.029219.57475.42340.022619.35075.42100.047519.84585.42250.0771425.52116.75140.011625.25596.69490.013324.90966.60410.029624.86996.68070.018124.86136.63970.0389528.30267.96000.082227.97417.91790.099727.82867.87860.133827.25987.94050.015427.75137.82860.1122The segmentation effect of IMHHO based on OTSU and Renyi entropy is shown in Figures7 and 8, respectively. As can be seen, the segmentation effect is directly proportional to the number of thresholds. With the number of thresholds increasing, the detailed processing and segmentation quality are better.Figure 7
Segmentation effect based on Otsu.Figure 8
Segmentation effect based on Renyi entropy.


## 6. Conclusion and Future Work

In order to improve the performance of HHO, this paper proposes IMHHO and applies it in multithreshold segmentation. IMHHO adopts Tent map and EOBL to initialize the population, quadratic interpolation method to reselect the dominant individuals, and the improved Gaussian disturbance to disturb optimal solution, which improves HHO’s ability in population diversity, global exploration, and local development.Experiments show that IMHHO performs better in the three kinds of benchmark functions, and its performance is ahead of most orders of magnitude; the effect of image segmentation is directly proportional to the number of thresholds; compared with other algorithms, IMHHO has obvious advantages in overall segmentation performance. Compared with HHO-DE, IMHHO’s comprehensive performance is better in benchmark functions tests and image segmentation, and IMHHO’s actual execution time is much less than that of HHO-DE. In the follow-up research work, the performance of IMHHO will be further optimized and applied to other research fields.



---

*Source: 7401040-2022-05-05.xml*