Processing Thermal Infrared Imagery Time-Series from Volcano Permanent Ground-Based Monitoring Network . Latest Methodological Improvements to Characterize Surface Temperatures Behavior of Thermal Anomaly Areas

In this technical paper, the state-of-art of automated procedures to process thermal infrared (TIR) scenes acquired by a permanent ground-based surveillance system, is discussed. TIR scenes regard diffuse degassing areas at Campi Flegrei and Vesuvio in the Neapolitan volcanic district (Italy). The processing system was developed in-house by using the flexible and fast processing Matlab© environment. The multi-step procedure, starting from raw infrared (IR) frames, generates a final product consisting mainly of de-seasoned temperatures and heat fluxes time-series as well as maps of yearly rates of temperature change of the IR frames. Accurate descriptions of all operational phases and of the procedures of analysis are illustrated; a Matlab© code (Natick, MA, USA) is provided as supplementary material. This product is ordinarily addressed to study volcanic dynamics and improve the forecasting of the volcanic activity. Nevertheless, it can be a useful tool to investigate the surface temperature field of any areas subjected to thermal anomalies, both of natural and anthropic origin.


Introduction
Thermal infrared (TIR) ground-based observations are largely used in volcanology, both in research and in surveillance activities, to investigate volcanic plumes and gases, lava flows, lava lakes and fumarole fields [1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17].Generally, the observations were made during a limited time span such as eruption phases or field campaigns with temporarily installed TIR stations or handheld cameras.In the last years the number of surveillance and research activities aimed to undertake TIR continuous observations of volcanic areas have increased [12][13][14][15][16][17][18][19][20].Improvements in monitoring tools and analysis techniques of long TIR time-series of infrared (IR) scenes of volcanic areas are becoming matter of great interest since they give the opportunity to track changes of surface thermal anomalies that may reveal a renewal of eruptive activity.Several works identified thermal precursors before eruptions by using TIR observations [21][22][23][24] and these insightful results, also provided by field campaigns, have suggested planning permanent fixed installations of ground TIR stations at active volcanoes in the world.
At present time, few commercial software packages, based on general-purpose procedures, are available to process TIR time-series and they are not aimed for a near real-time automated analysis of large dataset.Generally, they involve manual processing steps and cannot be used in daily continuous automated volcano monitoring activity.Recently, [20] introduced automated analysis techniques of long TIR time-series of images acquired inside the Campi Flegrei volcanic area and previously [19] discussed about analysis techniques applied to TIR scenes inside the Vesuvius crater.The studied zones of these works are diffuse degassing areas of quiescent volcanoes characterized by low temperatures of released gas fluxes.
In this work, recent developments of processing methodologies of several-years long TIR time-series of volcanic areas from a permanent surveillance network are discussed in detail.Additionally, the automation of the processes is discussed.Step-by step descriptions of all operational phases and of the theoretical basis are reported in order to provide a clear explanation of the applied procedures.The main final results are trends of temperatures, heat fluxes and yearly rate of temperature change of the studied areas.In particular, a detailed study with a focus on seasonal component removal and on pixel alignment of IR frames (co-registration) was carried out.The code of fully-automated Matlab© application (ASIRA, Automated System of InfraRed Analysis) used to process the IR data is provided as Supplementary Materials.

