Integrated Air Quality Monitoring and Alert System Based on Two Image Analysis Techniques for Reportable Fire Events

: In this paper, a new monitoring alert system for air pollution emergencies is proposed. The proposed system can perform air quality monitoring to provide real-time alerts of an individual event. The system uses two image analysis techniques, namely pixel recognition and haze extraction, for video ﬁre smoke detection. The image analysis process is divided into daytime and nighttime image analyses, which involve the analysis of red-green-blue (RGB) and gray scale images. The images analyzed in this study were captured by the video camera of an air quality monitoring station. Seven ﬁre accidents around a selected industrial park and downtown area were analyzed in detail. Among these accidents, three occurred at daytime, one occurred over 7 days, and three occurred at nighttime. Alert models based on pixel recognition and haze extraction were established. These models incorporated the formulas of haze equivalent ( H T ( t )) and separated pixels ( X T ( t )), as well as the threshold equations of haze equivalent ( ∇ H ) and separated pixels ( ∇ X ). An alert signal is sent to the administrator when H T ( t ) > ∇ H or X T ( t ) > ∇ X . The obtained results indicate that a real-time observation and alert system based on two image analysis techniques can be designed for air quality monitoring without expensive hardware devices. This alert system can be used by administrators to understand the course of a reportable event, especially as evidence for the appraisal of ﬁre accidents. It is recommended that this system be connected to the ﬁre brigades in order to obtain early ﬁre information.


Introduction
The production, transportation, and storage processes in chemical industries are complex; thus, the possibility of severe accidents is relatively high in these industries [1]. Most accident escalations in the industry, especially fire events that are not handled in a timely manner, are caused by a domino effect [2]. Therefore, the managers of factories and industrial areas must detect the occurrence of an event early and address it quickly. Studies have focused on risk estimation and safety management [3][4][5][6]. Some models have been developed to estimate the safety-critical scenario [7], population vulnerability and risk level of an industrial site [8], and impact factors of accidents [9].
Video smoke detection methods are widely used in fire warning systems [10][11][12][13][14]. Gaur et al. [15] and Umar et al. [16] have reviewed various fire sensing technologies to present an overview of their state-of-the-art practices. Some modified fire sensing and control system concepts have also been proposed by them. Three color spaces, namely the RGB, hue-saturation-intensity (HSI), and YCbCr color spaces, are used in fire detection approaches. Hasan and Razzak [17] designed a fire detection approach based on the RGB color space for home video surveillance to warn people dynamically. For fire detection, Horng and Peng [18] developed a fire-flame color feature model based on the HSI color space to extract similar fire colors and color shifts. Çelik et al. [19] presented an image processing approach based on the YCbCr color space for detecting fire and smoke. In the aforementioned approach, color information is combined with motion analysis. Chowdhury et al. [20] proposed a hybrid fire detection model comprising vision and smoke sensors to detect environmental smoke and gas.
Numerous researchers have begun to study how to use digital imaging technology for analyzing the relationship between fine particles and visible haze (or visibility). Liu et al. [21] demonstrated that smartphone cameras could be used to monitor fine-grained PM 2.5 in participatory sensing using their haze model with a deep learning-based method. Liu et al. [22] reported a method based on outdoor imaging to estimate particle matter concentration. Their method involves using six image features (the position of the sun, date, time, geographic information, and weather conditions) to predict the PM 2.5 index. The results of Liu et al. indicated that different features have different significance levels in PM 2.5 prediction. Zhan et al. [23] proposed a no-reference image quality assessment with a database comprising images of different haze levels. The results obtained using their method were consistent with those obtained through subjective evaluation. Feng et al. [24] proposed a PM 2.5 estimation method based on the random forest model. This method requires meteorological data, traffic data, records from monitoring sites, information regarding points of interest, and photographs. Wang et al. [25] processed color images obtained with a general camera to estimate the real-time particulate mass concentration. Their method exhibited a correlation coefficient of 0.8219 and a mean square error of 51.2324 µg m −3 . Moreover, the precision and recall of the PM 2.5 estimations were 0.875 and 0.872, respectively. Pan et al. [26] described the AirTick mobile app, which can turn any camera-enabled smartphone device into an air quality sensor. The average accuracies of the AirTick tool for daytime and night time operations were 87% and 75%, respectively. Image-based techniques for evaluating air quality can be divided into two categories: (1) nonmodel-based and (2) model-based techniques. Nonmodel-based techniques do not have any model basis. They mainly extract characteristic values of images, such as the spatial contrast [21], image entropy [22], root mean square of an image [22], and HSI of the sky [24], according to the image blurring phenomenon. Model-based techniques are based on an atmospheric scattering model [24][25][26]; thus, a 2D extinction coefficient profile can be obtained.
Most air quality monitoring stations (AQMSs) in Taiwan, especially industrial AQMSs, are equipped with surveillance cameras. Currently, these cameras only have the functions of monitoring and recording. Real-time monitoring data and images are transmitted to environmental protection units and their websites through the Internet of Things technology. This study assessed the monitoring performance achieved when integrating two image analysis techniques for developing a real-time observation and alert system for reportable events. Seven fire accidents around a selected industrial park and downtown area were analyzed in detail. The image analysis procedure was divided into daytime and nighttime image analyses, which were based on images with different color scales. The proposed system can be used to perform damage assessment and chronological construction for a reportable event.

