## 2 Interval Iterative Otsu Method Based on Region Growing
### Interval Iterative Otsu Method Based on Region Growing
#### 2.2.1 The First Stage  
In the first stage, the area with the smallest information entropy, \(H(i)\), is selected as the main area, which is merged with its adjacent areas. As shown in Figure 1b, the red area is the main area. The yellow areas are to merge into the red one, and the green areas are unselected.  
The maximum inter-class variance \(W\) of the main area and the area to be merged with are computed separately, and we will select the area with smaller \(W\) for merging. The amount of information \(D_{k}\) is taken as the information entropy of the new area, and it will participate in the next main area selection. The calculation of the amount of information \(D_{k}\) as follows:  
\[\omega_{k}=\sum_{i=t_{k}+1}^{t_{k+1}}P_{i}\qquad\mu_{k}=\sum_{i=t_{k}+1}^{t_{k +1}}\frac{iP_{i}}{\omega_{k}}\qquad\sigma_{k}^{2}=\sum_{i=t_{k}+1}^{t_{k+1}} \frac{(i-\mu_{k})^{2}P_{i}}{\omega_{k}}\qquad D_{k}=\omega_{k}\sigma_{k}^{2} \tag{5}\]  
Figure 1: The grayscale histogram of the original image and the process of region growing. (**a**) Image grayscale histogram, (**b**) area selection for first region growing, (**c**) results of the first area growth and selection of the main area for the second region growing, and (**d**) the second region growing results and main area selection for the next.  
where \(P_{l}\) is probability of the gray level \(i\), \(\omega_{k}\) is the probability of each area, \(\mu_{k}\) is the average gray level of each area, \(t_{k}\) is the threshold, and \(\sigma_{k}^{2}\) is the variance of each area. The definition of the maximum inter-class variance \(W\) as follows:  
\[\left\{\begin{array}{c}P_{0}=\sum\limits_{i=k}^{n}P(i)\\ P_{1}=\sum\limits_{i=m}^{n}p(i)\;m<n\end{array}\right\}\left\{\begin{array}{c} u_{0}=\sum\limits_{i=k}^{n}i\times p(i)\\ u_{1}=\sum\limits_{i=m}^{n}i\times p(i)\;m<n\end{array}\right\}\left\{\begin{array} []{c}u=P_{0}\times u_{0}+P_{1}\times u_{1}\\ W=P_{0}\times(u_{0}-u)^{2}+P_{1}\times(u_{1}-u)^{2}\end{array}\right. \tag{6}\]  
where \(p(i)\) is the probability of gray level \(i\), \(u\) is the average value of the area, and \(W\) is the maximum inter-class variance of the new area.  
We take Figure 1c,d as an example to illustrate the process of region growing in the first stage. In Figure 1c, it can be seen that the main area selected for the first time is merged with the area on the right to form a new area. Then, the area with the smallest information entropy \(H(i)\) is selected as the main area, which is marked in red. Its two adjacent areas are marked in yellow. The results of the last region growing are shown in Figure 1d. The newly generated area is selected as the main area. The area adjacent to the main area is selected as the area to be merged with. If the main area is an edge area, that is, the main area has only one adjacent area, then it is directly merged with the adjacent area without calculating \(W\).  
The above operations are repeated. The number of thresholds gradually decreases with region growing, and region growing will stop until it meets our pre-set threshold number. The final thresholds obtained by region growing are shown in Figure 2.