Sunteți pe pagina 1din 17

COMPUTER VISION BASED FIRE DETECTION WITH A VIDEO ALERT SYSTEM

CHAPTER 1
INTRODUCTION
COMPUTER vision is an interdisciplinary field that is useful in various
applications like robotics to understand advanced pictures or recordings. From the point of
view of designing, it tries to computerize errands that the human visual framework can do.
It helps to incorporate strategies for gaining, preparing, examining and understanding
computerized pictures, and extraction of high-dimensional information from this present
reality keeping in mind the end goal to deliver numerical or representative data. Image
processing is an integral part of computer vision. Image processing is a technique to do
operations on a picture, keeping in mind the end goal to get an upgraded picture or to
extricate some valuable data from it. Thus, this technology is used to break the video frame
by frame and operations are made on them to extract information. This information helps
in sending the alert that fire has been detected. As per world fire statistics of Center of fire
statistics, every year the fire accidents that take place in the overall world are more one
lakh. And the damages on property and lives of people are high. To overcome this problem
many detectors are employed to identify the presence of fire in its initial stages some of
them is a flame detector, heat detector, smoke detector etc. But on usage of these detectors,
there is a practical difficulty that if the area or room under consideration by these detectors
is a large space then the detector will alert the user only when the fire or smoke or heat is
at a considerable level. Hence, it takes a lot of time and the response of the system only
occurs after the intensity of fire is considerably more. Companies like Sasken have used
the existing algorithms for fire detection through vision sensors based on the RGB and
YCbCr color-space approach. There are various papers which deal with this fire detection
process. The main ideology remains same but the method and tool used for processing
differ. Initially, MATLAB is used as a tool for processing though it is easy to use; it takes
more time for processing and is expensive. And from an application point of view, OpenCV
is better than MATLAB. Hence, it is replaced by OpenCV. But till now images are sent as
an alert to the user if the fire is detected. Sometimes image taken will be less clarity and
misinterpretation is also possible. To overcome this problem a real-time video alert is sent
to the user periodically until the fire stops. The main challenges faced in our project is that
configuring raspberry pi in a way such that it should simultaneously monitor the fire zone

Dep’t of CSE 1 ICET Muvattupuzha


COMPUTER VISION BASED FIRE DETECTION WITH A VIDEO ALERT SYSTEM
as well as to send the processed video as an alert to the App. The rest of the paper is
organized as below. The proposed system is described in section II. At last, section III
concludes the paper.

Dep’t of CSE 2 ICET Muvattupuzha


COMPUTER VISION BASED FIRE DETECTION WITH A VIDEO ALERT SYSTEM

CHAPTER 2
COMPUTER VISION

Computer vision is an interdisciplinary scientific field that deals with how


computers can be made to gain high-level understanding from digital images or videos.
From the perspective of engineering, it seeks to automate tasks that the human visual
system can do. Computer vision tasks include methods
for acquiring, processing, analyzing and understanding digital images, and extraction
of high-dimensional data from the real world in order to produce numerical or symbolic
information, e.g. in the forms of decisions. Understanding in this context means the
transformation of visual images (the input of the retina) into descriptions of the world that
can interface with other thought processes and elicit appropriate action. This image
understanding can be seen as the disentangling of symbolic information from image data
using models constructed with the aid of geometry, physics, statistics, and learning theory.
The scientific discipline of computer vision is concerned with the theory behind artificial
systems that extract information from images. The image data can take many forms, such
as video sequences, views from multiple cameras, or multi-dimensional data from a
medical scanner. The technological discipline of computer vision seeks to apply its theories
and models to the construction of computer vision systems.
Sub-domains of computer vision include scene reconstruction, event detection, video
tracking, object recognition, 3D pose estimation, learning, indexing, motion estimation,
and image restoration.
Computer vision is an interdisciplinary field that deals with how computers can be
made to gain high-level understanding from digital images or videos. From the perspective
of engineering, it seeks to automate tasks that the human visual system can do. "Computer
vision is concerned with the automatic extraction, analysis and understanding of useful
information from a single image or a sequence of images. It involves the development of a
theoretical and algorithmic basis to achieve automatic visual understanding.” As
a scientific discipline, computer vision is concerned with the theory behind artificial
systems that extract information from images. The image data can take many forms, such
as video sequences, views from multiple cameras, or multi-dimensional data from

Dep’t of CSE 3 ICET Muvattupuzha


COMPUTER VISION BASED FIRE DETECTION WITH A VIDEO ALERT SYSTEM
a medical scanner. As a technological discipline, computer vision seeks to apply its theories
and models for the construction of computer vision systems.