Data and Image Sources
Images and air quality monitoring data from May 2018 to March 2019 were collected from AQMSs of the Environmental Protection Administration (EPA), Taiwan. The images were obtained from the videos captured by the surveillance cameras of the AQMSs. One image was collected every 10 min. The PM 2.5 monitoring dataset comprised hourly values because the beta attenuation mass monitoring method with a time resolution of 1 h was used according to the US EPA PM 2.5 Federal Equivalent Method.

Pixel Recognition
Three color spaces, namely the RGB, HSI, and YCbCr color spaces, are used in fire detection approaches. The RGB color space is used in the most simple and fast image processing methods for fire detection. Therefore, the fire detection approach based on the RGB color space was adopted in this study. The decision formulas of smoke or fire recognition for a pixel X at point (i, j) can be represented as follows [27]: X(i, j) = a smoke or flame pixel, ifM h − M l < T and K l ≤ I int ≤ K h not a smoke or flame pixel , otherwise where T is a global threshold value (a recommended range is from 15 to 25), K l and K h are thresholds used to determine the range of smoke or flame pixels, and I int is the intensity of optical flow. Table 1 presents the threshold ranges selected in this study for dark gray smoke, light gray smoke, yellow flame, and orange flame pixels. Because the observation distances between the cameras and industrial park were generally long, the pixels of the four channels were merged to improve the observation sensitivity. The merging formula for smoke and fire pixels (X(i, j, t)) is given as follows: where X T (t) is the total amount of separated pixels in time t. The footnotes of D, L, Y, and O are (i, j, t) for the ranges of dark gray smoke, light gray smoke, yellow flame, and orange flame pixels, respectively. In fire smoke detection, the threshold for the alteration uses the symbol of ∇ X for identifying fire accidents. Figure 1 illustrates examples of images depicting and not depicting fire (Figure 1a,c, respectively). The figure also displays the color separation of the aforementioned images. A white background color is used for easy viewing. The parameter X T (t) in Figure 1b acts as a baseline for checking fire occurrences.

Haze Extraction
The dark channel prior method can be used to remove single image haze according to the previous observations for haze-free images [28]. The recorded image intensity can be divided into two parts: light transmission from the scene that penetrates air and light scattered by the fine particles in the air. Light is scattered due to the Rayleigh and Mie scattering effects [29]. The Rayleigh and Mie scattering effects apply to scattering with particle sizes less than and greater than the wavelength of light, respectively. Assuming that the atmosphere is a homogeneous medium, the transmittance T in the air can be expressed using Equation (6) according to the Beer-Lambert law [22,30]. where β is scattering coefficient and d(i, j) is the scene depth at pixel coordinates (i, j) [24]. For the deflection of light by aerosols in the atmosphere, Fattal [31] presented an image formation model, which can be expressed as follows: where I(i, j), J(i, j), and A are the input image, scene radiance, and atmospheric light vector, respectively. For a single image, the A value can be obtained using the automatic method by Sulami et al. [32]. Two types of dehazing techniques exist: the closed-form solution [31] and dark channel prior methods [28]. The dark channel prior technique is more efficient than the closed-form solution method; therefore, the dark channel prior technique has been adopted in most dehazing studies. In this technique, the RGB image of most outdoor scenes is subdivided into multiple small areas when the weather is clear and haze-free. Each small local area Ω(i, j) must find a pixel whose (r, g, b) channel values approach zero.

