Alternative Real-time Image-based Smoke Detection Algorithm

A R T I C L E I N F O A B S T R A C T Article history: Received: 16 February, 2020 Accepted: 26 April, 2020 Online: 03 May, 2020 Most buildings are equipped with various types of sensors to detect smoke in the event of a fire, though most are located internally. Practically, smoke has to reach the sensor in order for the sensor to react. The limitations of these sensors are their inability to respond in the early stages of a fire, and their questioned efficiency in accurately detecting the source of the smoke and locations in external environments. Image processing techniques are widely used in different critical applications in the domains of security, recognition, detection, etc. In this paper, we present an alternative image-based algorithm that can detect smoke in both indoor and outdoor environments. The algorithm operates over colored images to detect smoke at the early stages of a fire. The core of the algorithm relies on target extraction, color analysis and block subtraction components. Results shows that our proposed algorithm is capable of detecting smoke accurately at a rate of 95.10%, making it suitable for wide range of applications.


Introduction
Accidental fires cause severe economic and ecological damage in addition to threatening people's lives. To avoid the catastrophe of a fire, fire-detection techniques were developed which were mainly based on particle sampling [1], temperature sampling [2], in addition to the traditional ultraviolet [3] and infrared [4] fire detectors and sensors. Sensor-based smoke detection systems work effectively if they are located close to the smoke source. One of the critical limitations of these systems is their inability to identify and locate the source the smoke, especially if deployed in outdoor environments.
As alternative to sensors, image-based detection systems of indoor and outdoor fires have been developed as an effective alternative to detect smoke. The concept relies on the development of an algorithm which is able to automatically detect very early signs of smoke in captured images. One of the most challenging issues in such techniques is the recognition of smoke in outdoor environments. This is due to the difficulty of recognizing the visual characteristics of the smoke.
In this paper we present an alternative image-based smoke detection algorithm which works on recognizing fire smoke using colored digital images captured in outdoor environments. The proposed technique assumes that regular images of the area under surveillance are captured and immediately processed. These images will be analyzed and through a series of stages, including extracting the target, analyzing image colors and subtracting images blocks through an organized process. The significance of the proposed method lies behind its structure's simplicity, smoke detection accuracy and performance. Compared to other techniques, our alternative method is found promising alternative as it offers high detection rates with non-complex design.

