You are on page 1of 6

Smoke Detection in Video Surveillance Using Optical Flow and Green’s

Theorem
Melih Altun and Mehmet Celenk
School of Electrical Engineering and Computer Science
Stocker Center, Ohio University
Athens, OH 45701 USA
{ma231709, celenk}@ohio.edu
http://www.ohio.edu

Abstract - Finding smoke in surveillance videos not directly seen or it is at an early phase where
can be crucial in early detection of fire only smoke is visible, smoke detection systems
emergencies. Such early detections improve provide an earlier response.
damage prevention and control by enabling the Smoke detection systems mainly use methods based
authorities to take the necessary precautionary on wavelet [3] information. [4] combines wavelet
steps. This paper describes a smoke detection methods with Hidden Markov trees to account for
technique developed for videos taken in visual the dynamic characteristics of smoke. Optical flow
band. The method makes use of optical flow and [5] and other dynamic features such as velocity
color filtering to detect smoke covered regions and histograms are also used [6]. [7,8] use color
the associated smoke sources. Next it extracts information and motion estimation methods for
dynamic smoke features such as average upwards detecting smoke covered regions in a video frame.
motion above the source and divergence around the Although color information is vital for eliminating
source via Green’s theorem. This determines non-smoke objects, it is not sufficient for detection
whether the selected region contains smoke. In due to the presence of other objects with colors
turn, the extracted dynamic characteristics of the similar to smoke. Therefore, it is used in
smoke pattern greatly improve detection accuracy combination with other methods to reduce false
of the method and produce highly robust results as detections. The idea behind our approach is similar
demonstrated in the experimental results. to the method developed in [8]. However, instead of
simple motion detection we use optical flow to
Keywords: Smoke detection, video surveillance, model smoke behavior more precisely.
optical flow, Green’s theorem In this paper a smoke detection method based on
optical flow and dynamic characteristics of smoke
is described. Color filtering is also applied to
1 Introduction reduce the possible smoke sources. After obtaining
an optical flow vector field and determining a
This paper presents a smoke detection method candidate smoke source, Green’s theorem is applied
based on video processing. Detection of smoke in around the selected source to test the divergent
videos is particularly useful in surveillance and behavior of smoke. Moreover, since heat
automatic event detection applications. convection above the source causes the smoke to
Traditional smoke detectors measure certain rise, average upward motion above the source is
chemicals and particles in the air. In small closed also calculated to improve the confidence of
spaces these particles rapidly reach a high detection. The remainder of this paper is organized
concentration so detectors can generate early as follows: In section II the details of the smoke
warnings. However, they do not function as well in detection method is described. Experimental results
large spaces and they are simply not applicable to are presented in section III. The last section
outdoor environments. contains conclusions.
Video based fire and smoke detectors are known to
overcome such difficulties by their remote sensing
capabilities. Moreover, video based systems are 2 Description of the Method
also capable of obtaining information such as the
exact location and the progress of fire. Color Filter: Smoke color can vary greatly from
Fire detection methods use visual and infrared (IR) very dark to almost white shades. To select those
cameras to find fire sources. They use color, shape gray levels and eliminate image segments with
and dynamic features such as flickering [1,2]. The other colors we convert RGB values to HSL values
disadvantage of both visual and IR methods is that and consider S value for selection. Since gray
they need direct visual of fire. In cases where fire is pixels have low saturation we take pixels with S
values less than a certain threshold as a potential since these regions are clustered we can detect the
smoke pixel. As it is stated in [8], sometimes smoke appearance of a cluster and mark it as a smoke
can have a bluish tone. So, for pixels where blue source. Green rectangle in Figure 3 and in other
value is higher than red and green we use a slightly figures showing the detection results denotes the
higher saturation threshold to allow for bluish type detected smoke source.
of smoke. After selection of possible smoke pixels
a Basic Sequential Algorithmic Scheme (BSAS) [9] 2.2 Application of Green’s Theorem
clusters nearby smoke colored pixels together.
However, most of these smoke colored clusters are After finding a potential smoke source with color
usually stationary background areas. Using optical filtering and obtaining the optical flow vector field
flow, which will be discussed in the next with the methods described in previous subsections
subsection, we are able to select dynamic regions we are able to test the dynamic characteristics of
and eliminate those stationary areas. smoke. The first dynamic characteristic we test is
the divergent behavior of smoke around its source.
2.1 Optical Flow One way to achieve this is to apply Green’s
Theorem. Green’s Theorem states that outward flux
To obtain the foreground objects in a video and of a vector field across a closed boundary is equal
accurately measure their motions optical flow is to the divergence of the vector field integrated over
utilized. A fast and efficient optical flow method is the region enclosed by the boundary. So if we
essential for the real time requirements of detection. define a simple closed curve, such as a small
Our optical flow calculation is mostly parallel to the rectangle around the smoke source, a continuous
method proposed in [10]. First a spatiotemporal positive outward flux across this rectangle indicates
gradient of the video sequence I(x,y,t) is obtained. a divergent source within it.
Then a 3D Gaussian filter is applied with linear We already have the horizontal and vertical
convolution to smooth the gradient as in equations components of the optical flow field. Divergence of
(1) and (2). the field is simply given by the equation 6.
, , , , , , ′
, , (1) (5)