The Study Areas
The TIR frames time-series, used to develop and test the methodologies described in this work, were acquired by stations of TIRNet (Thermel InfraRed Network), a surveillance network operated by the Osservatorio Vesuviano, section of National Institute of Geophysics and Volcanology (INGV), consisting of six permanent ground stations installed at Campi Flegrei caldera and Vesuvius crater (Figure 1).Campi Flegrei (CF) is an active volcanic field including part of the city of Napoli (Italy).Nowadays, although quiescent and the last eruption occurred in 1538 (Monte Nuovo; [25]), the CF area is affected by significant ground deformation (Bradyseism), low to moderate seismic activity, hot fumaroles fields and diffuse degassing zones.The target areas acquired by TIR cameras in the Solfatara crater and its surroundings are shown in (Figure 1a).The monitored area represents the main surface expression of the CF caldera hydrothermal system with gases emissions originated by interaction between fluids of magmatic and meteoric origin [26][27][28].The Somma-Vesuvius volcanic complex, located east of the city of Naples, is one of most dangerous volcanoes in the world and the latest eruption occurred on 1944 [29].The recent dynamic of the Vesuvius is characterized by low-level shallow seismicity and by low temperature fumarolic activity mainly concentrated in the crater area [30][31][32].TIR scenes are from low-temperatures surface thermal anomaly on the western inner slope of the Vesuvius crater (Figure 1b).

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.

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     ) 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.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].

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.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][19][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: σF > mσ − c * σF

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][19][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: where σF i 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 σ 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 = 1 a 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.

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').

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).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).
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).Different methods to remove seasonal component in time-series were previously tested to TIRNet data [18][19][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][19][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 (T max BKG) 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: were dT(n) is the residual de-seasoned temperature value, T max Sc(n) is the maximum temperature of the n IR scene and Tfit(n) is the value of T max Sc(n) in correspondence of T max BKG(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).

The STL Decomposition Method (STLd)
STL is a flexible, iterative non-parametric and robust method developed by [40] to decompose time-series into three components, according to an additive model: where TSi is the time-series of i-th pixel of IR frame, Ti is the Trend, which represents a general tendency of data to move in a certain direction, Si is the Seasonality, which is a repetitive pattern over time due to exogenous causes, and Ri is the remainder, e.g., TSi removed of Trend and Seasonality 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).
The STL Decomposition Method (STLd) STL is a flexible, iterative non-parametric and robust method developed by [40] to decompose time-series into three components, according to an additive model: where TS i is the time-series of i-th pixel of IR frame, T i is the Trend, which represents a general tendency of data to move in a certain direction, S i is the Seasonality, which is a repetitive pattern over time due to exogenous causes, and R i is the remainder, e.g., TS i removed of Trend and Seasonality components (Matlab© function: 'step04.m').The stl() function is available in the R statistical programming language [41].STL is an acronym for "Seasonal and Trend decomposition using Loess", where Loess is a method for estimating nonlinear relationships.The Loess (LOcal regrESSion) algorithm performs smooth estimate g(t) for temperature T at all times t, not just at time t i for which T has been observed.There are several parameters to set in the STL algorithm [40].The main parameters are the number of observations n.p per seasonal cycle, the trend window (t.window) and the seasonal window (s.window).These last two parameters specify how quickly the trend and seasonal components can change.In different words, t.window is the number of consecutive observations to be used when estimating the trend; s.window is the number of consecutive years to be used in estimating each value in the seasonal component.
The 'standard' use of STL function in R is: stl(time-series, s.window = "periodic").By using the setting s.window = "periodic", Loess smoothing is effectively replaced by the mean of the seasonal sub-series.This way, STL assumes the same seasonal cycle for each year of the time-series; therefore, the seasonal component for January is simply the mean of all January values and similarly for the other months.
STL can be set to be robust to outliers, so that occasional uncommon observations will not affect the trend and seasonal components, but only the remainder component.
As the STL algorithm was developed in R language only, a specific script was created to integrate the STL function into the Matlab© processing procedure.The script ('step04.m')consisted of two parts: a) Matlab© code which calls b) R code by using a Matlab toolbox (RunRcode, Matlab File Exchange).
When calling the STL function ('STLIR.R'), the s.window parameter was set to 'periodic' and the t.degree was set to 0. This last one parameter is the degree of locally-fitted polynomial in trend extraction.Moreover, it was important to set the periodicity when creating the temperature time-series in R script.For TIRNet temperature data, the periodicity was set to 365.
STL needs at least a two-year long, continuous time-series; otherwise, it does not process the dataset.If the dataset is not continuous, due to data lack in some periods, it has to be resampled daily.In case of shorter dataset, only BKGr method can be applied.
The STLd procedure can be simply applied to statistical time-series (e.g., raw maximum temperatures time-series; Figure 5) or applied to time-series of all pixel temperatures of the IR frames by using the processing scheme reported in Figure 6.
STL needs at least a two-year long, continuous time-series; otherwise, it does not process the dataset.If the dataset is not continuous, due to data lack in some periods, it has to be resampled daily.
In case of shorter dataset, only BKGr method can be applied.
The STLd procedure can be simply applied to statistical time-series (e.g., raw maximum temperatures time-series; Figure 5) or applied to time-series of all pixel temperatures of the IR frames by using the processing scheme reported in Figure 6.The STLd procedure used to remove seasonal component of all pixels from IR time-series (Figure 6) required, as a first step, the evaluation of the average temperatures time-series of BKG (TavBkgTS).
The STL function was then applied to the TavBkgTS time-series to decompose it into three components: where TrendBkgTS, SeasonBkgTS and RemBkgTS are, respectively, Trend, Seasonality and Remainder time-series of TavBkgTS.
As the background area is not influenced by thermal anomaly, the SeasonBkgTS can be assumed to be representative of the seasonal component affecting all pixels of the frames acquired by an IR station.This assumption makes it possible to apply the following relation: where TdesTSi is the de-seasoned time-series of i th pixel of IR frame and TiTS is the time-series of raw temperatures of the same pixel.The STLd procedure used to remove seasonal component of all pixels from IR time-series (Figure 6) required, as a first step, the evaluation of the average temperatures time-series of BKG (TavBkgTS).The STL function was then applied to the TavBkgTS time-series to decompose it into three components: where TrendBkgTS, SeasonBkgTS and RemBkgTS are, respectively, Trend, Seasonality and Remainder time-series of TavBkgTS.
As the background area is not influenced by thermal anomaly, the SeasonBkgTS can be assumed to be representative of the seasonal component affecting all pixels of the frames acquired by an IR station.This assumption makes it possible to apply the following relation: where T des TS i is the de-seasoned time-series of i th pixel of IR frame and T i TS is the time-series of raw temperatures of the same pixel.
In brief, STLd procedure removed the seasonal component to temperature time-series from all the pixels of IR frames, acquired by a IR station, by subtracting the seasonal component of BKG (SeasonBkgTS).Additionally, in the STLd method, the correct choice of the BKG is fundamental.A direct control of BKG quality is to plot the values of TrendBkgTS: they must be without significant variations (Trend plot in Figure 6).
The final result is a Matlab© 3D array representative of IR frames with de-seasoned temperature values.These arrays are relevant to perform advanced pixel-to-pixel processing methods, needing de-seasoned IR data, which are reported in the next steps.
Additional output of processing step 5 is a map showing locations of maximum temperatures values detected in all IR frames.

