## 2 Proposed Method
### Determining the Threshold Value for Image Segmentation  
The thermal abnormalities in the infrared image differentiate the foreground objects from the background of the image. In general, the high-temperature regions are correlated to the foreground object and therefore the pixels belonging to the high-intensity values represent the foreground objects in the infrared imaging [38]. In the proposed method, the threshold value that separates the objects from the background can be obtained from the second part of the histogram and the threshold value is defined based on the entropy value \(H\). The expression of the histogram based on the entropy is defined as  
\[h_{i=T}=h_{T}=(H/100)\times h_{m} \tag{12}\]  
Figure 2: (**a**) Original image; (**b**) the approximated part and original part for the first part of the original histogram; and (**c**) the approximated part and original part for the second part of the original histogram.  
By substituting Equation (12) in Equation (10), the modified expression is:  
\[h_{T}=h_{L-1}+(h_{m}-h_{L-1})e^{-(T-i_{m})/\tau} \tag{13}\]  
Simplifying Equation (13) further to get the expression for the threshold:  
\[h_{T}-h_{L-1}=(h_{m}-h_{L-1})e^{-(T-i_{m})/\tau} \tag{14}\]  
\[\frac{h_{m}-h_{L-1}}{h_{T}-h_{L-1}}=e^{(T-i_{m})/\tau} \tag{15}\]  
Applying the natural logarithm on both sides, the modified expression is:  
\[\ln\left(\frac{h_{m}-h_{L-1}}{h_{T}-h_{L-1}}\right)=\frac{(T-i_{m})}{\tau} \tag{16}\]  
\[T-i_{m}=\tau\ln\left(\frac{h_{m}-h_{L-1}}{h_{T}-h_{L-1}}\right) \tag{17}\]  
\[T=\ i_{m}+\tau\ln\left(\frac{h_{m}-h_{L-1}}{h_{T}-h_{L-1}}\right) \tag{18}\]  
The vertical line in Figure 3 indicates the intensity threshold value obtained from the proposed method for the infrared image shown in Figure 2b.  
The time-constant \(\tau\) is determined based on the concept of finding the approximate time taken by a linear first-order circuit to reach its steady-state. The approximate time taken by the first-order linear circuit to reach its steady-state is \(5\ \tau\)[36]. The procedure for finding the time-constant value is described in Figure 3. By applying this concept to the second part of the approximated histogram, we get:  
\[5\tau=(L-1)-i_{m} \tag{19}\]  
Simplifying further, the expression of \(\tau\) is:  
\[\tau=\frac{(L-1)-i_{m}}{5} \tag{20}\]  
In intensity thresholding, the gray-level is compared with a threshold value and based on the comparison, the grayscale image is converted into a binary image [39]. Equation (18) gives the  
Figure 3: Finding value for \(\tau\).  
expression of the threshold value for the image segmentation. Based on the threshold value, the image can be converted into a binary image as  
\[B(x,y)=\left\{\begin{array}{ll}0,&f(x,y)<T\\ 1,&f(x,y)\geq T\end{array}\right. \tag{21}\]  
where, \(f\left(x,y\right)\leq T\) represents the background and \(f(x,y)>T\) represents the foreground of the image for an image containing light objects on a dark background.  
The natural logarithmic function is defined only for positive values. In the proposed method, the natural logarithmic function defining the threshold value is not valid for the following two cases.  
Case 1:  
The natural logarithmic function is not defined in the proposed method for defining the threshold value when \(h_{m}-h_{L-1}\leq 0\) or \(h_{m}\leq h_{L-1}\). In this condition, the value for \(h_{L-1}\) of the approximated histogram is defined as  
\[h_{L-1}=0 \tag{22}\]  
Case 2:  
The second case in which the natural logarithmic function defining the threshold value is not valid, when \(h_{T}-h_{L-1}\leq 0\). In this condition, the expression of the threshold value is given as  
\[T=L-2 \tag{23}\]  
The proposed algorithm to find the threshold value for the infrared image segmentation can be explained through the flow chart as shown in Figure 4.  
Figure 4: Flowchart of the proposed method to find the threshold value.