You are on page 1of 3

Fire Detection Using Image Processing

Dhruv Bhate(B064) Vidit Kothari(B054) Shamoil Loliwala(B059)

Department of Computers Department of Computers Department of Computers

Mukesh Patel School of Technology Mukesh Patel School of Technology Mukesh Patel School of Technology
Management and Engineering Management and Engineering Management and Engineering
(NMIMS) (NMIMS) (NMIMS)
Mumbai, India Mumbai, India Mumbai, India

dhruvbhate3@gmail.com vidit.k.kothari@gmail.com shamoil.loliwala@gmail.com

Abstract​—Fire outbreaks have been a common issue in most


parts of the world, causing great damage to nature, humans II. METHOD IMPLEMENTED
and other objects. Due to this, the need for fire detection has
tremendously increased. This report uses image processing A. RGB Colour Model
techniques in order to detect fires which is compatible with
surveillance devices like CCTV. The algorithm uses the HSV
colour model to detect the fire over a range of shades of red.
The growth of fire is detected using Sobel edge detection. The
results of these two outputs are combined and segmented to
show only the fire regions.

I. INTRODUCTION
Application of fire detection as a tool has increased due
to the frequent occurrence of extended fire with
consequences on human health and security. The current Since we need to detect shades of fire which are shades of
methods which are based on electronic sensors usually red we use the HSV colour model to be able to detect the
depend on heat and pressure sensors. However, those fire regions. We first convert the BGR image to HSV colour
methods have a fatal flaw where they only work when a space and apply an HSV mask having lower and upper
certain condition has been reached. In the worst case limits of the HSV matrix which has the hue, saturation and
scenarios, these sensors get damaged which can cause heavy value. The mask used has approximated values to be able to
casualties. Hence, CCTV installation has increased in to be detect maximum shades of fire using some amount of trial
able to detect these fires more effectively. and error.
These type of systems offer several distinct advantages
over those traditional detection methods. For example, the
cost of using this type of detection is cheaper and the
implementation of this type of system is greatly simpler ​B​. Sobel Edge Detection
compared to the traditional methods. Secondly, the response
time of fire detection system is faster compared to any other
traditional detection methods since a vision sensor-based
fire detection system does not require any type conditions to
trigger the sensors and it has the ability to monitor large
areas depending on the camera used. The benefit of these
type of systems is that the fire source can be saved in a form
of image or video which can use for promoting the The next step in the process is to detect the magnanimity of
diversification of the fire detection method greatly. the fire hence we use an edge technique which is the Sobel
In this report, the algorithm combines colour information Edge Detection. We carry out detection in x-direction and
of the fire with the edges of the fire information. On y-direction and simply add their results to get the edges of
combining the results, segmentation is used to get the the entire image. Using this we are able to detect the edges
necessary details from the images to detect and identify the of the fire. This method uses a mask where convolution is
fire. applied, it is both associative and commutative.

XXX-X-XXXX-XXXX-X/XX/$XX.00 ©20XX IEEE


​ C.​ Segmentation Methods

The third and final step of the algorithm is to carry out


certain segmentation techniques to be able to extract out
only the fire regions from our entire image. To do so, we
have used two thresholding techniques and obtained their
results in order to analyse which one is more effective.
Before carrying out our segmentation we convert the
combined output of HSV colour detection and Sobel edge
detection into grayscale to apply thresholding
First, we used the simple global thresholding method where
using the data set we analyse the intensity regions where the
fire is being detected using the grayscale histogram and
apply our threshold accordingly. We have approximated the
threshold value to 160.
Second, we use the Otsu’s thresholding method which is an
algorithm trying to find an optimum threshold value.
Thresholding is a statistical decision-making problem hence
we need to use the main concept of probability, mean and
variance. Otsu’s algorithm uses to maximise the
between-class variance. The basic idea is that
well-thresholded classes should be distinct with respect to
the intensity values of their pixels and, conversely, that a
threshold giving the best separation between classes in terms
of their intensity values would be the best (optimum)
threshold. In addition to its optimality, Otsu’s method has
the important property that it is based entirely on
computations performed on the histogram of an image, an
easily obtainable 1-D array.
The results obtained from our 3 steps are showcased in the
next section along with the histogram representation of the
images.

III. RESULTS AND DISCUSSION

Original Global Otsu

As shown in the images and the corresponding output above,


we have implemented the algorithm on a variety of images.
As seen, global thresholding is a more effective
segmentation technique than otsu’s thresholding algorithm.
This is because the algorithm followed by otsu’s
thresholding does not give us a good approximation of the
threshold intensity value as the histograms in the images
have more valleys and no distinct demarcation, hence the
algorithm cannot conclude to an effective value. The
threshold value used in the global threshold is used after
testing the entire data set and by trial and error to achieve
best possible results.
The accuracy of the algorithm specify the ability of the
algorithm in detecting the ROI. Accuracy = TP/
(TP+TN)*100%
The efficiency test is given as
Efficiency = (TN+TP/TN+TP+FN+FP)*100%

Based on the entire dataset of about 35 images, the accuracy


and efficiency is as calculated below:
GLOBAL:
Accuracy = 76.9%
Efficiency = 76.4’%
OTSU:
Accuracy = 72.7%
Efficiency = 64.7%

IV. SCOPE OF IMPROVEMENT


On seeing the obtained outputs from our data sets we see
that there is a great scope for improvement. Some of the
aspects that could be worked on would firstly be to probably
use another colour model in order to get more accurate
detection of different shades of red which comes closer to
the different shades of fire. Once the fire shades are more
accurately detected we need to further work on segmenting
out fire regions from other different objects whose colour is
a different shade of red which is also detected in the colour
model, for example, a fire truck. Hence, we need to be able
to separate fire from these objects which have no relation to
the fire but are present in the frame. Due to which we need
to find a better method to segment out the region of interest.
This can be done using a depth image that can be used to
segment out the region of fire from the other objects which
are detected by the technique like fire trucks, orange
objects,etc.

V. ​CONCLUSION
We have used image processing techniques to detect fire
using the HSV colour space to capture only the shades of
red followed by Sobel edge detection to find the
magnanimity of the fire and finally segmentation methods to
find our region of interest. This algorithm has given us
relatively accurate results in detecting a fire outbreak with
the help of good quality surveillance equipment, there is still
significant scope for improvement to achieve better
segmentation and colour intensity detection. Which can be
done in future research.

REFERENCES
[1] https://www.learnopencv.com/invisibility-cloak-using-color-detection
-and-segmentation-with-opencv/
[2] https://github.com/niladri30/Fire-detection-using-Python/blob/master/
fire_detection.py
[3] FIRE DETECTION ALGORITHM USING IMAGE PROCESSING
TECHNIQUES - Kumarguru Poobalan1 and Siau-Chuin Liew2

You might also like