Step 4-Radiative Heat Flux (Q rad )
The estimation of radiative heat flux (Q rad ) from an area of IR frame mainly characterized by thermal anomaly (Region of Anomaly, RoA) is a newly proposed processing technique that can offer an interesting contribution to the investigation of possible variations of radiative thermal emissions.
In order to estimate Q rad , which is the thermal energy emitted per unity of area in a unity of time, the RoA has to include pixels whose temperatures are representative of the main thermal anomaly.Nevertheless, the RoA is usually not homogeneous and it is characterized by the presence of both high temperature sources (fumaroles) and low temperature sources (surrounding emission-free rocks).In addition, when sensor-target distance is more than approximately 10 m, the pixels of RoA can be several centimeters large, and therefore, some temperatures are underestimated if their pixels integrate both high and low temperatures [42,43].Consequently, the variations trend of Q rad can be sensibly flattened.A solution to this problem is to calculate the Standard Deviation (SD) of pixels' temperatures of a specific RoA and then to use only temperature values (T ROA H) greater than 2SD to estimate Q rad .
Finally, the Q rad of a specific RoA (W/m 2 ) is calculated by using the Stefan-Boltzmann equation: where σ is the Stefan-Boltzmann constant, ε is the emissivity (for pyroclastic rocks is assumed to be 0.9) and A is the investigated area size (m 2 ) obtained by multiplying pixel area and length n of T ROA H time-series.The detection of any possible change of Q rad trends, even though related to a specific RoA, allows to better characterize thermal behavior of the studied area if RoA is representative of the main thermal anomaly.
The use of de-seasoned time-series of temperature values (T des TS) is essential in order to evaluate Q rad changes due to endogenous sources only.This means that only the dataset processed with STLd can be used.
The Matlab© code performing Qrad ('step04.m') is available as Supplementary Materials and its functionalities are illustrated in the Appendix A.

