*3.1. The IR Sensors and Data Acquisition*

TIRNet stations were equipped with FLIR System, Inc. IR cameras, which acquire IR frames in the 7.5–13 μm waveband. The IR sensor installed at Campi Flegrei caldera is the FLIR SC655 and at Vesuvius is the FLIR A40 M, both with a focal plane array (FPA) uncooled microbolometer detector, of which the resolution was, respectively, 640 × 480 and 320 × 240 pixels. Accuracy was ±2 ◦C (SC655 and A40 M) and thermal sensitivity at 50/60 Hz was **<**30 mK (SC655) and 80 mK @ +25◦C (A40 M). All IR cameras were set to a −40◦ to 120 ◦C temperature range. The optics used depended both on the distance sensor-target and type of IR camera and varied from 24.6 mm (FoV 25◦ × 19◦) of SC655 camera to 36 mm (FoV 24◦ × 23.4◦) of A40 M camera. The technical specifications of FLIR cameras and the features of target areas are reported in Table 1.

The IR stations acquired three IR frames of the target area every day at night-time. As solar heating can drastically decrease the thermal contrast between fumarole anomaly and the heated surrounding rocks [33] and references therein], the acquisitions of TIR frames were carried out at night (00:00, 02:00, 04:00 AM) in order to minimize diurnal heating effects.

After IR frames acquisition, WiFi radio or UMTS (Universal Mobile Telecommunications Service) modem transmits TIR data to the INGV-Osservatorio Vesuviano server of TIRNet in order to process them and to display the results in the surveillance room.


**Table 1.** Technical specifications of remote stations, FLIR infrared cameras and target areas details.

As temperature values of TIR scenes are influenced by the atmospheric conditions (e.g., air temperature and humidity; [10]) and by the emissivity of target area, atmospheric correction was necessary. A probe of the IR station detected the values of air temperature and humidity and these values were transferred to the FLIR camera, which then applied the internal algorithm (LOWTRAN; [33]). This algorithm performed the atmospheric correction to the acquired IR frame in function of detector-target distance, emissivity of the target, air temperature and air relative humidity. The emissivity of the volcanic terrains (thermally altered pyroclasts), which characterize the target areas, was assumed to be 0.9 [34]).

The accuracy of the temperature measurements also depended on the orientation of the field of view, which should be as parallel as possible to the target. Generally, despite the calibration and correction of camera parameters, the detected IR temperatures were underestimated due to extrinsic field conditions mainly influenced by the presence of condensed water in fumarole gases which can partially hide the hot areas [14,35,36]. Therefore, the measured IR temperatures are to be considered apparent temperatures values that can differ from the real surface temperatures of the target area [1,37].

The resolution of FLIR cameras and the small distances between sensors and target areas allowed to detect correctly small thermal anomalies, and moreover, to minimize the attenuation of radiated energy of those non-homogeneous pixels which integrate both hot and cold areas [33]. In addition, the limitations in the calculation of real temperature were deemed not critical when the purpose was to investigate relative spatio-temporal variations of surface temperature field in volcanic areas [38].

#### *3.2. Data Processing Procedures*

The IR frames acquired by TIRNet stations were processed according to a multi-step procedure consisting of five main steps (Figure 2). The entire process is accomplished by the fully automated Matlab© software ASIRA (Natick, MA, USA), which was developed starting from the initial structure described by [19] and then by [20]. A detailed explanation of operative procedures is described in the following paragraphs. In the Appendix A, synthetic technical sheets of Matlab© code are reported.

**Figure 2.** Block diagram of IR images processing steps. 3D: three-dimensional.

3.2.1. Step 1—IR Files Conversion, Archiving and Image Quality Selection

The FLIR IR raw files (radiometric JPEG), transmitted by remote TIRNet stations to the acquisition server, were imported in the Matlab© environment, then saved in appropriate storage folders both as a single CSV file and in a Matlab© three-dimensional (3D) matrix (Matlab© function: 'step01.m'). Occasionally, the presence of wide blurred areas, due to the condensation of water vapor from the fumaroles plume and the occurrence of heavy rain, caused the homogenization of the IR temperatures [18–20] and generated low quality IR frames. With the aim of removing low quality data, only the IR scenes that satisfied the following condition were selected:

$$\mathfrak{a}\mathbb{F}\_i > \mathfrak{m}\mathfrak{a} - \mathfrak{c} \* \mathfrak{o}\mathbb{F}\_{\mathfrak{a}} \tag{1}$$