Haze Extraction
The dark channel prior method can be used to remove single image haze according to the previous observations for haze-free images [28]. The recorded image intensity can be divided into two parts: light transmission from the scene that penetrates air and light scattered by the fine particles in the air. Light is scattered due to the Rayleigh and Mie scattering effects [29]. The Rayleigh and Mie scattering effects apply to scattering with particle sizes less than and greater than the wavelength of light, respectively. Assuming that the atmosphere is a homogeneous medium, the transmittance T in the air can be expressed using Equation (6) according to the Beer-Lambert law [22,30].
where β is scattering coefficient and d(i, j) is the scene depth at pixel coordinates (i, j) [24]. For the deflection of light by aerosols in the atmosphere, Fattal [31] presented an image formation model, which can be expressed as follows: where I(i, j), J(i, j), and A are the input image, scene radiance, and atmospheric light vector, respectively. For a single image, the A value can be obtained using the automatic method by Sulami et al. [32].
Two types of dehazing techniques exist: the closed-form solution [31] and dark chan- where Ω(i, j) and J c are the transmission in a local patch and the color channel c in an RGB image, respectively. For a small local area, the value of Ω(i, j) is constant. Therefore, the first term on the right side of Equation (8) approaches zero and can be ignored. Thus, the estimated transmittance distribution of the atmosphere is calculated as follows [28]: where A c is the global atmospheric light, which is determined by the first 0.1% of the pixels in the dark channel [24]. The resolution of transmittance distribution is low; however, this problem can be overcome using the soft matting method or guided image filter. Finally, the transmittance T is converted using the Beer-Lambert law to obtain the product of the extinction coefficient β and scene depth d, such that: using the dark channel prior technology. In this study, the total amount of βd at time t is defined as a haze equivalent H T (t). In the haze extraction, the threshold for alteration uses the symbol of ∇ H for identifying fire accidents.
in the dark channel [24]. The resolution of transmittance distribution is low; however, this problem can be overcome using the soft matting method or guided image filter. Finally, the transmittance T is converted using the Beer-Lambert law to obtain the product of the extinction coefficient β and scene depth d, such that: Figure 2 displays the procedure and result of processing an air pollution image by using the dark channel prior technology. In this study, the total amount of βd at time t is defined as a haze equivalent HT(t). In the haze extraction, the threshold for alteration uses the symbol of ∇H for identifying fire accidents.

Contaminated Parcel Forward Trajectory
Mesoscale and macroscale trajectory models, such as the HYSPLIT trajectory model, are unsuitable for the illustration of contaminated parcel transmission in a microscale regional accident. In this study, the transmission path of a contaminated plume from an accident site was simulated using the mathematical formula of the forward trajectory. When a pollutant drifts passively with the wind, the trajectory is the integration of the pollutant position vector in space and time. The forward trajectory calculation involves obtaining the next position of the pollutant according to the average velocity of the polluted position P of the pollutant and the estimated forward position P′. The forward trajectory is calculated using the following equation:

Contaminated Parcel Forward Trajectory
Mesoscale and macroscale trajectory models, such as the HYSPLIT trajectory model, are unsuitable for the illustration of contaminated parcel transmission in a microscale regional accident. In this study, the transmission path of a contaminated plume from an accident site was simulated using the mathematical formula of the forward trajectory. When a pollutant drifts passively with the wind, the trajectory is the integration of the pollutant position vector in space and time. The forward trajectory calculation involves obtaining the next position of the pollutant according to the average velocity of the polluted position P of the pollutant and the estimated forward position P . The forward trajectory is calculated using the following equation: Fourth quadrant : θ = 360 where W s and W d are the wind speed (km h −1 ) and wind direction ( • ), respectively, and ∆t is the integration time of a step (h). When the path of the forward trajectory is determined, the possible downwind position on the path can be obtained. Data on W s and W d are obtained from the nearest AQMS at the accident site. In this study, the selected time interval between two step positions was 10 min for the calculation of the wind trajectory. Figure 3 depicts the sites of AQMSs of the Taiwan EPA around the four selected industrial parks, namely the Linhai Industrial Park, Linyuan Industrial Park, Dafa Industrial Park, and Qiaotou Industrial Park, which are located within Kaohsiung City (on the south coast of Taiwan). The Linhai Industrial Park is a comprehensive industrial zone with 493 factories belonging to over two dozen industry types in an area of 15.60 km 2 . The Linyuan Industrial Park has 27 factories mostly related to petrochemical processes in an area of 4.03 km 2 . The Dafa Industrial Park is a comprehensive industrial zone with 536 small and medium-sized factories in an area of 3.91 km 2 . Four AQMSs, namely the Xiaogang, Daliao, Linyuan, and Qiaotou AQMSs, are located near the aforementioned three industrial parks. Each AQMS is equipped with a surveillance camera. The camera angle field of view (FoV) at each AQMS is displayed in Figure 3. The pictures of the Linhai Industrial Park, Linyuan Industrial Park, and Dafa Industrial Park are illustrated in the insets of Figure 3. The four industrial parks were selected due to multiple fire incidents that occurred in these industrial parks of Kaohsiung City from May 2018 to March 2019.   The cameras mounted at all the aforementioned AQMSs except the Qiaotou AQMS ( Figure 4) can capture images of their adjacent industrial area. The red line in Figure 4b is the skyline of ambient haze extraction, which is determined to avoid the influence of white smoke in the estimation of H T (t). The Qiaotou Industrial Park is a small traditional industrial settlement with nine factories in an area with no obvious boundaries. Therefore, the camera mounted at the Qiaotou AQMS can image the downtown area (Figure 4d). The schematic of the camera lens's FoV at the Qiaotou AQMS is displayed in Figure 5. Because of the change in wind direction, the AQMS may not be located in the downwind direction of the industrial park. In addition, some fog events occur outside the industrial park, which is beyond the FoV of the camera. Eight reportable events occurred in the target area from May 2018 to March 2019. Among them, three events occurred at daytime, one occurred over 7 days, and four occurred at nighttime. Six of the seven analyzed fire accidents (excluding the event of power loss in the Linyuan Industrial Park on 13 January 2019) are explained in detail later in the manuscript.    Figure 6 illustrates the flow diagram of the alert working platform with fire and pollutant recognition functions. The images and data are processed by the image recognition and the pollutant recognition, respectively. The rise ratios of HT(t) and XT(t) at time t and time t − Δt are defined as ΛH(t) and ΛX(t), respectively. If ΛH(t) and ΛX(t) are higher than their thresholds (∇H and ∇X) at a certain time interval, an alert is sent to the management staff; otherwise, the loop is repeated. The aforementioned threshold values are used in checks. Thus, the values of ∇H and ∇X must be set first according to the characteristics of the landscape. Similarly, when the concentration of a pollutant is higher than the air quality standard, an anomaly notification is sent to the management staff; otherwise, the loop is repeated.