Step 5-Yearly Rate of Temperatures Change (YRTC)
The thermal variations, in a defined time interval, of every single pixels of IR frame, can be evidenced by evaluating the yearly rate of temperatures change (YRTC).This kind of elaboration produces a map of the IR frame, according to a color scale, of yearly rate of change of pixels' temperature.The yearly rate of temperatures change is represented by the values of slope coefficients of the linear fit of time-series temperatures of every pixel.On the other hand, the selected time interval has to be characterized by a progressive increase or decrease of maximum temperatures of IR frame, according to a correspondence as linear as possible.This needs a preliminary investigation of the temperatures trend over time.
The YRTC map is created by overlapping the values of slope coefficients on a picture (in the visible range) of the framed area.In order to show the yearly rate of change values of pixels whose temperature time-series best fit a linear model, a mask was applied.This mask allowed the display of values related to pixels whose linear regressions of temperature time-series had coefficients of determination (R 2 ) higher than a user-defined threshold value.
The YRTC map gives the opportunity to evidence possible connections between temperature increase/decrease and geological features of the monitored site (Figure 7).The Matlab© code performing YRTC data ('step06.m')is available as supplementary material and its functionalities are illustrated in the Appendix A.

System Automation and Graphic Interface
The above-described methodologies were performed as steps by Matlab© functions, which can be executed with a command line or managed by a user-friendly graphic interface (GUI).Settings can be saved in user-defined configuration files.Due to the modular structure of the processing steps, they can be performed singularly or grouped in an automated sequence in order to execute the whole procedure at defined time by using the GUI that integrates the automation code.Automation is necessary if IR data processing is aimed to surveillance purposes.
The GUI Matlab code (asira_gui.m) is available as supplementary material and its functionalities are illustrated in the Appendix A.

Results and Discussion
In order to discuss the advantages and the limits of the above presented processing The Matlab© code performing YRTC data ('step06.m')is available as Supplementary Materials and its functionalities are illustrated in the Appendix A.

System Automation and Graphic Interface
The above-described methodologies were performed as steps by Matlab© functions, which can be executed with a command line or managed by a user-friendly graphic interface (GUI).Settings can be saved in user-defined configuration files.Due to the modular structure of the processing steps, they can be performed singularly or grouped in an automated sequence in order to execute the whole procedure at defined time by using the GUI that integrates the automation code.Automation is necessary if IR data processing is aimed to surveillance purposes.
The GUI Matlab code (asira_gui.m) is available as Supplementary Materials and its functionalities are illustrated in the Appendix A.

Results and Discussion
In order to discuss the advantages and the limits of the above presented processing methodology, the results obtained by applying the five processing steps are reported.Two datasets were processed: (1) the first consisted of 2.901 IR JPEG frames acquired in the period 2016.01.27-2019.01.13 at Solfatara 1 (SF1) station; (2) the second consisted of 5.850 IR JPEG frames acquired in the period 2013.03.26-2019.01.13 at Pisciarelli (PS1) station.

Data Quality Selection
The relation (1), discussed in §3.2.1, was used to remove low-quality IR frames before starting the analysis of data.The efficiency of this procedure depended on the choice of the coefficient c which was influenced by the statistical distribution of data.Low values of Standard Deviation of IR frames temperatures were an indicator of low quality data and the lower the coefficient c, the higher the number of IR frames discarded as low quality ones.The analysis of data acquired by SF1 suggested c = 1 as an appropriate value (Figure 8), as the visual inspection of discarded frames (about 11% of total frames) confirmed that they were mainly low-quality ones.This kind of preliminary analysis had to be made to every dataset from different stations as the coefficient c can be different depending on the physical and geometrical characteristics of framed area and IR sensor.

Seasonal Component Removal
Two different methodologies of seasonal component removal are used in order to process IR datasets having different time-length.The background removal procedure (BKGr), previously proposed to seasonal correction [19,20], is suitable to very short datasets even though it has some limitations in the final output.The main limit was that the removal of seasonal component produces only residuals of maximum or median values of temperatures instead of absolute temperature values.
Although this kind of analysis does not take full advantage of all the intrinsic information contained inside the IR frames, the BKGr method generated trends of temperature residuals which provide adequate information to characterize the thermal behavior of studied area.
The STL decomposition method (STLd), proposed for the first time in this work to remove seasonality to IR temperature time-series, needed a nearly two-year long datasets due to the statistical approach of the robust and widely applied algorithm.By using STLd method, it was possible to estimate the Seasonality as a separate component of temperature time-series.This feature allows the removal of seasonality to all pixels of IR frames, giving the opportunity to apply further analysis methods (e.g., radiative Heat Flux estimate), which needed the whole frame to be de-seasoned.In