, , , , ∗ , , (2) ∙ (6)

where H is the 3D Gaussian function and * is the


convolution operation. Then the smoothed gradient General equation of Green’s Theorem is given in
vector is multiplied with its transpose to obtain the equation 7.
tensor matrix T.
∮ ∙ ∬ (7)

⋅ (3)

Here, is the vector field, is the normal to the


Following the calculation of tensors, the velocity closed curve C, s is an infinitesimal line segment
vectors are calculated using parameters t1 through over C and R is the region surrounded with C. We
t6, which are the elements of the symmetric tensor use the left side of this equation. Instead of
matrix. calculating the divergence over the entire source
region and summing it, we calculate the outward
t 6t 4  t5t 2 and t t t t (4) flux simply by taking the inner product of motion
vx  v y  5 4 62 1
t1t 2  t 42 t1t 2  t 4 vectors and the normal vector over the rectangle
surrounding the potential smoke source and sum the
Finally the velocity vectors for each pixel values. Divergent smoke sources are expected to
coordinate are smoothed by a 2D median filter [11] produce positive results.
to obtain the final x and y component values of
optical flow vector field. Optical flow for the 2.3 Average upwards motion above the
sample frames given in Figure 1 can be seen in source
Figure 2.
Since we are interested in the motion of smoke and Another dynamic characteristic of smoke is that it
not the other objects, we mask our optical flow map rises right above its source due to heat convection.
with the smoke colored clusters found by our color We only consider the area above the source because
filter. So we obtain a vector map showing only the as the smoke spreads away from the source it cools
motion of smoke colored foreground regions. And down and starts moving with the air currents in that
environment. It even displays random Brownian
motion if there is no dominant air current.
However, its motion is predictable when it is close
to the heat source. Therefore, we consider a
rectangular region above the possible smoke source
and examine the optical flow in this area. We take
the average of vertical component of flow vectors
in that region. If the result shows consistent
upwards motion it is strong evidence that the
possible source is an actual smoke source.
Consistent upwards motion in conjunction with
divergent behavior suggests that the selected cluster
in the video frame is real smoke.

Figure 3: Smoke detection result where smoke is marked


3 Experimental Results by the red closed curve and smoke source is marked by
the green rectangle.
For testing our smoke detection method we used
sample videos from Bilkent University Signal and In Figure 4 average of upwards optical flow vectors
Image Processing Group [12] and Octec dataset for the smoke source in Figure 1 is shown. Figure 5
from [13]. displays the total outward flux around the smoke
To demonstrate optical flow two consecutive source in each frame of the video. Note that both
frames are shown in Figure 1. Figure 2 shows the average upwards motion and total outwards flux
optical flow result in which, motions of rising consistently maintain positive values and support
smoke and running person are clearly seen. The our assertion.
result of smoke detection method is displayed in
Figure 3

Figure 1: Consecutive frames from a sample video

Figure 4: Average upwards motion above the smoke


source for the video sequence given in Figure 1

Figure 2: Optical flow results. Notice that hue represents


direction as indicated by the circle on bottom right and
saturation represents magnitude of the motion
Figure 5: Total outward flux around the smoke source for
the video sequence given in Figure 1. Notice the dip
around frame #41. It corresponds to the time the person
crosses in front of the smoke source and occludes it.
In order to measure our smoke detection rate, we
also visually selected smoke covered areas in the
video frames and established a ground truth. Then
we compared the smoke regions detected by our
algorithm to this ground truth. Figure 6 shows the
rate of detection obtained by this comparison.