Fire and Pollutant Recognition
In Taiwan, AQMS cameras perform daytime and nighttime imaging by using the RGB and gray scales, respectively. Therefore, no yellow or orange flame pixels were used  Figure 6 illustrates the flow diagram of the alert working platform with fire and pollutant recognition functions. The images and data are processed by the image recognition and the pollutant recognition, respectively. The rise ratios of H T (t) and X T (t) at time t and time t − ∆t are defined as Λ H (t) and Λ X (t), respectively. If Λ H (t) and Λ X (t) are higher than their thresholds (∇ H and ∇ X ) at a certain time interval, an alert is sent to the management staff; otherwise, the loop is repeated. The aforementioned threshold values are used in checks. Thus, the values of ∇ H and ∇ X must be set first according to the characteristics of the landscape. Similarly, when the concentration of a pollutant is higher than the air quality standard, an anomaly notification is sent to the management staff; otherwise, the loop is repeated.

Fire and Pollutant Recognition
Atmosphere 2021, 12, x FOR PEER REVIEW 9 of 18 than the rise rate because the rise ratio is dimensionless as well as independent of the background of a view and the period of a day. Figure 6. Flow diagram of the alert working platform with fire and pollutant recognitions, where ΛH and ΛX are the ratio of haze equivalents and ratio of total separated pixels; and ∇H and ∇X are the alert thresholds of haze extracting and pixel recognizing, respectively.

Reportable Events
The images captured by the AQMS cameras at daytime and nighttime used an RGB scale and a gray scale, respectively. The sensitivities of smoke or fire detection and haze extraction were reduced due to excessive interference from the gray pixels of images. Thus, the case studies of fire accidents were divided into two types of fires: fires occurring at daytime and nighttime.

Fire Accident Occurring at Daytime or over Multiple Days
Case 1: Fire accident of sulfur pit smoldering A sulfur pit smoldering fire accident occurred at a refining factory in the Linhai Industrial Park on 16 May 2018. The reported period of the accident was from 04:40 to 09:20 ( Figure 7). During this period, the prevailing wind direction was SSW with respect to the location of the Xiaogang AQMS, which is in the downwind of the affected factory (inset of Figure 7). The trajectory indicates that the pollutants arrived at the Xiaogang AQMS after 20 min. Light yellow smoke appeared on the left side of the images during the initial period of 04:58−05:29, which corresponded to the trends of HT and XT during the same time (Figure 7a,c,d). When the fire began to be extinguished with water, the value of the separated pixels decreased rapidly. However, the value of HT did not decrease significantly. The results indicate that fire extinguishment affects the total amount of separated pixels (reduction in the fire smoke), but it can also respond to the progress of fire accidents. In Taiwan, AQMS cameras perform daytime and nighttime imaging by using the RGB and gray scales, respectively. Therefore, no yellow or orange flame pixels were used in the estimation of X T at nighttime, which reduced the sensitivity of smoke/fire detection. Moreover, the sensitivity of haze extraction decreased due to excessive interference from the gray pixels of images. In this study, the equations for the threshold values of haze equivalent and separated pixels were as follows: > ∇ X,day at daytime ∇ X,night at nighttime , where n = 1 or 2 The parameter ∆t was selected as 10 min. Moreover, n was set as 1 and 2 for large (or nearby) and small (or distant) fire accidents, respectively. Summarizing the results of curve changes in many fire cases, the values of ∇ H and ∇ X at daytime and at nighttime are recommend set as 2.5 and 2.0, respectively. Equations (18) and (19) use the rise ratio rather than the rise rate because the rise ratio is dimensionless as well as independent of the background of a view and the period of a day.

