## 2 Materials and Methods
### Fire Prevention and Fire Detection
#### 2.2.5 Temperature Anomaly Detection  
When it comes to fire prevention by determining potential temperature anomalies, an infrared thermal camera is used. Infrared thermal imaging is the best way to capture the temperature-range characteristic of the Earth's electromagnetic spectrum. Figure 13 clearly shows the maximum of the visible part of the spectrum and the detection range of the infrared thermal imager. When objects were heated to a temperature higher than 525 \({}^{\circ}\)C, in addition to thermal radiation, the emission of light detected by a classical camera began to appear. However, the fire situation had progressed already.  
Figure 12: FireSense image-annotation tool interface.  
Figure 13: Radiation of the sun and earth by wavelengths.  
As mentioned earlier, FireBot will be equipped with an infrared thermal-imaging camera that will provide complete spatial radiometric data of the observed scene to detect the potential development of a fire in time before it manifests visually. A thermal-imaging camera does not measure temperature but registers radiation in the infrared part of the spectrum, as shown in Figure 14. Depending on the recording parameters set, the most important of which are the emissivity of the object, the amount of radiation reflected from the surroundings, and, at greater distances, the transmission of the atmosphere, accurate radiometric data can be obtained.  
The intensity of infrared radiation from the surface of the observed scene is measured by the camera's sensor and interpreted as the temperature of every pixel of a thermogram. The thermogram is used to better understand the scene and the potential temperature anomaly when inspecting visually, whereas the radiometric data are required for developing an efficient algorithm for automatic anomaly detection. If an infrared thermal camera without full spatial radiometric data is used, radiometric data can be accurately estimated from a thermogram and detected temperature boundaries, as described in [40]. The idea for anomaly detection is as follows: FireBot will have a predefined route for patrolling, during which it will actively search for a fire using a visual camera. On that route, it will have predefined points of interest that present a potential danger or contain some expensive equipment that needs to be monitored regularly--for example, computers, electric machines, electrical cabinets, server racks, etc. Every time FireBot comes to a certain point of interest, it will take an image of that scene; detect the hotspots; calculate the area of each hotspot, average temperature, and maximum temperature of every hotspot; and compare that data to the data gathered from all previous passes. If the detected temperatures are increased in comparison to the previous states, the number of hotspots is increased, or the area of a hotspot is increased beyond the predetermined threshold, it will be a trigger for an alarm, and an automatic warning message will be sent to the supervisor along with the location of that point of interest. At that moment, a remote supervisor can take control of FireBot and visually inspect that point by using an infrared thermal camera. If a more detailed inspection is required, a remote user can easily adjust the temperature scale or color map of a thermogram to better understand the scene, as described in [40], and call maintenance service if required. An example of anomaly detection is presented in Figure 15, and the flowchart of the temperature anomaly-detection algorithm is presented in Figure 16.  
Figure 14: Components of radiation detected by the infrared thermal camera.