Figure 8: Average upwards motion above the smoke


source for the video sequence given in Figure 7

Figure 6: Rate of smoke detection for the first sample


video sequence

Figure 7 shows another detection result from frame


sequence with the appearance of smoke. Results of
dynamic feature analysis are depicted in Figures 8
and 9. Again, average upwards motion and total
outwards flux value remain consistently positive
after smoke appears and source is detected.
Detection ratio obtained by comparing smoke areas
Figure 9: Total outward flux around the smoke source for
detected by our algorithm to ground truth also the video sequence given in Figure 7
remains high as seen in Figure 10.

Figure 10: Rate of smoke detection for the second sample


Figure 7: Smoke detection results for the Octec Dataset video sequence
Figure 12: A frame from the video sequence with no
smoke occurrence

Figure 13: Average upwards motion above the detected


source for the video sequence given in Figure 12

Figure 11: Further detection results from Bilkent smoke


video dataset

Other detection results from different video


sequences are presented in Figures 11 a, b and c.
In Figure 12, a case without any smoke is shown.
Even though an area on the left is selected as a
possible source, total outwards flux and average
upwards motion (Figures 13,14) show no signs of
dynamic smoke behavior. Hence, there is no
detection.

Figure 14: Total outward flux around the detected source


for the video sequence given in Figure 12
4 Conclusion [9] S. Theodoridis and K. Koutroumbas, Pattern
Recognition, 4th ed. Elsevier, 2009.
In this paper we have presented a new method for
[10] Z. Wei, D.J. Lee, B.E. Nelson, J.K. Archibald,
detecting smoke with color filtering, optical flow
and B.B. Edwards, FPGA-Based Embedded Motion
and utilizing Green’s Theorem. At first, by using a
Estimation Sensor, Int. Journal of Reconfigurable
color filter possible smoke covered regions are
Computing, vol. 2008, no. 636145, p. 8, 2008.
found. Then, optical flow enables detection of
motions in the video. Using the magnitude and the [11] J. S. Lim, Two-Dimensional Signal and Image
directionality of these motions, total outward flux Processing, Prentice Hall, 1990
and average upwards motion features are tested in
order to confirm the presence of a divergent smoke [12] Bilkent EE Signal Processing group,
source and a heat source in that selected region. http://signal.ee.bilkent.edu.tr/
Extracting these dynamic smoke features produces
highly reliable results as it is demonstrated with the [13] D. Dwyer, Octec Limited,
test cases. http://www.octec.co.uk/

5 References
[1] B.U. Toreyin, R.G. Cinbis, Y. Dedeoglu, A.E.
Cetin, Fire detection in infrared video using wavelet
analysis, Optical Engineering, vol. 46(6), pp.
67204-1 – 67204-9, 2007

[2] G. Marbach, M. Leopfe, T. Brupbacher, An


image processing technique for fire detection in
video images, Fire Safety Journal, vol. 41, pp 285-
289, 2006

[3] B.U. Toreyin, Y. Dedeoglu, A.E. Cetin, Contour


based smoke detection in video using wavelets,
14th European Signal Processing Conference
EUSIPCO, 2006

[4] R.J. Ferrari, H. Zhang, C.R. Kube, Real-time


detection of steam in video images. Pattern
Recognition, vol. 40(3), pp. 1148-1159, 2007

[5] I. Kolesov, P. Karasev, A. Tannenbaum, E.


Haber, Fire and smoke detection in video with
optimal mass transport based optical flow and
neural networks, 17th IEEE International
Conference on Image Processing (ICIP), pp. 761-
764, 2010

[6] J. Vicente, P. Guillemant, An image processing


technique for automatically detecting forest fire,
International Journal of Thermal Sciences, vol.
41(12), pp. 1113-1120, 2002

[7] D. Kim, Y. Wang. Smoke detection in video,


IEEE WRI World Congress on Computer Science
and Information Engineering, Vol. 5, pp. 759-763,
2009

[8] F. Yuan, A fast accumulative motion orientation


model based on integral image for video smoke
detection. Pattern Recognition Letters, vol. 29(7),
pp. 925-932, 2008

You might also like