Reportable Events
The images captured by the AQMS cameras at daytime and nighttime used an RGB scale and a gray scale, respectively. The sensitivities of smoke or fire detection and haze extraction were reduced due to excessive interference from the gray pixels of images. Thus, the case studies of fire accidents were divided into two types of fires: fires occurring at daytime and nighttime.  Figure 7). During this period, the prevailing wind direction was SSW with respect to the location of the Xiaogang AQMS, which is in the downwind of the affected factory (inset of Figure 7). The trajectory indicates that the pollutants arrived at the Xiaogang AQMS after 20 min. Light yellow smoke appeared on the left side of the images during the initial period of 04:58-05:29, which corresponded to the trends of H T and X T during the same time (Figure 7a,c,d). When the fire began to be extinguished with water, the value of the separated pixels decreased rapidly. However, the value of H T did not decrease significantly.
The results indicate that fire extinguishment affects the total amount of separated pixels (reduction in the fire smoke), but it can also respond to the progress of fire accidents. High values of SO2 (>340 ppb) and XT (>150,000) were measured during 03:10-04:20, which was before the reported accident period (Figure 7a,d). Moreover, the hourly concentrations of PM2.5 were lower than 10 μg m −3 (Figure 7b). The curve of HT responded to the fire that maintained a high intensity during the accident period (Figure 7c). The curve confirmed that smoldering occurred before the reported accident period but was not detected. Accidents are highly prone to occur at night (e.g., 02:00−04:00) [33]. Thus, an early alert system, which can also record the course of an accident more completely, is required. The value of ΛH at 04:50 and that of ΛX at 05:20 were higher than ∇H,day and ∇X,day; therefore, an alert was sent.
Case 2: Fire accident due to fuel tank leakage The fire accident due to fuel tank leakage occurred at an advanced material plant in Linyuan Industrial Park on 21 October 2018. The fuel tank of the carbon black process was ignited by an explosion at 08:40. A large amount of black smoke was discharged into the air, and thick smoke could be observed several kilometers away. The fire related to the accident was fierce over 3 h; however, no casualties were reported. The observed results are displayed in Figure 8. The camera of the Linyuan AQMS clearly captured the black smoke caused by the fire at 08:40-11:40. Compared with the images of the Daliao AQMS captured at the same time (Figure 9), the images of the Linyuan AQMS were full of haze, which was caused by the black smoke. The observed PM2.5 concentration increased to 35 μg m −3 . A high value of PM2.5 occurred before the fire accident due to the effects of hourly High values of SO 2 (>340 ppb) and X T (>150,000) were measured during 03:10-04:20, which was before the reported accident period (Figure 7a,d). Moreover, the hourly concentrations of PM 2.5 were lower than 10 µg m −3 (Figure 7b). The curve of H T responded to the fire that maintained a high intensity during the accident period (Figure 7c). The curve confirmed that smoldering occurred before the reported accident period but was not detected. Accidents are highly prone to occur at night (e.g., 02:00-04:00) [33]. Thus, an early alert system, which can also record the course of an accident more completely, is required. The value of Λ H at 04:50 and that of Λ X at 05:20 were higher than ∇ H,day and ∇ X,day ; therefore, an alert was sent.