APPLICATIONS
Applications range from tasks such as industrial machine vision systems which,
say, inspect bottles speeding by on a production line, to research into artificial intelligence
and computers or robots that can comprehend the world around them. The computer vision
and machine vision fields have significant overlap. Computer vision covers the core
technology of automated image analysis which is used in many fields. Machine vision
usually refers to a process of combining automated image analysis with other methods and
technologies to provide automated inspection and robot guidance in industrial applications.
In many computer-vision applications, the computers are pre-programmed to solve a
particular task, but methods based on learning are now becoming increasingly common.
Examples of applications of computer vision include systems for: Learning 3D shapes has
been a challenging task in computer vision. Recent advances in deep learning has enabled
researchers to build models that are able to generate and reconstruct 3D shapes from single
or multi-view depth maps or silhouettes seamlessly and efficiently .
 Automatic inspection, e.g., in manufacturing applications;
 Assisting humans in identification tasks, e.g., a species identification system;
 Controlling processes, e.g., an industrial robot;
 Detecting events, e.g., for visual surveillance or people counting;
 Interaction, e.g., as the input to a device for computer-human interaction;
 Modeling objects or environments, e.g., medical image analysis or topographical
modeling;
 Navigation, e.g., by an autonomous vehicle or mobile robot; and
 Organizing information, e.g., for indexing databases of images and image sequences.

Dep’t of CSE 4 ICET Muvattupuzha


COMPUTER VISION BASED FIRE DETECTION WITH A VIDEO ALERT SYSTEM

CHAPTER 3
OPEN CV

OpenCV (Open source computer vision) is a library of programming functions


mainly aimed at real-time computer vision.Originally developed by Intel, it was later
supported by Willow Garage then Itseez (which was later acquired by Intel). The library is
cross-platform and free for use under the open-source BSD license.

Officially launched in 1999, the OpenCV project was initially an Intel


Research initiative to advance CPU-intensive applications, part of a series of projects
including real-time ray tracing and 3D display walls. The main contributors to the project
included a number of optimization experts in Intel Russia, as well as Intel's Performance
Library Team. In the early days of OpenCV, the goals of the project were described as:

Advance vision research by providing not only open but also optimized code for
basic vision infrastructure. No more reinventing the wheel.
Disseminate vision knowledge by providing a common infrastructure that developers could
build on, so that code would be more readily readable and transferable.
Advance vision-based commercial applications by making portable, performance-
optimized code available for free – with a license that did not require code to be open or
free itself.

Dep’t of CSE 5 ICET Muvattupuzha


COMPUTER VISION BASED FIRE DETECTION WITH A VIDEO ALERT SYSTEM
The first alpha version of OpenCV was released to the public at the IEEE Conference on
Computer Vision and Pattern Recognition in 2000, and five betas were released between
2001 and 2005. The first 1.0 version was released in 2006. A version 1.1 "pre-release" was
released in October 2008.
The second major release of the OpenCV was in October 2009. OpenCV 2 includes major
changes to the C++ interface, aiming at easier, more type-safe patterns, new functions, and
better implementations for existing ones in terms of performance (especially on multi-core
systems). Official releases now occur every six months and development is now done by
an independent Russian team supported by commercial corporations.
In August 2012, support for OpenCV was taken over by a non-profit foundation
OpenCV.org, which maintains a developer and user site.
On May 2016, Intel signed an agreement to acquire Itseez, a leading developer of OpenCV.

OpenCV is written in C++ and its primary interface is in C++, but it still retains a less
comprehensive though extensive older C interface. There are bindings
in Python, Java and MATLAB/OCTAVE. The API for these interfaces can be found in the
online documentation. Wrappers in other languages such
as C#, Perl, Ch, Haskell, and Ruby have been developed to encourage adoption by a wider
audience.
Since version 3.4, OpenCV.js is a JavaScript binding for selected subset of OpenCV
functions for the web platform.
All of the new developments and algorithms in OpenCV are now developed in the C++
interface.
APPLICATIONS
OpenCV's application areas include:
2D and 3D feature toolkits
Egomotion estimation
Facial recognition system
Gesture recognition
Human–computer interaction (HCI)
Mobile robotics

Dep’t of CSE 6 ICET Muvattupuzha


COMPUTER VISION BASED FIRE DETECTION WITH A VIDEO ALERT SYSTEM
Motion understanding
Object identification
Segmentation and recognition
Stereopsis stereo vision: depth perception from 2 cameras
Structure from motion (SFM)
Motion tracking
Augmented reality
To support some of the above areas, OpenCV includes a statistical machine learning library
that contains:

Boosting
Decision tree learning
Gradient boosting trees
Expectation-maximization algorithm
k-nearest neighbor algorithm
Naive Bayes classifier
Artificial neural networks
Random forest
Support vector machine (SVM)
Deep neural networks (DNN)

Dep’t of CSE 7 ICET Muvattupuzha


COMPUTER VISION BASED FIRE DETECTION WITH A VIDEO ALERT SYSTEM

CHAPTER 4
COMPUTER VISION BASED FIRE DETECTION WITH A
VIDEO ALERT SYSTEM
All the previously existing systems either use sensors like flame sensor, gas sensors
or smoke sensors to detect fire holocausts in buildings. These detector systems will
cause false alarming. Sometimes, there will be a misinterpretation by the detector
which leads to a false alarm and it leads to unnecessary turbulence among people
in and around the fire examining the area. Also, there is a practical difficulty that
if the area or room under consideration by these detectors is a large space then the
detector will alert the user only when the fire or smoke or heat is at a considerable
level. Hence, it takes a lot of time and the response of the system only occurs after
the intensity of fire is considerably more. To overcome the above-mentioned problems,
a new method is proposed in which a surveillance camera can also be used for fire
detection using images and videos taken by it. The video taken is processed frame-
wise and fire or smoke presence is detected. Also, the alert in cases of fire is either
through SMS or as an image that is sent through an App [6]. The model proposed in
our system uses a webcam which is used as an alternative for surveillance cameras
that keeps monitoring the interiors of buildings. This video is processed using OpenCV
and Raspberry Pi using fire detection algorithms and if a fire is detected, alarm
rings to alert people in that particular area and also a short duration of the live
video is sent to the security of the building or the remote fire station through
wireless LAN. Thus, the fire station could act immediately and send rescuers to save
the people based on the number of people stuck in the fire blazing area, which is
known from the video. The block diagram is shown in Fig. 1.

Dep’t of CSE 8 ICET Muvattupuzha


COMPUTER VISION BASED FIRE DETECTION WITH A VIDEO ALERT SYSTEM

Fig. 1. Block Diagram of Computer Vision based fire detection with a video alert
system.

Fig. 2. Flowchart of Computer Vision based fire detection with a video alert
system using HSV algorithm.

A. CAPTURING THE VIDEO

A camera is used to keep our area under constant surveillance. The video that is
taken by this camera is processed frame by frame by the Raspberry Pi and
OpenCV using python programming language [7]. We utilize Raspberry Pi 3 Model
B which is a Single-board computer with remote LAN and Bluetooth connectivity.
Dep’t of CSE 9 ICET Muvattupuzha
COMPUTER VISION BASED FIRE DETECTION WITH A VIDEO ALERT SYSTEM
The Raspberry Pi 3 is the third generation Raspberry Pi with Quad Core 1.2GHz
Broadcom BCM2837 64bit CPU and 1GB RAM [8]. We use this model
particularly because it has Wi-Fi connectivity and also it is good in processing
images and videos at a faster rate. SD card is inserted into the Raspberry Pi to
store the OS Raspbian Jessie shown in Fig. 3. Open Source Computer Vision is
a library of programming functions mainly directed to real-time computer vision.

Fig. 3. Raspberry Pi 3 Model B.

Dep’t of CSE 10 ICET Muvattupuzha


COMPUTER VISION BASED FIRE DETECTION WITH A VIDEO ALERT SYSTEM

B. FIRE DETECTION AND ALGORITHM USED

The Hue, Saturation, Value (HSV) algorithm is used to detect fire in our system.
The video that is taken by the web camera is analyzed frame by frame by
image acquisition using python program and when a fire of more than a particular
intensity that is more than a particular pixel level is detected, an alert is sent.
One frame is taken and is converted into RGB color model [9]. Now red, blue
and green colors are separated. Range values are specified as values for all
shades of yellow and thus separating yellow from the other regions. This detected
yellow region alone is converted to white color. Then the frame is converted to
grayscale by grayscale conversion and contours are found by contour detection.
The areas of fire are now detected and represented as red blocks and the intensity
of fire can be said from these red blocks shown in Fig. 2.[10].

C. Video and Alarm Alert

When the fire is detected using the HSV algorithm, the alarm circuit activates
immediately alerting the people inside the room is shown in Fig. 4.

Fig. 4. (a) A frame from the Captured video.