Literature Review
The authors of [5] proposed a method which can detect smoke based on the concept of source separation. The method treats the captured fire images as a linear combination of smoke and background image pixels. In other words, the method aims to separate the smoke from the background of the captured images. The results published in this research show that the method is able to effectively detect smoke in outdoor environments. However, the performance of the proposed method is not examined, hence the method's efficiency is questioned.
In [6], a method for image-based smoke detection using an image-based technique is presented. The method relies on considering the static and dynamic features of the fire smoke. The dynamic features are disorder, growth, and frequent flicker, while the static features are self-similarity and wavelet energy. The first step is to detect the moving target in the image. This is done through the use of a median filter algorithm to retrain the noise. Consequently, a background subtraction technique based on ASTESJ ISSN: 2415-6698 * Sally Almanasra, Email : s.almanasra@arabou.edu.sa Advances in Science, Technology and Engineering Systems Journal Vol. 5, No. 3, 123-128 (2020) www.astesj.com adaptive a background update is applied. Upon detecting the moving target, the method aims to extract the target's contour in every binary image of the target in order to extract a frequentflicker feature in target boundaries. The disorder that may appear in the captured image can be measured based on the ratio of circumference to area for the segmented target region. The frequent-flicker feature is also extracted using a wavelet domain approach. This can help in determining the temporal highfrequency activity in a pixel. The last step carried out in this method is the process of joining all extracted features through a joint feature vector into an artificial neural network.
The work in [7] is presented according to the fact that the boundary of the smoke region is not clear, which makes it difficult to extract the smoke region using fundamental image processing. To resolve this limitation, authors incorporated K-means algorithms to fix the initial point in the domain region. The image is completely black while all pixels are in the initial point and through an image segmentation process, the image of the smoke shape then develops self-similarity properties. The positional relationships of pixels extracted from a single brightness is used to finally apply the fractal encoding techniques used for detecting smoke images [8].
In [9] a method to improve the image quality of the smoke using fuzzy logic is presented. The smoke area is extracted using a Gaussian mixed model. A hyper parameter of a support vector machine is established for smoke recognition.
Different types of RGB-based models can be used for fire/smoke detection systems, including, YCbCr and YUV color models. The YCbCr color model is effective for fire and smoke detection using image processing techniques [10][11][12]. However, to minimize the chance of selecting moving objects, clustering algorithms such as the K-means algorithm are used.
A different type of technique is presented in [13]. The authors propose a real-time smoke classification method using texture analysis. This method works by background subtraction for moving objects using the Gaussian Mixture Model (GMM), which divides the image into background and foreground. Pixels that don't match Gaussian distribution are considered as foreground pixels. The image is divided into blocks, where each block is composed of 16*16 pixels as shown in Figure 1.  [13] For each block, the number of foreground pixels is counted. The method considers that particular block as a candidate block if and only if it has more than 205 foreground pixels. Consequently, the texture features are calculated for every candidate block using Gray Level Co-occurrence Matrices (GLCM). The texture features are classified under three categories: energy, contrast and homogeneity. A back propagation Neural Network (NN) algorithm is used to discriminate the smoke features. The three texture features form the input to the NN algorithm. The resulting output is a binary value (either 0 or 1), where the value 1 represents the existence of smoke in the image, and the value 0 represent the absence of smoke, as illustrated in Figure 2.  [13] In [14], the proposed method is designed based on deep saliency network. It aims to specify the important objects in an image. The output of this method is a smoke saliency map that is generated through the combination of pixel-level and object-level convolutional neural networks. The results show the method achieves good performance compared to some other method in that particular types of detection.
An improved smoke detection approach based on frame movement is presented in [15]. The approach relies on analyzing the characteristics of smoke at its early stages. The core of the approach is based on converting the captured images (extracted from multiple frames) to their binary representations. The lightness pixels that are not within the scope of the method are then removed. Subsequently, the smoke is detected using gray and transparency features. According to the performance analysis, the approach achieves a detection rate of about 92%.
In [16], the authors present an alternative smoke detection method based on visual smoke characteristics, including movement, color, gray tones, etc. When a region with movement is detected, the pixels within that region are estimated and analyzed to specify possible smoke regions. For higher accuracy, the method uses local binary patterns to characterize each region. Evaluation results shows that this method achieve an average smoke detection accuracy rate of 98.84%.
The authors in [17] proposes an algorithm to detect smoke and flame for video obtained from a camera installed in open area. The algorithm utilizes the adaptive background subtraction, and apply the optical flow-based movement estimation to identify a motion. Wavelet analysis is also applied to achieve moving blobs classification. Experiments results shows that the algorithm achieves a detection rate of 87% for smoke.
Similarly, the method presented in [18] utilizes the appearance and motion information to extract robust information. Machine learning is applied to achieve accurate smoke detection. Experiments results shows that the algorithm achieves a detection rate of 84.08%.
Finally, a video-based smoke-detection method is proposed in [19]. The core of the method relies on analyzing the spatial and temporal characteristics of video sequences to identify smoke features from possible smoke regions. These features include: edge blurring, gradual energy changes, and gradual chromatic configuration changes. These features are combined using a support vector machine technique and a temporal-based alarm decision unit to enhance the detection rates. Experiments results shows that the algorithm achieves a detection rate of 83.05%.

Alternative Smoke Detection Algorithm
In this section we present our proposed real-time smoke detection algorithm. The core of the algorithm relies on two main components: a target extractor and a color analyzer. In addition, the algorithm is provided with a supportive component for controlling the sensitivity of the detection process according to the area of application. The overall structure of the proposed algorithm is presented in Figure 3. According to the above structure, the received image from the area under surveillance is processed through the Target Extractor (TE). This process assumes that the system is initialized by a base image in order to extract the target blocks which might be a candidate for a smoke block. Note that sensitivity controller is designed to control the sensitivity of the smoke detection process. Increasing the level of sensitivity results in detecting smoke in earlier stages. However, over-increasing in the sensitivity of the controller might increase the false positive ratios. The internal structure of the TE component is illustrated in Figure 4.
Upon completing the target extraction stage, the received image is then masked to compare the overall intensity against the base image. This operation is carried out as part of the Color Analyzer (CA). The CA component is designed to separate the RGB blocks to examine the standard deviation of the three mean values of the extracted blocks, as shown in Figure 5.