Seasonal Component Removal
Two different methodologies of seasonal component removal are used in order to process IR datasets having different time-length.The background removal procedure (BKGr), previously proposed to seasonal correction [19,20], is suitable to very short datasets even though it has some limitations in the final output.The main limit was that the removal of seasonal component produces only residuals of maximum or median values of temperatures instead of absolute temperature values.Although this kind of analysis does not take full advantage of all the intrinsic information contained inside the IR frames, the BKGr method generated trends of temperature residuals which provide adequate information to characterize the thermal behavior of studied area.
The STL decomposition method (STLd), proposed for the first time in this work to remove seasonality to IR temperature time-series, needed a nearly two-year long datasets due to the statistical approach of the robust and widely applied algorithm.By using STLd method, it was possible to estimate the Seasonality as a separate component of temperature time-series.This feature allows the removal of seasonality to all pixels of IR frames, giving the opportunity to apply further analysis methods (e.g., radiative Heat Flux estimate), which needed the whole frame to be de-seasoned.In Figure 9, the background area boundaries (Figure 9a) inside the SF1 IR frame and the plot of Trend component of background area, obtained by applying STLd method are reported (Figure 9b).The constant and flat temperature values of background Trend confirmed the appropriate choice of this area.The Trend component evaluated by the STLd method was useful to estimate the long-term thermal behavior of the studied area even though it was not suitable for short-term observations.In order to describe short-term thermal behavior, aimed to surveillance purpose, it was necessary to merge both Trend and Reminder components to obtain T + R plots (Figure 10, blue line plot).
Despite the reported limits of BKGr method, the comparison between temperature residuals plots with the BKGr method and T+R plots by STLd method of SF1 IR frames (Figure 10) showed a close similarity of data trends.This similarity confirms the effectiveness of the BKGr method to process datasets shorter than two years.The Trend component evaluated by the STLd method was useful to estimate the long-term thermal behavior of the studied area even though it was not suitable for short-term observations.In order to describe short-term thermal behavior, aimed to surveillance purpose, it was necessary to merge both Trend and Reminder components to obtain T + R plots (Figure 10, blue line plot).
order to describe short-term thermal behavior, aimed to surveillance purpose, it was necessary to merge both Trend and Reminder components to obtain T + R plots (Figure 10, blue line plot).
Despite the reported limits of BKGr method, the comparison between temperature residuals plots with the BKGr method and T+R plots by STLd method of SF1 IR frames (Figure 10) showed a close similarity of data trends.This similarity confirms the effectiveness of the BKGr method to process datasets shorter than two years.Despite the reported limits of BKGr method, the comparison between temperature residuals plots with the BKGr method and T+R plots by STLd method of SF1 IR frames (Figure 10) showed a close similarity of data trends.This similarity confirms the effectiveness of the BKGr method to process datasets shorter than two years.

Radiative Heat Flux Estimate
The computation of radiative heat flux was available on IR frames where seasonality was removed by applying the STLd method.In order to obtain the correct trend of radiative heat flux of a definite area, a correct selection of area boundaries was necessary.The heat flux computation strongly depended on the Hpix BKGpix ratio of the selected area, where Hpix is the number of pixels related to thermal anomaly and BKGpix is the number of pixels related to emission-free rocks.The higher this ratio is, the more accurate the radiative heat flux estimation.This way, the choice of boundaries of processed areas had to be made in order to include as many Hpix as possible.The solution to attenuate the underestimate the heat flux due to the presence of BKGpix, proposed in the §3.2.4, was to select pixels whose temperatures were greater than 2σ of the frequency distribution of temperatures from selected area.The plots reported in Figure 11 show how efficient this kind of solution was.In this figure, plot a) reports heat flux time-series of Areas 1, 2 and 3 evaluated by selecting all the pixels inside each area; plot b) reports heat flux time series of the same areas, evaluated by applying the selection of pixels greater than 2σ of temperatures frequency distribution.The blue line plot is from Area 1, which only includes the major thermal anomaly of the SF1 frame, characterized by the higher Hpix BKGpix ratio.Red line plots of Area 2 and black line plots of Area 3 are representative of lower Hpix BKGpix ratios due to higher number of BKGpix included in the selected areas.
3 are representative of lower Hpix BKGpix ratios due to higher number of BKGpix included in the selected areas.
The comparison between Figure 11a and Figure 11b evidences an underestimate of heat flux values when the computation includes all the pixels inside the selected areas (Figure 11a).Figure 11b was obtained selecting only the pixels whose temperatures values were greater than 2σand showed a remarkable decrease of heat flux underestimate, better evidencing trend variations.

