## 3 EIT Region of Interest Image Segmentation Methods  
### Maximum Entropy Threshold Image Segmentation Method  
In EIT image reconstruction, there is often no clear boundary between the region of interest and the background. In order to accurately identify the lung region in the reconstructed EIT image, image segmentation techniques have been introduced in this study. The purpose is to determine the position of the lung in the reconstructed image and obtain an easily identifiable lung area image. Taking the maximum entropy thresholding image segmentation as an example, it is a type of threshold-based segmentation method that can partition an image into multiple subregions with similar properties. It has been widely applied in image analysis and object recognition [27]. The maximum entropy thresholding method divides the image into regions of interest and background, where the threshold that maximizes the sum of the target entropy and background entropy is considered the optimal segmentation threshold. The conventional method of thresholding using one-dimensional grayscale histograms does not consider spatial information of the image and is susceptible to noise interference [28]. In this paper, the two-dimensional maximum entropy thresholding method considering both the pixel grayscale value and its neighborhood average grayscale value is used as an example. For an image of size \(N\times M\) and grayscale levels \(L\), the probability expression for the image's binary tuple \((i,j)\) is as follows:  
\[p_{i,j}=\frac{n_{i,j}}{N\times M} \tag{13}\]  
In the above equation, \(0\leq i,j\leq L-1\), \(n_{i,j}\) represents the number of pixels in the image with grayscale value \(i\) and local neighborhood average grayscale value \(j\). The two-dimensional grayscale histogram is illustrated in Figure 2.  
In Figure 2, regions \(A\) and \(B\) represent the target and background, while regions \(C\) and \(D\) represent the boundaries and noise. \(s\) represents the pixel's grayscale value, and \(t\) represents the local neighborhood mean value of the pixel. The segmentation threshold vector is denoted as (\(s\), \(t\)). By using the threshold vector, we can calculate the two-dimensional entropy for regions \(A\) and \(B\). The calculation expression for the two-dimensional entropy \(H(A)\) of region \(A\) is as follows:  
\[ \begin{array}{rl}H(A)&=-\underset{i=0}{\overset{s-1t-1}{\sum}}\underset{j=0 }{\overset{p_{ij}}{P_{A}}}lg\underset{P_{A}}{\overset{p_{ij}}{P_{A}}}\\ &=\frac{1}{P_{A}}lg\underset{A}{\overset{s-1t-1}{\sum}}\underset{j=0}{\overset {p_{ij}}{\sum}}p_{ij}-\frac{1}{P_{A}}\underset{i=0}{\overset{s-1t-1}{\sum}} \underset{j=0}{\overset{p_{ij}}{\sum}}p_{ij}\\ &=lg(P_{A})+H_{A}/P_{A}\end{array}  \tag{14}\]  
Similarly, we can obtain the calculation expression for the two-dimensional entropy \(H(B)\) of region \(B\) as follows:  
\[H(B)=lg(P_{B})+H_{B}/P_{B} \tag{15}\]  
Figure 2: Two-dimensional histogram plane. (\(A\): Target region \(B\): Background region C: Boundary region \(D\): Noise region). Therefore, this paper proposes a soft-threshold region segmentation algorithm with a relaxation factor. This method divides the original reconstructed image g into three parts: the inner region \(q_{1}\), the edge region \(q_{2}\), and the background region \(q_{3}\). The inner region and the edge region belong to the ROIs. Moreover, in order to preserve the potential edge information at the boundary between the region of interest and the background in the reconstructed EIT image g, the initial image to be segmented is normalized. On this basis, a relaxation factor \(\beta\) is introduced along with the fixed segmentation threshold \(T_{\text{EIT}}\), resulting in the soft-threshold region segmentation expression specifically for lung EIT tomography as follows:  
\[g(i)^{*}=\left\{ \begin{array}{ll}\sum\limits_{i\in q_{1}}^{i}T_{\text{EIT}}&g (i)\in[0,T_{\text{EIT}}-\beta]\\ g(i)&g(i)\in[T_{\text{EIT}}-\beta,T_{\text{EIT}}+\beta]\\ \sum\limits_{i\in q_{3}}^{i}T_{\text{EIT}}&g(i)\in[T_{\text{EIT}}+\beta,1]\\ \end{array}