Dep’t of CSE 11 ICET Muvattupuzha
COMPUTER VISION BASED FIRE DETECTION WITH A VIDEO ALERT SYSTEM

(b) RGB image.

(c) Yellow regions are converted to white.

Dep’t of CSE 12 ICET Muvattupuzha


COMPUTER VISION BASED FIRE DETECTION WITH A VIDEO ALERT SYSTEM

(d) Changing to Grayscale.

(e) Red blocks detected in the fire area.

Simultaneously, video is captured by the web camera and if fire is detected, the
program runs giving the output as an alert message which sends the name of the
place and its address to the App. Also, a short live video with small time intervals
inbetween is sent to the App until the fire is extinguished completely. This video

Dep’t of CSE 13 ICET Muvattupuzha


COMPUTER VISION BASED FIRE DETECTION WITH A VIDEO ALERT SYSTEM
can be reviewed by the remote fire alarm control unit and since we avoid using
sensors, false alarms can be avoided. The number of people caught inside the room
can be checked and rescuers can be sent to the area to rescue the people accordingly
shown in Fig. 5.

Dep’t of CSE 14 ICET Muvattupuzha


COMPUTER VISION BASED FIRE DETECTION WITH A VIDEO ALERT SYSTEM

Fig. 5. A picture of the video alert in the app.

Dep’t of CSE 15 ICET Muvattupuzha


COMPUTER VISION BASED FIRE DETECTION WITH A VIDEO ALERT SYSTEM

CHAPTER 4
CONCLUSION

This system is able to detect fire in the building by the use of camera and Raspberry
Pi. It is also capable of differentiating fire from rest of system. Thereby the system achieves
the required objectives. In future, a number of cameras can be connected to a common
Raspberry pi for detection of fire in various places of the same building. The advantage is
that we avoid using flame and smoke sensors that might give false alarms. In case there is
a false alarm by using our system, we can verify it by checking the video. In this paper, we
propose a fire detection method using OpenCV and Raspberry Pi to detect fire and send an
alert as an alarm in the same building and a short video is sent to the remote fire alarm
control unit.

Dep’t of CSE 16 ICET Muvattupuzha


COMPUTER VISION BASED FIRE DETECTION WITH A VIDEO ALERT SYSTEM

REFERENCES
[1] Richard Szeliski, “Computer Vision: Algorithms and Applications”,
published in September 2010.
[2] Md Saifudaullah Bin Bahrudin, Rosni Abu Kassim, “Development of
fire alarm system using Raspberry Pi and Arduino Uno,” 2013
International Conference on Electrical, Electronics and System
Engineering, December 2013.
[3] Ahmed Imteaj, Tanveer Rahman, Muhammad Kamrul Hossain,
Mohammed Shamsul Alam, Saad Ahmad Rahat, “An IoT based fire
alarming and authentication system for workhouse using Raspberry Pi
3”, International Conference on Electrical, Computer and
Communication Engineering(ECCE), February 2017.
[4] Rajeshkumar Kallur, Prof. Rohini Kallur, “Fire detection with a wireless
video camera using Matlab”, International Journal of Recent Trends in
Engineering & Research”, volume 02, Issue 04, April 2016.
[5] Chandrakant Shrimantrao, Mahesh S K, Vivekanand M Bonal, “Fire
detection system using Matlab”, International Journal for Research in
Applied Science & Engineering Technology, volume 5 Issue VII, July
2017.
[6] Vijayalaxmi, B.Shravani, G.Sree Ram, “Fire detection and Alert system
using image processing”, Global Journal of Advanced Engineering
Technologies. Special Issue(CTCNSF-2014).
[7] K.S.Shilpashree, Lokesha.H, Hadimani Shivakumar, “Implementation of
Image Processing on Raspberry Pi”, International Journal of Advanced
Research in Computer and Communication Engineering, Vol 4, Issue 5,
May 2015.
[8] Ashwin Pajankar, “Raspberry Pi Computer Vision Programming”,
Published in May 2015.
[9] R.Dhanujalakshmi, B.Divya, C.Divya@sandhiya, A.Robertsingh,
“Image Processing based fire detection system using Raspberry Pi
system”, SSRG International Journal of Computer science and
Engineering (JCSE), Volume 4 Issued 4 April 2017.
[10] Prof. Amit Hatekar, Saurabh Manwani, Gaurav Patil, Akshat Parekh,
“Fire detection on a surveillance system using Image processing”,
International Journal of Engineering Research & Technology(IJERT),

Dep’t of CSE 17 ICET Muvattupuzha

S-ar putea să vă placă și