# An Examination of Thermal Features' Relevance in the Task of Battery-Fault Detection
## 2 Experiment Design
### Thermal Image Processing  
Relevant features from the thermal image need to be extracted in order to detect the battery overheat. The thermal image is a color image of pixels the values of which belong to RGB color space representing the temperature. Its exact level is based on a given scale defined by the camera adjustment (the scale is located on the right side of the thermal image in Figure 4 (left)). It may be seen that the scale consists of many color shades, and, unfortunately, the exact transform from the pixel color to the temperature level is not straightforward. The manufacturer provides an additional feature for temperature level estimation. Because our motivation is to keep the costs of the final device minimal, we attempted to develop our own temperature level estimation, which, for the sake of simplicity, was based on the assumption that the relation between pixel color and its temperature level is linear. On the other hand, this experiment does not require exactly precise estimations of the temperature levels and the slightly incorrect estimations will still expose the differences among the battery cells, which is still considered as relevant. In recent years, several types of feature extraction approaches have been developed for thermal image processing in various fields of applications. The field of fault detection on electrical installation involved the maximum temperature difference between a hot spot and another point in its neighborhood [8]. Similarly, the combination of the spot temperature with the temperature difference of two similar components and the maximum admissible temperature of the component was used in [9; 10], the difference of the maximum and the minimum temperatures in the object, and the surrounding area, respectively, was designed. In [11], the authors used statistical features computed making use the pixel intensities of the image regions. The considered features were the  
Figure 4: The input thermal image in RGB space (**left**); the image transformed to the temperature space (**center**); and the the image with highlighted areas of batteries (green), battery segments (red), and battery surroundings (white) (**right**). Figure 3: Voltage distribution in battery set during constant voltage charging. (**a**) represents the battery set without any damaged battery-voltage levels are equally distributed, while in (**b**) the battery set contains one damaged battery where the voltage level is increased. maximum, minimum, mean and the standard deviation of intensity level. The authors in [12] compared several features that can be extracted from thermal images, such as maximum region temperature, average region temperature, relative temperature difference between target and surrounding regions, or combinations of these features. The combination of those features was mostly considered the most relevant according to the presented results. The transformation of a color-valued image matrix into a thermal-valued matrix assigns the temperature of the closest scale pixel to each transfered image pixel. The scale maximal (\(T_{max}\)) and minimal (\(T_{min}\)) temperatures are defined in the image (see Figure 4) and serve as the boundaries of normalization. The scale pixel values form an upwardly ordered vector \(P^{s}=(p_{0}^{s},p_{1}^{s},p_{2}^{s},\cdots,p_{n}^{s})\) where \(n+1\) is the count of scale lines and their temperatures are estimated simply as \(T(p_{k}^{s})=T_{min}+k(T_{max}-T_{min})/n\). Consequently, each \(i\)-th image pixel \(p_{i}\) obtains a temperature value of the most similar scale pixel \(p_{k}^{s}\) as \(T(p_{i})=T(p_{k}^{s})\) where the maximum similarity is considered the minimum distance \(d\) between two color-valued pixels, i.e. \(d=\min(|p_{j}^{s}-p_{i}|);j\in\{0,1,\cdots,n\}\). Inspired by the approaches mentioned above, we built our feature extraction aggregating the thermal image data.