## 3 Visible-Light and Thermal Infrared Confidence Measures
### Thermal Infrared Confidence Measures  
The illumination mean and the standard deviation provide very useful information about the contrast of an image in the thermal infrared spectrum. Since infrared sensors are designed to distinguish humans from the background, supposing that they usually appear warmer, this information is key to establishing the sensors' reliability in environmental conditions that satisfy this condition, _i.e._, in sequences where the human's temperature is higher than the environment's.  
Let us define the contrast \(\upsilon_{IR}\) as the coefficient between the average grey level value \(\overline{I_{IR}}\) of infrared image \(I_{IR}\) and its standard deviation \(\sigma_{I_{IR}}\), just as shown in Equation (2).  
\[\upsilon_{IR}=\frac{\overline{I_{IR}}}{\sigma_{I_{IR}}} \tag{2}\]  
An image with a high grey level mean and a low standard deviation denotes that a large number of pixels have similar values, making humans hard to distinguish from the background. An example of a frame with these features is shown in Figure 3a (with the equivalent visible-light frame shown in Figure 2b). On the other hand, an image with a great standard deviation and a low mean value has a small number of pixels with high grey level values and the rest of them with low values. The high value pixels usually correspond to humans. An example of a frame with this situation is shown in Figure 3c. The intermediate case where humans are distinguished from the background not as clearly as in the previous situation can be appreciated in Figure 3b.  
As mentioned before, we are in front of two possibilities when considering the confidence intervals in the thermal infrared spectrum. Firstly, we consider the case when the confidenc  
Figure 3: Different confidence values for the thermal infrared spectrum. (**a**) Thermal infrared image with a low confidence value; (**b**) thermal infrared image with a medium confidence value; (**c**) thermal infrared image with a high confidence value.  
spectrum is \(HIGH\). Here, the equation for establishing the reliability of the frames in the infrared spectrum (denoted as \(C_{IR}\)) is shown in Equation (3), where thresholds \(\zeta_{IRH}\) and \(\zeta_{IRL}\) are experimentally established, since they are dependent on the particular heat distribution of the test scenario.  
\[C_{IR}=\left\{\begin{array}{ll}\text{HIGH},&\text{if }(C_{V}=HIGH\text{ AND }\upsilon_{IR}<\zeta_{IRL})\\ \\ \text{MEDIUM},&\text{if }(C_{V}=HIGH\text{ AND }\zeta_{IRL}<\upsilon_{IR}<\zeta_{IRH})\\ \\ \text{LOW},&\text{if }(C_{V}=HIGH\text{ AND }\upsilon_{IR}>\zeta_{IRH})\end{array}\right. \tag{3}\]  
As previously mentioned, the thermal infrared confidence measures take on great importance when the confidence value in the visible-light spectrum is \(LOW\). An example of this situation is seen in Figure 2a for the visible-light camera and in Figure 3b for the infrared camera, where it can be appreciated that the human is still hard to distinguish, but more easily than in the visible spectrum. Thus, the thermal infrared confidence values at night (and also under bad atmospheric conditions) are restricted to \(MEDIUM\) and \(HIGH\), with a new threshold \(\zeta_{IRN}\) used to separate both values, as shown in Equation (4).  
\[C_{IR}=\left\{\begin{array}{ll}\text{HIGH},&\text{if }(C_{V}=LOW\text{ AND }\upsilon_{IR}<\zeta_{IRN})\\ \\ \text{MEDIUM},&\text{if }(C_{V}=LOW\text{ AND }\upsilon_{IR}>\zeta_{IRN})\end{array}\right. \tag{4}\]