Yearly Rate of Temperature Change Estimate
As reported in §3.2.5, the final product of this processing step was a color scale map of the yearly rate of temperature change (YRTC) values overlapped to a picture (in the visible range) of the framed The comparison between Figure 11a,b evidences an underestimate of heat flux values when the computation includes all the pixels inside the selected areas (Figure 11a).Figure 11b was obtained selecting only the pixels whose temperatures values were greater than 2σ and showed a remarkable decrease of heat flux underestimate, better evidencing trend variations.

Yearly Rate of Temperature Change Estimate
As reported in §3.2.5, the final product of this processing step was a color scale map of the yearly rate of temperature change (YRTC) values overlapped to a picture (in the visible range) of the framed area.YRTC data were filtered according to a threshold value of the coefficient of determination (R 2 ) of the linear regressions of pixels' temperature time-series.Two different examples of yearly temperature rate of change maps of PS1 area in the same time-interval (2016.03.10-2016.07.10) are reported in Figure 12.In this time-interval the PS1 temperatures were subjected to an increase of about 10 • C. The maps of Figure 12 only differ in the choice of R 2 threshold value; hence, a correct choice of these parameter is critical to produce a map that is easy to comprehend.Map b (R 2 = 0.7) shows better evidence of pixels whose temperatures rate of change time-series values best fit a linear model than map a (R 2 = 0.5).The ASIRA code allows the user to select both color scale limits and different values of R 2 threshold by using a user-friendly GUI in order to achieve the right balance between optimal visual result and reliability of data visualized.about 10 °C.The maps of Figure 12 only differ in the choice of R 2 threshold value; hence, a correct choice of these parameter is critical to produce a map that is easy to comprehend.Map b (R 2 = 0.7) shows better evidence of pixels whose temperatures rate of change time-series values best fit a linear model than map a (R 2 = 0.5).The ASIRA code allows the user to select both color scale limits and different values of R 2 threshold by using a user-friendly GUI in order to achieve the right balance between optimal visual result and reliability of data visualized.