Input image
Intensity Analysis Block Proportion

Results and Discussion
Our proposed system is tested against a set of images. Initially, the base-image should be stored for future comparison against the received image from the area under surveillance. Accordingly, Figure 6 presents the base image used in this experiment. For testing purposes, a fire has been started and the smoke starts to rise. Figure 7 shows the current image captured by the installed camera in the area under surveillance.
At this stage, a mask is applied over both the base image and the newly captured image to study possible changes in the overall intensity of the image's blocks. As shown in Figure 8, the masking process shows exactly which areas are candidate to represent smoke. Upon completing both the target extraction and color analysis, our proposed algorithm considers only the blocks which includes the black smoke. In the next stage. The curve fitting process is applied. Figure 9 shows the base image intensity before applying the curve fitting, where the figure shows the mean value of each block in the image. Consequently, the curve-fitting process is applied over the base and current images. This process aims to find the best fit to the series of data points in each image. Figure 10 presents the intensity of the base-image and the current image after curve fitting has taken place.
Based on the two fitted curves of both the base and current images, one can note that the fitted curve of the current image (with smoke blocks) is lower than the fitted curve of the base-image. At this point, the level of sensitivity plays its role in whether to consider a particular block as smoke or not. We have conducted our experiment over a selected set of original smoke and none smoke images found in [20] and illustrated in Figure 11. The experiment results over the set of images shown in Figure  11, reveals that our method is able to detect the smoke-spectrum in most of the images. The results of the detection process applied over smoke and none smoke images are presented in Figure 12 and 13, respectively.  Note that our proposed method is able to detect the smoke accurately as illustrated in Figure 12. However, our algorithm has also detected some smoke patterns in non-smoke images. This is due to the value assigned to the sensitivity controller. As highlighted in Section 3, the sensitivity controller plays a pivot role in formulating the final decision on whether a particular block of pixels is recognized as smoke or not. The sensitivity controller works on curve-fitting process. Increasing the sensitivity level to some extent, lead to higher false alarm rates. Table 1 shows how our algorithm react over different levels of sensitivities.
Obviously, the ideal level of sensitivity is found to be at rate 75%. Increasing or decreasing this ratio to some extent, results in higher rates of false alarms. However, it is a trade-off process, as some applications may require higher levels of sensitivity to avoid massive lost.
We run our experiment over 200 images. the results show that the detection rate is 95.1%. For comparison purposes, we compared our results with existing methods published in [15][16][17][18][19]. Results presented in Table 2 show that our method outperforms most of these methods in term of smoke detection rates. This is due to low-cost operations used in our method. In terms of performance, our method was tested on an Intel Core i7 processor of 2.8GHz, a memory RAM of 3 GB, and hard disk of 80 GB. The results show that the average processing time for an image of size 92.5KB takes about 98ms. This performance makes our method suitable for deployment in a wide range of applications and environments.

Conclusion
This research presents an early smoke detection method using image processing techniques. The method is based on target extraction, color analysis and curve fitting to delimit the candidate smoke region. The level of sensitivity plays a pivot role in determining whether an alarm of smoke should be activated. The experiments results show that the proposed method provides a good detection rate of smoke against several scenarios. Results show that our method provides outstanding detection results at the sensitivity level of 75%, where the alarm was activated on all images that includes smoke patterns. Similarly, the images without smoke has not activated the alarm in more than 97% of the cases. The main reason behind some false alarm cases is the distance between the recording device and the target area. However, the intensive analysis of our method over a set of 200 images reveals that, the detection rate is 95.10%. In term of processing time, our method is capable of processing an image of