<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xml:lang="en" article-type="research-article">
<front>
<journal-meta>
<journal-id journal-id-type="nlm-ta">Sensors</journal-id>
<journal-title>Sensors</journal-title>
<issn pub-type="epub">1424-8220</issn>
<publisher>
<publisher-name>Molecular Diversity Preservation International (MDPI)</publisher-name></publisher></journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.3390/s120505670</article-id>
<article-id pub-id-type="publisher-id">sensors-12-05670</article-id>
<article-categories>
<subj-group>
<subject>Article</subject></subj-group></article-categories>
<title-group>
<article-title>An Early Fire Detection Algorithm Using IP Cameras</article-title></title-group>
<contrib-group>
<contrib contrib-type="author">
<name><surname>Millan-Garcia</surname><given-names>Leonardo</given-names></name><xref ref-type="aff" rid="af1-sensors-12-05670"><sup>1</sup></xref></contrib>
<contrib contrib-type="author">
<name><surname>Sanchez-Perez</surname><given-names>Gabriel</given-names></name><xref ref-type="aff" rid="af1-sensors-12-05670"><sup>1</sup></xref><xref ref-type="corresp" rid="c1-sensors-12-05670"><sup>*</sup></xref></contrib>
<contrib contrib-type="author">
<name><surname>Nakano</surname><given-names>Mariko</given-names></name><xref ref-type="aff" rid="af1-sensors-12-05670"><sup>1</sup></xref></contrib>
<contrib contrib-type="author">
<name><surname>Toscano-Medina</surname><given-names>Karina</given-names></name><xref ref-type="aff" rid="af1-sensors-12-05670"><sup>1</sup></xref></contrib>
<contrib contrib-type="author">
<name><surname>Perez-Meana</surname><given-names>Hector</given-names></name><xref ref-type="aff" rid="af1-sensors-12-05670"><sup>1</sup></xref></contrib>
<contrib contrib-type="author">
<name><surname>Rojas-Cardenas</surname><given-names>Luis</given-names></name><xref ref-type="aff" rid="af2-sensors-12-05670"><sup>2</sup></xref></contrib></contrib-group>
<aff id="af1-sensors-12-05670">
<label>1</label>Graduate School, ESIME-Culhuacan, National Polytechnic Institute, Av. Santa Ana no. 1000, Col. San Francisco Culhuacan, Mexico D.F., 04430, Mexico; E-Mails: <email>millan.galeis@gmail.com</email> (L.M.-G.); <email>mnakano@ipn.mx</email> (M.N.); <email>ltoscano@ipn.mx</email> (K.T.-M.); <email>hmperezm@ipn.mx</email> (H.P.-M.)</aff>
<aff id="af2-sensors-12-05670">
<label>2</label>Electric Engineering Department, Metropolitan Autonomous University, Iztapalapa Campus, Mexico D.F., 09340, Mexico; E-Mail: <email>lmrc@xanum.uam.mx</email></aff>
<author-notes>
<corresp id="c1-sensors-12-05670">
<label>*</label>Author to whom correspondence should be addressed; E-Mail: <email>gasanchezp@ipn.mx</email>; Tel./Fax: +52-55-5656-2058.</corresp></author-notes>
<pub-date pub-type="collection">
<year>2012</year></pub-date>
<pub-date pub-type="epub">
<day>03</day>
<month>05</month>
<year>2012</year></pub-date>
<volume>12</volume>
<issue>5</issue>
<fpage>5670</fpage>
<lpage>5686</lpage>
<history>
<date date-type="received">
<day>29</day>
<month>02</month>
<year>2012</year></date>
<date date-type="rev-recd">
<day>19</day>
<month>04</month>
<year>2012</year></date>
<date date-type="accepted">
<day>28</day>
<month>04</month>
<year>2012</year></date></history>
<permissions>
<copyright-statement>© 2012 by the authors; licensee MDPI, Basel, Switzerland.</copyright-statement>
<copyright-year>2012</copyright-year>
<license>
<p>This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/3.0/).</p></license></permissions>
<abstract>
<p>The presence of smoke is the first symptom of fire; therefore to achieve early fire detection, accurate and quick estimation of the presence of smoke is very important. In this paper we propose an algorithm to detect the presence of smoke using video sequences captured by Internet Protocol (IP) cameras, in which important features of smoke, such as color, motion and growth properties are employed. For an efficient smoke detection in the IP camera platform, a detection algorithm must operate directly in the Discrete Cosine Transform (DCT) domain to reduce computational cost, avoiding a complete decoding process required for algorithms that operate in spatial domain. In the proposed algorithm the DCT Inter-transformation technique is used to increase the detection accuracy without inverse DCT operation. In the proposed scheme, firstly the candidate smoke regions are estimated using motion and color smoke properties; next using morphological operations the noise is reduced. Finally the growth properties of the candidate smoke regions are furthermore analyzed through time using the connected component labeling technique. Evaluation results show that a feasible smoke detection method with false negative and false positive error rates approximately equal to 4% and 2%, respectively, is obtained.</p></abstract>
<kwd-group>
<kwd>early fire detection</kwd>
<kwd>smoke detection</kwd>
<kwd>DCT</kwd>
<kwd>DCT inter-transformation</kwd>
<kwd>video surveillance</kwd>
<kwd>IP camera</kwd></kwd-group></article-meta></front>
<body>
<sec sec-type="intro">
<label>1.</label>
<title>Introduction</title>
<p>Early fire detection can help to alert of and prevent disasters that generate great economic damages and human losses. The combustion of objects usually begins with the emission of smoke, even before catching fire; therefore the presence of smoke is an essential factor for early fire detection. The features that describe the smoke depend on chemical properties of the combusting object, the fire temperature, the amount of oxygen, and so on. Generally the smoke color range goes from white to white-bluish when the combustion temperature is low, and from gray to black when the temperature rises to ignition. The most common smoke detectors are based on infrared or ultraviolet cameras, while other detection techniques are based on the analysis of particles, temperature, relative humidity and air transparency. Those systems are activated until the smoke particles or flames are very close to the fire detector device, moreover those devices cannot provide more information regarding to the exact location of fire, magnitude, growth rate and so on [<xref ref-type="bibr" rid="b1-sensors-12-05670">1</xref>]. To provide more accurate and reliable smoke detection, some video processing-based detection systems have been proposed.</p>
<p>Generally the video processing-based fire detection algorithms are carried out using two principal characteristics of fire, which are flame and smoke. Almost all fire detection algorithms in the literature perform a pixel level analysis using some flame and/or smoke properties, such as the flame/smoke color, flickering nature, loss of background edges in frames, among others. In [<xref ref-type="bibr" rid="b2-sensors-12-05670">2</xref>], authors proposed a method for fire detection using a multilayer neural network (MNN) with a back-propagation algorithm, which is trained using the color property of flames presented in the HSI (Hue-Saturation-Intensity) color space. This algorithm analyses the color of each pixel to determine if some pixels present the flame features or not. In [<xref ref-type="bibr" rid="b3-sensors-12-05670">3</xref>] and [<xref ref-type="bibr" rid="b4-sensors-12-05670">4</xref>], the Hidden Markov Models (HMM) and the discrete wavelet transform (DWT) are used to detect flickering pixels that indicate the presence of flames. Generally the presence of flames may indicate more a serious fire situation than the presence of smoke only. Therefore for early fire detection purposes, smoke detection schemes may be more efficient.</p>
<p>In [<xref ref-type="bibr" rid="b5-sensors-12-05670">5</xref>] and [<xref ref-type="bibr" rid="b6-sensors-12-05670">6</xref>], the authors use of a method for detecting smoke based on the loss of high frequencies using HMM and DWT. In [<xref ref-type="bibr" rid="b1-sensors-12-05670">1</xref>] the RGB image sequences are analyzed to detect smoke using its chromaticity and grade of disorder. The proposal of [<xref ref-type="bibr" rid="b7-sensors-12-05670">7</xref>] combines several dynamic and static smoke features, such as growth, disorder, flicking frequency and the energy of wavelet transform, and then this combined information is used to train a MNN to detect the presence of smoke. In [<xref ref-type="bibr" rid="b8-sensors-12-05670">8</xref>], a smoke detection algorithm analyses the smoke candidate area using the smoke motion direction in a cumulative manner through the video sequences. The algorithm in [<xref ref-type="bibr" rid="b9-sensors-12-05670">9</xref>] seeks to detect the smoke and the flame inside a tunnel, in which the fire detection is based on the extracted motion area using a background image and the motion history of images, as well as the invariant moments. The main problem of this application is the large amount of movement generated by cars and heavy air currents. In the smoke detection algorithm proposed by [<xref ref-type="bibr" rid="b10-sensors-12-05670">10</xref>], the smoke is considered as a type of texture pattern, which is extracted using local binary patterns (LBP) that are commonly used as texture classifier. These LBP are then used to train a MNN which determines the presence of smoke. In [<xref ref-type="bibr" rid="b11-sensors-12-05670">11</xref>], using the smoke color property defined in [<xref ref-type="bibr" rid="b1-sensors-12-05670">1</xref>] and smoke motion detected by optical flow algorithm, a MNN is trained to detect the presence of smoke. It is worth noting that all fire detection algorithms mentioned above operate in the spatial domain, analyzing pixel values of each frame of video.</p>
<p>Recently the use of IP cameras in video surveillance has grown significantly, because video surveillance systems based on IP technology are easy to implement at low cost due to the use of cabling and wireless Internet infrastructure already present in many companies [<xref ref-type="bibr" rid="b12-sensors-12-05670">12</xref>]. Moreover, an IP camera not only captures sequences of images, but also has its own processor, memory and operating system, allowing loaded programs to process the captured information without the need of additional computer equipment. IP cameras can also be connected to form networks, making a video surveillance system more reliable. Generally the information provided by IP camera is encoded data in several formats, such as Motion-JPEG (MJPEG), H.264, <italic>etc.</italic> [<xref ref-type="bibr" rid="b12-sensors-12-05670">12</xref>].</p>
<p>The use of IP technology for fire detection offers several advantages, for example IP-camera networks can detect fire origin, magnitude and propagation in more accurate manner compared with a single video surveillance system. However to efficiently use the IP technology for fire detection purposes, the smoke detection algorithm must perform directly in the Discrete Cosine Transform (DCT) domain, because decoding (from DCT domain to spatial domain) and possible encoding (from spatial domain to DCT domain) are considerably high time consuming processes. However almost all fire detection algorithms including those proposed in [<xref ref-type="bibr" rid="b1-sensors-12-05670">1</xref>–<xref ref-type="bibr" rid="b11-sensors-12-05670">11</xref>] are carried out in the spatial domain, analyzing the value of each pixel or block of pixels. Therefore any implementation of these algorithms in IP technology requires considerably high extra processing time.</p>
<p>This paper proposes a smoke detection algorithm, which is an extended version of that presented in UCAmI'11 [<xref ref-type="bibr" rid="b13-sensors-12-05670">13</xref>]. The proposed algorithm operates directly in DCT domain and can be implemented in IP camera-based surveillance system. The proposed algorithm detects the presence of smoke using several smoke features, such as color, motion and spreading characteristics, which are extracted directly from DCT coefficients to avoid the decoding process. To increase the resolution of video frames without significantly increasing the computational cost, fast inter-transformation of DCT coefficients proposed in [<xref ref-type="bibr" rid="b14-sensors-12-05670">14</xref>] and [<xref ref-type="bibr" rid="b15-sensors-12-05670">15</xref>] are used. The computer simulation results show the efficiency and high smoke detection rates of the proposed algorithm. The rest of this paper is organized as follows: Section 2 describes the proposed video processing-based smoke detection scheme. The experimental results and discussions are shown in Section 3, following by conclusions in Section 4.</p></sec>
<sec>
<label>2.</label>
<title>Proposed Video Processing-Based Smoke Detection Scheme</title>
<p>The proposed smoke detection scheme is designed to work efficiently in an IP camera-based system, in which the sequence encoded by the MJPEG codec is available as input data for the smoke detection algorithm. Recently, IP cameras with H.264 codec have been developed; however the cost of those IP cameras is much higher than that of IP cameras with MJPEG codec and we consider that the high compression rate offered by H.264 is not necessary for the smoke detection tasks, because it is not necessary to store and/or transmit the captured video sequences between the IP camera modules and the main computer systems. Also MJPEG codec offers higher quality of frames than H.264 codec. Therefore we decided that an MJPEG based IP camera module is the most adequate platform for efficient smoke detection scheme considering computational and economical cost, as well as the frame quality. Although the proposed scheme is designed for MJPEG codec system, it can be adapted to H.264 with minor modifications.</p>
<p>The block diagram of the proposed smoke detection scheme is shown in <xref rid="f1-sensors-12-05670" ref-type="fig">Figure 1</xref>, which is composed of four stages: video frames acquisition stage, DCT inter-transformation based preprocessing stage, smoke region detection stage and region analysis stage. In the video frames acquisition stage, each frame of size 1,920 × 1,080 pixels is captured by an IP camera and encoded using an standard JPEG codec, in which bi-dimensional DCT is applied to non-overlapped blocks of 8 × 8 pixels of each frame. In the preprocessing stage, the DCT inter-transformation is applied to all DCT blocks of 8 × 8 coefficients of each frame to get DCT blocks of 4 × 4 coefficients without using the inverse DCT (IDCT). In the smoke region detection stage, using the DC values of each DCT block of the 4 × 4 coefficients of several consecutive frames, motion and color properties of smoke are analyzed to get the smoke region candidates. The candidate regions are processed using morphological operations to eliminate isolated blocks. Using the connected component labeling algorithm, the smoke expansion properties of the candidate regions are analyzed through time to discard non-smoke regions. All stages, except the video frames acquisition stage, are described in following subsections.</p>
<sec>
<label>2.1.</label>
<title>DCT Inter-Transformation Based Preprocessing</title>
<p>As mentioned before, an IP camera module provides DCT blocks of 8 × 8 coefficients of each frame; however this block size is too large for accurate analysis of smoke features and it is necessary to use a smaller block size. Traditionally if a DCT block with a size different from a current block size is required, the IDCT must be computed and then a new DCT with the required block size is re-calculated. These processes are highly time consuming operations. In [<xref ref-type="bibr" rid="b14-sensors-12-05670">14</xref>,<xref ref-type="bibr" rid="b15-sensors-12-05670">15</xref>], inter-transformation of DCT coefficients is proposed, in which the relationship between DCT coefficients of different block sizes is established.</p>
<p>Consider the DCT coefficients of a block <italic>B</italic> of size S × S, which are given by: 
<disp-formula id="FD1">
<label>(1)</label>
<mml:math id="mm1" display="block">
<mml:semantics id="sm1">
<mml:mrow>
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>u</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>v</mml:mi></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>=</mml:mo>
<mml:msqrt>
<mml:mrow>
<mml:mfrac>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi></mml:mfrac></mml:mrow></mml:msqrt>
<mml:mi>α</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>v</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:munderover>
<mml:mo>∑</mml:mo>
<mml:mrow>
<mml:mi>q</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>0</mml:mn></mml:mrow>
<mml:mrow>
<mml:mi>S</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:munderover>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msqrt>
<mml:mrow>
<mml:mfrac>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi></mml:mfrac></mml:mrow></mml:msqrt>
<mml:mi>α</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>u</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:munderover>
<mml:mo>∑</mml:mo>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>0</mml:mn></mml:mrow>
<mml:mrow>
<mml:mi>S</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:munderover>
<mml:mrow>
<mml:mi>B</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>q</mml:mi></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>cos</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mn>2</mml:mn>
<mml:mi>p</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo stretchy="false">)</mml:mo>
<mml:mi>u</mml:mi>
<mml:mo>π</mml:mo></mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi></mml:mrow></mml:mfrac></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>cos</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mn>2</mml:mn>
<mml:mi>q</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo stretchy="false">)</mml:mo>
<mml:mi>v</mml:mi>
<mml:mo>π</mml:mo></mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi></mml:mrow></mml:mfrac></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi></mml:mfrac>
<mml:mi>α</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>v</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mi>α</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>u</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:munderover>
<mml:mo>∑</mml:mo>
<mml:mrow>
<mml:mi>q</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>0</mml:mn></mml:mrow>
<mml:mrow>
<mml:mi>S</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:munderover>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:munderover>
<mml:mo>∑</mml:mo>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>0</mml:mn></mml:mrow>
<mml:mrow>
<mml:mi>S</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:munderover>
<mml:mrow>
<mml:mi>B</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>q</mml:mi></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>cos</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mn>2</mml:mn>
<mml:mi>p</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo stretchy="false">)</mml:mo>
<mml:mi>u</mml:mi>
<mml:mo>π</mml:mo></mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi></mml:mrow></mml:mfrac></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>cos</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mn>2</mml:mn>
<mml:mi>q</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo stretchy="false">)</mml:mo>
<mml:mi>v</mml:mi>
<mml:mo>π</mml:mo></mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi></mml:mrow></mml:mfrac></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:semantics></mml:math></disp-formula> where 
<disp-formula id="FD2">
<mml:math id="mm2" display="block">
<mml:semantics id="sm2">
<mml:mrow>
<mml:mi>u</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>v</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>,</mml:mo>
<mml:mn>2</mml:mn>
<mml:mo>,</mml:mo>
<mml:mo>…</mml:mo>
<mml:mi>S</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>α</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>u</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mi>α</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>v</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:mfrac>
<mml:mn>1</mml:mn>
<mml:mrow>
<mml:msqrt>
<mml:mn>2</mml:mn></mml:msqrt></mml:mrow></mml:mfrac></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mi>u</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>0</mml:mn>
<mml:mspace width="0.2em"/>
<mml:mtext>o</mml:mtext>
<mml:mspace width="0.2em"/>
<mml:mi>v</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>0</mml:mn></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mn>1</mml:mn></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mtext>otherwise</mml:mtext></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mrow></mml:mrow></mml:semantics></mml:math></disp-formula> and defining a matrix <italic>M<sub>S</sub></italic> of S × S as:
<disp-formula id="FD3">
<label>(2)</label>
<mml:math id="mm3" display="block">
<mml:semantics id="sm3">
<mml:mrow>
<mml:mtable columnalign="left">
<mml:mtr columnalign="left">
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mi>S</mml:mi></mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>h</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>l</mml:mi></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>=</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:mfrac>
<mml:mn>1</mml:mn>
<mml:mrow>
<mml:msqrt>
<mml:mi>S</mml:mi></mml:msqrt></mml:mrow></mml:mfrac></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mi>h</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>0</mml:mn></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:msqrt>
<mml:mrow>
<mml:mfrac>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi></mml:mfrac></mml:mrow></mml:msqrt>
<mml:mo>cos</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mo>π</mml:mo>
<mml:mo stretchy="false">(</mml:mo>
<mml:mn>2</mml:mn>
<mml:mi>l</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo stretchy="false">)</mml:mo>
<mml:mi>h</mml:mi></mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi></mml:mrow></mml:mfrac></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mi>h</mml:mi>
<mml:mo>≠</mml:mo>
<mml:mn>0</mml:mn></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mrow></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr columnalign="left">
<mml:mtd columnalign="left">
<mml:mrow>
<mml:mi>h</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>l</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>0</mml:mn>
<mml:mo>,</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>,</mml:mo>
<mml:mo>⋯</mml:mo>
<mml:mi>S</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:semantics></mml:math></disp-formula></p>
<p>It follows that: 
<disp-formula id="FD4">
<label>(3)</label>
<mml:math id="mm4" display="block">
<mml:semantics id="sm4">
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mi>S</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:msqrt>
<mml:mrow>
<mml:mfrac>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi></mml:mfrac></mml:mrow></mml:msqrt>
<mml:mrow>
<mml:mo>[</mml:mo>
<mml:mrow>
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:mfrac>
<mml:mn>1</mml:mn>
<mml:mrow>
<mml:msqrt>
<mml:mn>2</mml:mn></mml:msqrt></mml:mrow></mml:mfrac></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mfrac>
<mml:mn>1</mml:mn>
<mml:mrow>
<mml:msqrt>
<mml:mn>2</mml:mn></mml:msqrt></mml:mrow></mml:mfrac></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mfrac>
<mml:mn>1</mml:mn>
<mml:mrow>
<mml:msqrt>
<mml:mn>2</mml:mn></mml:msqrt></mml:mrow></mml:mfrac></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mo>⋯</mml:mo></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mfrac>
<mml:mn>1</mml:mn>
<mml:mrow>
<mml:msqrt>
<mml:mn>2</mml:mn></mml:msqrt></mml:mrow></mml:mfrac></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:mo>cos</mml:mo>
<mml:mfrac>
<mml:mo>π</mml:mo>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi></mml:mrow></mml:mfrac></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mo>cos</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn>3</mml:mn>
<mml:mo>π</mml:mo></mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi></mml:mrow></mml:mfrac></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mo>cos</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn>5</mml:mn>
<mml:mo>π</mml:mo></mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi></mml:mrow></mml:mfrac></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mo>⋯</mml:mo></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mo>cos</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>π</mml:mo></mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi></mml:mrow></mml:mfrac></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:mo>cos</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mo>π</mml:mo></mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi></mml:mrow></mml:mfrac></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mo>cos</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn>6</mml:mn>
<mml:mo>π</mml:mo></mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi></mml:mrow></mml:mfrac></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mo>cos</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn>10</mml:mn>
<mml:mo>π</mml:mo></mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi></mml:mrow></mml:mfrac></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mo>⋯</mml:mo></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mo>cos</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo stretchy="false">)</mml:mo>
<mml:mn>2</mml:mn>
<mml:mo>π</mml:mo></mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi></mml:mrow></mml:mfrac></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mo>⋮</mml:mo></mml:mtd>
<mml:mtd>
<mml:mo>⋮</mml:mo></mml:mtd>
<mml:mtd>
<mml:mo>⋮</mml:mo></mml:mtd>
<mml:mtd>
<mml:mo>⋮</mml:mo></mml:mtd>
<mml:mtd>
<mml:mo>⋮</mml:mo></mml:mtd></mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:mo>cos</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>S</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>π</mml:mo></mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi></mml:mrow></mml:mfrac></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mo>cos</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn>3</mml:mn>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>S</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>π</mml:mo></mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi></mml:mrow></mml:mfrac></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mo>cos</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn>5</mml:mn>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>S</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>π</mml:mo></mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi></mml:mrow></mml:mfrac></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mo>⋯</mml:mo></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mo>cos</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>S</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>π</mml:mo></mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>S</mml:mi></mml:mrow></mml:mfrac></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow>
<mml:mo>]</mml:mo></mml:mrow></mml:mrow></mml:semantics></mml:math></disp-formula></p>
<p>Using <xref rid="FD4" ref-type="disp-formula">Equation (3)</xref>, we can rewrite <xref rid="FD1" ref-type="disp-formula">Equation (1)</xref> as:
<disp-formula id="FD5">
<label>(4)</label>
<mml:math id="mm5" display="block">
<mml:semantics id="sm5">
<mml:mrow>
<mml:mi>C</mml:mi>
<mml:mo>=</mml:mo>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mi>S</mml:mi></mml:msub>
<mml:mo>×</mml:mo>
<mml:mi>B</mml:mi>
<mml:mo>×</mml:mo>
<mml:msup>
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mi>S</mml:mi></mml:msub></mml:mrow>
<mml:mi>T</mml:mi></mml:msup></mml:mrow></mml:semantics></mml:math></disp-formula></p>
<p>Multiplying <xref rid="FD5" ref-type="disp-formula">Equation (4)</xref> on the left by 
<inline-formula>
<mml:math id="mm6" display="inline">
<mml:semantics id="sm6">
<mml:mrow>
<mml:msubsup>
<mml:mi>M</mml:mi>
<mml:mi>S</mml:mi>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula> and on the right by 
<inline-formula>
<mml:math id="mm7" display="inline">
<mml:semantics id="sm7">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:msubsup>
<mml:mi>M</mml:mi>
<mml:mi>S</mml:mi>
<mml:mi>T</mml:mi></mml:msubsup>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math></inline-formula>, we get:
<disp-formula id="FD6">
<label>(5)</label>
<mml:math id="mm8" display="block">
<mml:semantics id="sm8">
<mml:mrow>
<mml:mi>B</mml:mi>
<mml:mo>=</mml:mo>
<mml:msup>
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mi>S</mml:mi></mml:msub></mml:mrow>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup>
<mml:mo>×</mml:mo>
<mml:mi>C</mml:mi>
<mml:mo>×</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mi>M</mml:mi>
<mml:mi>S</mml:mi>
<mml:mi>T</mml:mi></mml:msubsup></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math></disp-formula></p>
<p>Considering that the block <italic>B</italic> is divided in 4 sub-blocks of size <italic>S</italic>/2 × <italic>S</italic>/2 and denoting each sub-block by <italic><sub>S</sub>B<sub>qr</sub></italic>, <italic>q</italic>,<italic>r</italic> = 1,2, we can get 
<inline-formula>
<mml:math id="mm9" display="inline">
<mml:semantics id="sm9">
<mml:mrow>
<mml:mi>B</mml:mi>
<mml:mo>=</mml:mo>
<mml:mrow>
<mml:mo>[</mml:mo>
<mml:mrow>
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:msub>
<mml:mi>B</mml:mi>
<mml:mrow>
<mml:mn>11</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:msub>
<mml:mi>B</mml:mi>
<mml:mrow>
<mml:mn>12</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:msub>
<mml:mi>B</mml:mi>
<mml:mrow>
<mml:mn>21</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:msub>
<mml:mi>B</mml:mi>
<mml:mrow>
<mml:mn>22</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow>
<mml:mo>]</mml:mo></mml:mrow></mml:mrow></mml:semantics></mml:math></inline-formula>.</p>
<p>The coefficients of DCT of each sub-block and its inverse transform can be expressed in the same manner as <xref rid="FD5" ref-type="disp-formula">Equations (4)</xref> and <xref rid="FD6" ref-type="disp-formula">(5)</xref>:
<disp-formula id="FD7">
<label>(6)</label>
<mml:math id="mm10" display="block">
<mml:semantics id="sm10">
<mml:mrow>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mi>q</mml:mi>
<mml:mi>r</mml:mi></mml:mrow></mml:msub>
<mml:mo>=</mml:mo>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mrow>
<mml:mfrac>
<mml:mi>S</mml:mi>
<mml:mn>2</mml:mn></mml:mfrac></mml:mrow></mml:msub>
<mml:mo>×</mml:mo>
<mml:mi>s</mml:mi>
<mml:msub>
<mml:mi>B</mml:mi>
<mml:mrow>
<mml:mi>q</mml:mi>
<mml:mi>r</mml:mi></mml:mrow></mml:msub>
<mml:mo>×</mml:mo>
<mml:msup>
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mrow>
<mml:mfrac>
<mml:mi>S</mml:mi>
<mml:mn>2</mml:mn></mml:mfrac></mml:mrow></mml:msub></mml:mrow>
<mml:mi>T</mml:mi></mml:msup></mml:mrow></mml:semantics></mml:math></disp-formula>
<disp-formula id="FD8">
<label>(7)</label>
<mml:math id="mm11" display="block">
<mml:semantics id="sm11">
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:msub>
<mml:mi>B</mml:mi>
<mml:mrow>
<mml:mi>q</mml:mi>
<mml:mi>r</mml:mi></mml:mrow></mml:msub>
<mml:mo>=</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mrow>
<mml:mfrac>
<mml:mi>S</mml:mi>
<mml:mn>2</mml:mn></mml:mfrac></mml:mrow></mml:msub></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup>
<mml:mo>×</mml:mo>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mi>q</mml:mi>
<mml:mi>r</mml:mi></mml:mrow></mml:msub>
<mml:mo>×</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mrow>
<mml:mfrac>
<mml:mi>S</mml:mi>
<mml:mn>2</mml:mn></mml:mfrac></mml:mrow></mml:msub></mml:mrow>
<mml:mi>T</mml:mi></mml:msup></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math></disp-formula></p>
<p>Substituting <xref rid="FD8" ref-type="disp-formula">Equation (7)</xref> in <xref rid="FD6" ref-type="disp-formula">Equation (5)</xref>, we get:
<disp-formula id="FD9">
<label>(8)</label>
<mml:math id="mm12" display="block">
<mml:semantics id="sm12">
<mml:mrow>
<mml:mtable columnalign="left">
<mml:mtr columnalign="left">
<mml:mtd columnalign="left">
<mml:mrow>
<mml:mi>B</mml:mi>
<mml:mo>=</mml:mo>
<mml:msup>
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mi>S</mml:mi></mml:msub></mml:mrow>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup>
<mml:mo>×</mml:mo>
<mml:mi>C</mml:mi>
<mml:mo>×</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mi>M</mml:mi>
<mml:mi>S</mml:mi>
<mml:mi>T</mml:mi></mml:msubsup></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup>
<mml:mo>=</mml:mo>
<mml:mrow>
<mml:mo>[</mml:mo>
<mml:mrow>
<mml:mtable columnalign="left">
<mml:mtr columnalign="left">
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mrow>
<mml:mfrac>
<mml:mi>S</mml:mi>
<mml:mn>2</mml:mn></mml:mfrac></mml:mrow></mml:msub></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup>
<mml:mo>×</mml:mo>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mn>11</mml:mn></mml:mrow></mml:msub>
<mml:mo>×</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mrow>
<mml:mfrac>
<mml:mi>S</mml:mi>
<mml:mn>2</mml:mn></mml:mfrac></mml:mrow></mml:msub></mml:mrow>
<mml:mi>T</mml:mi></mml:msup></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:mtd>
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mrow>
<mml:mfrac>
<mml:mi>S</mml:mi>
<mml:mn>2</mml:mn></mml:mfrac></mml:mrow></mml:msub></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup>
<mml:mo>×</mml:mo>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mn>12</mml:mn></mml:mrow></mml:msub>
<mml:mo>×</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mrow>
<mml:mfrac>
<mml:mi>S</mml:mi>
<mml:mn>2</mml:mn></mml:mfrac></mml:mrow></mml:msub></mml:mrow>
<mml:mi>T</mml:mi></mml:msup></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr columnalign="left">
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mrow>
<mml:mfrac>
<mml:mi>S</mml:mi>
<mml:mn>2</mml:mn></mml:mfrac></mml:mrow></mml:msub></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup>
<mml:mo>×</mml:mo>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mn>21</mml:mn></mml:mrow></mml:msub>
<mml:mo>×</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mrow>
<mml:mfrac>
<mml:mi>S</mml:mi>
<mml:mn>2</mml:mn></mml:mfrac></mml:mrow></mml:msub></mml:mrow>
<mml:mi>T</mml:mi></mml:msup></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:mtd>
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mrow>
<mml:mfrac>
<mml:mi>S</mml:mi>
<mml:mn>2</mml:mn></mml:mfrac></mml:mrow></mml:msub></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup>
<mml:mo>×</mml:mo>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mn>22</mml:mn></mml:mrow></mml:msub>
<mml:mo>×</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mrow>
<mml:mfrac>
<mml:mi>S</mml:mi>
<mml:mn>2</mml:mn></mml:mfrac></mml:mrow></mml:msub></mml:mrow>
<mml:mi>T</mml:mi></mml:msup></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow>
<mml:mo>]</mml:mo></mml:mrow></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr columnalign="left">
<mml:mtd columnalign="left">
<mml:mrow>
<mml:mo>=</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo>[</mml:mo>
<mml:mrow>
<mml:mtable columnalign="left">
<mml:mtr columnalign="left">
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mrow>
<mml:mfrac>
<mml:mi>S</mml:mi>
<mml:mn>2</mml:mn></mml:mfrac></mml:mrow></mml:msub></mml:mrow></mml:mtd>
<mml:mtd columnalign="left">
<mml:mn>0</mml:mn></mml:mtd></mml:mtr>
<mml:mtr columnalign="left">
<mml:mtd columnalign="left">
<mml:mn>0</mml:mn></mml:mtd>
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mrow>
<mml:mfrac>
<mml:mi>S</mml:mi>
<mml:mn>2</mml:mn></mml:mfrac></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow>
<mml:mo>]</mml:mo></mml:mrow></mml:mrow>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup>
<mml:mrow>
<mml:mo>[</mml:mo>
<mml:mrow>
<mml:mtable columnalign="left">
<mml:mtr columnalign="left">
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mn>11</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mtd>
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mn>12</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr columnalign="left">
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mn>21</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mtd>
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mn>22</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow>
<mml:mo>]</mml:mo></mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo>[</mml:mo>
<mml:mrow>
<mml:mtable columnalign="left">
<mml:mtr columnalign="left">
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msubsup>
<mml:mi>M</mml:mi>
<mml:mrow>
<mml:mfrac>
<mml:mi>S</mml:mi>
<mml:mn>2</mml:mn></mml:mfrac></mml:mrow>
<mml:mi>T</mml:mi></mml:msubsup></mml:mrow></mml:mtd>
<mml:mtd columnalign="left">
<mml:mn>0</mml:mn></mml:mtd></mml:mtr>
<mml:mtr columnalign="left">
<mml:mtd columnalign="left">
<mml:mn>0</mml:mn></mml:mtd>
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msubsup>
<mml:mi>M</mml:mi>
<mml:mrow>
<mml:mfrac>
<mml:mi>S</mml:mi>
<mml:mn>2</mml:mn></mml:mfrac></mml:mrow>
<mml:mi>T</mml:mi></mml:msubsup></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow>
<mml:mo>]</mml:mo></mml:mrow></mml:mrow>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:semantics></mml:math></disp-formula></p>
<p>And substituting <xref rid="FD9" ref-type="disp-formula">Equation (8)</xref> in <xref rid="FD5" ref-type="disp-formula">Equation (4)</xref>, it follows:
<disp-formula id="FD10">
<label>(9)</label>
<mml:math id="mm13" display="block">
<mml:semantics id="sm13">
<mml:mrow>
<mml:mi>C</mml:mi>
<mml:mo>=</mml:mo>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mi>S</mml:mi></mml:msub>
<mml:mo>×</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo>[</mml:mo>
<mml:mrow>
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mrow>
<mml:mfrac>
<mml:mi>S</mml:mi>
<mml:mn>2</mml:mn></mml:mfrac></mml:mrow></mml:msub></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn></mml:mtd></mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mn>0</mml:mn></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mrow>
<mml:mfrac>
<mml:mi>S</mml:mi>
<mml:mn>2</mml:mn></mml:mfrac></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow>
<mml:mo>]</mml:mo></mml:mrow></mml:mrow>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup>
<mml:mo>×</mml:mo>
<mml:mrow>
<mml:mo>[</mml:mo>
<mml:mrow>
<mml:mtable columnalign="left">
<mml:mtr columnalign="left">
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mn>11</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mtd>
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mn>12</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr columnalign="left">
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mn>21</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mtd>
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mn>22</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow>
<mml:mo>]</mml:mo></mml:mrow>
<mml:mo>×</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo>[</mml:mo>
<mml:mrow>
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:msubsup>
<mml:mi>M</mml:mi>
<mml:mrow>
<mml:mfrac>
<mml:mi>S</mml:mi>
<mml:mn>2</mml:mn></mml:mfrac></mml:mrow>
<mml:mi>T</mml:mi></mml:msubsup></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn></mml:mtd></mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mn>0</mml:mn></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:msubsup>
<mml:mi>M</mml:mi>
<mml:mrow>
<mml:mfrac>
<mml:mi>S</mml:mi>
<mml:mn>2</mml:mn></mml:mfrac></mml:mrow>
<mml:mi>T</mml:mi></mml:msubsup></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow>
<mml:mo>]</mml:mo></mml:mrow></mml:mrow>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup>
<mml:mo>×</mml:mo>
<mml:msubsup>
<mml:mi>M</mml:mi>
<mml:mi>S</mml:mi>
<mml:mi>T</mml:mi></mml:msubsup></mml:mrow></mml:semantics></mml:math></disp-formula></p>
<p>To simplify we introduce a matrix <italic>A</italic> of <italic>S</italic> × <italic>S</italic> given by:
<disp-formula id="FD11">
<label>(10)</label>
<mml:math id="mm14" display="block">
<mml:semantics id="sm14">
<mml:mrow>
<mml:mi>A</mml:mi>
<mml:mo>=</mml:mo>
<mml:mrow>
<mml:mo>[</mml:mo>
<mml:mrow>
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mrow>
<mml:mrow>
<mml:mover accent="true">
<mml:mspace height=".6"/>
<mml:mi>S</mml:mi></mml:mover>
<mml:mo stretchy="true">/</mml:mo>
<mml:munder accentunder="true">
<mml:mspace depth="-.8"/>
<mml:mn>2</mml:mn></mml:munder></mml:mrow></mml:mrow></mml:msub></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mn>0</mml:mn></mml:mtd></mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mn>0</mml:mn></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mrow>
<mml:mrow>
<mml:mover accent="true">
<mml:mspace height=".6"/>
<mml:mi>S</mml:mi></mml:mover>
<mml:mo stretchy="true">/</mml:mo>
<mml:munder accentunder="true">
<mml:mspace depth="-.8"/>
<mml:mn>2</mml:mn></mml:munder></mml:mrow></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow>
<mml:mo>]</mml:mo></mml:mrow>
<mml:mo>×</mml:mo>
<mml:msup>
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mi>S</mml:mi></mml:msub></mml:mrow>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math></disp-formula></p>
<p>Considering <italic>A<sup>T</sup></italic> = <italic>A</italic><sup>−</sup><italic><sup>1</sup></italic>, the relationship between DCT coefficients of a block of <italic>S</italic> × <italic>S</italic> and those of its sub-blocks of <italic>S/2</italic> × <italic>S/2</italic> is obtained as:
<disp-formula id="FD12">
<label>(11)</label>
<mml:math id="mm15" display="block">
<mml:semantics id="sm15">
<mml:mrow>
<mml:mrow>
<mml:mo>[</mml:mo>
<mml:mrow>
<mml:mtable columnalign="left">
<mml:mtr columnalign="left">
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mn>11</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mtd>
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mn>12</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr columnalign="left">
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mn>21</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mtd>
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mn>22</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow>
<mml:mo>]</mml:mo></mml:mrow>
<mml:mo>=</mml:mo>
<mml:mi>A</mml:mi>
<mml:mo>×</mml:mo>
<mml:mi>C</mml:mi>
<mml:mo>×</mml:mo>
<mml:msup>
<mml:mi>A</mml:mi>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:semantics></mml:math></disp-formula>
<disp-formula id="FD13">
<label>(12)</label>
<mml:math id="mm16" display="block">
<mml:semantics id="sm16">
<mml:mrow>
<mml:mi>C</mml:mi>
<mml:mo>=</mml:mo>
<mml:msup>
<mml:mi>A</mml:mi>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup>
<mml:mo>×</mml:mo>
<mml:mrow>
<mml:mo>[</mml:mo>
<mml:mrow>
<mml:mtable columnalign="left">
<mml:mtr columnalign="left">
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mn>11</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mtd>
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mn>12</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr columnalign="left">
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mn>21</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mtd>
<mml:mtd columnalign="left">
<mml:mrow>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mn>22</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow>
<mml:mo>]</mml:mo></mml:mrow>
<mml:mo>×</mml:mo>
<mml:mi>A</mml:mi></mml:mrow></mml:semantics></mml:math></disp-formula></p>
<p>According to [<xref ref-type="bibr" rid="b14-sensors-12-05670">14</xref>], this DCT inter-transformation is four times faster than the traditional IDCT-DCT operation. In the proposed smoke detection scheme, firstly the DCT inter-transformation is applied to each frame to get <italic>S/2</italic> × <italic>S/2</italic> DCT blocks directly from <italic>S</italic> × <italic>S</italic> DCT blocks, where <italic>S</italic> = 8 because an IP camera is used.</p></sec>
<sec>
<label>2.2.</label>
<title>Smoke Region Detection Stage</title>
<p>In the smoke region detection stage, some smoke block candidates are estimated using the motion and color properties of smoke. This stage receives DCT blocks of <italic>S<sub>b</sub></italic> × <italic>S<sub>b</sub></italic> coefficients previously calculated by the preprocessing stage of each frame, which is composed of three channels: luminance channel (<italic>Y</italic>) and two chrominance channels (<italic>C<sub>b</sub></italic> and <italic>C<sub>r</sub></italic>). The motion property of smoke is analyzed using only the luminance channel <italic>Y</italic>, and the smoke color property is analyzed using two chrominance channels <italic>C<sub>b</sub></italic> and <italic>C<sub>r</sub></italic>.</p>
<sec sec-type="methods">
<label>2.2.1.</label>
<title>Smoke Motion Analysis</title>
<p>Considering that the DC coefficient of DCT block of <italic>S<sub>b</sub></italic> × <italic>S<sub>b</sub></italic> is <italic>S<sub>b</sub></italic> times the average value of the block in spatial domain as shown by <xref rid="FD14" ref-type="disp-formula">Equation (13)</xref>, only the DC value of each DCT block is considered for motion analysis:
<disp-formula id="FD14">
<label>(13)</label>
<mml:math id="mm17" display="block">
<mml:semantics id="sm17">
<mml:mtable columnalign="left">
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:mi>C</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mn>0</mml:mn>
<mml:mo>,</mml:mo>
<mml:mn>0</mml:mn>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:msqrt>
<mml:mrow>
<mml:mfrac>
<mml:mn>2</mml:mn>
<mml:mrow>
<mml:msub>
<mml:mi>S</mml:mi>
<mml:mi>b</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mrow></mml:msqrt>
<mml:mi>α</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mn>0</mml:mn>
<mml:mo stretchy="false">)</mml:mo>
<mml:munderover>
<mml:mo>∑</mml:mo>
<mml:mrow>
<mml:mi>q</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>0</mml:mn></mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mi>S</mml:mi>
<mml:mi>b</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:munderover>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msqrt>
<mml:mrow>
<mml:mfrac>
<mml:mn>2</mml:mn>
<mml:mrow>
<mml:msub>
<mml:mi>S</mml:mi>
<mml:mi>b</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mrow></mml:msqrt>
<mml:mi>α</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mn>0</mml:mn>
<mml:mo stretchy="false">)</mml:mo>
<mml:munderover>
<mml:mo>∑</mml:mo>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>0</mml:mn></mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mi>S</mml:mi>
<mml:mi>b</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:munderover>
<mml:mrow>
<mml:mi>B</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>p</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>q</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>cos</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mn>2</mml:mn>
<mml:mi>p</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>×</mml:mo>
<mml:mn>0</mml:mn>
<mml:mo>×</mml:mo>
<mml:mo>π</mml:mo></mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:msub>
<mml:mi>S</mml:mi>
<mml:mi>b</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>cos</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mn>2</mml:mn>
<mml:mi>p</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>×</mml:mo>
<mml:mn>0</mml:mn>
<mml:mo>×</mml:mo>
<mml:mo>π</mml:mo></mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:msub>
<mml:mi>S</mml:mi>
<mml:mi>b</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mspace width="4em"/>
<mml:mrow>
<mml:mo>=</mml:mo>
<mml:msub>
<mml:mi>S</mml:mi>
<mml:mi>b</mml:mi></mml:msub>
<mml:mo>×</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mfrac>
<mml:mn>1</mml:mn>
<mml:mrow>
<mml:msubsup>
<mml:mi>S</mml:mi>
<mml:mi>b</mml:mi>
<mml:mn>2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac>
<mml:munderover>
<mml:mo>∑</mml:mo>
<mml:mrow>
<mml:mi>q</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>0</mml:mn></mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mi>S</mml:mi>
<mml:mi>b</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:munderover>
<mml:mrow>
<mml:munderover>
<mml:mo>∑</mml:mo>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>0</mml:mn></mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mi>S</mml:mi>
<mml:mi>b</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:munderover>
<mml:mrow>
<mml:mi>B</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>p</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>q</mml:mi>
<mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:semantics></mml:math></disp-formula></p>
<p>Considering that 
<inline-formula>
<mml:math id="mm18" display="inline">
<mml:semantics id="sm18">
<mml:mrow>
<mml:msubsup>
<mml:mi>Y</mml:mi>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msubsup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math></inline-formula> is the DC value of (<italic>x</italic>,<italic>y</italic>)-th block of the luminance channel <italic>Y</italic> in frame <italic>t</italic>, each DCT block is classified into motion or static blocks using blocks 
<inline-formula>
<mml:math id="mm19" display="inline">
<mml:semantics id="sm19">
<mml:mrow>
<mml:msubsup>
<mml:mi>Y</mml:mi>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msubsup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math></inline-formula> and 
<inline-formula>
<mml:math id="mm20" display="inline">
<mml:semantics id="sm20">
<mml:mrow>
<mml:msubsup>
<mml:mi>Y</mml:mi>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msubsup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math></inline-formula>. This classification is given by:
<disp-formula id="FD15">
<label>(14)</label>
<mml:math id="mm21" display="block">
<mml:semantics id="sm21">
<mml:mrow>
<mml:msub>
<mml:mi>f</mml:mi>
<mml:mi>m</mml:mi></mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mi>Y</mml:mi>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msubsup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi>Y</mml:mi>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msubsup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>=</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:mtable columnalign="right">
<mml:mtr columnalign="right">
<mml:mtd columnalign="right">
<mml:mn>1</mml:mn></mml:mtd>
<mml:mtd columnalign="right">
<mml:mrow>
<mml:mtext mathvariant="italic">if</mml:mtext>
<mml:mspace width="0.2em"/>
<mml:mi>t</mml:mi>
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mn>1</mml:mn></mml:msub>
<mml:mo>&lt;</mml:mo>
<mml:mfrac>
<mml:mn>1</mml:mn>
<mml:mrow>
<mml:msub>
<mml:mi>S</mml:mi>
<mml:mi>b</mml:mi></mml:msub></mml:mrow></mml:mfrac>
<mml:mrow>
<mml:mo>|</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mi>Y</mml:mi>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msubsup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>−</mml:mo>
<mml:msubsup>
<mml:mi>Y</mml:mi>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msubsup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mo>|</mml:mo></mml:mrow>
<mml:mo>&lt;</mml:mo>
<mml:mi>t</mml:mi>
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mn>2</mml:mn></mml:msub></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr columnalign="right">
<mml:mtd columnalign="right">
<mml:mn>0</mml:mn></mml:mtd>
<mml:mtd columnalign="right">
<mml:mrow>
<mml:mtext mathvariant="italic">otherwise</mml:mtext></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mrow></mml:mrow></mml:semantics></mml:math></disp-formula>where the matrix <italic>f<sub>m</sub></italic> is a binary matrix of size <italic>M</italic> × <italic>N</italic> (<italic>M</italic> = 1,920/<italic>S<sub>b</sub></italic> and <italic>N</italic> = 1,080/<italic>S<sub>b</sub></italic>), indicating a moving smoke block with value ‘1’, otherwise ‘0’, and <italic>th<sub>1</sub></italic> and <italic>th<sub>2</sub></italic> are two threshold values considering the general motion speed presented by smoke. The smoke motion and any other moving objects produce changes in the luminance value of a given block in two consecutive frames. Then, to avoid a wrong detection, taking into account the smoke movement speed, we set a suitable range given by the threshold <italic>th<sub>1</sub></italic> and <italic>th<sub>2</sub></italic>, whose values are experimentally determined as 12 and 80, respectively.</p>
<p>Another important result obtained from <xref rid="FD15" ref-type="disp-formula">Equation (14)</xref> is the fact that, the proposed smoke motion analysis is robust to different scene illumination produced by various weather conditions, because it depends only on the difference of luminance of two consecutive frames; then from <xref rid="f1-sensors-12-05670" ref-type="fig">Figure 1</xref> it follows that the proposed smoke detection algorithm is also robust to scene illumination changes.</p></sec>
<sec sec-type="methods">
<label>2.2.2.</label>
<title>Smoke Color Analysis</title>
<p>The color is another important feature of smoke; therefore this feature has been used commonly in several smoke detection algorithms [<xref ref-type="bibr" rid="b8-sensors-12-05670">8</xref>,<xref ref-type="bibr" rid="b11-sensors-12-05670">11</xref>]. Almost all algorithms used Chen's smoke color model [<xref ref-type="bibr" rid="b1-sensors-12-05670">1</xref>], in which the smoke color is determined using RGB color space-based rules. The first rule is based on the fact that the smoke color is gray, which means intensities of three color-channels are approximately the same. The second rule determines that the gray intensity must be between 80 and 220. This range indicates that the smoke color is neither so white nor so black. These rules, proposed by [<xref ref-type="bibr" rid="b1-sensors-12-05670">1</xref>], are given by <xref rid="FD16" ref-type="disp-formula">Equation (15)</xref>:
<disp-formula id="FD16">
<label>(15)</label>
<mml:math id="mm22" display="block">
<mml:semantics id="sm22">
<mml:mrow>
<mml:mtable columnalign="left">
<mml:mtr columnalign="left">
<mml:mtd columnalign="left">
<mml:mrow>
<mml:mtext>Rule</mml:mtext>
<mml:mspace width="0.2em"/>
<mml:mn>1</mml:mn>
<mml:mo>:</mml:mo>
<mml:mi>R</mml:mi>
<mml:mo>±</mml:mo>
<mml:mi>α</mml:mi>
<mml:mo>=</mml:mo>
<mml:mi>G</mml:mi>
<mml:mo>±</mml:mo>
<mml:mi>α</mml:mi>
<mml:mo>=</mml:mo>
<mml:mi>B</mml:mi>
<mml:mo>±</mml:mo>
<mml:mi>α</mml:mi></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr columnalign="left">
<mml:mtd columnalign="left">
<mml:mrow>
<mml:mtext>Rule</mml:mtext>
<mml:mspace width="0.2em"/>
<mml:mn>2</mml:mn>
<mml:mo>:</mml:mo>
<mml:mn>80</mml:mn>
<mml:mo>≤</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>R</mml:mi>
<mml:mo>+</mml:mo>
<mml:mi>G</mml:mi>
<mml:mo>+</mml:mo>
<mml:mi>B</mml:mi></mml:mrow>
<mml:mn>3</mml:mn></mml:mfrac>
<mml:mo>≤</mml:mo>
<mml:mn>220</mml:mn></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:semantics></mml:math></disp-formula>where 15 ≤ <italic>α</italic> ≤ 20. If both rules are satisfied, then the pixel is considered as smoke.</p>
<p>In the proposed algorithm, which is performed in MJPEG domain by the IP camera, the available color space is YC<sub>b</sub>C<sub>r</sub> instead of RGB color space. Therefore the smoke color model proposed by Chen <italic>et al.</italic> [<xref ref-type="bibr" rid="b1-sensors-12-05670">1</xref>] must be adapted as follows:
<disp-formula id="FD17">
<label>(16)</label>
<mml:math id="mm23" display="block">
<mml:semantics id="sm23">
<mml:mrow>
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:mtext>Rule</mml:mtext>
<mml:mn>1</mml:mn>
<mml:mo>:</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mi>C</mml:mi>
<mml:mi>b</mml:mi>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msubsup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>−</mml:mo>
<mml:mn>128</mml:mn></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow>
<mml:mn>2</mml:mn></mml:msup>
<mml:mo>+</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mi>C</mml:mi>
<mml:mi>r</mml:mi>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msubsup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>−</mml:mo>
<mml:mn>128</mml:mn></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow>
<mml:mn>2</mml:mn></mml:msup>
<mml:mo>≤</mml:mo>
<mml:msup>
<mml:mover accent="true">
<mml:mi>α</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:mtext>Rule</mml:mtext>
<mml:mn>2</mml:mn>
<mml:mo>:</mml:mo>
<mml:mi>T</mml:mi>
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mn>3</mml:mn></mml:msub>
<mml:mo>≤</mml:mo>
<mml:msup>
<mml:mi>Y</mml:mi>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>≤</mml:mo>
<mml:mi>T</mml:mi>
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mn>4</mml:mn></mml:msub></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:semantics></mml:math></disp-formula>where 
<inline-formula>
<mml:math id="mm24" display="inline">
<mml:semantics id="sm24">
<mml:mrow>
<mml:msubsup>
<mml:mi>C</mml:mi>
<mml:mi>b</mml:mi>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msubsup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math></inline-formula>, 
<inline-formula>
<mml:math id="mm25" display="inline">
<mml:semantics id="sm25">
<mml:mrow>
<mml:msubsup>
<mml:mi>C</mml:mi>
<mml:mi>r</mml:mi>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msubsup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math></inline-formula>, and <italic>Y<sup>DC</sup></italic> (<italic>x</italic>, <italic>y</italic>) are the DC values of two chrominance and luminance channels of (<italic>x</italic>,<italic>y</italic>)-th block, and applying the linear transform between RGB and YC<sub>b</sub>C<sub>r</sub>, it follows that <italic>α̂</italic> = 10, <italic>Th<sub>3</sub></italic> = 80 and <italic>Th<sub>4</sub></italic> = 220. Using the same manner of Chen's model, if both rules are satisfied, then the (x,y)-th block is considered as smoke block by color property, that is 
<inline-formula>
<mml:math id="mm26" display="inline">
<mml:semantics id="sm26">
<mml:mrow>
<mml:msub>
<mml:mi>f</mml:mi>
<mml:mi>c</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:mo stretchy="false">(</mml:mo>
<mml:msup>
<mml:mi>Y</mml:mi>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi>C</mml:mi>
<mml:mi>b</mml:mi>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msubsup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi>C</mml:mi>
<mml:mi>r</mml:mi>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msubsup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:semantics></mml:math></inline-formula>, otherwise 
<inline-formula>
<mml:math id="mm27" display="inline">
<mml:semantics id="sm27">
<mml:mrow>
<mml:msub>
<mml:mi>f</mml:mi>
<mml:mi>c</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:mo stretchy="false">(</mml:mo>
<mml:msup>
<mml:mi>Y</mml:mi>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi>C</mml:mi>
<mml:mi>b</mml:mi>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msubsup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi>C</mml:mi>
<mml:mi>r</mml:mi>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msubsup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:mn>0</mml:mn></mml:mrow></mml:semantics></mml:math></inline-formula>.</p>
<p>Once both smoke feature analyses are concluded, the blocks that satisfy both smoke features are considered as smoke candidate regions, as follows:
<disp-formula id="FD18">
<label>(17)</label>
<mml:math id="mm28" display="block">
<mml:semantics id="sm28">
<mml:mrow>
<mml:msub>
<mml:mi>B</mml:mi>
<mml:mi>t</mml:mi></mml:msub>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:msub>
<mml:mi>f</mml:mi>
<mml:mi>m</mml:mi></mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mi>Y</mml:mi>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msubsup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi>Y</mml:mi>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msubsup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>∧</mml:mo>
<mml:msub>
<mml:mi>f</mml:mi>
<mml:mi>c</mml:mi></mml:msub>
<mml:mo stretchy="false">(</mml:mo>
<mml:msup>
<mml:mi>Y</mml:mi>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi>C</mml:mi>
<mml:mi>b</mml:mi>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msubsup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi>C</mml:mi>
<mml:mi>r</mml:mi>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mi>C</mml:mi></mml:mrow></mml:msubsup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>where operator ‘⋀’ denotes logical-and. If <italic>B<sub>t</sub></italic>(<italic>x</italic>, <italic>y</italic>) is ‘1’ then (<italic>x,y</italic>)-th block is smoke candidate block and moreover is analyzed in next stage, otherwise the block is discarded. <xref ref-type="fig" rid="f2-sensors-12-05670">Figure 2</xref> shows two consecutive frames, and binary image calculated by <xref rid="FD18" ref-type="disp-formula">Equation (17)</xref>, in which the candidate smoke blocks are represented by white block.</p></sec>
<sec>
<label>2.2.3.</label>
<title>Elimination of Isolated Blocks</title>
<p>Illumination variations and motion caused by wind are the principal factors of erroneous block detection; however these erroneous blocks can be detected easily because these blocks are generally isolated. Taking in account the expansion property of smoke, which occupies several connected blocks, the isolated blocks can be considered as erroneous blocks. To eliminate the isolated blocks, the morphological opening operation based on the dilation and erosion is applied to the binary matrix <italic>B<sub>t</sub></italic> obtained by <xref rid="FD18" ref-type="disp-formula">Equation (17)</xref>, which is given by:
<disp-formula id="FD19">
<label>(18)</label>
<mml:math id="mm29" display="block">
<mml:semantics id="sm29">
<mml:mrow>
<mml:msub>
<mml:mi>M</mml:mi>
<mml:mi>t</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:msub>
<mml:mi>B</mml:mi>
<mml:mi>t</mml:mi></mml:msub>
<mml:mo>∘</mml:mo>
<mml:mi>W</mml:mi>
<mml:mo>=</mml:mo>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>B</mml:mi>
<mml:mi>t</mml:mi></mml:msub>
<mml:mo>⊗</mml:mo>
<mml:mi>W</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>⊕</mml:mo>
<mml:mi>W</mml:mi></mml:mrow></mml:semantics></mml:math></disp-formula>where ○, ⊗ and ⊕ are opening, erosion and dilation operators, respectively, and <italic>W</italic> is 2 × 2 square structuring element. <xref ref-type="fig" rid="f3-sensors-12-05670">Figure 3</xref> shows a noisy binary image <italic>B<sub>t</sub></italic> and a binary image <italic>M<sub>t</sub></italic> is the result of the morphological opening operation given by <xref rid="FD19" ref-type="disp-formula">Equation (18)</xref>. We can observe that many isolated blocks are eliminated efficiently.</p></sec></sec>
<sec sec-type="methods">
<label>2.3.</label>
<title>Region Analysis Stage</title>
<p>Once the smoke candidate regions are detected, the behavior of these regions through the several frames must be analyzed, because some objects possess similar properties to smoke. After the binary images <italic>M<sub>t</sub>(t = 0,…T)</italic> from each consecutive frame are obtained by <xref rid="FD19" ref-type="disp-formula">Equation (18)</xref>, the smoke candidate regions composed of several connected blocks are detected and labeled using connected component labeling algorithm with connectivity-4. Each candidate region is denoted by 
<inline-formula>
<mml:math id="mm30" display="inline">
<mml:semantics id="sm30">
<mml:mrow>
<mml:msubsup>
<mml:mi>A</mml:mi>
<mml:mi>t</mml:mi>
<mml:mi>k</mml:mi></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula>, <italic>k</italic> = 1,2,…<italic>K</italic>, where <italic>k</italic> means the label number and <italic>K</italic> is a total number of candidate regions in the binary image <italic>M<sub>t</sub></italic> of time <italic>t</italic>. Considering that smoke has a property of continuously expansion, the corresponding smoke regions 
<inline-formula>
<mml:math id="mm31" display="inline">
<mml:semantics id="sm31">
<mml:mrow>
<mml:msubsup>
<mml:mi>A</mml:mi>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mi>k</mml:mi></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula> and 
<inline-formula>
<mml:math id="mm32" display="inline">
<mml:semantics id="sm32">
<mml:mrow>
<mml:msubsup>
<mml:mi>A</mml:mi>
<mml:mi>t</mml:mi>
<mml:mi>k</mml:mi></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula> of the consecutive binary images <italic>M<sub>t-1</sub></italic> and <italic>M<sub>t</sub></italic>, respectively, present an expansion with overlapping. This property can efficiently discriminate smoke from other moving object with similar color, such as car light, moving person with gray clothes, <italic>etc.</italic> To analyze this smoke property, each region is updated using <xref rid="FD20" ref-type="disp-formula">Equation (19)</xref>:
<disp-formula id="FD20">
<label>(19)</label>
<mml:math id="mm33" display="block">
<mml:semantics id="sm33">
<mml:mrow>
<mml:msubsup>
<mml:mi>A</mml:mi>
<mml:mi>t</mml:mi>
<mml:mi>k</mml:mi></mml:msubsup>
<mml:mo>=</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:msubsup>
<mml:mi>A</mml:mi>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mi>k</mml:mi></mml:msubsup>
<mml:mo>∪</mml:mo>
<mml:msubsup>
<mml:mi>A</mml:mi>
<mml:mi>t</mml:mi>
<mml:mi>k</mml:mi></mml:msubsup></mml:mrow>
<mml:mo>,</mml:mo></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mtext>if</mml:mtext>
<mml:mspace width="0.2em"/>
<mml:msubsup>
<mml:mi>A</mml:mi>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mi>k</mml:mi></mml:msubsup>
<mml:mo>∩</mml:mo>
<mml:msubsup>
<mml:mi>A</mml:mi>
<mml:mi>t</mml:mi>
<mml:mi>k</mml:mi></mml:msubsup>
<mml:mo>≠</mml:mo>
<mml:mi>ϕ</mml:mi></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:msubsup>
<mml:mi>A</mml:mi>
<mml:mi>t</mml:mi>
<mml:mi>k</mml:mi></mml:msubsup></mml:mrow>
<mml:mo>,</mml:mo></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mtext>otherwise</mml:mtext></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>,</mml:mo>
<mml:mn>2</mml:mn>
<mml:mo>,</mml:mo>
<mml:mo>…</mml:mo>
<mml:mo>,</mml:mo>
<mml:mi>K</mml:mi></mml:mrow></mml:semantics></mml:math></disp-formula>where <italic>ϕ</italic> denotes null set, while ‘∪’ and ‘∩’ are union and intersection operators, respectively. Thus the new binary image <italic>M̂<sub>t</sub></italic> becomes:
<disp-formula id="FD21">
<label>(20)</label>
<mml:math id="mm34" display="block">
<mml:semantics id="sm34">
<mml:mrow>
<mml:msub>
<mml:mover accent="true">
<mml:mi>M</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>t</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:munderover>
<mml:mo>∪</mml:mo>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mi>K</mml:mi></mml:munderover>
<mml:mrow>
<mml:msubsup>
<mml:mi>A</mml:mi>
<mml:mi>t</mml:mi>
<mml:mi>k</mml:mi></mml:msubsup></mml:mrow></mml:mrow></mml:semantics></mml:math></disp-formula></p>
<p><xref ref-type="fig" rid="f4-sensors-12-05670">Figure 4</xref> illustrates this update operation of each smoke candidate region.</p>
<p>In <xref ref-type="fig" rid="f4-sensors-12-05670">Figure 4</xref>, there are two regions 
<inline-formula>
<mml:math id="mm35" display="inline">
<mml:semantics id="sm35">
<mml:mrow>
<mml:msubsup>
<mml:mtext>A</mml:mtext>
<mml:mrow>
<mml:mtext>t</mml:mtext>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mn>1</mml:mn></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula> and 
<inline-formula>
<mml:math id="mm36" display="inline">
<mml:semantics id="sm36">
<mml:mrow>
<mml:msubsup>
<mml:mtext>A</mml:mtext>
<mml:mrow>
<mml:mtext>t</mml:mtext>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mn>2</mml:mn></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula> in <italic>M̂<sub>t</sub></italic><sub>−1</sub>. In <italic>M<sub>t</sub></italic>, two candidate regions <italic>Z<sup>1</sup></italic> and <italic>Z<sup>2</sup></italic> are extracted using the smoke properties mentioned above. According to <xref rid="FD20" ref-type="disp-formula">Equation (19)</xref>, the region of 
<inline-formula>
<mml:math id="mm37" display="inline">
<mml:semantics id="sm37">
<mml:mrow>
<mml:msubsup>
<mml:mtext>A</mml:mtext>
<mml:mrow>
<mml:mtext>t</mml:mtext>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mn>1</mml:mn></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula> is expanded by the union operation with <italic>Z<sup>2</sup></italic> due to 
<inline-formula>
<mml:math id="mm38" display="inline">
<mml:semantics id="sm38">
<mml:mrow>
<mml:msubsup>
<mml:mtext>A</mml:mtext>
<mml:mrow>
<mml:mtext>t</mml:mtext>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mn>1</mml:mn></mml:msubsup>
<mml:mo>∩</mml:mo>
<mml:msup>
<mml:mi>Z</mml:mi>
<mml:mn>2</mml:mn></mml:msup>
<mml:mo>≠</mml:mo>
<mml:mi>ϕ</mml:mi></mml:mrow></mml:semantics></mml:math></inline-formula>, while the region 
<inline-formula>
<mml:math id="mm39" display="inline">
<mml:semantics id="sm39">
<mml:mrow>
<mml:msubsup>
<mml:mtext>A</mml:mtext>
<mml:mrow>
<mml:mtext>t</mml:mtext>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mn>2</mml:mn></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula> disappears because it is not intersected with any candidate region in <italic>M<sub>t</sub></italic>. The new candidate region <italic>Z<sup>1</sup></italic> is registered as new region 
<inline-formula>
<mml:math id="mm40" display="inline">
<mml:semantics id="sm40">
<mml:mrow>
<mml:msubsup>
<mml:mtext>A</mml:mtext>
<mml:mtext>t</mml:mtext>
<mml:mn>3</mml:mn></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula> in the binary image <italic>M̂<sub>t</sub></italic>.</p>
<p>To achieve an accurate detection of smoke candidate regions, it is essential to use morphological operations to eliminate noise in the frame under analysis. This is because without noise elimination, small noisy regions may be overlapped through the time producing wrong smoke candidate regions, degrading the system performance. <xref ref-type="fig" rid="f5-sensors-12-05670">Figure 5</xref> shows an example of smoke candidate region detection with and without morphological operations in absence of smoke, indicating clearly the importance of using the morphological operations.</p>
<p>Considering that generally smoke expands upwards, the expansion direction of each candidate region is estimated, and using this direction, some regions with different expansion directions can be discarded. In this process firstly the centroids of each candidate region of two consecutive time intervals are calculated. Next the motion vector is estimated as the difference between both centroids. Then if the motion vector angle θ is larger than 0° and smaller than 180°, as shown by <xref ref-type="fig" rid="f6-sensors-12-05670">Figure 6</xref>, the region under analysis can be considered as potential smoke.</p>
<p>After discarding the non-smoke regions that do not satisfy the expansion direction criterion, the expansion area is analyzed, as follows:
<disp-formula id="FD22">
<label>(21)</label>
<mml:math id="mm41" display="block">
<mml:semantics id="sm41">
<mml:mrow>
<mml:msup>
<mml:mi>R</mml:mi>
<mml:mi>k</mml:mi></mml:msup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:mtext mathvariant="italic">number</mml:mtext>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mrow>
<mml:mo>|</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>∈</mml:mo>
<mml:msubsup>
<mml:mi>A</mml:mi>
<mml:mi>t</mml:mi>
<mml:mi>k</mml:mi></mml:msubsup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>k</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>,</mml:mo>
<mml:mn>2</mml:mn>
<mml:mo>,</mml:mo>
<mml:mo>…</mml:mo>
<mml:mo>,</mml:mo>
<mml:mi>K</mml:mi></mml:mrow></mml:semantics></mml:math></disp-formula>where <italic>number</italic>(<italic>y</italic>) denotes the number of element of <italic>y</italic>. Next, if <italic>R<sup>k</sup></italic>(<italic>t</italic>) is an increasing function during a given time interval, <italic>th<sub>5</sub></italic>, and the condition given by <xref rid="FD23" ref-type="disp-formula">Equation (22)</xref> is satisfied then 
<inline-formula>
<mml:math id="mm42" display="inline">
<mml:semantics id="sm42">
<mml:mrow>
<mml:msubsup>
<mml:mtext>A</mml:mtext>
<mml:mtext>t</mml:mtext>
<mml:mtext>k</mml:mtext></mml:msubsup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math></inline-formula> is considered as a smoke region.
<disp-formula id="FD23">
<label>(22)</label>
<mml:math id="mm43" display="block">
<mml:semantics id="sm43">
<mml:mrow>
<mml:msup>
<mml:mi>R</mml:mi>
<mml:mi>k</mml:mi></mml:msup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>+</mml:mo>
<mml:mi>t</mml:mi>
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mn>5</mml:mn></mml:msub>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>≥</mml:mo>
<mml:mi>t</mml:mi>
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mn>6</mml:mn></mml:msub>
<mml:mo>×</mml:mo>
<mml:msup>
<mml:mi>R</mml:mi>
<mml:mi>k</mml:mi></mml:msup>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>where <italic>th<sub>5</sub></italic> is monitoring interval which, for early smoke detection, is set to 1 second and <italic>th<sub>6</sub></italic> is growing rate of the smoke region which was set to 1.5.</p>
<p><xref ref-type="fig" rid="f7-sensors-12-05670">Figure 7(a)</xref> illustrates the condition of smoke region given by <xref rid="FD23" ref-type="disp-formula">Equation (22)</xref> and <xref ref-type="fig" rid="f7-sensors-12-05670">Figure 7(b)</xref> shows an example of three candidate smoke regions. From this figure it follows that the areas of <italic>A<sup>1</sup></italic> and <italic>A<sup>2</sup></italic> grow through time, for example <italic>A<sup>1</sup></italic> grows from 37 to 60 blocks in 20 frames, while <italic>A<sup>2</sup></italic> grows from 19 to 36 blocks during this time. Considering that the frame rate is 20 frames/sec, it follows that <italic>th<sub>5</sub></italic> is equal to 20, and these two regions satisfy the condition in <xref rid="FD23" ref-type="disp-formula">Equation (22)</xref>, because 60 ≥ 37 × 1.5 = 55.5 and 36 ≥ 19 × 1.5 = 28.5. And then these regions can be considered as smoke region. On the other hand, <italic>A<sup>3</sup></italic> remains almost constant during five frames and later this region disappears, therefore it is not considered a smoke region.</p></sec></sec>
<sec sec-type="results|discussion">
<label>3.</label>
<title>Results and Discussion</title>
<p>The performance of the proposed algorithm is evaluated using 50 videos with smoke and other 50 videos without smoke which are available in [<xref ref-type="bibr" rid="b16-sensors-12-05670">16</xref>,<xref ref-type="bibr" rid="b17-sensors-12-05670">17</xref>]. <xref ref-type="fig" rid="f8-sensors-12-05670">Figure 8</xref> shows some frames of video sequences used in evaluation, in which (a) and (b) are video frames with smoke and (c) and (d) are video frames without smoke.</p>
<p><xref ref-type="fig" rid="f9-sensors-12-05670">Figure 9</xref> shows the detected smoke candidate regions through the time together with the behavior of <italic>R<sup>k</sup></italic>(<italic>t</italic>), <italic>k</italic> = 1…<italic>K</italic>, of the video frames with smoke, given by <xref ref-type="fig" rid="f8-sensors-12-05670">Figure 8(a)</xref>. <xref ref-type="fig" rid="f9-sensors-12-05670">Figure 9(a–d)</xref> is binary images <italic>M̂<sub>t</sub></italic> when <italic>t</italic> = 20, 30, 40 and 50, respectively, and <xref ref-type="fig" rid="f9-sensors-12-05670">Figure 9(e)</xref> shows the behavior of <italic>R<sup>k</sup></italic>(<italic>t</italic>), <italic>k</italic> = 1…7 through time (from <italic>t</italic> = 0 to <italic>t</italic> = 80). Since the frame rate of this video is 10 frames/s, it follows that <italic>th<sub>5</sub></italic> = 10. Taking in account the proposed condition given by <xref rid="FD23" ref-type="disp-formula">Equation (22)</xref>, from <xref ref-type="fig" rid="f9-sensors-12-05670">Figure 9(e)</xref> the candidate regions <italic>A<sup>1</sup></italic>, <italic>A<sup>2</sup></italic>, <italic>A<sup>4</sup></italic>, <italic>A<sup>5</sup></italic> and <italic>A<sup>7</sup></italic> are discarded, because the condition is not satisfied. The proposed algorithm starts monitoring the candidate region <italic>A<sup>3</sup></italic> during one second (<italic>th<sub>5</sub></italic> = 10 frames) from <italic>t</italic> = 14, and <italic>R</italic><sup>3</sup>(<italic>t</italic>) with <italic>t</italic> = 14 and <italic>t</italic> = 24 are calculated, here <italic>R</italic><sup>3</sup>(14) is equal to 4, while <italic>R</italic><sup>3</sup>(24) is equal to 29. Then it is clear that <italic>R</italic><sup>3</sup>(24) &gt; <italic>th</italic><sub>6</sub> ×<italic>R</italic><sup>3</sup>(14) = 1.5 × 4 = 6. Then the proposed scheme detects the presence of smoke in <italic>t</italic> = 24, which corresponds to 2.4 second. Although the region <italic>A<sup>6</sup></italic> can be considered as a smoke region, the proposed scheme detected the smoke in <italic>t</italic> = 24, so this region is not monitored any more. <xref ref-type="fig" rid="f10-sensors-12-05670">Figure 10</xref> shows the detected smoke candidate region through the time together with the behavior of <italic>R<sup>k</sup></italic>(<italic>t</italic>), <italic>k</italic> = 1…<italic>K</italic>, of the video without smoke, given by <xref ref-type="fig" rid="f8-sensors-12-05670">Figure 8(c)</xref>, in which (a)–(d) are the binary images <italic>M̂t</italic>, when <italic>t</italic> = 20, 40, 60 and 80, respectively, and (e) shows the behavior of <italic>R<sup>k</sup></italic>(<italic>t</italic>), <italic>k</italic> = 1…24 through time (from <italic>t</italic> = 0 to <italic>t</italic> = 80). The frame rate of this video sequence is also 10 frames/sec. In this case a lot of candidate regions are detected, however no candidate region satisfied the condition given by <xref rid="FD23" ref-type="disp-formula">Equation (22)</xref>, because the candidate regions with largest duration (in case of <italic>A<sup>7</sup></italic>) is only 6 frames, which is shorter than one second, and then the proposed scheme did not detect the presence of smoke during observation time (all frames of the video).</p>
<p>The proposed smoke detection algorithm is evaluated in terms of false positive error and false negative error rates using 50 video sequences with smoke and 50 video sequences without smoke, where the proposed scheme detected correctly 48 sequences with smoke and 49 sequences without smoke. That is in two cases the proposed algorithm was not able to detect the smoke because, among other reasons, the background and smoke color is quite similar and the camera is very far from the smoke origin as shown in <xref ref-type="fig" rid="f11-sensors-12-05670">Figure 11(a,b)</xref>. On the other hand the scheme detects smoke wrongly in one case, because the behavior of water of the fountain is quite similar to that of the smoke as shown in <xref ref-type="fig" rid="f11-sensors-12-05670">Figure 11(c)</xref>.</p>
<p>The proposed system was also evaluated using the criterion proposed by [<xref ref-type="bibr" rid="b18-sensors-12-05670">18</xref>] including correct detection (TP) and correct rejection rates (TN), false alarm and missed detection rates. Two criteria regarding the sensitivity of the wildfire observer, true positive rates (cd) and false positive rate (fd); as well as two criteria regarding the specificity, that is the true negative rate (cr) and the missed detection (md). Other evaluation measures, well known in signal detection theory and error analysis that can be also used are: the accuracy (acc), the positive predicted value (ppv) and the Mattews correlation (mmc). The evaluation results of proposed scheme, using the above mentioned criterions is shown in <xref ref-type="table" rid="t1-sensors-12-05670">Table 1</xref>.</p>
<p>Other important feature is the number of frames required to achieve a correct detection. <xref ref-type="table" rid="t2-sensors-12-05670">Table 2</xref> shows the performance of proposed method compared with two smoke detection schemes reported in the literature ([<xref ref-type="bibr" rid="b5-sensors-12-05670">5</xref>] and [<xref ref-type="bibr" rid="b11-sensors-12-05670">11</xref>]), using the video frames shown in <xref ref-type="fig" rid="f12-sensors-12-05670">Figure 12</xref>.</p>
<p>Evaluation results show that proposed scheme is able to detect the smoke presence faster than other previously reported algorithms [<xref ref-type="bibr" rid="b5-sensors-12-05670">5</xref>,<xref ref-type="bibr" rid="b11-sensors-12-05670">11</xref>].</p></sec>
<sec sec-type="conclusions">
<label>4.</label>
<title>Conclusions</title>
<p>In this paper we have proposed an early fire detection scheme using Internet Protocol (IP) camera technology with Motion JPEG (MJPEG) codec, in which the Discrete Cosine Transform (DCT) coefficients of each block of size 8 × 8 are available as input data. In the proposed scheme, several smoke features, such as motion, color and expansion properties are analyzed directly in the DCT domain, avoiding high time-consuming inverse DCT operations. To increase the accuracy of smoke property estimation, the DCT Inter-transformation [<xref ref-type="bibr" rid="b14-sensors-12-05670">14</xref>,<xref ref-type="bibr" rid="b15-sensors-12-05670">15</xref>] is introduced as a preprocessing operation, which allows changing the block size from 8 × 8 to 4 × 4 without inverse DCT. The proposed scheme is evaluated using 50 video sequences with smoke and other 50 video sequences without smoke, obtaining false positive error rates of about 2% and false negative error rates approximately equal to 4%. The principal reason for the false negative errors occurring in two video sequences with smoke is the great similarity of color between the background and smoke; this problem may be solved using other IP cameras located in other positions. The smoke detection speed of the proposed algorithm is set within one second by the threshold <italic>th<sub>5</sub></italic> in <xref rid="FD23" ref-type="disp-formula">Equation (22)</xref>, as a warranty of early fire detection, which is faster than other, previously reported algorithms [<xref ref-type="bibr" rid="b5-sensors-12-05670">5</xref>,<xref ref-type="bibr" rid="b11-sensors-12-05670">11</xref>]. The proposed algorithm can be implemented in IP camera networks, where each IP camera can transmit its analysis results to a C4 operation center to obtain more reliable information about the fire, such as the origin, magnitude, growth speed and orientation, <italic>etc.</italic></p></sec></body>
<back>
<ack>
<p>The authors thank the National Science and Technology Council (CONACyT) of Mexico, the National Polytechnic Institute and the MAPFRE Foundation for financial support to realize this research.</p></ack>
<ref-list>
<title>References</title>
<ref id="b1-sensors-12-05670"><label>1.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Chen</surname><given-names>T.</given-names></name><name><surname>Yin</surname><given-names>S</given-names></name><name><surname>Huang</surname><given-names>Y.</given-names></name><name><surname>Ye</surname><given-names>Y.</given-names></name></person-group><article-title>The Smoke Detection for Early Fire-Alarming System Based on Video Processing</article-title><conf-name>Proceedings of International Conference on Intelligent Information Hiding and Multimedia Signal Processing</conf-name><conf-loc>Pasadena, CA, USA</conf-loc><conf-date>18–20 December 2006</conf-date></citation></ref>
<ref id="b2-sensors-12-05670"><label>2.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Horng</surname><given-names>W.</given-names></name><name><surname>Peng</surname><given-names>J.</given-names></name></person-group><article-title>Image-Based Fire Detection Using Neural Networks</article-title><conf-name>Proceedings of Joint Conference on Information Sciences</conf-name><conf-loc>Kaohsing, Taiwan</conf-loc><conf-date>8–11 October 2006</conf-date></citation></ref>
<ref id="b3-sensors-12-05670"><label>3.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Ugur-Töreyin</surname><given-names>B.</given-names></name><name><surname>Dedeoglu</surname><given-names>Y.</given-names></name><name><surname>Enis-Çetin</surname><given-names>A.</given-names></name></person-group><article-title>Flame Detection in Video Using Hidden Markov Models</article-title><conf-name>Proceedings of IEEE International Conference on Image Processing</conf-name><conf-loc>Genoa, Italy</conf-loc><conf-date>11–14 September 2005</conf-date></citation></ref>
<ref id="b4-sensors-12-05670"><label>4.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Dedeoglu</surname><given-names>Y.</given-names></name><name><surname>Ugur-Töreyin</surname><given-names>B.</given-names></name><name><surname>Ugur-Güdükbay</surname><given-names>A.</given-names></name><name><surname>Enis-Çetin</surname><given-names>A.</given-names></name></person-group><article-title>Real-Time Fire and Flame Detection in Video</article-title><conf-name>Proceedings of IEEE International Conference on Acoustics, Speech and Signal Processing</conf-name><conf-loc>Philadelphia, PA, USA</conf-loc><conf-date>18–23 March 2005</conf-date></citation></ref>
<ref id="b5-sensors-12-05670"><label>5.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Ugur-Töreyin</surname><given-names>B</given-names></name><name><surname>Enis-Çetin</surname><given-names>A.</given-names></name></person-group><article-title>Wavelet Based Real-Time Smoke Detection in Video</article-title><conf-name>Proceedings of European Signal Processing Conference</conf-name><conf-loc>Antalya, Turkey</conf-loc><conf-date>4–8 September 2005</conf-date></citation></ref>
<ref id="b6-sensors-12-05670"><label>6.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Ugur-Töreyin</surname><given-names>B</given-names></name><name><surname>Dedeoglu</surname><given-names>Y</given-names></name><name><surname>Enis-Çetin</surname><given-names>A.</given-names></name></person-group><article-title>Contour Based Smoke Detection in Video Using Wavelets</article-title><conf-name>Proceedings of European Signal Processing Conference</conf-name><conf-loc>Florence, Italy</conf-loc><conf-date>4–8 September 2006</conf-date></citation></ref>
<ref id="b7-sensors-12-05670"><label>7.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Xu</surname><given-names>Z.</given-names></name><name><surname>Xu</surname><given-names>J.</given-names></name></person-group><article-title>Automatic Fire Smoke Detection Based on Image Visual Features</article-title><conf-name>Proceedings of International Conference on Computational Intelligence and Security Workshops</conf-name><conf-loc>Heilongjiang, China</conf-loc><conf-date>15–19 December 2007</conf-date></citation></ref>
<ref id="b8-sensors-12-05670"><label>8.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Yuan</surname><given-names>F.</given-names></name></person-group><article-title>A Fast Accumulative Motion Orientation Model Based on Integral Image for Video Smoke Detection</article-title><source>Patt. Recog. Lett.</source><year>2008</year><volume>29</volume><fpage>925</fpage><lpage>932</lpage><pub-id pub-id-type="doi">10.1016/j.patrec.2008.01.013</pub-id></citation></ref>
<ref id="b9-sensors-12-05670"><label>9.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Han</surname><given-names>D</given-names></name><name><surname>Lee</surname><given-names>B.</given-names></name></person-group><article-title>Flame and Smoke Detection Method for Early Real-Time Detection of a Tunnel Fire</article-title><source>Fire Safety J.</source><year>2009</year><volume>44</volume><fpage>951</fpage><lpage>961</lpage><pub-id pub-id-type="doi">10.1016/j.firesaf.2009.05.007</pub-id></citation></ref>
<ref id="b10-sensors-12-05670"><label>10.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Yuan</surname><given-names>F.</given-names></name></person-group><article-title>Video-Based Smoke Detection with Histogram Sequence of LBP and LBPV Pyramids</article-title><source>Fire Safety J.</source><year>2011</year><volume>46</volume><fpage>132</fpage><lpage>139</lpage><pub-id pub-id-type="doi">10.1016/j.firesaf.2011.01.001</pub-id></citation></ref>
<ref id="b11-sensors-12-05670"><label>11.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Yu</surname><given-names>C.</given-names></name><name><surname>Faon</surname><given-names>J.</given-names></name><name><surname>Wang</surname><given-names>J.</given-names></name><name><surname>Zhang</surname><given-names>Y.</given-names></name><name><surname>State</surname><given-names>K.</given-names></name></person-group><article-title>Video Fire Smoke Detection Using Motion and Color Features</article-title><source>Fire Technol.</source><year>2010</year><volume>46</volume><fpage>651</fpage><lpage>663</lpage><pub-id pub-id-type="doi">10.1007/s10694-009-0110-z</pub-id></citation></ref>
<ref id="b12-sensors-12-05670"><label>12.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Schneiderman</surname><given-names>R.</given-names></name></person-group><article-title>Trends in Video Surveillance Given DSP an Apps Boost</article-title><source>IEEE Sign. Process. Mag.</source><year>2010</year><volume>6</volume><fpage>6</fpage><lpage>12</lpage></citation></ref>
<ref id="b13-sensors-12-05670"><label>13.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Millan</surname><given-names>L.</given-names></name><name><surname>Sanchez</surname><given-names>G.</given-names></name><name><surname>Rojas</surname><given-names>L.</given-names></name><name><surname>Nakano</surname><given-names>M.</given-names></name><name><surname>Toscano</surname><given-names>K.</given-names></name></person-group><article-title>Early Fire Detection Algorithm Using IP Camera</article-title><conf-name>Proceedings of Ubiquitous Computing and Ambient Intelligence</conf-name><conf-loc>Cancun, Mexico</conf-loc><conf-date>5–9 December 2011</conf-date></citation></ref>
<ref id="b14-sensors-12-05670"><label>14.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Jianmin</surname><given-names>J.</given-names></name><name><surname>Guocan</surname><given-names>F.</given-names></name></person-group><article-title>The Spatial Relationship of DCT Coefficients between a Block and its Sub-Blocks</article-title><source>IEEE Trans. Sign. Process.</source><year>2002</year><volume>50</volume><fpage>1160</fpage><lpage>1169</lpage><pub-id pub-id-type="doi">10.1109/78.995072</pub-id></citation></ref>
<ref id="b15-sensors-12-05670"><label>15.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Davis</surname><given-names>B.J</given-names></name><name><surname>Nawab</surname><given-names>S.H.</given-names></name></person-group><article-title>The Relationship of Transform Coefficients for Differing Transform and/or Differing Subblock Sizes</article-title><source>IEEE Trans. Sign. Process.</source><year>2004</year><volume>52</volume><fpage>1458</fpage><lpage>1461</lpage><pub-id pub-id-type="doi">10.1109/TSP.2004.826165</pub-id></citation></ref>
<ref id="b16-sensors-12-05670"><label>16.</label><citation citation-type="web"><article-title>Sample Fire and Smoke Video Clips</article-title><comment>Available online: <ext-link xlink:href="http://signal.ee.bilkent.edu.tr/VisiFire/Demo/SampleClips.html" ext-link-type="uri">http://signal.ee.bilkent.edu.tr/VisiFire/Demo/SampleClips.html</ext-link> (accessed on 10 November 2011)</comment></citation></ref>
<ref id="b17-sensors-12-05670"><label>17.</label><citation citation-type="web"><article-title>SEPI ESIME Culhuacan</article-title><comment>Available online: <ext-link xlink:href="http://www.posgrados.esimecu.ipn.mx/videos_smoke" ext-link-type="uri">http://www.posgrados.esimecu.ipn.mx/videos_smoke</ext-link> (accessed on 10 November 2011)</comment></citation></ref>
<ref id="b18-sensors-12-05670"><label>18.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Jakovcevic</surname><given-names>T.</given-names></name><name><surname>Setic</surname><given-names>L.</given-names></name><name><surname>Stipanicev</surname><given-names>D.</given-names></name><name><surname>Krstinic</surname><given-names>D.</given-names></name></person-group><article-title>Wildfire Smoke-Detection Algorithms Evaluation</article-title><conf-name>Proceedings of International Conference on Forest Fire Research</conf-name><conf-loc>Coimbra, Portugal</conf-loc><conf-date>15–18 November 2010</conf-date></citation></ref></ref-list>
<sec sec-type="display-objects">
<title>Figures and Tables</title>
<fig id="f1-sensors-12-05670" position="float">
<label>Figure 1.</label>
<caption>
<p>Block diagram of the proposed smoke detection scheme.</p></caption>
<graphic xlink:href="sensors-12-05670f1.gif"/></fig>
<fig id="f2-sensors-12-05670" position="float">
<label>Figure 2.</label>
<caption>
<p>Detection of candidate smoke blocks; (<bold>a</bold>) and (<bold>b</bold>) consecutive frames and (<bold>c</bold>) binary image <italic>B<sub>t</sub></italic>.</p></caption>
<graphic xlink:href="sensors-12-05670f2.gif"/></fig>
<fig id="f3-sensors-12-05670" position="float">
<label>Figure 3.</label>
<caption>
<p>Noise reduction by morphological opening operation. (<bold>a</bold>) binary image obtained by <xref rid="FD18" ref-type="disp-formula">Equation (17)</xref> and (<bold>b</bold>) binary image after morphological opening.</p></caption>
<graphic xlink:href="sensors-12-05670f3.gif"/></fig>
<fig id="f4-sensors-12-05670" position="float">
<label>Figure 4.</label>
<caption>
<p>Binary images <italic>M̂<sub>t</sub></italic><sub>−1</sub> and <italic>M̂<sub>t</sub></italic> obtained applying <xref rid="FD20" ref-type="disp-formula">Equation (19)</xref> to each candidate region.</p></caption>
<graphic xlink:href="sensors-12-05670f4.gif"/></fig>
<fig id="f5-sensors-12-05670" position="float">
<label>Figure 5.</label>
<caption>
<p>Smoke candidate region detection. (<bold>a</bold>) using morphological operation (<bold>b</bold>) without morphological operation.</p></caption>
<graphic xlink:href="sensors-12-05670f5.gif"/></fig>
<fig id="f6-sensors-12-05670" position="float">
<label>Figure 6.</label>
<caption>
<p>Expansion direction of smoke regions.</p></caption>
<graphic xlink:href="sensors-12-05670f6.gif"/></fig>
<fig id="f7-sensors-12-05670" position="float">
<label>Figure 7.</label>
<caption>
<p>(<bold>a</bold>) Description of the condition given by <xref rid="FD23" ref-type="disp-formula">Equation (22)</xref> and (<bold>b</bold>) An example of the expansion of three candidate smoke regions <italic>A<sup>1</sup></italic>, <italic>A<sup>2</sup></italic> and <italic>A<sup>3</sup></italic>.</p></caption>
<graphic xlink:href="sensors-12-05670f7.gif"/></fig>
<fig id="f8-sensors-12-05670" position="float">
<label>Figure 8.</label>
<caption>
<p>Some of video sequences used in evaluation of the proposed algorithm.</p></caption>
<graphic xlink:href="sensors-12-05670f8a.gif"/>
<graphic xlink:href="sensors-12-05670f8b.gif"/></fig>
<fig id="f9-sensors-12-05670" position="float">
<label>Figure 9.</label>
<caption>
<p>Behavior of <italic>R<sup>k</sup></italic>(<italic>t</italic>), <italic>k</italic> = 1…<italic>K</italic> of a video sequences with smoke.</p></caption>
<graphic xlink:href="sensors-12-05670f9a.gif"/>
<graphic xlink:href="sensors-12-05670f9b.gif"/></fig>
<fig id="f10-sensors-12-05670" position="float">
<label>Figure 10.</label>
<caption>
<p>Behavior of <italic>k</italic> = 1…<italic>K</italic> of a video sequences without smoke.</p></caption>
<graphic xlink:href="sensors-12-05670f10.gif"/></fig>
<fig id="f11-sensors-12-05670" position="float">
<label>Figure 11.</label>
<caption>
<p>Video sequences in which the proposed scheme does not performs correctly.</p></caption>
<graphic xlink:href="sensors-12-05670f11.gif"/></fig>
<fig id="f12-sensors-12-05670" position="float">
<label>Figure 12.</label>
<caption>
<p>Video sequences used to obtain the evaluation results shown in <xref ref-type="table" rid="t2-sensors-12-05670">Table 2</xref>. (<bold>a</bold>) Movie 1, (<bold>b</bold>) Movie 2 and (<bold>c</bold>) Movie 3.</p></caption>
<graphic xlink:href="sensors-12-05670f12.gif"/></fig>
<table-wrap id="t1-sensors-12-05670" position="float">
<label>Table 1.</label>
<caption>
<p>Evaluation results of proposed algorithm using global evaluation measures.</p></caption>
<table frame="box" rules="all">
<thead>
<tr>
<th align="center" valign="top">Criterion</th>
<th align="center" valign="top">TP</th>
<th align="center" valign="top">TN</th>
<th align="center" valign="top">FP</th>
<th align="center" valign="top">FN</th>
<th align="center" valign="top">cd</th>
<th align="center" valign="top">fd</th>
<th align="center" valign="top">cr</th>
<th align="center" valign="top">md</th>
<th align="center" valign="top">acc</th>
<th align="center" valign="top">PPV</th>
<th align="center" valign="top">mcc</th></tr></thead>
<tbody>
<tr>
<td align="center" valign="top"/>
<td align="center" valign="top">48</td>
<td align="center" valign="top">49</td>
<td align="center" valign="top">1</td>
<td align="center" valign="top">2</td>
<td align="center" valign="top">0.96</td>
<td align="center" valign="top">0.02</td>
<td align="center" valign="top">0.98</td>
<td align="center" valign="top">0.04</td>
<td align="center" valign="top">0.97</td>
<td align="center" valign="top">0.98</td>
<td align="center" valign="top">0.94</td></tr></tbody></table></table-wrap>
<table-wrap id="t2-sensors-12-05670" position="float">
<label>Table 2.</label>
<caption>
<p>Smoke detection performance comparison of proposed and two previously reported methods.</p></caption>
<table frame="box" rules="cols">
<thead>
<tr>
<th align="center" valign="top"><bold>Video Sequences</bold></th>
<th align="center" valign="top"><bold>Duration (frames)</bold></th>
<th align="center" valign="top"><bold>Proposed method</bold></th>
<th align="center" valign="top"><bold>Chunyu's <italic>et al.</italic> method</bold></th>
<th align="center" valign="top"><bold>Tereyin's method</bold></th>
<th align="center" valign="middle"><bold>Video descriptions</bold></th></tr>
<tr>
<th colspan="6" valign="bottom">
<hr/></th></tr></thead>
<tbody>
<tr>
<td align="center" valign="top">Movie 1</td>
<td align="center" valign="top">630</td>
<td align="center" valign="top">68 frames</td>
<td align="center" valign="top">118 frames</td>
<td align="center" valign="top">132 frames</td>
<td align="center" valign="top">Smoke behind the fence</td></tr>
<tr>
<td align="center" valign="top">Movie 2</td>
<td align="center" valign="top">240</td>
<td align="center" valign="top">105 frames</td>
<td align="center" valign="top">121 frames</td>
<td align="center" valign="top">127 frames</td>
<td align="center" valign="top">Smoke behind window</td></tr>
<tr>
<td align="center" valign="top">Movie 3</td>
<td align="center" valign="top">900</td>
<td align="center" valign="top">38 frames</td>
<td align="center" valign="top">86 frames</td>
<td align="center" valign="top">98 frames</td>
<td align="center" valign="top">Smoke behind waste basket</td></tr></tbody></table></table-wrap></sec></back></article>