Conclusions
Relevant contribution to the surveillance of volcanic areas affected by thermal anomalies can be provided by monitoring the spatio-temporal evolution of surface temperatures field.The acquisition of IR image data by ground-based monitoring network is an effective tool to perform this task.
However, the analysis of IR data time-series is not easy to accomplish due to the influence over IR temperatures of both exogenous and endogenous processes.
In this paper, we have presented a unique operational processing chain developed in Matlab© environment which allows the detection and quantification of possible changes in time and space of the ground-surface thermal features.This application (ASIRA, Automated System of InfraRed Analysis) performed a multi-step procedure that generated both trends of temperatures and heat fluxes as well as maps of yearly rate of temperatures change.The procedure implemented new algorithms based on improvements of previously proposed methods and also original techniques aimed to effectively remove seasonal component of IR temperature time-series and to evaluate radiative heat fluxes of thermal anomaly areas.
ASIRA can be performed as separate steps or executed in a fully-automated way by using a userfriendly graphic interface.The Matlab© code of ASIRA and the Operative Manual are included as supplementary material.
The ASIRA code was applied to process IR data acquired by stations of TIRNet surveillance network operated by the Osservatorio Vesuviano, section of National Institute of Geophysics and Volcanology (INGV) at Campi Flegrei volcanic area (Italy).The results show the effectiveness of this method to provide a valuable contribution to the continuous monitoring of thermal anomalies related to studied areas.This operative tool has been conceived for volcanic surveillance of diffuse degassing areas and low-temperature fumarole fields which variations may precede significant phases of volcanic unrest.
Notwithstanding, the procedure can be applied to monitor different volcanic scenarios (i.e., lava-

Conclusions
Relevant contribution to the surveillance of volcanic areas affected by thermal anomalies can be provided by monitoring the spatio-temporal evolution of surface temperatures field.The acquisition of IR image data by ground-based monitoring network is an effective tool to perform this task.However, the analysis of IR data time-series is not easy to accomplish due to the influence over IR temperatures of both exogenous and endogenous processes.
In this paper, we have presented a unique operational processing chain developed in Matlab© environment which allows the detection and quantification of possible changes in time and space of the ground-surface thermal features.This application (ASIRA, Automated System of InfraRed Analysis) performed a multi-step procedure that generated both trends of temperatures and heat fluxes as well as maps of yearly rate of temperatures change.The procedure implemented new algorithms based on improvements of previously proposed methods and also original techniques aimed to effectively remove seasonal component of IR temperature time-series and to evaluate radiative heat fluxes of thermal anomaly areas.
ASIRA can be performed as separate steps or executed in a fully-automated way by using a user-friendly graphic interface.The Matlab© code of ASIRA and the Operative Manual are included as Supplementary Materials.
The ASIRA code was applied to process IR data acquired by stations of TIRNet surveillance network operated by the Osservatorio Vesuviano, section of National Institute of Geophysics and Volcanology (INGV) at Campi Flegrei volcanic area (Italy).The results show the effectiveness of this method to provide a valuable contribution to the continuous monitoring of thermal anomalies related to studied areas.
This operative tool has been conceived for volcanic surveillance of diffuse degassing areas and low-temperature fumarole fields which variations may precede significant phases of volcanic unrest.Notwithstanding, the procedure can be applied to monitor different volcanic scenarios (i.e., lava-flows, active volcanic vents and eruptive fractures) but also different natural and environmental hazards (fires, waste-disposal sites, pollution discharges, landslides, etc.).
Supplementary Materials: the Matlab© code of A.S.I.R.A. (Automated System of InfraRed Analysis) which is described in Appendix A), and the Operative Manual (pdf file) are provided at the following link: http: //www.mdpi.com/2072-4292/11/5/553/s1.Author Contributions: F.S. was responsible for the ASIRA design and implementation in the Matlab© software, data acquisition and analysis, and writing the manuscript.G.V. was responsible for the research design, data analysis and writing the manuscript.Both authors contributed to the software validation.Below are reported synthetic technical sheets of functionalities and type of input and output data of the different processing steps and of the graphic user interface.

Figure 1 .
Figure 1.The Solfatara area (a) and Vesuvius crater (b) acquired by Thermel InfraRed Network (TIRnet) cameras.Red points are infrared (IR) stations locations and yellow regions represent the framed areas.

Figure 1 .
Figure 1.The Solfatara area (a) and Vesuvius crater (b) acquired by Thermel InfraRed Network (TIRnet) cameras.Red points are infrared (IR) stations locations and yellow regions represent the framed areas.

( 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 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 = 1 a 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.

Figure 4 .
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).

Figure 4 .
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).

Figure 5 .
Figure 5. STL decomposition procedure applied to Pisciarelli station: RAW maximum temperature of IR scene (grey color) and de-seasoned maximum temperature of IR scene (blue color).

Figure 5 . 23 249Figure 6 .
Figure 5. STL decomposition procedure applied to Pisciarelli station: RAW maximum temperature of IR scene (grey color) and de-seasoned maximum temperature of IR scene (blue color).Remote Sens. 2018, 10, x FOR PEER REVIEW 10 of 23

Figure 6 .
Figure 6.Processing scheme used to remove seasonal component of TIRNet data by using R script including STL procedure ('STLIR.R') and Matlab code. 1) Evaluation of seasonal component (S) by applying STL to background area.2) Removal of S to a pixel raw temperature in order to get the de-seasoned values.

Figure 7 .
Figure 7. Yearly rate of temperature change maps of SF1 in the period 2016.02.01-2016.11.30.Map (a) has R 2 threshold value = 0.2.Map (b) has and R 2 threshold value = 0.45.In this time-interval SF1 maximum temperatures decreased of about 10 °C as evidenced by the color map.