Case 2: Fire Accident Due to Fuel Tank Leakage
The fire accident due to fuel tank leakage occurred at an advanced material plant in Linyuan Industrial Park on 21 October 2018. The fuel tank of the carbon black process was ignited by an explosion at 08:40. A large amount of black smoke was discharged into the air, and thick smoke could be observed several kilometers away. The fire related to the accident was fierce over 3 h; however, no casualties were reported. The observed results are displayed in Figure 8. The camera of the Linyuan AQMS clearly captured the black smoke caused by the fire at 08:40-11:40. Compared with the images of the Daliao AQMS captured at the same time (Figure 9), the images of the Linyuan AQMS were full of haze, which was caused by the black smoke. The observed PM 2.5 concentration increased to 35 µg m −3 . A high value of PM 2.5 occurred before the fire accident due to the effects of hourly averages (Figure 8a). The parameter βd was maintained at a high value during and before the fire accident (Figure 8b). Therefore, using H T as an early warning function makes it difficult to determine whether an increase in H T is an event. The amount of X T increased from 13,610 to about 60,040 at 08:40 and decreased to approximately 23,110 at 11:10. The rapid drop in X T may have been due to the start of fire extinguishment, which suppressed the escape of black smoke. At 08:40, Λ H and Λ X were higher than ∇ H,night and ∇ X,night , and an alert was sent.   Figure 9) indicates that the pollutants arrived at the Daliao station in 1-2 h. Although the fire smoke was not directly captured by the camera of the Daliao AQMS, a part of the sky became darker during the accident. The curves of HT and XT responded to the delayed fire plume. The ΛH and ΛX values at 09:00 were higher than the values of ∇H,day and ∇X,day, and an alert was sent.   Figure 9) indicates that the pollutants arrived at the Daliao station in 1-2 h. Although the fire smoke was not directly captured by the camera of the Daliao AQMS, a part of the sky became darker during the accident. The curves of HT and XT responded to the delayed fire plume. The ΛH and ΛX values at 09:00 were higher than the values of ∇H,day and ∇X,day, and an alert was sent.    Figure 9) indicates that the pollutants arrived at the Daliao station in 1-2 h. Although the fire smoke was not directly captured by the camera of the Daliao AQMS, a part of the sky became darker during the accident. The curves of H T and X T responded to the delayed fire plume. The Λ H and Λ X values at 09:00 were higher than the values of ∇ H,day and ∇ X,day , and an alert was sent.  Figure 10). The measured PM 2.5 concentrations at the Qiaotou AQMS increased from 16 to 64 µg m −3 at 17:00 and then decreased to 16 µg m −3 at 19:00. During this time, the station camera recorded the image of the fire clearly. Image analysis indicates that the results obtained through smoke or fire recognition were superior to those obtained through haze extraction for the detection of open burning. The range of H T was 0.5-0.8 at 15:00-18:20, which includes the period 2 h before the fire accident. Therefore, H T did not vary when the accident occurred. The Λ X value at 17:50 was higher than ∇ X,day , and an alert was sent. The ΛX value at 17:50 was higher than ∇X,day, and an alert was sent.  Figure 11a presents the forward trajectories at 00:00, 06:00, 12:00, and 18:00 for each day of the accident. The wind speed was mostly very low during the accident period, which indicated that the air pollutants did not dissipate easily. Therefore, a fire-contaminated parcel was observed intermittently although the paper mill was beyond the FoV of the AQMS's camera. Furthermore, the alert subsystem of air pollutant had repeatedly reflected the high concentration of PM2.5. To describe this case in brief, daytime on 19 October 2018 was selected as a representative period of the fire accident. The curves of HT and XT at the Daliao AQMS were similar during the daytime. The variations in these curves may reflect the effect of the contaminated parcel observed intermittently in the images. The measured PM2.5 concentrations also vary with changes in the images, especially at 11:00-12:00. High PM2.5 concentrations were measured at noon for the 7 consecutive days of the accident. Because of its long duration and poor weather conditions, the aforementioned fire accident had a considerable effect on local air quality.  Figure 11a presents the forward trajectories at 00:00, 06:00, 12:00, and 18:00 for each day of the accident. The wind speed was mostly very low during the accident period, which indicated that the air pollutants did not dissipate easily. Therefore, a fire-contaminated parcel was observed intermittently although the paper mill was beyond the FoV of the AQMS's camera. Furthermore, the alert subsystem of air pollutant had repeatedly reflected the high concentration of PM2.5. To describe this case in brief, daytime on 19 October 2018 was selected as a representative period of the fire accident. The curves of H T and X T at the Daliao AQMS were similar during the daytime. The variations in these curves may reflect the effect of the contaminated parcel observed intermittently in the images. The measured PM 2.5 concentrations also vary with changes in the images, especially at 11:00-12:00. High PM 2.5 concentrations were measured at noon for the 7 consecutive days of the accident. Because of its long duration and poor weather conditions, the aforementioned fire accident had a considerable effect on local air quality.