where σFi is the Standard Deviation (SD) of the i-th IR frame, mσ is the median of SD values of all IR frames of the station time-series, σF<sup>σ</sup> is the Standard Deviation of all Standard Deviations of IR frames of the station time-series, and c is a user-defined coefficient depending on the statistical distribution of data (Matlab© function: 'step01.m'). We found c=1a suitable value to obtain a homogeneous data set by excluding very low-quality images.

This step converted input data (FLIR radiometric JPEG, CSV or TXT IR matrix) into Matlab© 3D arrays [resY, resX, n], where (resY, resX) is the image resolution and n is the number of IR collected frames.

#### 3.2.2. Step 2—IR Frames Co-registration

The accurate alignment of all the IR frames related to a station time-series was necessary to proceed to further analysis. Since the IR framed area can vary in time, due to ground movements affecting volcanic areas or simply to maintenance services, a correction of IR frames position in respect of a reference IR frame was carried out (co-registration). This correction performed the alignment of the same pixels, of all IR frames belonging to the same station, by using the flow-based, image registration Matlab© algorithm, SIFT flow [39]. The SIFT flow algorithm matches pixel-to-pixel correspondences between two images and it is able to find dense scene correspondence despite substantial differences in spatial arrangement of compared images (Matlab© function: 'step02.m').

### 3.2.3. Step 3—Seasonal Component Removal

A simple plot of the time-series of temperature values evidenced a typical recurring pattern due to the seasonal influence over the surface temperatures (background raw maximum temperature plot in Figure 3). The temperature time-series of raw IR frames were representative of both exogenous (e.g., seasonal) and endogenous (thermal anomaly) components. Therefore, in order to highlight the possible spatio-temporal variation of thermal anomalies, it was necessary to remove the seasonal component in the raw temperature time-series (de-seasoned time-series).

**Figure 3.** Processing scheme of background removal procedure (BKGr).

Different methods to remove seasonal component in time-series were previously tested to TIRNet data [18–20] and two methods demonstrated to be effective to perform seasonal adjustment: the background removal (BKGr) and the STL decomposition (STLd, Seasonal-Trend decomposition based on Loess) [40]. The effectiveness of these two different methodologies depends on the time-length of the dataset. BKGr is applied on time-series shorter than two years that cannot be processed by STLd as it requires several-years-long time-series. The BKGr removes the seasonality only to maximum and average temperatures of IR time-series and does not perform the seasonal adjustment to all the pixels of IR frame. Diversely, STLd can remove the seasonal component to all the pixels of IR frame, allowing to perform deeper analysis to the IR dataset.

The Background Removal Procedure (BKGr)

The BKGr procedure [18–20] consisted of the removal of background temperature time-series to raw IR frames time-series. Background temperatures were detected in a background area of the IR scene not influenced by thermal anomaly. The procedure was based on the evidence that a linear correspondence is between maximum (or mean) temperature of background area (*TmaxBKG*) and maximum (or mean) temperature of IR scene (TmaxSc), as previously reported by [19,20] and illustrated in Figure 3 (TmaxSc vs TmaxBKG plot). This correspondence allows the application of the following equation:

$$dTn = T\_{\max} \mathcal{S}c(n) - T\_{fit}(n) \tag{2}$$

were *dT*(*n*) is the residual de-seasoned temperature value, *TmaxSc*(*n*) is the maximum temperature of the n IR scene and *Tfit*(*n*) is the value of *TmaxSc*(*n*) in correspondence of *TmaxBKG*(*n*) according to the linear fitting equation of the two variables (Figure 3; Matlab© function: 'step03.m').

The accurate selection of the background area (BKG) was crucial as it strongly influenced the efficiency of this procedure. BKG had to be outside the region of the IR frame affected by thermal anomaly and also characterized by similar lithology of the anomaly area, without vegetation and any kind of anthropic object. An efficient way to test the quality of the chosen BKG was to perform a linear regression to time-series of average temperature values of BKG. A suitable BKG must have the slope of the linear regression equation near to zero (Figure 4a).

**Figure 4.** (**a**) Time-series of average temperature values of Pisciarelli background area (grey color) and linear regression fit (blue color); (**b**) the results of the background removal procedure applied to Pisciarelli station: RAW maximum temperature of IR scene (grey color) and residual temperature value dT (blue color).

The main advantage of BKGr method was the possibility to apply seasonal correction to short temperature time-series; nevertheless, the results are expressed in terms of temperature residuals and not as absolute temperatures (Figure 4b).