Figure 7 .
Figure 7. Yearly rate of temperature change maps of SF1 in the period 2016.02.01-2016.11.30.Map (a) has R 2 threshold value = 0.2.Map (b) has and R 2 threshold value = 0.45.In this time-interval SF1 maximum temperatures decreased of about 10 • C as evidenced by the color map.

23 Figure 8 .
Figure 8. Frequency distribution of Standard Deviation values of IR frames temperatures (F) acquired at SF1 station.The line 'Lower Threshold', which is defined by the relation (1) with c parameter equal to 1, splits good-quality frames (on the right of the line) and low-quality frames (on the left of the line).

Figure 8 .
Figure 8. Frequency distribution of Standard Deviation values of IR frames temperatures (σF) acquired at SF1 station.The line 'Lower Threshold', which is defined by the relation (1) with c parameter equal to 1, splits good-quality frames (on the right of the line) and low-quality frames (on the left of the line).

23 Figure 9 .
Figure 9. Background area boundaries inside the SF1 IR frame (a) and plot of Trend component of background area which is obtained by applying STLd method (b).Trend values varie between 14.35 and 14.7 °C.

Figure 9 .
Figure 9. Background area boundaries inside the SF1 IR frame (a) and plot of Trend component of background area which is obtained by applying STLd method (b).Trend values varie between 14.35 and 14.7 • C.

Figure 10 .
Figure 10.Plots of temperatures acquired at SF1 station removed of seasonal component.Red line = temperature residuals obtained by applying BKGr method; blue line = Trend+Reminder values obtained by applying STLd method.

Figure 10 .
Figure 10.Plots of temperatures acquired at SF1 station removed of seasonal component.Red line = temperature residuals obtained by applying BKGr method; blue line = Trend+Reminder values obtained by applying STLd method.

Figure 11 .
Figure 11.Heat flux plots of selected areas inside SF1 frames.Area 1 (c) includes the mayor thermal anomaly, Area 2 and 3 (c) include emission-free rocks.Plot a) = heat flux trends (smoothed with window = 29) of Areas 1, 2 and 3 evaluated by selecting all the pixels inside each area.Plot b) = heat flux trends (smoothed with window = 29) of Areas 1, 2 and 3 evaluated by applying the selection of pixels greater than 2 s of temperatures frequency distribution.

Figure 11 .
Figure 11.Heat flux plots of selected areas inside SF1 frames.Area 1 (c) includes the mayor thermal anomaly, Area 2 and 3 (c) include emission-free rocks.Plot a) = heat flux trends (smoothed with window = 29) of Areas 1, 2 and 3 evaluated by selecting all the pixels inside each area.Plot b) = heat flux trends (smoothed with window = 29) of Areas 1, 2 and 3 evaluated by applying the selection of pixels greater than 2 s of temperatures frequency distribution.

Figure A1 .
Figure A1.Tabs of the Automated System of InfraRed Analysis (ASIRA) graphics interface representative of five processing steps and automation settings.Numbers inside the red circles are the IDs reported in the technical sheets of Appendix A.Below are reported synthetic technical sheets of functionalities and type of input and output data of the different processing steps and of the graphic user interface.

Figure A1 .
Figure A1.Tabs of the Automated System of InfraRed Analysis (ASIRA) graphics interface representative of five processing steps and automation settings.Numbers inside the red circles are the IDs reported in the technical sheets of Appendix A. 19

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

Table A1 .
Technical specifications of functionality and input/output data type of graphic interface.

Table A2 .
Technical specifications of functionality and input/output data type of STEP 1.

Table A3 .
Technical specifications of functionality and input/output data type of STEP 2.

Table A4 .
Technical specifications of functionality and input/output data type of STEP 3.FunctionalitySeasonal correction with BKGr and STLd methods (tab 'Step 3 in GUI)

Table A5 .
Technical specifications of functionality and input/output data type of STEP 4.

Table A6 .
Technical specifications of functionality and input/output data type of STEP 5. Functionality Temperature rate of change during selected time-period (tab 'Step 5 in GUI) Show map of temperature rate of change JPEG image by pressing button 35 Arrays of temperature rate of change data Matlab (.mat) archive in output folder Data sheets of temperature rate of change data Excel file in output folder