Fire Accident Occurring at Nighttime
Case 5: Fire accident at the waste paper warehouse Another fire accident occurred at a large waste paper warehouse of a paper mill at nighttime on 28 January 2019. This paper mill is the same as that in case 4 and is beyond the FoV of the cameras of the four AQMSs. The forward trajectory indicates that the contaminated parcel arrived at the Linyuan AQMS approximately 1.5 h after the accident began (inset of Figure 12) because the wind speed was low at nighttime. The measured hourly average concentration of PM2.5 increased from 13 μg m −3 (at 20:50) to 30 μg m −3 (at 21:00) and 46 μg m −3 (at 22:00). Thus, the pollutants were transferred with the airflow to the Linyuan AQMS (Figure 12a). Approximately 1 h after the fire, HT increased significantly over time (Figure 12b). The fire smoke was observed 50 min after the fire had begun (Figure 12c). The variations in PM2.5, HT, and XT responded to the fire accident. However, XT was more representative of the evolution of the fire accident than the other two factors were. Thus, the variations in XT can help trace the cause and evolution of accidents. The ΛH value at 22:20 and ΛX value at 21:50 were higher than the values of ∇H,night and ∇X,night; therefore, an alert was sent. 3.2.2. Fire Accident Occurring at Nighttime Case 5: Fire Accident at the Waste Paper Warehouse Another fire accident occurred at a large waste paper warehouse of a paper mill at nighttime on 28 January 2019. This paper mill is the same as that in case 4 and is beyond the FoV of the cameras of the four AQMSs. The forward trajectory indicates that the contaminated parcel arrived at the Linyuan AQMS approximately 1.5 h after the accident began (inset of Figure 12) because the wind speed was low at nighttime. The measured hourly average concentration of PM 2.5 increased from 13 µg m −3 (at 20:50) to 30 µg m −3 (at 21:00) and 46 µg m −3 (at 22:00). Thus, the pollutants were transferred with the airflow to the Linyuan AQMS (Figure 12a). Approximately 1 h after the fire, H T increased significantly over time (Figure 12b). The fire smoke was observed 50 min after the fire had begun (Figure 12c). The variations in PM 2.5 , H T , and X T responded to the fire accident. However, X T was more representative of the evolution of the fire accident than the other two factors were. Thus, the variations in X T can help trace the cause and evolution of accidents. The Λ H value at 22:20 and Λ X value at 21:50 were higher than the values of ∇ H,night and ∇ X,night ; therefore, an alert was sent. Case 6: Fire accident due to pipeline rupture A fire accident caused by pipeline rupture occurred at a petrochemical plant in the Linyuan Industrial Park on 28 February 2019. At the time of the accident, the operators used 10 kg of nitrogen gas to blow out the pipeline. Due to the rupture of the externally evacuated rubber pipeline, high-pressure gas was discharged to contact the fire source, which resulted in fire and explosion. Four operators were taken to the hospital due to burn injuries. The reported period of the accident event was from 17:48 to 23:18. The forward trajectory indicates that the contaminated parcel arrived at the Linyuan AQMS approximately 10 min after the fire began (inset in Figure 13). The measured PM2.   Case 6: Fire accident due to pipeline rupture A fire accident caused by pipeline rupture occurred at a petrochemical plant in the Linyuan Industrial Park on 28 February 2019. At the time of the accident, the operators used 10 kg of nitrogen gas to blow out the pipeline. Due to the rupture of the externally evacuated rubber pipeline, high-pressure gas was discharged to contact the fire source, which resulted in fire and explosion. Four operators were taken to the hospital due to burn injuries. The reported period of the accident event was from 17:48 to 23:18. The forward trajectory indicates that the contaminated parcel arrived at the Linyuan AQMS approximately 10 min after the fire began (inset in Figure 13). The measured PM2.5 concentration increased from 15 μg m −3 at 17:00 to 40 μg m −3 at 19:00 (Figure 13a). Fire smoke was observed 20 min before the reported time of the accident. Therefore, the fire accident may have started at approximately 17:20. The variations in HT and XT exhibited the same trend as the variations in the PM2.5 concentration, and the values of HT and XT began to increase at 17:30 (Figure 13b,c). At this time, ΛH and ΛX were higher than ∇H,night and ∇X,night; therefore, an alert was sent.  Case 7: Fire Accident Due to a Reaction Tank Leakage A fire accident was caused due to reaction tank leakage in the Linyuan Industrial Park on 12 January 2019. The fire started at 22:00 and it was extinguished by 01:00. The forward trajectory indicates that the pollutants arrived at the Linyuan AQMS 20 min after the beginning of the fire (inset in Figure 14). The hourly PM 2.5 value increased to 56 µg m −3 at 00:00 (Figure 14a). The image analysis results indicated that H T and X T increased with time after approximately 22:20. At this time, Λ H and Λ X were higher than ∇ H,night and ∇ X,night ; therefore, an alert was sent.
here 2021, 12, x FOR PEER REVIEW 15 of 18 Case 7: Fire accident due to a reaction tank leakage A fire accident was caused due to reaction tank leakage in the Linyuan Industrial Park on 12 January 2019. The fire started at 22:00 and it was extinguished by 01:00. The forward trajectory indicates that the pollutants arrived at the Linyuan AQMS 20 min after the beginning of the fire (inset in Figure 14). The hourly PM2.5 value increased to 56 μg m −3 at 00:00 (Figure 14a). The image analysis results indicated that HT and XT increased with time after approximately 22:20. At this time, ΛH and ΛX were higher than ∇H,night and ∇X,night; therefore, an alert was sent.

