# [PERSON]'s Entropy Based Multilevel Thresholding Using a Novel Meta-Heuristics Algorithm
## 3 Proposed Method
### Idea of the Algorithm  
The key idea of employing HRO to deal with multi-threshold is mapping of problem solutions. The objective functions of image segmentation used in the paper are Renyi's entropy. The real-coded HRO is used to quickly obtain the optimal solution of multiple thresholds. A seed in the HRO  
Figure 1: Breeding mechanism of three-line Chinese hybrid rice. represents a solution of the problem. The dimension of the gene in the seed is equal to the dimension space of the problem to be solved. For example, if the number of thresholds to be solved is 2, the spatial dimension of the problem is 2, the dimension of gene is 2. The optimal threshold could be obtained by maximizing the value of the objective function. Among them, since hybrid rice is divided into three lines, it is recommended that the population is a multiple of 3, for example, 30, 45, 60. Definition: The population of rice is N, the proportion of the maintainer line and the sterile line in the population is a%, and the number is A = N x a/100. Then the proportion of the restorer line in the population is (100-2a)%. The number of maintainer lines, sterile lines, and restorer lines is A, A, and N-2A (the number of individuals in the three lines is generally N/3). The dimension of each individual gene is D, the value of D is the number of thresholds, in the paper \(D=\{2,4,6,8\}\). \(X_{i}^{t}\) indicates the gene of the i-th individual in the group at the t-th breeding, \(X_{i}^{t}=\left(X_{i}^{1},X_{i}^{2},X_{i}^{3},\ldots,X_{i}^{D-1},X_{i}^{D}\right)\). When t = 0, randomly generate N solutions in the solution space: \(x_{i}^{0}=\left\{x_{1}^{0},x_{2}^{0},\ldots,x_{N-1}^{0},x_{N}^{0}\right\}\). The specific generation formula is done by Equation (13). \[x_{i}^{j}=\min x^{j}+\text{rand}(0,1)\Big{(}\max x^{j}-\min x^{j}\Big{)} \tag{13}\]  
where \(j\in\{1,2,3,\ldots,D\}\), \(\max x^{j}\) and \(min\ x^{j}\) represent the maximum and minimum values of the j-th component of the search space, respectively, the problem solved in the paper is the optimal threshold, so the maximum value is 255 and the minimum value is 0. The fitness value of each individual in the population is calculated and the current optimal value is recorded. The fitness function in HRO is the formula of Renyi's entropy introduced in the second part of the paper. The rice population is ranked according to the fitness value from superior to inferior. The top A individuals are taken as maintenance lines, the bottom A individuals are sterile lines, and the remaining N-2A individuals are restorer lines. Hybridization: Select one of the following hybridization methods as the hybridization method of the entire algorithm. Random hybridization:  
\[x_{si}^{j}(t+1)=\frac{r_{1}\cdot x_{ma}^{j}(t)+r_{2}\cdot x_{sb}^{j}(t)}{r_{1} +r_{2}} \tag{14}\]  
\(x_{si}^{j}(t+1)\) represents is the j-th gene in the gene sequence of the i-th rice seed in the sterile line, \(r_{1},r_{2}\) is a random number between \(-1\) and \(1\), and \(r_{1}+r_{2}\
eq 0\), in the paper, the threshold value solved by HRO is only positive integer, so \(r_{1},r_{2}\) is a random number between \(-0.5\) and \(1.5\), a, b are randomly taken from \(\{1,2,3\ldots,\text{m}\}\), \(x_{ma}^{j}\) is the a-th individual in the maintaining lines, and \(x_{sb}^{j}\) is the b-th individual in the sterile lines. Each dimension of the newly generated individual gene sequence is calculated by Equation (14) from rice seed of randomly selected male sterile lines and maintainers. Corresponding hybridization:  
\[x_{si}^{j}(t+1)=\frac{r_{1}\cdot x_{mc}^{j}(t)+r_{2}\cdot x_{sc}^{j}(t)}{r_{1} +r_{2}} \tag{15}\]  
\(x_{mc}^{j}(t)\)and \(x_{sc}^{j}(t)\) represent the j-th gene in the c-th seed gene sequence of maintainer line and sterile line. The new individuals are randomly obtained from the c-th rice seed of the sterile line and the c-th rice seed of the maintainer line in a certain proportion.