Serviceability Limits of Alerts
The results of the aforementioned case studies indicate that the proposed approach is suitable for designing a successful real-time observation and alert system for reportable events, such as industrial fires, illegal open burning, and smoke-related emissions. This system uses the existing surveillance cameras and monitors of AQMSs and does not require expensive hardware devices. The results indicate that this system can respond to the progress of fire accidents and record it, such as fire start and end times, start time of water extinguishing, scale of the accident, and the possible harm situation. They are very important sources of evidence for subsequent fire accident identification. The two image analysis methods adopted in this study have complementary effects. The pixel recognition method provides high intensity values for fire accidents but is affected by fire extinguishment. By contrast, the haze extraction method provides low intensity values for fire accidents but is unaffected by fire extinguishment. Therefore, this system with two image analysis technologies can avoid the disadvantages of general pixel analysis systems [10][11][12][13][14]. In addition, the effect of wind speed on fire smoke flow is small because hot smokes normally rise a considerable distance, which could reduce the influence of wind. Therefore, the effect of wind speed on the application of the two methods is slight. The aforementioned two model-based image processing techniques are based on atmospheric scattering, the dark channel phenomena, and separated pixels. Thus, the alerts provided by the system used in this study have the following serviceability limits: 1. Under poor weather conditions, such as rain, snow, and dark clouds, the collected images are too distorted due to low light flux from the atmosphere.

Serviceability Limits of Alerts
The results of the aforementioned case studies indicate that the proposed approach is suitable for designing a successful real-time observation and alert system for reportable events, such as industrial fires, illegal open burning, and smoke-related emissions. This system uses the existing surveillance cameras and monitors of AQMSs and does not require expensive hardware devices. The results indicate that this system can respond to the progress of fire accidents and record it, such as fire start and end times, start time of water extinguishing, scale of the accident, and the possible harm situation. They are very important sources of evidence for subsequent fire accident identification. The two image analysis methods adopted in this study have complementary effects. The pixel recognition method provides high intensity values for fire accidents but is affected by fire extinguishment. By contrast, the haze extraction method provides low intensity values for fire accidents but is unaffected by fire extinguishment. Therefore, this system with two image analysis technologies can avoid the disadvantages of general pixel analysis systems [10][11][12][13][14]. In addition, the effect of wind speed on fire smoke flow is small because hot smokes normally rise a considerable distance, which could reduce the influence of wind. Therefore, the effect of wind speed on the application of the two methods is slight. The aforementioned two model-based image processing techniques are based on atmospheric scattering, the dark channel phenomena, and separated pixels. Thus, the alerts provided by the system used in this study have the following serviceability limits:

1.
Under poor weather conditions, such as rain, snow, and dark clouds, the collected images are too distorted due to low light flux from the atmosphere.

2.
The acquisition of representative smoke pixels is negatively affected by the camera lens having a poor FoV (lens being too far or too close to the target area), unsuitable (too high or low) elevation angles, and an insufficiently high erection height. 3.
In the case of poor air quality, visibility is obscured by numerous fine particles.

4.
A large number of plumes with a high moisture or pollutant content, such as a high-mist plumes (Figure 4b), mist from cooling towers, and boiler soot-blowing. 5.
The camera must be protected from glare caused by direct sunlight. In addition, the camera lens must be kept clean. 6.
The change of the threshold varies in Equations (4), (18) and (19) with different regions, time periods, and weather conditions that require further determination.
To overcome the aforementioned limitations, artificial intelligence (AI) architectures, such as support vector machines (supervised learning) or convolutional neural networks (deep learning), can be introduced into the working platform to extract fine feature values from a large number of event images (at least 30). These feature values include the thresholds, temporal features, spatial features, lighting, lens angle, scene depth, smoke motion, and color. Through the self-learning and updating mechanism, a real-time observation and alert system can be developed. In addition, using an integrated deep agent approach to algorithms is also recommended since it can integrate two or more existing algorithms and enable them to complement each other to achieve a better outcome than using each one of them alone [34].

Conclusions
The proposed monitoring and alert system uses the existing surveillance cameras of AQMSs and does not require expensive hardware devices. A working platform with fire and pollutant recognition is proposed. The pixel recognition and haze extraction methods have better image analysis results at nighttime and daytime, respectively, so the two methods have complementary effects in image analysis. Estimation equations for pixel recognition, haze extraction, and alerting thresholds were established and used in this study. Moreover, a forward trajectory model suitable for regional contaminated parcel transmission was established to understand the transmission of fire plumes. This model can help to interpret image analysis results when pollutant transmission is delayed. Although this system is not connected to the fire brigade, all fire incidents can be matched with the fire brigade's records without any omission. The results of seven case studies indicated that the proposed approach is successful. In image analysis, the fire accidents were divided into two types, namely daytime and nighttime fires, according to the image color scales. We detailed the serviceability limits of the proposed approach, especially with regard to the use of images, and introduced AI can reduce these limits. The proposed alert system can be used by administrators to understand the course of a reportable event, especially as evidence for the appraisal of fire accidents. It is recommended that this system be connected to the fire brigades in order to obtain early fire information.