<?xml version="1.0"?>
<?xml-stylesheet href="docbook.xsl" type="text/xsl" ?>
<book xmlns="http://docbook.org/ns/docbook" version="5.0">
  <info>
    <title>Analytics Service Specification</title>
    <titleabbrev>Analytics</titleabbrev>
    <releaseinfo>26.06</releaseinfo>
    <author>
      <orgname>ONVIF™</orgname>
      <uri>www.onvif.org</uri>
    </author>
    <pubdate>June, 2026</pubdate>
    <mediaobject>
      <imageobject>
        <imagedata fileref="media/logo.png" contentwidth="60mm"/>
      </imageobject>
    </mediaobject>
    <copyright>
      <year>2008-2026</year>
      <holder>ONVIF™ All rights reserved.</holder>
    </copyright>
    <legalnotice>
      <para>Recipients of this document may copy, distribute, publish, or display this document so
        long as this copyright notice, license and disclaimer are retained with all copies of the
        document. No license is granted to modify this document.</para>
      <para>THIS DOCUMENT IS PROVIDED "AS IS," AND THE CORPORATION AND ITS MEMBERS AND THEIR
        AFFILIATES, MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
        LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
        NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THIS DOCUMENT ARE SUITABLE FOR ANY PURPOSE;
        OR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS,
        TRADEMARKS OR OTHER RIGHTS.</para>
      <para>IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FOR ANY
        DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR
        RELATING TO ANY USE OR DISTRIBUTION OF THIS DOCUMENT, WHETHER OR NOT (1) THE CORPORATION,
        MEMBERS OR THEIR AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR (2)
        SUCH DAMAGES WERE REASONABLY FORESEEABLE, AND ARISING OUT OF OR RELATING TO ANY USE OR
        DISTRIBUTION OF THIS DOCUMENT.  THE FOREGOING DISCLAIMER AND LIMITATION ON LIABILITY DO NOT
        APPLY TO, INVALIDATE, OR LIMIT REPRESENTATIONS AND WARRANTIES MADE BY THE MEMBERS AND THEIR
        RESPECTIVE AFFILIATES TO THE CORPORATION AND OTHER MEMBERS IN CERTAIN WRITTEN POLICIES OF
        THE CORPORATION.</para>
    </legalnotice>
    <revhistory>
      <revision>
        <revnumber>2.1</revnumber>
        <date>Jul-2011</date>
        <author>
          <personname>Hans Busch</personname>
        </author>
        <revremark>Split from Core 2.0 without change of content.</revremark>
      </revision>
      <revision>
        <revnumber>2.1.1</revnumber>
        <date>Jan-2012</date>
        <author>
          <personname>Hans Busch</personname>
        </author>
        <revremark>Change Requests 505, 535</revremark>
      </revision>
      <revision>
        <revnumber>2.2</revnumber>
        <date>May-2012</date>
        <author>
          <personname>Hasan T. Ozdemir</personname>
        </author>
        <revremark>Incorporated 2.2 enhancements</revremark>
      </revision>
      <revision>
        <revnumber>2.2.1</revnumber>
        <date>Dec-2012</date>
        <author>
          <personname>Hans Busch</personname>
        </author>
        <revremark>Change Request 708</revremark>
      </revision>
      <revision>
        <revnumber>2.4</revnumber>
        <date>Aug-2013</date>
        <author>
          <personname>Hasan T. Ozdemir</personname>
        </author>
        <revremark>Generalized from VideoAnalytics. Added Audio events.</revremark>
      </revision>
      <revision>
        <revnumber>2.4.1</revnumber>
        <date>Dec-2013</date>
        <author>
          <personname>Michio Hirai</personname>
        </author>
        <revremark>Change Request 1164, 1193</revremark>
      </revision>
      <revision>
        <revnumber>2.4.2</revnumber>
        <date>Jun-2014</date>
        <author>
          <personname>Michio Hirai</personname>
        </author>
        <revremark>Change Request 1305</revremark>
      </revision>
      <revision>
        <revnumber>2.5</revnumber>
        <date>Dec-2014</date>
        <author>
          <personname>Hasan T. Ozdemir</personname>
        </author>
        <author>
          <personname>Michio Hirai</personname>
        </author>
        <revremark>Added A6 Query Rule Change Request 1559</revremark>
      </revision>
      <revision>
        <revnumber>16.06</revnumber>
        <date>Jun-2016</date>
        <author>
          <personname>Hiroyuki Sano</personname>
        </author>
        <revremark>Change Request 1821, 1825, 1844</revremark>
      </revision>
      <revision>
        <revnumber>16.12</revnumber>
        <date>Dec-2016</date>
        <author>
          <personname>Steven Dillingham</personname>
        </author>
        <author>
          <personname>Hiroyuki Sano</personname>
        </author>
        <revremark>Added Motion Region Detection Rules: 5.2.3.6, Annex C Change Request
          1871</revremark>
      </revision>
      <revision>
        <revnumber>17.06</revnumber>
        <date>Jun-2017</date>
        <author>
          <personname>Hans Busch</personname>
        </author>
        <author>
          <personname>Hiroyuki Sano</personname>
        </author>
        <revremark>Updated method layouts. Apply 2089 Change Request 1843, 1984, 2042, 2052, 2072,
          2114, 2137 Added GetAnalyticsModuleOptions &amp; Annex D</revremark>
      </revision>
      <revision>
        <revnumber>17.12</revnumber>
        <date>Dec-2017</date>
        <author>
          <personname>Hiroyuki Sano</personname>
        </author>
        <revremark>Change Request 2177, 2204</revremark>
      </revision>
      <revision>
        <revnumber>18.06</revnumber>
        <date>Jun-2018</date>
        <author>
          <personname>Qian Zhou</personname>
        </author>
        <author>
          <personname>Hiroyuki Sano</personname>
        </author>
        <revremark>Added Vehicle information, Speed, License plate information descriptor Change
          Request 2234, 2235, 2245, 2305, 2306</revremark>
      </revision>
      <revision>
        <revnumber>18.12</revnumber>
        <date>Dec-2018</date>
        <author>
          <personname>Hiroyuki Sano</personname>
        </author>
        <revremark>Change Request 2322, 2354, 2363, 2376, 2385, 2437</revremark>
      </revision>
      <revision>
        <revnumber>19.06</revnumber>
        <date>Jun-2019</date>
        <author>
          <personname>Sujith Raman</personname>
        </author>
        <author>
          <personname>Hiroyuki Sano</personname>
        </author>
        <author>
          <personname>Hans Busch</personname>
        </author>
        <revremark>Added PTZ Motion Region Configuration, Tampering Configuration Change Request
          2462, 2484 Change Request 2465</revremark>
      </revision>
      <revision>
        <revnumber>19.12</revnumber>
        <date>Dec-2019</date>
        <author>
          <personname>Haina Han</personname>
        </author>
        <author>
          <personname>Hiroyuki Sano</personname>
        </author>
        <revremark>Added Image Sending, Object Classification, Face and Human body descriptor Change
          Request 2504, 2527, 2528, 2555, 2556, 2565, 2566, 2567, 2578, 2628</revremark>
      </revision>
      <revision>
        <revnumber>20.06</revnumber>
        <date>Jun-2020</date>
        <author>
          <personname>Michio Hirai</personname>
        </author>
        <author>
          <personname>Sujith Raman</personname>
        </author>
        <author>
          <personname>Hainha Han, Sriram Bhetanabottla</personname>
        </author>
        <revremark>Change Request 2695, 2640, 2641, 2669, 2671, 2678, 2682, 2685, 2690, 2696, 2698,
          2686 Added PolyLine and Polygon options Added Recognition rule engines</revremark>
      </revision>
      <revision>
        <revnumber>20.12</revnumber>
        <date>Dec-2020</date>
        <author>
          <personname>Hans Busch</personname>
        </author>
        <revremark>Add occurrence section. Refactor Annex A. Remove Query Rule and Declarative
          Motion Detector.</revremark>
      </revision>
      <revision>
        <revnumber>21.06</revnumber>
        <date>Jun-2021</date>
        <author>
          <personname>Hans Busch</personname>
        </author>
        <revremark>Update counting rule. Minor editorial fixes.</revremark>
      </revision>
      <revision>
        <revnumber>21.12</revnumber>
        <date>Dec-2021</date>
        <author>
          <personname>Sujith Raman, Fredrik Svensson, Hans Busch</personname>
        </author>
        <revremark>Added body temperature alarm rule. Clarifications for color.</revremark>
      </revision>
      <revision>
        <revnumber>22.06</revnumber>
        <date>Jun-2022</date>
        <author>
          <personname>Fredrik Svensson, Hans Busch, Sriram Bhetanabottla, Venki Aravapalli</personname>
        </author>
        <revremark>Move scene description to separate chapter and append section on JSON syntax.
          Clarify color value range. Add missing Access Class for DeleteAnalyticsModule. Update license plate rule configuration.</revremark>
      </revision>
      <revision>
        <revnumber>22.12</revnumber>
        <date>Dec-2022</date>
        <author>
          <personname>Fredrik Svensson, Hans Busch</personname>
        </author>
        <revremark>Unify analytics and core mqtt attribute and value handling. Add Likelihood attribute to color type</revremark>
      </revision>
      <revision>
        <revnumber>23.06</revnumber>
        <date>Jun-2023</date>
        <author>
          <personname>Fredrik Svensson, Sujith Raman, Venki Aravapalli</personname>
        </author>
        <revremark>Addition of spherical coordinate descriptor, direction descriptor and barcode
          information. Rule additions for abandoned and removed objects.</revremark>
      </revision>
      <revision>
        <revnumber>23.12</revnumber>
        <date>Dec-2023</date>
        <author>
          <personname>Sriram Bhetanabottla, Hans Busch, Sujith Raman</personname>
        </author>
        <revremark>JSON Payload section moved to Core spec, fix EyeShape definition, clarify metadata image format and add optional event object description.</revremark>
      </revision>
      <revision>
        <revnumber>24.06</revnumber>
        <date>Jun-2024</date>
        <author>
          <personname>Hans Busch</personname>
        </author>
        <revremark>Addition of accessory subtypes. Remove requirement on maxInstances for fixed items.</revremark>
      </revision>
      <revision>
        <revnumber>24.12</revnumber>
        <date>Dec-2024</date>
        <author>
          <personname>Hans Busch, Sriram Bhetanabottla</personname>
        </author>
        <revremark>Add Object UUID as well as sign and label info. Extend LPR data fields for speed and direction.</revremark>
      </revision>
      <revision>
        <revnumber>25.06</revnumber>
        <date>Jun-2025</date>
        <author>
          <personname>Hans Busch, Sriram Bhetanabottla</personname>
        </author>
        <revremark>Introduce enhanced type Belongings and deprecate type Belonging. Add support for license plate colors. Clarify requirements for faults for rules and modules creation and modification.</revremark>
      </revision>
      <revision>
        <revnumber>25.12</revnumber>
        <date>Dec-2025</date>
        <author>
          <personname>Sriram Bhetanabottla, Hans Busch</personname>
        </author>
        <revremark>Add object track aggregation.</revremark>
      </revision>
      <revision>
        <revnumber>26.06</revnumber>
        <date>Jun-2026</date>
        <author>
          <personname>Cédrick Emond, Wang Xiaomin</personname>
        </author>
        <revremark>Add metadata aspect ratio transformation and multi-dimensional sensor
          data.</revremark>
      </revision>
    </revhistory>
  </info>
  <chapter>
    <title>Scope</title>
    <para>This document defines the web service interface for configuration and operation of video/audio analytics.</para>
    <para>Web service usage is outside of the scope of this document. Please refer to the ONVIF core specification.</para>
    <para>Since the scope of this service is extended to include audio data, the service is renamed from Video Analytics Service to Analytics Service.</para>
  </chapter>
  <chapter>
    <title>Normative references</title>
    <para>ONVIF Core Specification</para>
    <para role="reference">&lt;<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/specs/core/ONVIF-Core-Specification.pdf"></link>&gt;</para>
    <para>ONVIF Media Service Specification</para>
    <para role="reference">&lt;<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/specs/srv/media/ONVIF-Media-Service-Spec.pdf"></link>&gt;</para>
    <para>ONVIF Streaming  Specification</para>
    <para role="reference">&lt;<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/specs/stream/ONVIF-Streaming-Spec.pdf"></link>&gt;</para>
    <para>ISO 3864-1:2011 - Safety colours and safety signs</para>
    <para role="reference">&lt;<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.iso.org/standard/51021.html"></link>&gt;</para>
    <para>ISO 7010-1:2019 - Graphical symbols — Safety colours and safety signs — Registered safety signs</para>
    <para role="reference">&lt;<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.iso.org/standard/51021.html"></link>&gt;</para>
    <para>ISO 12639:2004. Graphic Technology -- Prepress digital data exchange -- Tag image file format for image technology (TIFF/IT).  TIFF Revision 6.0</para>
    <para role="reference">&lt;<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.iso.org/iso/iso_catalogue/catalogue_ics/catalogue_detail_ics.htm?csnumber=34342"></link>&gt;</para>
    <para>ISO 3166-1:2013 Codes for the representation of names of countries and their subdivisions -- Part 1: Country codes</para>
    <para role="reference">&lt;<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.iso.org/standard/63545.html"></link>&gt;</para>
    <para>RFC 7159 The JavaScript Object Notation (JSON) Data Interchange Format</para>
    <para role="reference">&lt;<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.rfc-editor.org/rfc/rfc7159.txt"></link>&gt;</para>
    <para>UNECE Globally Harmonized System of Classification and Labelling of Chemicals (GHS)</para>
    <para role="reference">&lt;<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://unece.org/DAM/trans/danger/publi/ghs/ghs_rev07/English/ST_SG_AC10_30_Rev7e.pdf"></link>&gt;</para>
    <para>UNECE Agreement Concerning the International Carriage of Dangerous Goods by Road Volume II, 2021</para>
    <para role="reference">&lt;<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://unece.org/sites/default/files/2021-01/ADR2021_Vol2e.pdf"></link>&gt;</para>
  </chapter>
  <chapter>
    <title>Terms and Definitions</title>
    <section>
      <title>Definitions</title>
      <informaltable>
        <tgroup cols="2">
          <colspec colname="c1" colwidth="24*" />
          <colspec colname="c2" colwidth="76*" />
          <tbody valign="top">
            <row>
              <entry align="left">
                <para>
                  <emphasis role="bold">Video Analytics</emphasis>
                </para>
              </entry>
              <entry align="left">
                <para>Algorithms used to evaluate video data for meaning of content</para>
              </entry>
            </row>
            <row>
              <entry align="left">
                <para>
                  <emphasis role="bold">Audio Analytics</emphasis>
                </para>
              </entry>
              <entry align="left">
                <para>Algorithms used to evaluate audio data for meaning of content</para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>
    </section>
    <section>
      <title>Abbreviations</title>
      <informaltable>
        <tgroup cols="2">
          <colspec colname="c1" colwidth="24*" />
          <colspec colname="c2" colwidth="76*" />
          <tbody valign="top">
            <row>
              <entry valign="middle">
                <para>PTZ</para>
              </entry>
              <entry valign="middle">
                <para>Pan Tilt Zoom</para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>
    </section>
    <section>
      <title>Namespaces</title>
      <para>
        <xref linkend="_Ref515970930" /> lists the prefix and namespaces used in this specification. Listed prefixes are not part of the standard and an implementation can use any prefix.</para>
      <table xml:id="_Ref515970930">
        <title>Namespaces used in this specification</title>
        <tgroup cols="3">
          <colspec colname="c1" colwidth="8*" />
          <colspec colname="c2" colwidth="44*" />
          <colspec colname="c3" colwidth="48*" />
          <thead>
            <row>
              <entry>
                <para>Prefix</para>
              </entry>
              <entry>
                <para>Namespace URI</para>
              </entry>
              <entry>
                <para>Description</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry>
                <para>tt</para>
              </entry>
              <entry>
                <para>
                  <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/ver10/schema">http://www.onvif.org/ver10/schema</link>
                </para>
              </entry>
              <entry>
                <para>XML schema descriptions in this specification.</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>ter</para>
              </entry>
              <entry>
                <para>
                  <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/ver10/error">http://www.onvif.org/ver10/error</link>
                </para>
              </entry>
              <entry>
                <para>The namespace for ONVIF defined faults.</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>tns1</para>
              </entry>
              <entry>
                <para>
                  <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/ver10/topics">http://www.onvif.org/ver10/topics</link>
                </para>
              </entry>
              <entry>
                <para>The namespace for the ONVIF topic namespace</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>axt</para>
              </entry>
              <entry>
                <para>
                  <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/ver20/analytics">http://www.onvif.org/ver20/analytics</link>
                </para>
              </entry>
              <entry>
                <para>XML schema descriptions for the analytics service</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>ttr</para>
              </entry>
              <entry>
                <para>
                  <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/ver20/analytics/radiometry">http://www.onvif.org/ver20/analytics/radiometry</link>
                </para>
              </entry>
              <entry>
                <para>XML schema descriptions for Radiometry</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>fc</para>
              </entry>
              <entry>
                <para>
                  <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/ver20/analytics/humanface">http://www.onvif.org/ver20/analytics/humanface</link>
                </para>
              </entry>
              <entry>
                <para>XML schema descriptions for human face metadata</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>bd</para>
              </entry>
              <entry>
                <para>
                  <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/ver20/analytics/humanbody">http://www.onvif.org/ver20/analytics/humanbody</link>
                </para>
              </entry>
              <entry>
                <para>XML schema descriptions for human body metadata</para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <para>This specification references the following namespaces (listed in <xref linkend="_Ref11684852" />) by specified prefix.</para>
      <table xml:id="_Ref11684852">
        <title>Referenced namespaces </title>
        <tgroup cols="3">
          <colspec colname="c1" colwidth="11*" />
          <colspec colname="c2" colwidth="39*" />
          <colspec colname="c3" colwidth="50*" />
          <thead>
            <row>
              <entry>
                <para>Prefix</para>
              </entry>
              <entry>
                <para>Namespace URI</para>
              </entry>
              <entry>
                <para>Description</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry>
                <para>xs</para>
              </entry>
              <entry>
                <para>http://www.w3.org/2001/XMLSchema</para>
              </entry>
              <entry>
                <para>Instance namespace as defined by XS [XML-Schema, Part1] and [XML-Schema, Part 2]</para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
    </section>
  </chapter>
  <chapter>
    <title>Overview</title>
    <para>Analytic applications are divided into image/audio analysis and application-specific parts. The interface between these two parts produces an abstraction that describes the scene based on the objects present. The application specific part performs a comparison of the scene descriptions and of the scene rules (such as virtual lines that are prohibited to cross, or polygons that define a protected area). Other rules may represent intra-object behaviour such as objects following other objects (to form a tailgating detection). Such rules can also be used to describe prohibited object motion, which may be used to establish a speed limit.</para>
    <para>These two separate parts, referred to as the video/audio analytics engine and as the rule engine, together with the events and actions, form the analytics architecture according to this specification as illustrated in <xref linkend="_Ref210463770" />.</para>
    <para>The analytics architecture consists of elements and interfaces. Each element provides a functionality corresponding to a semantically unique entity of the complete video/audio analytics solution. Interfaces are unidirectional and define an information entity with a unique content. Only the Interfaces are subject to this specification. Central to this architecture is the ability to distribute any elements or sets of adjacent elements to any device in the network.</para>
    <figure xml:id="_Ref210463770">
      <title>Analytics architecture</title>
      <mediaobject>
        <imageobject>
          <imagedata fileref="media/Analytics/image4.svg" contentwidth="128.24mm" />
        </imageobject>
      </mediaobject>
    </figure>
    <para>The following interfaces are defined in this standard:</para>
    <itemizedlist>
      <listitem>
        <para>Analytics Configuration Interface</para>
      </listitem>
      <listitem>
        <para>Scene Description</para>
      </listitem>
      <listitem>
        <para>Rule Configuration Interface</para>
      </listitem>
    </itemizedlist>
    <para>This specification defines a configuration framework for the analytics engine called ONVIF Analytics Service. This framework enables a client to contact a device implementing the ONVIF Analytics Service for supported analytics modules and their configurations. Configurations of such modules can be dynamically added, removed or modified by a client, allowing a client to run multiple Analytics Modules in parallel if supported by the device.</para>
    <para>The output from the Analytics Engine is called a <emphasis>Scene Description</emphasis>.
      The Scene Description represents the abstraction of the scene in terms of metadata for the
      objects, either static or dynamic, that are part of the scene. This specification defines an
      XML-based Scene Description Interface including data types. For easy consumption by
      non-traditional clients (e.g. cloud vendors) and to bridge the gap between traditional
      surveillance systems and IoT ecosystems metadata including scene description can be published
      in JSON format over the MQTT protocol.</para>
    <para>Rules describe how the scene description is interpreted and how to react on that information. The specification defines standard rule syntax and methods to communicate configuration of these rules from the application to the device.</para>
    <para>A device supporting ONVIF Analytics Service shall implement the Scene Description Interface and allow events to be dispatched using the Event Service. If the device additionally supports a rule engine then it shall implement the Rules Analytics Modules Interface.</para>
    <para>Event and action engine interfaces and configuration are out of scope of this specification. The event interface is handled through the Event Service as described in the ONVIF Core specification.</para>
    <para>An analytics configuration can be attached to a Media Profile if the ONVIF Media Service is present. In that case the analytics configuration becomes connected to a specific source.</para>
    <para>For server based analytics the ONVIF Analytics Device Service provides for the necessary configuration commands to bundle single analytic algorithm configurations represented as AnalyticsConfiguration to engines or application like processing chains (e.g. all algorithms and rules necessary to build a “lost baggage detector”).</para>
    <para>Note that the Media 1 Service Specification uses the name VideoAnalyticsConfiguration for historic reasons which maps to the same entity as the AnalyticsConfiguration.</para>
    <para>WSDL for the analytics service is part of the framework and provided in the Analytics WSDL file <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/ver20/analytics/wsdl/analytics.wsdl">http://www.onvif.org/ver20/analytics/wsdl/analytics.wsdl</link>.</para>
    <para>Rule and Module description reference types that are not already defined in the [ONVIF Schema] are defined in the RULES Schema file <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/ver20/analytics/wsdl/rules.xsd">http://www.onvif.org/ver20/analytics/wsdl/rules.xsd</link>.</para>
    <para>Radiometry types, modules and rules are defined in the RADIOMETRY Schema file <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/ver20/analytics/radiometry.xsd">http://www.onvif.org/ver20/analytics/radiometry.xsd</link>.</para>
  </chapter>
  <chapter>
    <title>Scene Description</title>
      <section>
        <title>Overview</title>
        <para>This chapter defines the XML-based scene description, which can be streamed as metadata to clients via RTP as defined in the ONVIF Streaming Specification.</para>
        <para>The scope of the Scene Description covers basic Scene Elements which can be displayed in a video overlay to the end-user as well as a framework for vendor-specific extensions.</para>
        <para>Section <xref linkend="mqtt"/> defines an alternate JSON based representation.</para>
      </section>
      <section>
        <title>Frame Related Content</title>
        <para>The input of the analytics engine is images from a video source. The extracted scene elements are associated with the image from which they were extracted. An extracted scene is distinguished from the general description of the video source processed by the analytics engine (information such as video input line, video resolution, frame cropping, frame rate etc.), the temporal frame association within the input stream, and the spatial positioning of elements within a frame.</para>
        <para>The temporal and spatial relation of scene elements with respect to the selected video source is discussed in sections <xref linkend="_Ref208711862" /> and <xref linkend="_Ref208712096" />. The appearance and behaviour of tracked objects is discussed in section <xref linkend="_Ref208712481" />. Interactions between objects like splits and merges are described in section <xref linkend="_Ref208712401" />.</para>
        <para>A PTZ device can put information about the pan, tilt and zoom at the beginning of a frame, allowing a client to estimate the 3D coordinates of scene elements. Next, the image coordinate system can be adapted with an optional transformation node which is described in the next subsection. Finally, multiple object descriptions can be placed and their association can be specified within an ObjectTree node. Optionally SceneImageRef and SceneImage can also be included inside Frame. Below, the definitions are included for convenience<footnote xml:id="__FN1__"><para>Please note that the schema is included here for <emphasis>information only. </emphasis>[ONVIF Schema] contains the normative schema definition.</para></footnote>:</para>
        <programlisting><![CDATA[<xs:complexType name="Frame">
  <xs:sequence>
    <xs:element name="PTZStatus" type="tt:PTZStatus"
      minOccurs="0"/>
    <xs:element name="Transformation" type="tt:Transformation"
      minOccurs="0"/>
    <xs:element name="Object" type="tt:Object" minOccurs="0"
      maxOccurs="unbounded"/>
    <xs:element name="ObjectTree" type="tt:ObjectTree" minOccurs="0"/>
    <xs:element name="SceneImageRef" type="tt:anyURI" minOccurs="0"/>
    <xs:element name="SceneImage" type="xs:base64Binary" minOccurs="0"/>
    ...
  </xs:sequence>
  <xs:attribute name="UtcTime" type="xs:dateTime" use="required"/>
  ...
</xs:complexType>
<xs:element name="Frame" type="tt:Frame">
]]></programlisting>
        <para>Subsection <xref linkend="_Ref208711862" /> describes how frames processed by the analytics algorithm are referenced within the analytics stream.</para>
        <section xml:id="_Ref208711862">
          <title>Temporal Relation</title>
          <para>Since multiple scene elements can be extracted from the same image, scene elements are listed below a frame node that establishes the link to a specific image from the video input. The frame node contains a mandatory UtcTime attribute. This UtcTime timestamp shall enable a client to map the frame node exactly to one video frame. For example, the RTP timestamp of the corresponding encoded video frame shall result in the same UTC timestamp after conversion. The synchronization between video and metadata streams is further described in the ONVIF Streaming Specification.</para>
          <para>Note that there is not necessarily a one to one relation between video and metadata frames. Typically an analytics module generates metadata at a lower frame rate. However when more than one analytics module generates metadata, multiple metadata frames may occur for the same video frame and also the temporal order may vary because different analytics modules may have differing computational delay.</para>
          <para>When multiple analytics modules are streaming metadata in interleaved frames then the name of the originating analytics module shall be signaled via the Frame Source attribute.</para>
          <para>Example:</para>
          <programlisting>&lt;tt:Frame <emphasis role="bold">UtcTime=</emphasis>&quot;2008-10-10T12:24:57.321&quot;&gt;
  ...
&lt;/tt:Frame&gt;
...
&lt;tt:Frame <emphasis role="bold">UtcTime=</emphasis>&quot;2008-10-10T12:24:57.521&quot;&gt;
  ...
&lt;/tt:Frame&gt;
</programlisting>
        </section>
        <section xml:id="_Ref208712096">
          <title>Spatial Relation</title>
          <para>Most scene elements refer to some part in an image from which information has been extracted. For instance, when tracking objects over time, their position within each frame shall be specified. These positions shall relate to a coordinate system. The normalized coordinate system is shown in <xref linkend="_Ref213224534" />.</para>
          <figure xml:id="_Ref213224534">
            <title>Normalized frame coordinate system</title>
            <mediaobject>
              <imageobject>
                <imagedata fileref="media/Analytics/coordinates.svg" contentwidth="80mm" />              </imageobject>
            </mediaobject>
          </figure>
          <para>This specification allows modification of the coordinate system for individual nodes of the XML tree. As a result, each frame node starts with the normalized coordinate system. Each child node inherits the most recent coordinate system of its parent. A transformation node modifies the most recent coordinate system of its parent. Coordinate specifications are always related to the most recent coordinate system of the parent node.</para>
          <para>The specification defines transformation nodes for scaling and translation. The Scene Description contains placeholders where these transformation nodes are placed<footnote xml:id="__FN2__"><para>Please note that the schema is included here for <emphasis>information only. </emphasis>[ONVIF Schema] contains the normative schema definition.</para></footnote>.</para>
          <programlisting><![CDATA[<xs:complexType name="Transformation">
  <xs:sequence>
    <xs:element name="Translate" type="Vector" minOccurs="0"/>
    <xs:element name="Scale" type="Vector" minOccurs="0"/>
    ...
  </xs:sequence>
</xs:complexType>
]]></programlisting>
          <para>A mathematical description of coordinate systems and transformations follows. A coordinate transformation consists of a translational vector <inlinemediaobject><imageobject><imagedata fileref="media/Analytics/image5.svg" contentwidth="55" contentdepth="51" /></imageobject></inlinemediaobject> and scaling <inlinemediaobject><imageobject><imagedata fileref="media/Analytics/image6.svg" contentwidth="59" contentdepth="51" /></imageobject></inlinemediaobject>. A point <inlinemediaobject><imageobject><imagedata fileref="media/Analytics/image7.svg" contentwidth="65" contentdepth="51" /></imageobject></inlinemediaobject> given with respect to this coordinate system is transformed into the corresponding point <inlinemediaobject><imageobject><imagedata fileref="media/Analytics/image8.svg" contentwidth="61" contentdepth="51" /></imageobject></inlinemediaobject> of the normalized coordinate system by the following formula: <inlinemediaobject><imageobject><imagedata fileref="media/Analytics/image9.svg" contentwidth="139" contentdepth="51" /></imageobject></inlinemediaobject>. Similarly, a vector <emphasis role="bold"><emphasis>v</emphasis></emphasis> given with respect to the coordinate system is transformed into the corresponding vector <emphasis role="bold"><emphasis>w</emphasis></emphasis> of the normalized coordinate system by: <inlinemediaobject><imageobject><imagedata fileref="media/Analytics/image10.svg" contentwidth="109" contentdepth="51" /></imageobject></inlinemediaobject>.</para>
          <para>A transformation node has an optional scaling vector <inlinemediaobject><imageobject><imagedata fileref="media/Analytics/image11.svg" contentwidth="61" contentdepth="51" /></imageobject></inlinemediaobject> and an optional translational vector <inlinemediaobject><imageobject><imagedata fileref="media/Analytics/image12.svg" contentwidth="60" contentdepth="51" /></imageobject></inlinemediaobject>. If the scaling is not specified, its default value <inlinemediaobject><imageobject><imagedata fileref="media/Analytics/image13.svg" contentwidth="51" contentdepth="48" /></imageobject></inlinemediaobject> is assumed. Similarly, the default value for the translation is <inlinemediaobject><imageobject><imagedata fileref="media/Analytics/image14.svg" contentwidth="52" contentdepth="48" /></imageobject></inlinemediaobject>. The transformation node modifies the top-most coordinate system in the following way:</para>
          <para><inlinemediaobject><imageobject><imagedata fileref="media/Analytics/image15.svg" contentdepth="51" /></imageobject></inlinemediaobject>,
            <inlinemediaobject><imageobject><imagedata fileref="media/Analytics/image16.svg" contentdepth="51"  /></imageobject></inlinemediaobject>, where
            <inlinemediaobject><imageobject><imagedata fileref="media/Analytics/image17.svg" contentdepth="51"  /></imageobject></inlinemediaobject> and
            <inlinemediaobject><imageobject><imagedata fileref="media/Analytics/image18.svg" contentdepth="51"  /></imageobject></inlinemediaobject> replace the top-most coordinate system.
          </para>
          <para>For example, the coordinates of the scene description are given in a frame coordinate system, where the lower-left corner has coordinates (0,0) and the upper-right corner coordinates (320,240).  The frame node resembles the following code where the scaling is set to the doubled reciprocal of the frame width and the frame height:</para>
          <programlisting><![CDATA[<tt:Frame UtcTime="2008-10-10T12:24:57.321">
  <tt:Transformation>
    <tt:Translate x="-1.0" y="-1.0"/>
    <tt:Scale x="0.00625" y="0.00834"/>
  </tt:Transformation>
  ...
</tt:Frame>
]]></programlisting>
        </section>
        </section>
        <section>
          <title>Aspect Ratio Dependant Transformation</title>
          <para>This section describes the transformation specific to a scene aspect ratio.</para>
          <para>Same as the transformation node, this node is used to apply final geometric transformations to the scene elements when the device supports more than one aspect ratio. This node allows the client to choose which transformation to apply, matching the metadata aspect ratio to the rendered aspect ratio.</para>
          <para>The aspect ratio transformation node can contain the following elements:</para>
          <programlisting><![CDATA[<xs:complexType name="AspectRatioTransformation">
  <xs:sequence>
    <xs:element name="Translate" type="Vector" minOccurs="0"/>
    <xs:element name="Scale" type="Vector" minOccurs="0"/>
    ...
  </xs:sequence>
  <xs:attribute name="ratio" type="xs:float" use="required"/>
</xs:complexType>
]]></programlisting>
          <para>If the transformation is a centered crop on one axis, no Translate vector is needed and the Scale vector is calculated with this formula.</para>
		  <para>For the rendered aspect ratios greater than the video source aspect ratio, fix ScaleX = 1 and compute ScaleY = RenderedAspectRatio / VideoSourceAspectRatio.</para>
		  <para>For the rendered aspect ratios less than the video source aspect ratio, fix ScaleY = 1 and compute ScaleX = VideoSourceAspectRatio / RenderedAspectRatio.</para>
		  <para>For example, the coordinates of the scene description are given in a frame coordinate system, where the lower-left corner has coordinates (0,0) and the upper-right corner coordinates (1920,1440). The video source aspect ratio is 4:3. The device supports resolutions 1920x1080 and 960x576 corresponding aspect ratio 16:9 = 1.77777778 and 5:3 = 1.66666667.</para>
		  <para>The frame node resembles the following code, where the scale is set to crop the image to other supported aspect ratios:</para>
          <programlisting><![CDATA[<tt:Frame UtcTime="2008-10-10T12:24:57.321">
  <tt:AspectRatioTransformation ratio="1.66666667">
    <tt:Scale x="1" y="1.25"/>
  </tt:AspectRatioTransformation>
  <tt:AspectRatioTransformation ratio="1.77777778>
    <tt:Scale x="1" y="1.33333333"/>
  </tt:AspectRatioTransformation>
  ...
</tt:Frame>
]]></programlisting>
      <para>In every Frame, the device must add the nodes for at least the currently configured aspect ratios. The node for the video source aspect ratio should be omitted.</para>
      </section>
      <section>
        <title>Scene Elements</title>
        <para>This section focuses on scene elements generated by object tracking algorithms and defines object handling and object shapes for them.</para>
        <para>Frames where no objects have been detected can be skipped within the scene description to save bandwidth, as long as the last frame in the scene description is empty as well. . It is recommended that the device regularly sends the scene description even if it is empty. This is in order to indicate that the analytics engine is operational. The device shall send a scene description if a SynchronizationPoint is requested for the corresponding stream.</para>
        <para>When the receiver of a scene description receives an empty frame, the receiver should assume that all subsequent frames are empty as well until the next non-empty frame is received. When the last received frame is non-empty, the receiver should assume that a description of the next processed frame will be transmitted.</para>

        <section xml:id="_Ref208712481">
          <title>Objects</title>
          <para>The object node has two placeholders for appearance and behaviour information. The appearance node starts with an optional transformation node which can be used to change from a frame-centric coordinate system to an object-centric coordinate system. Next, the Shape of an object can be specified. If an object is detected in a frame, the shape information should be present in the appearance description. The analytics algorithm may add object nodes for currently not visible objects, if it is able to infer information for this object otherwise. In such cases, the shape description may be omitted.</para>
          <para>Object features such as shape (see <xref linkend="_Ref208821074" />), color (see <xref linkend="_Toc214944464" />) and object class (see <xref linkend="_Ref485906999" />) can be added to the appearance node.</para>
          <para>This specification defines two standard behaviours for objects: Removed or Idle.
            These behaviours shall be listed as child nodes of the behaviour node of an object. The
            presence of a removed or idle node does not automatically delete the corresponding
            ObjectId, making it possible to reuse the same ObjectId when the object starts moving
            again.</para>
          <para>An object marked with the removed behaviour specifies the place from where the real object was removed. The marker should not be used as the behaviour of the removed object. It is possible to detect the removal even if the action of taking away the object was not detected.</para>
          <para>Objects previously in motion can be marked as Idle to indicate that the object stopped moving. As long as such objects don’t change, they will not be listed in the scene description anymore. When an Idle object appears again in the Scene Description, the Idle flag is removed automatically.</para>
          <para>Example:</para>
          <programlisting><![CDATA[  ...
  <tt:Frame UtcTime="2008-10-10T12:24:57.321">
    <tt:Transformation>
      <tt:Translate x="-1.0" y="-1.0"/>
      <tt:Scale x="0.003125" y="0.00416667"/>
    </tt:Transformation>
    <tt:Object ObjectId="12">
      <tt:Appearance>
        <tt:Shape>
          <tt:BoundingBox left="20.0" top="80.0" right="100.0" bottom="30.0"/>
          <tt:CenterOfGravity x="60.0" y="50.0"/>
        </tt:Shape>
      </tt:Appearance>
    </tt:Object>
  </tt:Frame>
  ...
  <tt:Frame UtcTime="2008-10-10T12:24:57.421">
    <tt:Transformation>
      <tt:Translate x="-1.0" y="-1.0"/>
      <tt:Scale x="0.003125" y="0.00416667"/>
    </tt:Transformation>
    <tt:Object ObjectId="12">
      <tt:Appearance>
        <tt:Shape>
          <tt:BoundingBox left="20.0" top="80.0" right="100.0" bottom="30.0"/>
          <tt:CenterOfGravity x="60.0" y="50.0"/>
        </tt:Shape>
      </tt:Appearance>
      <tt:Behaviour>
        <tt:Idle/>
      </tt:Behaviour>
    </tt:Object>
  </tt:Frame>
  ...
  <tt:Frame UtcTime="2008-10-10T12:24:57.521">
    <tt:Transformation>
      <tt:Translate x="-1.0" y="-1.0"/>
      <tt:Scale x="0.003125" y="0.00416667"/>
    </tt:Transformation>
  </tt:Frame>
  ...
  <tt:Frame UtcTime="2008-10-10T12:24:57.621">
    <tt:Transformation>
      <tt:Translate x="-1.0" y="-1.0"/>
      <tt:Scale x="0.003125" y="0.00416667"/>
    </tt:Transformation>
    <tt:Object ObjectId="12">
      <tt:Appearance>
        <tt:Shape>
          <tt:BoundingBox left="25.0" top="80.0" right="105.0" bottom="30.0"/>
          <tt:CenterOfGravity x="65.0" y="50.0"/>
        </tt:Shape>
      </tt:Appearance>
    </tt:Object>
  </tt:Frame>
  ...
  <tt:Frame UtcTime="2008-10-10T12:24:57.721">
    <tt:Transformation>
      <tt:Translate x="-1.0" y="-1.0"/>
      <tt:Scale x="0.003125" y="0.00416667"/>
    </tt:Transformation>
    <tt:Object ObjectId="19">
      <tt:Appearance>
        <tt:Shape>
          <tt:BoundingBox left="20.0" top="80.0" right="100.0" bottom="30.0"/>
          <tt:CenterOfGravity x="60.0" y="50.0"/>
        </tt:Shape>
      </tt:Appearance>
      <tt:Behaviour>
        <tt:Removed/>
      </tt:Behaviour>
    </tt:Object>
  </tt:Frame>
]]></programlisting>
        </section>
        <section>
          <title>Object Identifier</title>
          <para>Objects are enumerated via their integer ObjectId. ObjectIds are implicitly created
          by an analytics module with the first appearance of the object. A unique identifier can be
          assigned to objects via the UUID attribute for linking object information from multiple
          analytics module streams.</para>
          <para>Objects can be related, for example, a LicensePlate object can be related to Vehicle Object to which it belongs, in this case LicensePlate object which is child has the Vehicle's ObjectId as Parent.</para>
          <para>Example:</para>
          <programlisting><![CDATA[  <tt:Frame UtcTime="2019-06-10T12:24:57.321">
    <tt:Transformation>
      <tt:Translate x="-1.0" y="-1.0"/>
      <tt:Scale x="0.003125" y="0.00416667"/>
    </tt:Transformation>
    <tt:Object ObjectId="12" UUID='032e91c6-39f1-4504-9970-3a2c41408d4a'>
      <tt:Appearance>
        <tt:Shape>
          <tt:BoundingBox left="20.0" top="180.0" right="100.0" bottom="30.0"/>
          <tt:CenterOfGravity x="60.0" y="80.0"/>
        </tt:Shape>
        <tt:Class>
          <tt:Type Likelihood="0.9">Vehicle</tt:Type>
        </tt:Class>
      </tt:Appearance>
    </tt:Object>
  </tt:Frame>
  <tt:Frame UtcTime="2019-06-10T12:24:57.721">
    <tt:Transformation>
      <tt:Translate x="-1.0" y="-1.0"/>
      <tt:Scale x="0.003125" y="0.00416667"/>
    </tt:Transformation>
    <tt:Object ObjectId="14" Parent="12">
      <tt:Appearance>
        <tt:Shape>
          <tt:BoundingBox left="40.0" top="150.0" right="70.0" bottom="100.0" />
          <tt:CenterOfGravity x="57.0" y="130.0" />
        </tt:Shape>
        <tt:Class>
          <tt:Type Likelihood="0.6">LicensePlate</tt:Type>
        </tt:Class>
      </tt:Appearance>
    </tt:Object>
  </tt:Frame>
]]></programlisting>
        </section>
        <section xml:id="_Ref208712401">
          <title>Object Tree</title>
          <para>When two objects come too close to each other, such that the analytics can no longer track them individually, an object merge should be signalled by adding a merge node to the ObjectTree node of the frame node. The merge node contains a From node listing the merging ObjectIds and a To node containing the ObjectId. The merged object is used in future frames as the tracking ID. If the analytics algorithm detects that one object is occluding the others and is able to track this object further, the occluding object should be put in the To node.</para>
          <para>The separation of objects is indicated by a Split node. In this case, the From node contains a single ObjectId representing the object which is split in the current frame. The objects separating from this split object are listed in the To node. The ObjectId of the From node can reappear in the To node, if this object did occlude the others and the analytics algorithm was able to track this object during the occlusion.</para>
          <para>An object does not need to be involved in a merge operation in order to be part of a split operation. For example, if an object is moving together with a person, and the person leaves the object somewhere, the object might be detected the first time by the analytics when the person moves away from the object left behind. In such cases, the first appearance of the object can be combined with a split operation.</para>
          <para>When a merged object reappears as an object node in a later frame without a split indication, then this object is implicitly split. The analytics algorithm, however, could not determine where the split object came from.</para>
          <para>An analytics algorithm can track and remember a limited number of objects. In order to indicate that a certain object has been removed from the memory of the algorithm and therefore never appear again, the scene description can contain a Delete node within the ObjectTree node.</para>
          <para>If the analytics algorithm can not decide during a Split operation the identity of an object, it should use a new ObjectId. When the algorithm has collected sufficient evidence for the identity of this object, it can change the ObjectId via the Rename operation. The Rename operation can also be used when an object reenters the scene and the true identity is discovered after some time.</para>
          <para>A deleted ObjectId shall not be reused within the scene description until the ObjectId container has wrapped around.</para>
          <para>Example:</para>
          <programlisting><![CDATA[<tt:Frame UtcTime="2008-10-10T12:24:57.321">
  <tt:Object ObjectId="12">
    ...
  </tt:Object>
  <tt:Object ObjectId="17">
    ...
  </tt:Object>
</tt:Frame>
<tt:Frame UtcTime="2008-10-10T12:24:57.421">
  <tt:Object ObjectId="12">
    ...
  </tt:Object>
  <tt:ObjectTree>
    <tt:Merge>
      <tt:From ObjectId="12"/>
      <tt:From ObjectId="17"/>
      <tt:To ObjectId="12"/>
    </tt:Merge>
  </tt:ObjectTree>
</tt:Frame>
<tt:Frame UtcTime="2008-10-10T12:24:57.521">
  <tt:Object ObjectId="12">
    ...
  </tt:Object>
</tt:Frame>
<tt:Frame UtcTime="2008-10-10T12:24:57.621">
  <tt:Object ObjectId="12">
    ...
  </tt:Object>
  <tt:Object ObjectId="17">
    ...
  </tt:Object>
  <tt:ObjectTree>
    <tt:Split>
      <tt:From ObjectId="12"/>
      <tt:To ObjectId="17"/>
      <tt:To ObjectId="12"/>
    </tt:Split>
  </tt:ObjectTree>
</tt:Frame>
]]></programlisting>
        </section>
        <section xml:id="_Ref208821074">
          <title>Shape descriptor</title>
          <para>Shape information shall be placed below the optional shape node of in an object appearance node. If present, the shape node holds information where the object under consideration has been detected in the specified frame. A shape node shall at least contain two nodes representing the BoundingBox and the CenterOfGravity of the detected object.</para>
          <para>The coarse BoundingBox is further refined with additional child nodes, each representing a shape primitive. If multiple shape primitives are present, their union defines the object’s shape. In this specification, a generic polygon descriptor is provided.</para>
          <para>Polygons that describe the shape of an object shall be simple polygons defined by a list of points.</para>
          <para>Two consecutive points (where the last point is connected with the first one) in the list define a line segment. The order of the points shall be chosen such that the enclosed object region can be found on the left-hand side all line segments. The polyline defined by the list of points shall not be self-intersecting.</para>
          <para>Example:</para>
          <programlisting><![CDATA[<tt:Frame UtcTime="2008-10-10T12:24:57.321">
  <tt:Transformation>
    <tt:Translate x="-1.0" y="-1.0"/>
    <tt:Scale x="0.003125" y="0.00416667"/>
  </tt:Transformation>
  <tt:Object ObjectId="12">
    <tt:Appearance>
      <tt:Shape>
        <tt:BoundingBox left="20.0" top="80.0" right="100.0" bottom="30.0"/>
        <tt:CenterOfGravity x="60.0" y="50.0"/>
        <tt:Polygon>
          <tt:Point x="20.0" y="30.0"/>
          <tt:Point x="100.0" y="30.0"/>
          <tt:Point x="100.0" y="80.0"/>
          <tt:Point x="20.0" y="80.0"/>
        </tt:Polygon>
      </tt:Shape>
    </tt:Appearance>
  </tt:Object>
</tt:Frame>
]]></programlisting>
        </section>
        <section xml:id="_Toc214944464">
          <title>Color descriptor</title>
          <para>The optional color descriptor allows to describe the representative colors of the
            detected object or region. Each color is represented as a three-dimensional vector based on a color space.
            Its weight denotes the fraction of pixels assigned to the representative color in the
            range [0 .. 1]. Color covariance describes the variation of color values around the
            representative color value in color space thus representative color denotes a region in
            color space.</para>
          <para>Note that the color descriptor does not specify, how color clusters are created.
            They can represent bins of a color histogram or the result of a clustering
            algorithm.</para>
          <para>The color space defaults to the YCbCr color space which refers to the 'sRGB' gamut
            with the RGB to YcbCr transformation as of ISO/IEC 10918-1 (Information technology --
            Digital compression and coding of continuous-tone still images: Requirements and
            guidelines), a.k.a. JPEG. The Colorspace URI for the YCbCr color space is <link
              xmlns:xlink="http://www.w3.org/1999/xlink"
              xlink:href="http://www.onvif.org/ver10/colorspace/YCbCr"/>. Alternate color spaces as
            defined in <xref linkend="_colorspaces"/> can be defined on frame level and individually
            for each object.</para>
          <para>An example metadata containing color information of the detected object is given below.</para>
          <programlisting><![CDATA[<tt:Frame UtcTime="2010-09-10T12:24:57.721" Colorspace="RGB">
  <tt:Transformation>
    <tt:Translate x="-1.0" y="-1.0"/>
    <tt:Scale x="0.003125" y="0.00416667"/>
  </tt:Transformation>
  <tt:Object ObjectId="34">
    <tt:Appearance>
      <tt:Shape>
        <tt:BoundingBox left="20.0" top="80.0" right="100.0" bottom="30.0"/>
        <tt:CenterOfGravity x="60.0" y="50.0"/>
      </tt:Shape>
      <tt:Color>
        <tt:ColorCluster>
          <tt:Color X="58" Y="105" Z="212"/>
          <tt:Covariance XX="7.2" YY="6" ZZ="3"/>
          <tt:Weight>0.5</tt:Weight>
        </tt:ColorCluster>
        <tt:ColorCluster>
          <tt:Color X="165" Y="44" Z="139"/>
          <tt:Covariance XX="4" YY="4" ZZ="4"/>
          <tt:Weight>0.3</tt:Weight>
        </tt:ColorCluster>
      </tt:Color>
    </tt:Appearance>
  </tt:Object>
</tt:Frame>
]]></programlisting>
          <para>An alternative representation of color can be used by adding a likelihood attribute to the color element.</para>
          <para>Its likelihood denotes how confident the algorithm is that the color is correct. The
          range of likelihood is [0 .. 1].</para>
          <para>When using the likelihood attribute the weight and covariance should not be used
          as they are missing a meaningful definition in this case.</para>
          <para>When using the likelihood attribute the meaning of multiple color clusters in the same color descriptor
          changes. Multiple color clusters with likelihood should be interpreted as different color candidates
          with different likelihoods, not as different regions of colors on the object.</para>
          <para>An example metadata containing color information of the detected object using a color cluster with a
          likelihood attribute is given below.</para>
          <programlisting><![CDATA[<tt:Frame UtcTime="2010-09-10T12:24:57.721" Colorspace="RGB">
  <tt:Transformation>
    <tt:Translate x="-1.0" y="-1.0"/>
    <tt:Scale x="0.003125" y="0.00416667"/>
  </tt:Transformation>
  <tt:Object ObjectId="34">
    <tt:Appearance>
      <tt:Shape>
        <tt:BoundingBox left="20.0" top="80.0" right="100.0" bottom="30.0"/>
        <tt:CenterOfGravity x="60.0" y="50.0"/>
      </tt:Shape>
      <tt:Color>
        <tt:ColorCluster>
          <tt:Color X="0" Y="0" Z="255" Likelihood="0.93"/>
        </tt:ColorCluster>
        <tt:ColorCluster>
          <tt:Color X="255" Y="255" Z="255" Likelihood="0.87"/>
        </tt:ColorCluster>
        <tt:ColorCluster>
          <tt:Color X="0" Y="0" Z="0" Likelihood="0.12"/>
        </tt:ColorCluster>
        <tt:ColorCluster>
          <tt:Color X="0" Y="128" Z="0" Likelihood="0.08"/>
        </tt:ColorCluster>
        <tt:ColorCluster>
          <tt:Color X="255" Y="0" Z="0" Likelihood="0.04"/>
        </tt:ColorCluster>
      </tt:Color>
    </tt:Appearance>
  </tt:Object>
</tt:Frame>
]]></programlisting>

          <para>The following table lists the acceptable values for colorspace attribute</para>
          <table xml:id="_colorspaces">
            <title>Colorspace namespace values</title>
            <tgroup cols="3">
              <colspec colname="c1" colwidth="1*"/>
              <colspec colname="newCol2" colwidth="4.19*"/>
              <colspec colname="c2" colwidth="3.33*"/>
              <thead>
                <row>
                  <entry>Colorspace</entry>
                  <entry>
                    <para>Namespace URI</para>
                  </entry>
                  <entry>
                    <para>Description</para>
                  </entry>
                </row>
              </thead>
              <tbody valign="top">
                <row>
                  <entry><para>YCbCr</para></entry>
                  <entry>
                    <para>http://www.onvif.org/ver10/colorspace/YCbCr</para>
                  </entry>
                  <entry>
                    <para>YCbCr color space</para>
                  </entry>
                </row>
                <row>
                  <entry><para>RGB</para></entry>
                  <entry>
                    <para>http://www.onvif.org/ver10/colorspace/RGB</para>
                  </entry>
                  <entry>
                    <para>RGB color space</para>
                  </entry>
                </row>
                <row>
                  <entry><para>CIELUV</para></entry>
                  <entry>
                    <para>http://www.onvif.org/ver10/colorspace/CIELUV</para>
                  </entry>
                  <entry>
                    <para><emphasis role="bold">Deprecated</emphasis> CIE LUV</para>
                  </entry>
                </row>
                <row>
                  <entry><para>CIELAB</para></entry>
                  <entry>
                    <para>http://www.onvif.org/ver10/colorspace/CIELAB</para>
                  </entry>
                  <entry>
                    <para><emphasis role="bold">Deprecated</emphasis> CIE 1976 (L*a*b*)</para>
                  </entry>
                </row>
                <row>
                  <entry><para>HSV</para></entry>
                  <entry>
                    <para>http://www.onvif.org/ver10/colorspace/HSV</para>
                  </entry>
                  <entry>
                    <para><emphasis role="bold">Deprecated</emphasis> HSV color space</para>
                  </entry>
                </row>
              </tbody>
            </tgroup>
          </table>
          <para><xref linkend="_colorranges"/> lists the acceptable value ranges for prominent color
            spaces.</para>
          <table xml:id="_colorranges">
            <title>Colorspace value ranges</title>
            <tgroup cols="2">
              <colspec colname="c1" colwidth="1*"/>
              <colspec colname="newCol2" colwidth="4.19*"/>
              <thead>
                <row>
                  <entry>Colorspace</entry>
                  <entry>
                    <para>Range</para>
                  </entry>
                </row>
              </thead>
              <tbody valign="top">
                <row>
                  <entry>
                    <para>YCbCr</para>
                  </entry>
                  <entry>
                    <para>Y [16 to 235] and Cb/Cr[16 to 240]</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>RGB</para>
                  </entry>
                  <entry>
                    <para>For all component values [0...255]</para>
                  </entry>
                </row>
              </tbody>
            </tgroup>
          </table>
        </section>
        <section xml:id="_Ref485906999">
          <title>Object Class descriptor</title>
          <para>A Class Descriptor is defined as an optional element of the appearance node of an object node. The class descriptor is defined by a list of object classes together with a likelihood that the corresponding object belongs to this class. The range of likelihood is [0..1].</para>
          <para>The following example shows an object metadata sample that contains object class information about a detected object:</para>
          <programlisting><![CDATA[<tt:Frame UtcTime="2010-11-10T12:24:57.721">
  <tt:Transformation>
    <tt:Translate x="-1.0" y="-1.0"/>
    <tt:Scale x="0.003125" y="0.00416667"/>
  </tt:Transformation
  <tt:Object ObjectId="22">
    <tt:Appearance>
      <tt:Shape>
        <tt:BoundingBox left="20.0" top="80.0" right="100.0" bottom="30.0"/>
        <tt:CenterOfGravity x="60.0" y="50.0"/>
      </tt:Shape>
      <tt:Class>
        <tt:Type Likelihood="0.8">Vehicle</tt:Type>
        <tt:Type Likelihood="0.75">Car</tt:Type>
        <tt:Type Likelihood="0.3">Truck</tt:Type>
      </tt:Class>
    </tt:Appearance>
  </tt:Object>
</tt:Frame>
]]></programlisting>
          <para>Besides the small set of predefined class types free type definitions can be added using the Type member defined as StringLikelihood.</para>
        </section>
        <section>
          <title>Motion In Cells descriptor</title>
          <para>The scene description of a cell motion contains the cells where motion is detected. To decode base64Binary the columns and rows of the cell grid are provided.</para>
          <para>For spatial relation the "Transformation" element is used, see section <xref linkend="_Ref208712096" />.  The cell grid is starting from the upper left corner. The X dimension is going from left to right and the Y dimension is going from up to down, see <xref linkend="_Ref272497397" />.</para>
          <para>This example contains a snippet of a metadata stream using the Cell Motion Detector.</para>
          <programlisting><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
  <tt:MetaDataStream
    xmlns:tt="http://www.onvif.org/ver10/schema">
    <tt:VideoAnalytics>
      <tt:Frame UtcTime="2010-10-20T12:24:57.321">
        <tt:Transformation>
          <tt:Translate x="-0.66666" y="-0.6"/>
          <tt:Scale x="0.1666666" y="-0.2"/>
        </tt:Transformation>
        <tt:Extension>
          <tt:MotionInCells Columns="8" Rows="6" Cells="AAD8AA=="/>
        </tt:Extension>
      </tt:Frame>
      <tt:Frame UtcTime="2010-10-20T12:24:57.621">
        ...
      </tt:Frame>
    </tt:VideoAnalytics>
    <tt:Event>
      <wsnt:NotficationMessage>
        <wsnt:Topic Dialect="...Concrete">
          tns1:RuleEngine/CellMotionDetector/Motion
        </wsnt:Topic>
        <wsnt:Message>
          <tt:Message UtcTime= "2010-10-20T12:24:57.628">
            <tt:Source>
              <tt:SimpleItem Name="VideoSourceConfigurationToken" Value="1"/>
              <tt:SimpleItem Name="VideoAnalyticsConfigurationToken" Value="1"/>
              <tt:SimpleItem Name="Rule" Value="MotionInDefinedCells"/>
            </tt:Source>
            <tt:Data>
              <tt:SimpleItem Name="IsMotion" Value="true"/>
            </tt:Data>
            </tt:Message>
        </wsnt:Message>
      </wsnt:NotficationMessage>
    </tt:Event>
  </tt:MetaDataStream>
]]></programlisting>
          <table>
            <title>Description of attributes of MotionInCells type</title>
            <tgroup cols="2">
              <colspec colname="c1" colwidth="22*" />
              <colspec colname="c2" colwidth="78*" />
              <thead>
                <row>
                  <entry>
                    <para>Attribute</para>
                  </entry>
                  <entry>
                    <para>Description</para>
                  </entry>
                </row>
              </thead>
              <tbody valign="top">
                <row>
                  <entry>
                    <para>Columns</para>
                  </entry>
                  <entry>
                    <para>Number of columns of the cell grid (x dimension)</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Rows</para>
                  </entry>
                  <entry>
                    <para>Number of rows of the cell grid (y dimension).</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Cells</para>
                  </entry>
                  <entry>
                    <para>A “1” denotes a cell where motion is detected and a “0” an empty cell.</para>
                    <para>The first cell is in the upper left corner. Then the cell order goes first from left to right and then from up to down (see <xref linkend="_Ref272497397" />).</para>
                    <para>If the number of cells is not a multiple of 8 the last byte is filled with zeros.</para>
                    <para>The information is run-length encoded according to Packbit coding in ISO 12639 (TIFF, Revision 6.0).</para>
                  </entry>
                </row>
              </tbody>
            </tgroup>
          </table>
        </section>
        <section>
          <title>Vehicle information descriptor</title>
          <para>The vehicle information descriptor defines an optional extension of the object appearance node. It is used to describe other features of the vehicle, like type, brand and model. The details are shown  in <xref linkend="_Ref515970936" />. For each element, there is a class, which is associated with a likelihood. A likelihood/probability means the corresponding object belongs to this class. The default value is 1. Missing likelihood attribute means 100%.</para>
          <table xml:id="_Ref515970936">
            <title>Description of the vehicle detail</title>
            <tgroup cols="2">
              <colspec colname="c1" colwidth="26*" />
              <colspec colname="c2" colwidth="74*" />
              <thead>
                <row>
                  <entry>
                    <para>VehicleInfo</para>
                  </entry>
                  <entry>
                    <para>Description</para>
                  </entry>
                </row>
              </thead>
              <tbody valign="top">
                <row>
                  <entry>
                    <para>Type</para>
                  </entry>
                  <entry>
                    <para>Define the vehicle’s type, including Car, Truck, Bus, Motorcycle, Bicycle and Others.</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Brand</para>
                  </entry>
                  <entry>
                    <para>Describe the vehicle’s brand which could be the same as its logo.</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Model</para>
                  </entry>
                  <entry>
                    <para>Describe the vehicle’s model which can give more detailed information of the vehicle brand.</para>
                  </entry>
                </row>
              </tbody>
            </tgroup>
          </table>
          <para>An example metadata containing the vehicle information of the detected object is given below.</para>
          <programlisting><![CDATA[<tt:VideoAnalytics>
  <tt:Frame UtcTime="2020-11-05T12:24:57.321">
    <tt:Object ObjectId="45">
      <tt:Appearance>
        <tt:VehicleInfo>
          <tt:Type Likelihood="0.9">Car</tt:Type>
          <tt:Brand Likelihood="0.7">Volvo</tt:Brand>
          <tt:Model Likelihood="0.6">XC60</tt:Model>
        </tt:VehicleInfo>
      </tt:Appearance>
    </tt:Object>
  </tt:Frame>
</tt:VideoAnalytics>
]]></programlisting>
        </section>
        <section>
          <title>Speed descriptor</title>
          <para>The Speed element describes the speed value of the object. The unit is meters per second.</para>
          <para>An example metadata containing speed information of the detected object is given below.</para>
          <programlisting><![CDATA[<tt:VideoAnalytics>
  <tt:Frame UtcTime="2016-9-10T12:24:57.321">
    <tt:Object ObjectId="23">
      <tt:Behaviour>
        <tt:Speed>120.5</tt:Speed>
      </tt:Behaviour>
    </tt:Object>
  </tt:Frame>
</tt:VideoAnalytics>
]]></programlisting>
        </section>
      <section xml:id="section_k5g_pdf_hvb">
        <title>Spherical coordinate descriptor</title>
        <para>The spherical coordinates give the position of the object
            <emphasis>relative</emphasis> to the device as three coordinates: distance (r), elevation
          angle (θ) and azimuth angle (φ). The origin is the device itself and the x axis is
          rightwards, the y axis is away from the device and the z axis is upwards. The spherical
          coordinates are described according to <xref linkend="figure_d1v_21f_hvb"/>, where the
          distance (r) is the number of meters from the origin, elevation angle (θ) is the elevation
          from the x-y plane and the azimuth angle (φ) is the rotation around the z axis, counter
          clockwise. The range for the elevation angle is -90 to 90 degrees and for the azimuth
          angle -180 to 180 degrees.</para>
        <figure xml:id="figure_d1v_21f_hvb">
          <title>Spherical coordinates</title>
          <mediaobject>
            <imageobject>
              <imagedata fileref="media/Analytics/3D_Spherical.svg" contentwidth="80mm"/>
            </imageobject>
          </mediaobject>
        </figure>
        <para>An example metadata containing spherical coordinates of a detected object.</para>
        <programlisting><![CDATA[<tt:VideoAnalytics>
  <tt:Frame UtcTime="2016-9-10T12:24:57.321">
    <tt:Object ObjectId="23">
      <tt:SphericalCoordinate Distance="15.5" ElevationAngle="70.6" AzimuthAngle="50.7"/>
    </tt:Object>
  </tt:Frame>
</tt:VideoAnalytics>
]]></programlisting>
      </section>
        <section>
          <title>Direction descriptor</title>
          <para>The Direction element describes the movement direction of the object as a
          GeoOrientation type with the angles yaw (ψ) and pitch (θ). The origin is the device itself
          and the x axis is rightwards, the y axis is away from the device and the z axis is
          upwards, i.e. "body frame" coordinate system according to <xref
            linkend="figure_bqn_z5f_fvb"/>. The range for yaw is between -180 and +180 degrees,
          where 0 is rightwards and 90 is away from the device. The range for pitch is between 90
          and -90 degrees where 90 is upwards.</para>
        <figure xml:id="figure_bqn_z5f_fvb">
          <title>Orientation on earth surface<footnote>
              <para>Source: By Qniemiec, CC BY-SA 3.0,
                https://commons.wikimedia.org/w/index.php?curid=10893168</para>
            </footnote></title>
          <mediaobject>
            <imageobject>
              <imagedata fileref="media/Core/image4.png" contentwidth="79.59mm"/>
            </imageobject>
          </mediaobject>
        </figure>
          <para>An example metadata containing direction information of the detected object is given below.</para>
          <programlisting><![CDATA[<tt:VideoAnalytics>
<tt:Frame UtcTime="2016-9-10T12:24:57.321">
  <tt:Object ObjectId="23">
    <tt:Behaviour>
      <tt:Direction yaw=38.8 pitch=15.5/>
    </tt:Behaviour>
  </tt:Object>
</tt:Frame>
</tt:VideoAnalytics>
]]></programlisting>
      </section>
      <section>
          <title>License plate information descriptor</title>
          <para>The license plate detail descriptor defines an optional extension of the object appearance node. It is used to extend the details of the vehicle license plate information. The details are shown in <xref linkend="_Ref517429752" />. For each element, there is a class, which is associated with a likelihood. A likelihood/probability means the corresponding object belongs to this class. The default value is 1. Missing likelihood attribute means 100%.</para>
          <table xml:id="_Ref517429752">
            <title>Description of the License plate detail</title>
            <tgroup cols="2">
              <colspec colname="c1" colwidth="32*" />
              <colspec colname="c2" colwidth="68*" />
              <thead>
                <row>
                  <entry>
                    <para>LicensePlateInfo</para>
                  </entry>
                  <entry>
                    <para>Description</para>
                  </entry>
                </row>
              </thead>
              <tbody valign="top">
                <row>
                  <entry>
                    <para>PlateNumber</para>
                  </entry>
                  <entry>
                    <para>A string of vehicle license plate numbers,e.g., “6DZG261”, “756 JWB”, etc.</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>PlateType</para>
                  </entry>
                  <entry>
                    <para>Description of the vehicle license plate type, e.g., ”Normal”, ”Police”, ”Diplomat”.</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>CountryCode</para>
                  </entry>
                  <entry>
                    <para>Describes the country of the license plate. The country code shall be encoded as two letter code according to ISO 3166-1:2013 Alpha-2.</para>
                    <para>Refer to the ISO 3166-1 alpha-2 code of the country,e.g.,"CN" means China,"US" means United States,"JP"means Japan.</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>IssuingEntity</para>
                  </entry>
                  <entry>
                    <para>State province or authority that issues the license plate.</para>
                  </entry>
                </row>
              <row>
                <entry><para>Color</para></entry>
                <entry><para>Optional background color of the license plate in case of vehicle objects.
                  For license plate objects use color descriptor.</para></entry>
              </row>
              </tbody>
            </tgroup>
          </table>
          <para>An example metadata containing the license plate information of the detected object is given below.</para>
          <programlisting><![CDATA[<tt:VideoAnalytics>
  <tt:Frame UtcTime="2010-10-20T12:24:57.321">
    <tt:Object ObjectId="12">
      <tt:Appearance>
        <tt:LicensePlateInfo>
          <tt:PlateNumber Likelihood="0.9">6DZG261</tt:PlateNumber>
          <tt:PlateType Likelihood="0.8">Normal</tt:PlateType>
          <tt:CountryCode Likelihood="0.7">US</tt:CountryCode>
          <tt:IssuingEntity Likelihood="0.6">California</tt:IssuingEntity>
        </tt:LicensePlateInfo>
      </tt:Appearance>
    </tt:Object>
  </tt:Frame>
</tt:VideoAnalytics>
]]></programlisting>
        </section>
        <section xml:id="_Ref515972960">
          <title>Image Data</title>
          <para>Frames where objects have been detected can also carry image data within the Scene Description. Image Data relating to a detected object are added in the Appearance Node. When embedding Image Data as base64Binary, image format shall be either JPG or PNG (On receiving end, start bytes may be used to identify the image type). Below, the definitions of Image and ImageRef are given for convenience:</para>
          <programlisting><![CDATA[<xs:complexType name="Appearance">
  <xs:sequence>
    <xs:element name="Transformation" type="tt:Transformation" minOccurs="0"/>
    <xs:element name="Shape" type="tt:ShapeDescriptor" minOccurs="0"/>
    <xs:element name="Color" type="tt:ColorDescriptor" minOccurs="0"/>
    <xs:element name="Class" type="tt:ClassDescriptor" minOccurs="0"/>
    <xs:element name="Extension" type="tt:AppearanceExtension" minOccurs="0"/>
    <xs:element name="GeoLocation" type="tt:GeoLocation" minOccurs="0"/>
    <xs:element name="VehicleInfo" type="tt:VehicleInfo" minOccurs="0"/>
    <xs:element name="LicensePlateInfo" type="tt:LicensePlateInfo" minOccurs="0"/>
    <xs:element name="ImageRef" type="xs:anyURI" minOccurs="0"/>
    <xs:element name="Image" type="xs:base64Binary" minOccurs="0"/>
    <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
  </xs:sequence>
  <xs:anyAttribute processContents="lax"/>
</xs:complexType>
]]></programlisting>
        </section>
        <section>
          <title>Face descriptor</title>
          <para>Face descriptor is defined as another optional element of an Object Node. It is used to describe the other features of the face, e.g., facial shape, hair, eye. Annex F provides samples of several face elements.</para>
          <table>
            <title>Description of the Human Face detail</title>
            <tgroup cols="4">
              <colspec colname="c1" colwidth="23*" />
              <colspec colname="c2" colwidth="19*" />
              <colspec colname="c3" colwidth="31*" />
              <colspec colname="c4" colwidth="27*" />
              <thead>
                <row>
                  <entry>
                    <para>Feature</para>
                  </entry>
                  <entry>
                    <para>Sub feature</para>
                  </entry>
                  <entry>
                    <para>Type</para>
                  </entry>
                  <entry>
                    <para>Defined Value</para>
                  </entry>
                </row>
              </thead>
              <tbody valign="top">
                <row>
                  <entry>
                    <para>Age</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                  <entry>
                    <para>tt:IntRange</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Gender</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>fc:Gender</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Temperature</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                  <entry>
                    <para>xs:float</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Complexion</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>fc:Complexion</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>FacialShape</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>fc:FacialShape</para>
                  </entry>
                </row>
                <row>
                  <entry morerows="3">
                    <para>Hair</para>
                  </entry>
                  <entry>
                    <para>length</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>fc:Length</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Style</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>fc:HairStyle</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Color</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>tt: ColorDescriptor</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Bangs</para>
                  </entry>
                  <entry>
                    <para>xs:boolean</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry morerows="2">
                    <para>Eyebrow</para>
                  </entry>
                  <entry>
                    <para>Width</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>fc:EyebrowWidth</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Color</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>tt: ColorDescriptor</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Space</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>fc:EyebrowSpace</para>
                  </entry>
                </row>
                <row>
                  <entry morerows="2">
                    <para>Eye</para>
                  </entry>
                  <entry>
                    <para>Shape</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>fc:EyeShape</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Eyelid</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>fc:Eyelid</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Eyeball</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>fc:Eyeball</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Ear</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>fc:Ear</para>
                  </entry>
                </row>
                <row>
                  <entry morerows="3">
                    <para>Nose</para>
                  </entry>
                  <entry>
                    <para>Length</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>fc:NoseLength</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>NoseBridge</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>fc:NoseBridge</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>NoseWing</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>fc:NoseWing</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>NoseEnd</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>fc:NoseEnd</para>
                  </entry>
                </row>
                <row>
                  <entry morerows="2">
                    <para>FacialHair</para>
                  </entry>
                  <entry>
                    <para>Mustache</para>
                  </entry>
                  <entry>
                    <para>xs:boolean</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Beard</para>
                  </entry>
                  <entry>
                    <para>xs:boolean</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Sideburn</para>
                  </entry>
                  <entry>
                    <para>xs:boolean</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Lip</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>fc:Lip</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Chin</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>fc:Chin</para>
                  </entry>
                </row>
                <row>
                  <entry morerows="1">
                    <para>PoseAngle</para>
                  </entry>
                  <entry>
                    <para>PoseAngle</para>
                  </entry>
                  <entry>
                    <para>tt:GeoOrientation</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Uncertainty</para>
                  </entry>
                  <entry>
                    <para>tt:GeoOrientation</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry morerows="7">
                    <para>Accessory</para>
                  </entry>
                  <entry>
                    <para>Opticals</para>
                  </entry>
                  <entry>
                    <para>fc: AccessoryDescription</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Hat</para>
                  </entry>
                  <entry>
                    <para>fc: AccessoryDescription</para>
                  </entry>
                  <entry>
                    <para>fc:HatType*</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Mask</para>
                  </entry>
                  <entry>
                    <para>fc: AccessoryDescription</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Hijab</para>
                  </entry>
                  <entry>
                    <para>fc: AccessoryDescription</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Helmet</para>
                  </entry>
                  <entry>
                    <para>fc: AccessoryDescription</para>
                  </entry>
                  <entry>
                    <para>fc:HelmetType*</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Kerchief</para>
                  </entry>
                  <entry>
                    <para>fc: AccessoryDescription</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>RightEyePatch</para>
                  </entry>
                  <entry>
                    <para>fc: AccessoryDescription</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>LeftEyePatch</para>
                  </entry>
                  <entry>
                    <para>fc: AccessoryDescription</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry morerows="3">
                    <para>AdditionalFeatures</para>
                  </entry>
                  <entry>
                    <para>Scar</para>
                  </entry>
                  <entry>
                    <para>xs:boolean</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Mole</para>
                  </entry>
                  <entry>
                    <para>xs:boolean</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Tattoo</para>
                  </entry>
                  <entry>
                    <para>xs:boolean</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Freckles</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>fc:FrecklesType</para>
                  </entry>
                </row>
              </tbody>
            </tgroup>
          </table>
          <para>Items denoted with asterisk as e.g. fc:HatType* apply to subtype.</para>
          <para>PoseAngle represents the estimated pose of the face, two elements are included in PoseAngle field. One is PoseAngles which includes three angles yaw, pitch, roll, the other one is the pose angle uncertainty, uncertainty describes the expected degree of uncertainty of each pose angle.</para>
          <para>Yaw angle: rotation about the vertical(y) axis.</para>
          <para>Pitch angle: rotation about the horizontal side-to-side(x) horizontal axis.</para>
          <para>Roll angle: rotation about the horizontal back to front(z) axis.</para>
          <para>The range of yaw, pitch and roll is between -180 and +180 degrees. Pose angles are defined relative to the frontal view of the subject. Angle(0,0,0) is shown in <xref linkend="_Ref27066703" />.</para>
          <figure xml:id="_Ref27066703">
            <title>Pose angles with respect to the frontal view of the subject</title>
            <mediaobject>
              <imageobject>
                <imagedata fileref="media/Analytics/image19.png" contentwidth="60.81mm" />
              </imageobject>
            </mediaobject>
          </figure>
        </section>
        <section>
          <title>Human body descriptor</title>
          <para>A human body descriptor is defined as an optional element of the Appearance Node of an Object Node. It is exploited to describe some features of the human body, such as body metric, clothing, belonging and behavior. All features are listed in the below table.</para>
          <table>
            <title>Description of the Human Body detail</title>
            <tgroup cols="5">
              <colspec colname="c1" colwidth="17*" />
              <colspec colname="c2" colwidth="20*" />
              <colspec colname="c3" colwidth="14*" />
              <colspec colname="c4" colwidth="24*" />
              <colspec colname="c5" colwidth="25*" />
              <thead>
                <row>
                  <entry>
                    <para>Feature</para>
                  </entry>
                  <entry>
                    <para>Sub Feature</para>
                  </entry>
                  <entry>
                    <para>Element</para>
                  </entry>
                  <entry>
                    <para>Type</para>
                  </entry>
                  <entry>
                    <para>Defined Value</para>
                  </entry>
                </row>
              </thead>
              <tbody valign="top">
                <row>
                  <entry morerows="1">
                    <para>BodyMetric</para>
                  </entry>
                  <entry>
                    <para>Height</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                  <entry>
                    <para>xs:int</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>BodyShape</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>bd:BodyShape</para>
                  </entry>
                </row>
                <row>
                  <entry morerows="13">
                    <para>Clothing</para>
                  </entry>
                  <entry morerows="1">
                    <para>Scarf</para>
                  </entry>
                  <entry>
                    <para>Color</para>
                  </entry>
                  <entry>
                    <para>tt:ColorDescriptor</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Wear</para>
                  </entry>
                  <entry>
                    <para>xs:boolean</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry morerows="1">
                    <para>Gloves</para>
                  </entry>
                  <entry>
                    <para>Color</para>
                  </entry>
                  <entry>
                    <para>tt:ColorDescriptor</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Wear</para>
                  </entry>
                  <entry>
                    <para>xs:boolean</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry morerows="3">
                    <para>Tops</para>
                  </entry>
                  <entry>
                    <para>Category</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>bd:TopsCategory</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Color</para>
                  </entry>
                  <entry>
                    <para>tt:ColorDescriptor</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Grain</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>bd:Grain</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Style</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>bd:TopsStyle</para>
                  </entry>
                </row>
                <row>
                  <entry morerows="3">
                    <para>Bottoms</para>
                  </entry>
                  <entry>
                    <para>Category</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>bd:BottomsCategory</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Color</para>
                  </entry>
                  <entry>
                    <para>tt:ColorDescriptor</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Grain</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>bd:Grain</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Style</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>bd:BottomsStyle</para>
                  </entry>
                </row>
                <row>
                  <entry morerows="1">
                    <para>Shoes</para>
                  </entry>
                  <entry>
                    <para>Category</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>bd:ShoesCategory</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Color</para>
                  </entry>
                  <entry>
                    <para>tt:ColorDescriptor</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry morerows="8">
                  <para>Belongings</para>
                </entry>
                  <entry morerows="1">
                    <para>Bag</para>
                  </entry>
                  <entry>
                    <para>Category</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>bd:BagCategory</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Color</para>
                  </entry>
                  <entry>
                    <para>tt:ColorDescriptor</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry morerows="1">
                    <para>Umbrella</para>
                  </entry>
                  <entry>
                    <para>Color</para>
                  </entry>
                  <entry>
                    <para>tt:ColorDescriptor</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Open</para>
                  </entry>
                  <entry>
                    <para>xs:boolean</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry morerows="1">
                    <para>Cart</para>
                  </entry>
                  <entry>
                    <para>Category</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>bd:CartCategory</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Color</para>
                  </entry>
                  <entry>
                    <para>tt:ColorDescriptor</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry morerows="2">
                  <para>Weapon</para>
                </entry>
                  <entry>
                    <para>Category</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>bd:WeaponCategory</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Color</para>
                  </entry>
                  <entry>
                    <para>tt:ColorDescriptor</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Pose</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>bd:WeaponPose</para>
                  </entry>
                </row>
                <row>
                  <entry morerows="2">
                    <para>Behaviour</para>
                  </entry>
                  <entry>
                    <para>Smoking</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>bd:Smoking</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>UsingMobile</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>bd:UsingMobile</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Activity</para>
                  </entry>
                  <entry>
                    <para>N/A</para>
                  </entry>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>bd:HumanActivity</para>
                  </entry>
                </row>
              </tbody>
            </tgroup>
          </table>
        </section>
        <section>
          <title>Barcode information descriptor</title>
          <para>A barcode information descriptor is defined as an optional element of the Appearance Node of an Object Node. It is used to give details of the barcode, like barcode data, type and pixel per module. The details are shown  in <xref linkend="_Ref515970939"/>.</para>
          <table xml:id="_Ref515970939">
            <title>Description of the barcode information</title>
            <tgroup cols="2">
              <colspec colname="c1" colwidth="26*" />
              <colspec colname="c2" colwidth="74*" />
              <thead>
                <row>
                  <entry>
                    <para>BarcodeInfo</para>
                  </entry>
                  <entry>
                    <para>Description</para>
                  </entry>
                </row>
              </thead>
              <tbody valign="top">
                <row>
                  <entry>
                    <para>Data</para>
                  </entry>
                  <entry>
                    <para>Information encoded in barcode</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>Type</para>
                  </entry>
                  <entry>
                    <para>Barcode type Code-128, PDF417, QRCode etc., Acceptable values are defined in tt:BarcodeType.</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>PPM</para>
                  </entry>
                  <entry>
                    <para>Pixel per module(PPM) refers to how many pixels it will take to cover one cell or module of the code.</para>
                  </entry>
                </row>
              </tbody>
            </tgroup>
          </table>
          <para>An example metadata containing the Barcode information is given below</para>
          <programlisting><![CDATA[<tt:VideoAnalytics>
  <tt:Frame UtcTime="2022-12-21T12:25:51.211">
    <tt:Object ObjectId="12">
      <tt:Appearance>
        <tt:Class>
          <tt:Type Likelihood="0.9">Barcode</tt:Type>
        </tt:Class>
        <tt:BarcodeInfo>
          <tt:Data Likelihood="0.9">Content</tt:Data>
          <tt:Type Likelihood="0.9">Code-128</tt:Type>
          <tt:PPM>1.4</tt:PPM>
        </tt:BarcodeInfo>
	  </tt:Appearance>
    </tt:Object>
  </tt:Frame>
</tt:VideoAnalytics>
]]></programlisting>
        </section>
        <section>
          <title>Label information descriptor</title>
          <para>A label descriptor is defined as an optional element of the objects appearance node.
          It allows to provide information regarding graphical signs. Instead of defining its own
          classification scheme ONVIF refers to external authorities. Hence each entry consists of
          an authority identifier and an ID defined by that authority. For well defined authorities
          see <xref linkend="labelAuthorities"/></para>
          <table xml:id="labelAuthorities">
            <title>Label Authorities</title>
            <tgroup cols="2">
              <colspec colname="c1" colwidth="26*" />
              <colspec colname="c2" colwidth="74*" />
              <thead>
                <row>
                  <entry>
                    <para>Authority Identifier</para>
                  </entry>
                  <entry>
                    <para>Description</para>
                  </entry>
                </row>
              </thead>
              <tbody valign="top">
                <row>
                  <entry>
                    <para>ISO_3864</para>
                  </entry>
                  <entry>
                    <para>ISO Graphical Symbols - safety colors and safety design</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>ISO_7010</para>
                  </entry>
                  <entry>
                    <para>ISO Registered safety signs</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>UNECE_ADR</para>
                  </entry>
                  <entry>
                    <para>UNECE ADR Volume II, page 238ff</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>UNECE_GHS</para>
                  </entry>
                  <entry>
                    <para>United Nations Globally Harmonized System of Classification and Labelling
                    of Chemicals, Annex 1</para>
                  </entry>
                </row>
              </tbody>
            </tgroup>
          </table>
        <para>For the ID definition refer to the authorities external specifications.</para>
          <figure xml:id="iso7010-example">
            <title>ISO 7010 sign for slippery floor.</title>
            <mediaobject>
              <imageobject>
                <imagedata fileref="media/Analytics/iso7010-w011.png" contentwidth="10mm" />
              </imageobject>
            </mediaobject>
          </figure>
          <para>An example metadata describing slippery floor according to ISO 7010 is given
          below</para>
          <programlisting><![CDATA[<tt:VideoAnalytics>
  <tt:Frame UtcTime="2022-12-21T12:25:51.211">
    <tt:Object ObjectId="12">
      <tt:Appearance>
        <tt:Label Likelihood="0.7">
          <tt:Authority>ISO_7010</tt:Authority>
          <tt:ID>W011</tt:ID>
        </tt:Label>
      </tt:Appearance>
    </tt:Object>
  </tt:Frame>
</tt:VideoAnalytics>
]]></programlisting>
        </section>

      <section xml:id="sensordata">
        <title>Sensor Data</title>
        <para>This section defines the metadata representation for multi-dimensional sensor data, used for periodic sensor data reporting scenarios.</para>
        
        <section>
          <title>Sensor Data Description</title>
          <para>Sensor data is represented through the SensorData element, which contains the following information:</para>
          <itemizedlist>
            <listitem>
              <para>Type: Type of sensor (e.g., Temperature, RelativeHumidity, AbsoluteHumidity, etc.)</para>
            </listitem>
            <listitem>
              <para>Value: Numerical value from the sensor. The unit of temperature is Celsius, the unit of absolute humidity is g/m³, and the unit of relative humidity is %.</para>
            </listitem>
          </itemizedlist>
          
          <para>The SensorData element is designed to be included in the MetadataStream structure, 
          allowing sensor data to be transmitted alongside other metadata types.</para>
        </section>
        
        <section>
          <title>Temperature Sensor Metadata</title>
          <para>Temperature sensor data is a common type of sensor information. The metadata for temperature sensors follows the general sensor data structure with specific conventions:</para>
          <itemizedlist>
            <listitem>
              <para>Type: Should be set to "temperature"</para>
            </listitem>
            <listitem>
              <para>Value: Floating point value representing the temperature in Celsius</para>
            </listitem>
          </itemizedlist>
          
          <programlisting><![CDATA[<tt:SensorData UtcTime="2025-07-15T14:30:00Z" SensorID="temp_001">
  <tt:Type>Temperature</tt:Type>
  <tt:Value>28.65</tt:Value>
</tt:SensorData>]]></programlisting>
        </section>
        
        <section>
          <title>Humidity Sensor Metadata</title>
          <para>Humidity sensor data represents ambient humidity conditions. The metadata for humidity sensors follows the general sensor data structure with specific conventions:</para>
          <itemizedlist>
            <listitem>
              <para>Type: Should be set to "RelativeHumidity" or "AbsoluteHumidity"</para>
            </listitem>
            <listitem>
              <para>Value: Floating point value representing the humidity percentage, either relative or absolute, units are %RH or g/m³</para>
            </listitem>
          </itemizedlist>
          
          <para>Absolute humidity is the actual mass of water vapor per unit volume of air (unit: g/m³), while relative humidity is the percentage ratio of the current water vapor content to the saturated content at the same temperature (unit: %).</para>

          <programlisting><![CDATA[<tt:SensorData UtcTime="2025-07-15T14:30:00Z" SensorID="humidity_001">
  <tt:Type>AbsoluteHumidity</tt:Type>
  <tt:Value>10</tt:Value>
</tt:SensorData>]]></programlisting>

          <programlisting><![CDATA[<tt:SensorData UtcTime="2025-07-15T14:30:00Z" SensorID="humidity_001">
  <tt:Type>RelativeHumidity</tt:Type>
  <tt:Value>65.2</tt:Value>
</tt:SensorData>]]></programlisting>

        </section>
        
        <section>
          <title>Sensor Data Example</title>
          <para>The following is an example of temperature and humidity sensor data in the MetadataStream:</para>

          <programlisting><![CDATA[<tt:MetadataStream xmlns:tt="http://www.onvif.org/ver10/schema">
  <tt:SensorData UtcTime="2025-07-15T14:30:00Z" SensorID="temp_001">
    <tt:Type>Temperature</tt:Type>
    <tt:Value>28.65</tt:Value>
  </tt:SensorData>
  <tt:SensorData UtcTime="2025-07-15T14:30:00Z" SensorID="humidity_001">
    <tt:Type>RelativeHumidity</tt:Type>
    <tt:Value>65.2</tt:Value>
  </tt:SensorData>
  <tt:SensorData UtcTime="2025-07-15T14:30:00Z" SensorID="humidity_001">
    <tt:Type>AbsoluteHumidity</tt:Type>
    <tt:Value>10</tt:Value>
  </tt:SensorData>
</tt:MetadataStream>]]></programlisting>
        </section>
      </section>
      </section>
    <section  xml:id="mqtt">
      <title>JSON over MQTT</title>
    	<section>
      <title>Metadata publish sequence</title>
    	  <para>MQTT is a pub/sub messaging protocol centered around topics.
    	    Consumers can subscribe to topics published by producers to get
    	    continuous updates on the data content. ONVIF metadata, like video
    	    analytics scene descriptions, can be published to an MQTT broker and
    	    subscribed to by a consumer.</para>
	  <para>This is a sequence of operations to set up the metadata flow:<itemizedlist>
          <listitem>
            <para>An ONVIF client calls AddEventBroker in the device's Event
            service to set up:<itemizedlist>
                <listitem>
                  <para>Address and credentials to the MQTT broker to use</para>
                </listitem>

                <listitem>
                  <para>A unique TopicPrefix for the device</para>
                </listitem>

                <listitem>
                  <para>A MetadataFilter listing topics to which the device
                  shall publish</para>
                </listitem>
              </itemizedlist></para>
          </listitem>

          <listitem>
            <para>The producer (ONVIF device) connects to the MQTT broker and starts publishing
            data on the selected topics.</para>
          </listitem>

          <listitem>
            <para>The consumer connects to the MQTT broker, specifying which topics
            that it wants to subscribe to. A consumer can be any MQTT capable
            client, for example, an event engine like Node-RED, IoT cloud
            platforms, VSaaS platforms, etc. Multiple consumers using
            different topics are possible.</para>
          </listitem>

          <listitem>
            <para>The consumer receives updates on subscribed topics and can
            implement actions like statistics aggregation and complex
            analytics rules with data from multiple sources.</para>
          </listitem>
        </itemizedlist></para>

      <para>The following section describes how topics shall be structured by an ONVIF metadata
          producer when published to an MQTT broker. The payload shall be encoded as defined in
          Annex E of the ONVIF Core Specification.</para>
    	</section>
      <section>
        <title>MQTT topic structure</title>

        <para>This section describes how an MQTT topic is structured based on
        metadata type and source expressed as ABNF rules according to RFC
        5234.</para>

        <para>Topic = TopicPrefix "/" PayloadPrefix "/" MetadataType "/" MetadataProducer</para>
		 <para>Note that special characters like, ‘/’, ‘#’ and ‘+’ shall be omitted from the topic.</para>
        <para>with<itemizedlist>
            <listitem>
              <para>TopicPrefix - uniquely identifies the producer and is
              configurable through the AddEventBroker command in the Event
              service. It shall not be empty.</para>
            </listitem>

            <listitem>
              <para>PayloadPrefix - signals in what format the data is
              published. See <xref linkend="table_qy2_xhl_crb"/> below for
              possible values.</para>
            </listitem>

            <listitem>
              <para>MetadataType - signals what type of metadata it is. See
              <xref linkend="table_i4l_yhl_crb"/> below for possible
              values.</para>
            </listitem>

            <listitem>
              <para>MetadataProducer - specifies additional source information for the metadata. The
                format depends on the metadata type. See <xref linkend="table_i4l_yhl_crb"/> below
                for definition.</para>
            </listitem>
          </itemizedlist></para>

        <table xml:id="table_qy2_xhl_crb">
          <title>PayloadPrefix types</title>

          <tgroup cols="2">
            <thead>
              <row>
                <entry align="center"><para>Prefix</para></entry>

                <entry align="center"><para>Description</para></entry>
              </row>
            </thead>

            <tbody>
              <row>
                <entry><para>"onvif-mj"</para></entry>

                <entry><para>ONVIF metadata with JSON payload</para></entry>
              </row>
            </tbody>
          </tgroup>
        </table>

        <table xml:id="table_i4l_yhl_crb">
          <title>MetadataType categories with corresponding MetadataProducer</title>

          <tgroup cols="3">
            <thead>
              <row>
                <entry align="center"><para>MetadataType</para></entry>

                <entry align="center"><para>MetadataProducer (template in ABNF) </para></entry>

                <entry align="center"><para>Description</para></entry>
              </row>
            </thead>

            <tbody>
              <row>
                <entry><para>"VideoAnalytics"</para></entry>

                <entry><para>ProfileToken "/"
                AnalyticsModuleName</para></entry>

                <entry><para>ONVIF metadata from a VideoAnalytics module
                active via VideoAnalyticsConfiguration included in Profile
                configuration</para></entry>
              </row>

              <row>
                <entry><para>"AudioAnalytics"</para></entry>

                <entry><para>ProfileToken "/"
                AnalyticsModuleName</para></entry>

                <entry><para>ONVIF metadata from an AudioAnalytics module
                active via AudioAnalyticsConfiguration included in Profile
                configuration</para></entry>
              </row>

              <row>
                <entry><para>"PTZ"</para></entry>

                <entry><para>ProfileToken "/" PTZConfigurationToken</para></entry>

                <entry><para>ONVIF metadata from a PTZ node included in
                Profile configuration</para></entry>
              </row>
              
              <row>
                <entry><para>"SensorData"</para></entry>
                <entry><para>Type</para></entry>
                <entry><para>ONVIF metadata from sensor data sources</para></entry>
              </row>
            </tbody>
          </tgroup>
        </table>

        <para>with<itemizedlist>
            <listitem>
              <para>ProfileToken = The media profile token</para>
            </listitem>

            <listitem>
              <para>AnalyticsModuleName = The name of the analytics
              module</para>
            </listitem>

            <listitem>
              <para>PTZConfigurationToken = The PTZ configuration token</para>
            </listitem>
            <listitem>
              <para>Type = The type of sensor (e.g., "Temperature", "RelativeHumidity", "AbsoluteHumidity")</para>
            </listitem>
          </itemizedlist></para>
      </section>

      <section xml:id="example">
        <title>Example</title>

        <para>Sample metadata frame in XML format:</para>

        <programlisting>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;tt:MetadataStream xmlns:tt="http://www.onvif.org/ver10/schema"
        xmlns:fc="http://www.onvif.org/ver20/analytics/humanface"
        xmlns:bd="http://www.onvif.org/ver20/analytics/humanbody"
        xmlns:acme="http://www.acme.com/schema"&gt;
  &lt;tt:VideoAnalytics&gt;
    &lt;tt:Frame UtcTime="2021-10-05T15:13:27.321" Source="MyClassifier"&gt;
      &lt;tt:Transformation&gt;
        &lt;tt:Translate x="-1.0" y="-1.0"/&gt;
        &lt;tt:Scale x="0.003125" y="0.00416667"/&gt;
      &lt;/tt:Transformation&gt;
      &lt;tt:Object ObjectId="15"&gt;
        &lt;tt:Appearance&gt;
          &lt;tt:Shape&gt;
            &lt;tt:BoundingBox left="20.0" top="80.0" right="100.0" bottom="30.0"/&gt;
            &lt;tt:CenterOfGravity x="60.0" y="50.0"/&gt;
            &lt;tt:Polygon&gt;
              &lt;tt:Point x="20.0" y="30.0"/&gt;
              &lt;tt:Point x="100.0" y="30.0"/&gt;
              &lt;tt:Point x="100.0" y="80.0"/&gt;
              &lt;tt:Point x="20.0" y="80.0"/&gt;
            &lt;/tt:Polygon&gt;
          &lt;/tt:Shape&gt;
          &lt;tt:Color&gt;
            &lt;tt:ColorCluster&gt;
              &lt;tt:Color X="213" Y="135" Z="126" /&gt;
              &lt;tt:Weight&gt;0.9&lt;/tt:Weight&gt;
              &lt;acme:ColorName&gt;White&lt;/acme:ColorName&gt;
            &lt;/tt:ColorCluster&gt;
            &lt;tt:ColorCluster&gt;
              &lt;tt:Color X="102" Y="176" Z="119" /&gt;
              &lt;tt:Weight&gt;0.5&lt;/tt:Weight&gt;
              &lt;acme:ColorName&gt;Blue&lt;/acme:ColorName&gt;
            &lt;/tt:ColorCluster&gt;
          &lt;/tt:Color&gt;
          &lt;tt:Class&gt;
            &lt;tt:Type Likelihood="0.8"&gt;Human&lt;/tt:Type&gt;
          &lt;/tt:Class&gt;
          &lt;tt:HumanFace&gt;
            &lt;fc:Gender&gt;Male&lt;/fc:Gender&gt;
            &lt;fc:Age&gt;
              &lt;tt:Min&gt;20&lt;/tt:Min&gt;
              &lt;tt:Max&gt;30&lt;/tt:Max&gt;
            &lt;/fc:Age&gt;
            &lt;fc:Accessory&gt;
              &lt;fc:Opticals&gt;
                &lt;fc:Wear&gt;True&lt;/fc:Wear&gt;
              &lt;/fc:Opticals&gt;
              &lt;fc:Hat&gt;
                &lt;fc:Wear&gt;True&lt;/fc:Wear&gt;
              &lt;/fc:Hat&gt;
            &lt;/fc:Accessory&gt;
          &lt;/tt:HumanFace&gt;
          &lt;tt:HumanBody&gt;
            &lt;bd:Clothing&gt;
              &lt;bd:Tops&gt;
                &lt;bd:Category&gt;LongSleeve&lt;/bd:Category&gt;
              &lt;/bd:Tops&gt;
              &lt;bd:Bottoms&gt;
                &lt;bd:Category&gt;Shorts&lt;/bd:Category&gt;
              &lt;/bd:Bottoms&gt;
            &lt;/bd:Clothing&gt;
            &lt;bd:Belonging&gt;
              &lt;bd:Bag&gt;
                &lt;bd:Category&gt;Backpack&lt;/bd:Category&gt;
              &lt;/bd:Bag&gt;
            &lt;/bd:Belonging&gt;
          &lt;/tt:HumanBody&gt;
        &lt;/tt:Appearance&gt;
      &lt;/tt:Object&gt;
    &lt;/tt:Frame&gt;
  &lt;/tt:VideoAnalytics&gt;
&lt;/tt:MetadataStream&gt;</programlisting>

        <para>This data will be published under this topic:</para>

        <programlisting>MyDevice/onvif-mj/VideoAnalytics/1/MyClassifier</programlisting>

        <para>Where "MyDevice" is the given TopicPrefix and "1" is the
        profile token. Shown below is how the sample metadata
        frame is formatted in JSON:</para>

        <programlisting>{
  "Frame": [{
    "@UtcTime": "2021-10-05T15:13:27.321",
    "@Source": "MyClassifier",
    "@context": {
        "acme": "http://www.acme.com/schema"
	},
    "Transformation": {
      "Translate": {
        "@x": -1.0, "@y": -1.0
      },
      "Scale": {
        "@x": 0.003125, "@y": 0.00416667
      }
    },
    "Object": [{
      "@ObjectId": 15,
      "Appearance": {
        "Shape": {
          "BoundingBox": {
            "@left": 20.0, "@top": 80.0, "@right": 100.0, "@bottom": 30.0
          },
          "CenterOfGravity": {
            "@x": 60.0, "@y": 50.0
          },
          "Polygon": {
            "Point": [{
              "@x": 20.0, "@y": 30.0
              }, {
              "@x": 100.0, "@y": 30.0
              }, {
              "@x": 100.0, "@y": 80.0
              }, {
              "@x": 20.0, "@y": 80.0
            }]
          }
        },
        "Color": {
          "ColorCluster": [{
            "Color": {
              "@X": 213, "@Y": 135, "@Z": 126
            },
            "Weight": 0.9,
            "acme:ColorName": "White"
          }, {
            "Color": {
              "@X": 102, "@Y": 176, "@Z": 119
            },
            "Weight": 0.5,
            "acme:ColorName": "Blue"
          }]
        },
        "Class": {
          "Type": [{
            "@Likelihood": 0.8,
            "#text": "Human"
          }]
        },
        "HumanFace": {
          "Gender": "Male",
          "Age": {
            "Min": 20, "Max": 30
          },
          "Accessory": {
            "Opticals": {
              "Wear": true
            },
            "Hat": {
              "Wear": true
            }
          }
        },
        "HumanBody": {
          "Clothing": {
            "Tops": {
              "Category": "LongSleeve"
            },
            "Bottoms": {
              "Category": "Shorts"
            }
          },
          "Belonging": {
            "Bag": {
              "Category": "Backpack"
            }
          }
        }
      }
    }]
  }]
}</programlisting>
      </section>

      <section xml:id="sensor_example">
      <title>Sensor Data Examples</title>
      
      <para>Temperature data will be published under this topic. For devices with multiple temperature sensors, each sensor will publish data with a unique SensorID in the payload:</para>
      
      <programlisting>MyDevice/onvif-mj/SensorData/Temperature</programlisting>
      
      <para>Shown below is how the sample temperature sensor data is formatted in JSON:</para>
      
      <programlisting>{
      "SensorData": {
        "@UtcTime": "2025-07-15T14:30:00Z",
        "@SensorID": "temp_001",
        "Value": 298.65
      }
    }</programlisting>

      <para>Relative Humidity data will be published under this topic. For devices with multiple humidity sensors, each sensor will publish data with a unique SensorID in the payload:</para>
      
      <programlisting>MyDevice/onvif-mj/SensorData/RelativeHumidity</programlisting>
      
      <para>Shown below is how the sample humidity sensor data is formatted in JSON:</para>
      
      <programlisting>{
      "SensorData": {
        "@UtcTime": "2025-07-15T14:30:00Z",
        "@SensorID": "humidity_001",
        "Value": 65.2
      }
    }</programlisting>

      <para>Absolute Humidity data will be published under this topic. For devices with multiple humidity sensors, each sensor will publish data with a unique SensorID in the payload:</para>
      
      <programlisting>MyDevice/onvif-mj/SensorData/AbsoluteHumidity</programlisting>
      
      <para>Shown below is how the sample humidity sensor data is formatted in JSON:</para>
      
      <programlisting>{
      "SensorData": {
        "@UtcTime": "2025-07-15T14:30:00Z",
        "@SensorID": "humidity_001",
        "Value": 10
      }
    }</programlisting>

    </section>
    </section>
  </chapter>
  <chapter>
    <title>Service</title>
    <para>This section covers the following main areas of this architecture:</para>
    <itemizedlist>
      <listitem>
        <para>Analytics Module interface</para>
      </listitem>
      <listitem>
        <para>Rules interface</para>
      </listitem>
    </itemizedlist>
    <para>The analytics service allows fine-grained configuration of individual rules and individual analytics modules (see <xref linkend="_Ref11057187" /> and <xref linkend="_Ref476820362" />).</para>
    <section xml:id="_Ref42033279">
      <title>Configuration description language</title>
      <para>This specification introduces a description language which is used to configure rules and analytics modules. Besides configuration parameters the config description additionally contains an event description according to the OASIS topic notification.</para>
      <para>Implementations can define their own configuration types defined using the configuration descriptions as specified in section <xref linkend="_Ref9000320" />. The provided APIs allow devices and clients to instantiate one or more instances of the types available on a device. Each of the instances can be configured with the parameters given in <xref linkend="_Ref9000654" /> and their options defined in <xref linkend="_Ref9001629" />.</para>
      <section xml:id="_Ref9000654">
        <title>Configuration parameters</title>
        <para>Each configuration has two required attributes: one specifies the name and the other specifies the type of the rule. The type refers to the name property of a description.</para>
        <para>The different configuration parameters are listed below the parameters element of the rule element. Each parameter is either a SimpleItem or an ElementItem. The name attribute of each item shall be unique within the parameter list. SimpleItems have an additional Value attribute containing the value of the parameter. The value of ElementItems is given by the child element of the ElementItem. It is recommended to represent as many parameters as possible with SimpleItems.</para>
        <para>In case of the ElementItem, the type attribute shall reference a global element declaration of an XML schema.</para>
      </section>
      <section xml:id="_Ref9000320">
        <title>Configuration description</title>
        <para>A description has a name attribute with a name provided by the device vendor.</para>
        <para>The description of a configuration contains the type information for all parameters belonging to a configuration as well as the description of the output produced by such a rule. The output of the Rule Engine is events which can either be used in an Event Engine or be subscribed to by a client.</para>
        <para>All parameters are defined as SimpleItems or ElementItems and are respectively described by SimpleItemDescription or ElementItemDescription. Both item descriptions contain a name attribute to identify the parameter and a type attribute to reference a specific XML schema type. In case of the SimpleItemDescription, the type attribute shall reference a SimpleType schema definition. In case of the ElementItemDescription, the type attribute shall reference a global element declaration of an XML schema.</para>
        <para>Below, the definitions are included for convenience<footnote xml:id="__FN4__"><para>Please note that the schema is included here for <emphasis>information only. </emphasis>[ONVIF Schema] contains the normative schema definition.</para></footnote>:</para>
        <programlisting><![CDATA[<xs:complexType name="ConfigDescription">
  <xs:sequence>
    <xs:element name="Parameters"
      type="tt:ItemListDescription"/>
    <xs:element name="Messages" minOccurs="0" maxOccurs="unbounded">
      <xs:complexType>
        <xs:complexContent>
          <xs:extension base="tt:MessageDescription">
            <xs:sequence>
              <xs:element name="ParentTopic" type="xs:string"/>
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
    </xs:element>
    ...
  </xs:sequence>
  <xs:attribute name="Name" type="xs:QName" use="required"/>
</xs:complexType>
<xs:complexType name="ItemListDescription">
  <xs:sequence>
    <xs:element name="SimpleItemDescription" minOccurs="0"
      maxOccurs="unbounded">
      <xs:complexType>
        <xs:attribute name="Name" type="xs:string" use="required"/>
        <xs:attribute name="Type" type="xs:Qname" use="required"/>
      </xs:complexType>
    </xs:element>
    <xs:element name="ElementItemDescription" minOccurs="0"
      maxOccurs="unbounded">
      <xs:complexType>
        <xs:attribute name="Name" type="xs:string" use="required"/>
        <xs:attribute name="Type" type="xs:Qname" use="required"/>
      </xs:complexType>
    </xs:element>
  </xs:sequence>
</xs:complexType>
]]></programlisting>
      </section>
      <section xml:id="_Ref9001629">
        <title>Configuration options</title>
        <section>
          <title>Overview</title>
          <para>This section defines a generic mechanism for signaling valid parameter configuration values for simple element items via the GetRuleOptions and GetAnalyticsModuleOptions methods.</para>
        </section>
        <section xml:id="_Toc529533198">
          <title>Option type definition</title>
          <para>
            <xref linkend="_Ref529524673" /> defines how to describe any static or dynamic limitations for generic types through the GetRuleOptions and GetAnalyticsModule options.</para>
          <table xml:id="_Ref529524673">
            <title>Generic constraint definitions for parameter data types</title>
            <tgroup cols="3">
              <colspec colname="c1" colwidth="22*" />
              <colspec colname="c2" colwidth="29*" />
              <colspec colname="c3" colwidth="49*" />
              <thead>
                <row>
                  <entry>
                    <para>Parameter Type</para>
                  </entry>
                  <entry>
                    <para>Option Type</para>
                  </entry>
                  <entry>
                    <para>Limitation</para>
                  </entry>
                </row>
              </thead>
              <tbody valign="top">
                <row>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>tt:StringList</para>
                  </entry>
                  <entry>
                    <para>Specified string options (no whitespace allowed)</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>xs:string</para>
                  </entry>
                  <entry>
                    <para>tt:StringItems</para>
                  </entry>
                  <entry>
                    <para>Specific string options (whitespace allowed)</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>xs:int</para>
                  </entry>
                  <entry>
                    <para>tt:IntRange</para>
                  </entry>
                  <entry>
                    <para>Min and Max value</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>xs:int</para>
                  </entry>
                  <entry>
                    <para>tt:IntList</para>
                  </entry>
                  <entry>
                    <para>Specific values</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>xs:float</para>
                  </entry>
                  <entry>
                    <para>tt:FloatRange</para>
                  </entry>
                  <entry>
                    <para>Min and Max value</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>xs:float</para>
                  </entry>
                  <entry>
                    <para>tt:FloatList</para>
                  </entry>
                  <entry>
                    <para>Specific values</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>xs:duration</para>
                  </entry>
                  <entry>
                    <para>tt:DurationRange</para>
                  </entry>
                  <entry>
                    <para>Min and Max value</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>tt:IntRectangle</para>
                  </entry>
                  <entry>
                    <para>tt:IntRectangleRange</para>
                  </entry>
                  <entry>
                    <para>Min and Max values for each x, y, width and height attribute</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>tt:StringList</para>
                  </entry>
                  <entry>
                    <para>tt:StringList</para>
                  </entry>
                  <entry>
                    <para>Parameter and options without whitespace</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>tt:StringItems</para>
                  </entry>
                  <entry>
                    <para>tt:StringItems</para>
                  </entry>
                  <entry>
                    <para>Parameter and options may contain whitespace</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>tt:Polyline</para>
                  </entry>
                  <entry>
                    <para>tt:IntRange</para>
                  </entry>
                  <entry>
                    <para>Number of points supported Min and Max value</para>
                  </entry>
                </row>
                <row>
                  <entry>
                    <para>tt:Polygon</para>
                  </entry>
                  <entry>
                    <para>tt: PolygonOptions</para>
                  </entry>
                  <entry>
                    <para>Specifies polygon support and number of points supported</para>
                  </entry>
                </row>
              </tbody>
            </tgroup>
          </table>
          <para>Both tt:Polyline and tt:Polygon shall use normalized coordinates as defined in <xref linkend="_Ref208712096"/></para>
          <para>Note that the option type in  <xref linkend="_Ref529524673" /> refers to the element definition. In case parameters occur with differing constraints in multiple rules or analytics modules the device shall provide the optional parameters RuleType or AnalyticsModule.</para>
          <para>The service shall provide options only for parameters with constraints. Parameters like boolean can be excluded in options.</para>
        </section>
        <section>
          <title>Occurrence</title>
          <para>Configuration parameters may signal their allowed minimal occurrence using the minOccurs attribute. Setting the value to zero signals that the parameter is optional.</para>
          <para>The maxOccurs attribute allows to specify how often an element may occur in the
            same instance of a rule or module.</para>
        </section>
        <section>
          <title>Example</title>
          <para>This example explains the options for an analytics module called myModule in namespace nn with four simple parameters:</para>
          <programlisting><![CDATA[<tt:AnalyticsModuleDescription Name="nn:myModule" fixed="true">
  <tt:Parameters>
    <tt:SimpleItemDescription Name="Mode" Type="xs:string"/>
    <tt:SimpleItemDescription Name="Targets" Type="xs:string"/>
    <tt:SimpleItemDescription Name="Speed" Type="xs:int"/>
    <tt:SimpleItemDescription Name="Latency" Type="xs:duration"/>
  </tt:Parameters>
</tt:AnalyticsModuleDescription>]]></programlisting>
          <itemizedlist>
            <listitem>
              <para>Mode 		is either  ‘Motion Detection’ or ‘Object Tracking’</para>
            </listitem>
            <listitem>
              <para>Targets 	is either 'Car', 'Bike' or 'Pedestrian'</para>
            </listitem>
            <listitem>
              <para>Speed		supports the range between zero and 120</para>
            </listitem>
            <listitem>
              <para>Latency	supports the range between one second and oneminute</para>
            </listitem>
          </itemizedlist>
          <para>The following code snipped shows the options returned by GetAnalyticsModuleOptions for myModule:</para>
          <programlisting><![CDATA[<tan:Options AnalyticsModule="nn:myModule" Name="Mode">
  <tt:StringItems>
    <tt:Item>Motion Detection</tt:Item>
    <tt:Item>Object Tracking</tt:Item>
  </tt:StringItems>
</tan:Options>
<tan:Options AnalyticsModule="nn:myModule" Name="Targets">
  <tt:StringList>Car Bike Pedestrian</tt:StringList>
</tan:Options>
<tan:Options AnalyticsModule="nn:myModule" Name="Speed">
  <tt:IntRange>
    <tt:Min>0</tt:Min>
    <tt:Max>120</tt:Max>
  </tt:IntRange >
</tan:Options>
<tan:Options AnalyticsModule="nn:myModule" Name="Latency">
  <tt:DurationRange>
    <tt:Min>PT1S</tt:Min>
    <tt:Max>PT1M</tt:Max>
  </tt:DurationRange>
</tan:Options>]]></programlisting>
          <para>A device only supporting three concrete values for the speed parameter may instead return for the respective option:</para>
          <programlisting><![CDATA[<tan:Options AnalyticsModule="nn:myModule" Name="Speed">
  <tt:IntList>15 30 80</tt:IntList>
</tan:Options>]]></programlisting>
        </section>
      </section>
    </section>
    <section xml:id="_Ref11057187">
      <title>Rule interface</title>
      <para>An XML structure is introduced in Section <xref linkend="_Ref210634568" /> to communicate the configuration of rules. Section <xref linkend="_Ref210635747" /> specifies a language to describe the configuration of a specific rule type. A device implementing a rule engine can support rules described in Appendix A. Section <xref linkend="_Ref213120730" /> introduces operations to manage rules. If the device supports a Rule Engine, it shall implement the complete rule interface.</para>
      <para>Analytics rules typically operate on scene description generated by analytics models as
        depicted in <xref linkend="_Ref210463770"/>. Note that changes to associated analytics
        modules may affect rule configuration and cause differing device responses for
        GetSupportedRules and GetRuleOptions.</para>
      <section xml:id="_Ref210634568">
        <title>Rule representation</title>
        <para>The rule representation uses the configuration language as defined in section <xref linkend="_Ref9000654" />. The following example shows a complete analytics configuration containing two rules:</para>
        <programlisting><![CDATA[<tt:RuleEngineConfiguration>
  <tt:Rule Name="MyLineDetector" Type="tt:LineDetector">
    <tt:Parameters>
      <tt:SimpleItem Name="Direction" Value="Any"/>
      <tt:ElementItem Name="Segments">
        <tt:Polyline>
          <tt:Point x="0.10"  y="0.50"/>
          <tt:Point x="1.0" y="0.50"/>
        </tt:Polyline>
      </tt:ElementItem>
    </tt:Parameters>
  </tt:Rule>
  <tt:Rule Name="MyFieldDetector" Type="tt:FieldDetector">
    <tt:Parameters>
      <tt:ElementItem Name="Field">
        <tt:Polygon>
          <tt:Point x="0.1"  y="0.5"/>
          <tt:Point x="1.0" y="0.5"/>
          <tt:Point x="1.0" y="0.7"/>
        </tt:Polygon>
      </tt:ElementItem>
    </tt:Parameters>
  </tt:Rule>
</tt:RuleEngineConfiguration>]]></programlisting>
      </section>
      <section xml:id="_Ref210635747">
        <title>Rule description language</title>
        <para>Rules are described using the rule description language defined in section <xref linkend="_Ref9000320" />.</para>
        <para>The output produced by this rule type is described in multiple Messages elements. Each Message contains a description of the message payload according to the Message Description Language detailed in the ONVIF Core specification. Additionally, the Messages shall contain a ParentTopic element naming the Topic a client has to subscribe to in order to receive this specific output. The topic shall be specified as a Concrete Topic Expression.</para>
      </section>
      <section xml:id="_Ref213120730">
        <title>Operations on rules</title>
        <para>The Create/Delete/Modify operations are atomic, meaning that either all modifications can be processed or the complete operation shall fail.</para>
        <section>
          <title>GetSupportedRules</title>
          <para>A device signaling support for rules via the RuleSupport capability shall support this operation. It returns a list of rule descriptions according to the Rule Description Language described in Section <xref linkend="_Ref210635747" />. Additionally, it contains a list of URLs that provide the location of the schema files. These schema files describe the types and elements used in the rule descriptions. Rule descriptions that reference types or elements imported from any ONVIF defined schema files need not explicitly list those schema files.</para>
          <para>The device shall indicate its limit for maximum number of non-fixed rules through the maxInstances attribute.</para>
          <variablelist role="op">
            <varlistentry>
              <term>request</term>
              <listitem>
                <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
                <para role="text">Token of an existing analytics configuration.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>response</term>
              <listitem>
                <para role="param">SupportedRules [tt:SupportedRules]</para>
                <para role="text">Rules supported for the analytics configuration</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>faults</term>
              <listitem>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
                <para role="text">The requested analytics configuration does not exist.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>access class</term>
              <listitem>
                <para role="access">READ_MEDIA</para>
              </listitem>
            </varlistentry>
          </variablelist>
        </section>
        <section>
          <title>GetRules</title>
          <para>A device signaling support for rules via the RuleSupport capability shall support this operation to retrieve the currently associated rules with a video analytics configuration.</para>
          <variablelist role="op">
            <varlistentry>
              <term>request</term>
              <listitem>
                <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
                <para role="text">Token of an existing analytics configuration.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>response</term>
              <listitem>
                <para role="param">Rule - optional, unbounded [tt:Config]</para>
                <para role="text">List of rules associated with the specified configuration.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>faults</term>
              <listitem>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
                <para role="text">The requested analytics configuration does not exist.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>access class</term>
              <listitem>
                <para role="access">READ_MEDIA</para>
              </listitem>
            </varlistentry>
          </variablelist>
        </section>
        <section>
          <title>CreateRules</title>
          <para>A device signaling support for rules via the RuleSupport capability shall support
            this operation to add rules to an AnalyticsConfiguration. If all rules can not be
            created as requested, the device shall respond with a fault message. The device shall
            accept adding of analytics rules with an empty Parameter definition. Note that the
            resulted configuration may include a set of default parameter values.</para>
          <variablelist role="op">
            <varlistentry>
              <term>request</term>
              <listitem>
                <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
                <para role="text">Analytics configuration for which the rules should be created.</para>
                <para role="param">Rule - unbounded [tt:Config]</para>
                <para role="text">Rules to be added to the specified configuration.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>response</term>
              <listitem>
                <para role="text">This is an empty message.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>faults</term>
              <listitem>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
                <para role="text">The requested analytics configuration does not exist.</para>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:InvalidRule</para>
                <para role="text">The suggested rule configuration is not valid on the device.</para>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:RuleAlreadyExistent</para>
                <para role="text">A rule with the same name already exists in the configuration.</para>
                <para role="param">env:Sender - ter:Action - ter:FixedRules</para>
                <para role="text">At least one of the requested rules is fixed and cannot be created.</para>
                <para role="param">env:Receiver - ter:Action - ter:TooManyRules</para>
                <para role="text">There is not enough space in the device to add the rules to the configuration.</para>
                <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
                <para role="text">The device cannot create the rules without creating a conflicting configuration.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>access class</term>
              <listitem>
                <para role="access">ACTUATE</para>
              </listitem>
            </varlistentry>
          </variablelist>
        </section>
        <section>
          <title>ModifyRules</title>
          <para>A device signaling support for modifying rules via the RuleOptionsSupported
            capability shall support this operation. If all rules can not be modified as requested,
            the device shall respond with a fault message. A device may reject a request to change
            the rule type.</para>
          <para>A device should interpret parameters not present in the payload as unchanged. Note that this does not always result in unchanged values of such parameters, since some parameters may change due to dependency on others.</para>
          <variablelist role="op">
            <varlistentry>
              <term>request</term>
              <listitem>
                <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
                <para role="text">Token of an existing analytics configuration.</para>
                <para role="param">Rule - unbounded [tt:Config]</para>
                <para role="text">List of rules to be modified for the specified configuration.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>response</term>
              <listitem>
                <para role="text">This is an empty message.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>faults</term>
              <listitem>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
                <para role="text">The requested analytics configuration does not exist.</para>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:InvalidRule</para>
                <para role="text">The suggested rule configuration is not valid on the device.</para>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:RuleNotExistent</para>
                <para role="text">The rule name or names do not exist.</para>
                <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
                <para role="text">The device cannot modify the rules without creating a conflicting configuration.</para>
                <para role="param">env:Receiver - ter:Action - ter:TypeChangeProhibited</para>
                <para role="text">The device cannot modify the rule configuration type without creating a conflicting configuration.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>access class</term>
              <listitem>
                <para role="access">ACTUATE</para>
              </listitem>
            </varlistentry>
          </variablelist>
        </section>
        <section>
          <title>DeleteRules</title>
          <para>A device signaling support for rules via the RuleSupport capability shall support this operation to delete one or more rules. If all rules can not be deleted as requested, the device responds with a fault message.</para>
          <variablelist role="op">
            <varlistentry>
              <term>request</term>
              <listitem>
                <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
                <para role="text">Token of an existing analytics configuration.</para>
                <para role="param">RuleName - unbounded [xs:string]</para>
                <para role="text">List of rules to be removed for the specified configuration.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>response</term>
              <listitem>
                <para role="text">This is an empty message.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>faults</term>
              <listitem>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
                <para role="text">The requested analytics configuration does not exist.</para>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:RuleNotExistent</para>
                <para role="text">The rule name or names do not exist.</para>
                <para role="param">env:Sender - ter:Action - ter:FixedRules</para>
                <para role="text">At least one of the requested rules is fixed and cannot be deleted.</para>
                <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
                <para role="text">The device cannot delete the rules without creating a conflicting configuration.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>access class</term>
              <listitem>
                <para role="access">ACTUATE</para>
              </listitem>
            </varlistentry>
          </variablelist>
        </section>
        <section>
          <title>GetRuleOptions</title>
          <para>A device signaling support for modifying rules via the RuleOptionsSupported capability shall support this operation to retrieve the options for the supported rules that specify an Option attribute.</para>
          <variablelist role="op">
            <varlistentry>
              <term>request</term>
              <listitem>
                <para role="param">RuleType - optional [xs:QName]</para>
                <para role="text">Optional rule type for which the options shall be retrieved. If omitted all rule option types with all rule options supported by the device shall be retuned (as appropriate).</para>
                <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
                <para role="text">Token of an existing analytics configuration.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>response</term>
              <listitem>
                <para role="param">RuleOptions - optional, unbounded [tan:ConfigOptions]</para>
                <para role="text">List of options for the specified rule. A device shall provide respective ConfigOptions.RuleType for each RuleOption if the request does not specify RuleType. The response Options shall not contain any AnalyticsModule attribute.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>faults</term>
              <listitem>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
                <para role="text">The requested analytics configuration does not exist.</para>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:<phrase>RuleNotExistent</phrase></para>
                <para role="text">The rule option type does not exist.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>access class</term>
              <listitem>
                <para role="access">READ_MEDIA</para>
              </listitem>
            </varlistentry>
          </variablelist>
        </section>
      </section>
    </section>
    <section xml:id="_Ref476820362">
      <title>Analytics modules interface</title>
      <para>Section <xref linkend="_Ref213061710" /> defines an XML structure that communicates the configuration of analytics modules. Section <xref linkend="_Ref213061716" /> defines the language that describes the configuration of a specific analytics module. Section <xref linkend="_Ref213061721" /> defines the operations required by the analytics modules interface. If the device supports an analytics engine as defined by ONVIF, it shall implement the complete analytics modules Interface.</para>
      <section xml:id="_Ref213061710">
        <title>Analytics module configuration</title>
        <para>The analytics module configuration uses the configuration description language as described in section <xref linkend="_Ref9000654" />. The following example shows a possible configuration of a vendor-specific ObjectTracker. This tracker allows configuration of the minimum and maximum object size with respect to the processed frame geometry.</para>
        <programlisting><![CDATA[<tt:AnalyticsEngineConfig>
  <tt:AnalyticsModule Name="MyObjectTracker" Type="nn:ObjectTracker">
    <tt:Parameters>
      <tt:SimpleItem Name="MinObjectWidth" Value="0.01"/>
      <tt:SimpleItem Name="MinObjectHeight" Value="0.01"/>
      <tt:SimpleItem Name="MaxObjectWidth" Value="0.5"/>
      <tt:SimpleItem Name="MaxObjectHeight" Value="0.5"/>
    </tt:Parameters>
  </tt:AnalyticsModule>
</tt:AnalyticsEngineConfig>
]]></programlisting>
      </section>
      <section xml:id="_Ref213061716">
        <title>Analytics module description language</title>
        <para>The Analytics Module reuses the configuration description language, described in section <xref linkend="_Ref9000320" />. The following AnalyticsModuleDescription element replaces the RuleDescription element:</para>
        <programlisting><![CDATA[<xs:element name="AnalyticsModuleDescription"
  type="tt:ConfigDescription"/>
]]></programlisting>
        <para>Similar to rules, analytics modules produce events and shall be listed within the analytics module description. The subsequent description corresponds to the example of the previous section. The example module produces a SceneTooCrowded event when the scene becomes too complex for the module.</para>
        <programlisting><![CDATA[<tt:AnalyticsModuleDescription Name="nn:ObjectTracker">
  <tt:Parameters>
    <tt:SimpleItemDescription Name="MinObjectWidth"  Type="xs:float"/>
    <tt:SimpleItemDescription Name="MinObjectHeight" Type="xs:float"/>
    <tt:SimpleItemDescription Name="MaxObjectWidth"  Type="xs:float"/>
    <tt:SimpleItemDescription Name="MaxObjectHeight" Type="xs:float"/>
  </tt:Parameters>
  <tt:Messages>
    <tt:Source>
      <tt:SimpleItemDescription Name="VideoSourceConfiguration"
        Type="tt:ReferenceToken"/>
      <tt:SimpleItemDescription Name="AnalyticsConfiguration"
        Type="tt:ReferenceToken"/>
      <tt:SimpleItemDescription Name="AnalyticsModule" Type="xs:string"/>
    </tt:Source>
    <tt:ParentTopic>
      tns1:VideoAnalytics/nn:ObjectTracker/SceneTooCrowded
    </tt:ParentTopic>
  </tt:Messages>
</tt:RuleDescription>
]]></programlisting>
      </section>
      <section xml:id="_Ref213061721">
        <title>Operations on analytics modules</title>
        <para>The Create/Delete/Modify operations shall be atomic, all modifications can be processed or the complete operation shall fail.</para>
        <section>
          <title>GetSupportedAnalyticsModules</title>
          <para>A device signaling support for analytics modules via the AnalyticsModuleSupport capability shall support retrieving a list of analytics modules for an analytics configuration. The description shall conform to the configuration description language as described in section <xref linkend="_Ref42033279" />.</para>
          <para>The optional AnalyticsModuleContentSchemaLocation parameter allows to list schema file locations that provide reference to types or elements which are not defined by ONVIF.</para>
          <para>The device shall indicate its limit for maximum number of analytics modules for non-fixed modules through the maxInstances attribute.</para>
          <variablelist role="op">
            <varlistentry>
              <term>request</term>
              <listitem>
                <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
                <para role="text">Token of an existing analytics configuration.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>response</term>
              <listitem>
                <para role="param">SupportedAnalyticsModules[tt:SupportedModules]</para>
                <para role="text">Analytics modules supported for the analytics configuration</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>faults</term>
              <listitem>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
                <para role="text">The requested analytics configuration does not exist.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>access class</term>
              <listitem>
                <para role="access">READ_MEDIA</para>
              </listitem>
            </varlistentry>
          </variablelist>
        </section>
        <section>
          <title>GetAnalyticsModules</title>
          <para>A device signaling support for analytics modules via the AnalyticsModuleSupport capability shall support this method to retrieve currently associated analytics modules for an analytics configuration.</para>
          <variablelist role="op">
            <varlistentry>
              <term>request</term>
              <listitem>
                <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
                <para role="text">Token of an existing analytics configuration.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>response</term>
              <listitem>
                <para role="param">AnalyticsModule - optional, unbounded [tt:Config]</para>
                <para role="text">List of modules associated with the specified configuration.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>faults</term>
              <listitem>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
                <para role="text">The requested analytics configuration does not exist.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>access class</term>
              <listitem>
                <para role="access">READ_MEDIA</para>
              </listitem>
            </varlistentry>
          </variablelist>
        </section>
        <section>
          <title>CreateAnalyticsModules</title>
          <para>A device signaling support for analytics modules via the AnalyticsModuleSupport
            capability shall support this method to add analytics modules to an analytics
            configuration. If all modules can not be created as requested, the device shall respond
            with a fault message.</para>
          <para>The device shall accept adding of analytics modules with an empty Parameter definition. Note that the resulting configuration may include a set of default parameter values.</para>
          <variablelist role="op">
            <varlistentry>
              <term>request</term>
              <listitem>
                <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
                <para role="text">Token of an existing analytics configuration.</para>
                <para role="param">AnalyticsModule - unbounded [tt:Config]</para>
                <para role="text">Modules to be added to the specified configuration.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>response</term>
              <listitem>
                <para role="text">This is an empty message.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>faults</term>
              <listitem>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
                <para role="text">The requested analytics configuration does not exist.</para>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:InvalidModule</para>
                <para role="text">The suggested module configuration is not valid on the device.</para>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:NameAlreadyExistent</para>
                <para role="text">The same analytics module name exists already in the configuration.</para>
                <para role="param">env:Sender - ter:Action - ter:FixedModules</para>
                <para role="text">At least one of the requested modules is fixed and cannot be created.</para>
                <para role="param">env:Receiver - ter:Action - ter:TooManyModules</para>
                <para role="text">There are not enough resources in the device to add the analytics modules to the configuration.</para>
                <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
                <para role="text">The device cannot create the analytics modules without creating a conflicting configuration.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>access class</term>
              <listitem>
                <para role="access">ACTUATE</para>
              </listitem>
            </varlistentry>
          </variablelist>
        </section>
        <section>
          <title>ModifyAnalyticsModules</title>
          <para>A device signaling support for analytics modules via the
            AnalyticsModuleOptionsSupported capability shall support this method to modify analytics
            module configurations. If all modules can not be modified as requested, the device shall
            respond with a fault message. A device may reject a request to change the module
            type.</para>
          <para>A device should interpret parameters not present in the payload as unchanged. Note that this does not always result in unchanged values of such parameters, since some parameters may change due to dependency on others.</para>
          <variablelist role="op">
            <varlistentry>
              <term>request</term>
              <listitem>
                <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
                <para role="text">Token of an existing analytics configuration.</para>
                <para role="param">AnalyticsModule - unbounded [tt:Config]</para>
                <para role="text">List of modules to be modified for the specified configuration.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>response</term>
              <listitem>
                <para role="text">This is an empty message.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>faults</term>
              <listitem>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
                <para role="text">The requested analytics configuration does not exist.</para>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:InvalidModule</para>
                <para role="text">The suggested module configuration is not valid on the device.</para>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:NameNotExistent</para>
                <para role="text">The module name or names do not exist.</para>
                <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
                <para role="text">The device cannot modify the modules without creating a conflicting configuration.</para>
                <para role="param">env:Receiver - ter:Action - ter:TypeChangeProhibited</para>
                <para role="text">The device cannot modify the analytics module type without creating a conflicting configuration.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>access class</term>
              <listitem>
                <para role="access">ACTUATE</para>
              </listitem>
            </varlistentry>
          </variablelist>
        </section>
        <section>
          <title>DeleteAnalyticsModules</title>
          <para>A device signaling support for analytics modules via the AnalyticsModuleSupport capability shall support this method for removing analytics modules from an analytics configuration.</para>
          <variablelist role="op">
            <varlistentry>
              <term>request</term>
              <listitem>
                <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
                <para role="text">Token of an existing analytics configuration.</para>
                <para role="param">AnalyticsModuleName - unbounded [xs:string]</para>
                <para role="text">List of modules to be removed for the specified configuration.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>response</term>
              <listitem>
                <para role="text">This is an empty message.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>faults</term>
              <listitem>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
                <para role="text">The requested analytics configuration does not exist.</para>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:NameNotExistent</para>
                <para role="text">The module name or names do not exist.</para>
                <para role="param">env:Sender - ter:Action - ter:FixedModules</para>
                <para role="text">At least one of the requested modules is fixed and cannot be deleted.</para>
                <para role="param">env:Receiver - ter:Action - ter:ConfigurationConflict</para>
                <para role="text">The device cannot delete the modules without creating a conflicting configuration.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>access class</term>
              <listitem>
                <para role="access">ACTUATE</para>
              </listitem>
            </varlistentry>
          </variablelist>
        </section>
        <section>
          <title>GetAnalyticsModuleOptions</title>
          <para>The following operation returns the options for the supported analytics modules that specify an Option attribute. A device signaling support for the AnalyticsModuleOptionsSupported capability shall support this method.</para>
          <variablelist role="op">
            <varlistentry>
              <term>request</term>
              <listitem>
                <para role="param">Type - optional [xs:QName]</para>
                <para role="text">Optional module type for which the options shall be retrieved. If omitted all module option types with all module options supported by the device shall be retuned (as appropriate).</para>
                <para role="param">ConfigurationToken [tt:ReferenceToken]</para>
                <para role="text">Token of an existing analytics configuration.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>response</term>
              <listitem>
                <para role="param">Options - optional, unbounded [tan:<phrase>ConfigOptions</phrase>]</para>
                <para role="text">List of options for the specified analytics module. The response Options shall not contain any RuleType attribute.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>faults</term>
              <listitem>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:NoConfig</para>
                <para role="text">The requested analytics configuration does not exist.</para>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:<phrase>TypeNotExistent</phrase></para>
                <para role="text">The module option type does not exist.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>access class</term>
              <listitem>
                <para role="access">READ_MEDIA</para>
              </listitem>
            </varlistentry>
          </variablelist>
        </section>
        <section>
          <title>GetSupportedMetadata</title>
          <para>This operation allows to query what metadata a device can generate. It shall be supported if the SupportedMetadata capability is set to true.</para>
          <para>The response contains the following information</para>
          <itemizedlist>
            <listitem>
              <para>SampleFrame [tt:Frame]</para>
              <para>An example Frame instance. The instance shall include all elements that the analytics module outputs to the frame of a metadata stream. A device implementation should strive for including all supported enumeration values.</para>
            </listitem>
          </itemizedlist>
          <para>If the sample frame includes object bounding boxes or shapes, these shall be located in the top left quarter of the image.</para>
          <variablelist role="op">
            <varlistentry>
              <term>request</term>
              <listitem>
                <para role="param">Type - optional [xs:QName]</para>
                <para role="text">Optional module type for which the metadata information shall be retrieved. If omitted, the response of this method shall signal the information for all supported analytics modules.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>response</term>
              <listitem>
                <para role="param">AnalyticsModule – optional, unbounded [tan:<phrase>MetadataInfo</phrase>]</para>
                <para role="text">This parameter contains sample meta frames.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>faults</term>
              <listitem>
                <para role="param">env:Sender - ter:InvalidArgVal - ter:<phrase>TypeNotExistent</phrase></para>
                <para role="text">The module option type does not exist.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>access class</term>
              <listitem>
                <para role="access">READ_MEDIA</para>
              </listitem>
            </varlistentry>
          </variablelist>
        </section>
      </section>
    </section>
	<section>
      <title>GetServiceCapabilities</title>
      <para>The capabilities reflect optional functions and functionality of a service. The information is static and does not change during device operation. The following capabilities are available:</para>
      <variablelist>
        <varlistentry>
          <term>RuleSupport</term>
          <listitem><para>Indication that the device supports rules interface and rules syntax as specified in Section <xref linkend="_Ref11057187" />.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>AnalyticsModuleSupport</term>
          <listitem><para>Indication that the device supports the scene analytics module interface as specified in Section <xref linkend="_Ref476820362" />.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>CellBasedSceneDescriptionSupported</term>
          <listitem><para>Indication that the device produces the cell based scene description.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>RuleOptionsSupported</term>
          <listitem><para>Indication that the device supports GetRuleOptions and ModifyRules.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>AnalyticsModuleOptionsSupported</term>
          <listitem><para>Indication that the device supports GetAnalyticsModuleOptions and ModifyAnalyticsModules.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>SupportedMetadata</term>
          <listitem><para>Indication that the device supports the method GetSupportedMetadata.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>ImageSendingType</term>
          <listitem><para>Lists the supported methods for transmitting images.</para></listitem>
        </varlistentry>
      </variablelist>
      <variablelist role="op">
        <varlistentry>
          <term>request</term>
          <listitem>
            <para role="text">This message is empty</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>response</term>
          <listitem>
            <para role="param">Capabilities [tan:Capabilities]</para>
            <para role="text">Set of indicators for function groups as described above.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>faults</term>
          <listitem>
            <para role="text">None</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>access class</term>
          <listitem>
            <para role="access">PRE_AUTH</para>
          </listitem>
        </varlistentry>
      </variablelist>
    </section>
    <section>
      <title>Events</title>
      <section>
        <title>Audio Detected (deprecated)</title>
        <para>An analytics engine can send the following event for analyzed audio data. This event is
          deprecated in favor of events described in <xref linkend="appendix_hw3_vnr_nwb"/>.</para>
        <programlisting><![CDATA[<tt:MessageDescription IsProperty=“false">
  <tt:Source>
    <tt:SimpleItemDescription Name=“AudioSourceConfigurationToken"
      Type="tt:ReferenceToken"/>
    <tt:SimpleItemDescription Name=“AudioAnalyticsConfigurationToken"
      Type="tt:ReferenceToken"/>
    <tt:SimpleItemDescription Name=“Rule"
      Type="xs:string"/>
  </tt:Source>
  <tt:Data>
    <tt:SimpleItemDescription Name=“isSoundDetected" Type="xs:boolean"/>
    <tt:SimpleItemDescription Name=“UTCTime" Type="xs:dateTime"/>
    <tt:ElementItemDescription Name=“AudioClassifications" Type=“AudioClassDescriptor"/>
  </tt:Data >
  <tt:ParentTopic>tns1:AudioAnalytics/Audio/DetectedSound
  </tt:ParentTopic>
</tt:MessageDescription>]]></programlisting>
        <para>The Rule field is optional and contains the Rule instance name that generated the audio detected event.</para>
      </section>
    </section>
  </chapter>
  <appendix>
    <title>Specified Rules (normative)</title>
    <section>
      <title>Overview</title>
      <para>This Annex defines a set of generic rules. Rules are mainly designed for static cameras
        since the graphical primitives are provided using bounds based normalized coordinates. For
        usage with PTZ devices see <xref xmlns:xlink="http://www.w3.org/1999/xlink"
          linkend="Annex-Rules-PTZ"/>.</para>
      <section xml:id='_msgSource'>
        <title>Message format</title>
        <para>Whenever a rule triggers it generates a message according to the core specification
          message definition. The topic identifies the rule type while the source items identify the
          originating input and rule. Most events signal their status via data values.</para>
        <variablelist role="op">
          <varlistentry>
            <term>Topic</term>
            <listitem><para role="text">Topic of the rule related event.</para></listitem>
          </varlistentry>
          <varlistentry>
            <term>Source</term>
            <listitem>
              <para role="param">VideoSource [tt:ReferenceToken]</para>
              <para role="text">The token of the video source.</para>
              <para role="param">AnalyticsConfiguration - optional [tt:ReferenceToken]</para>
              <para role="text">Optional token of the analytics configuration.</para>
              <para role="param">Rule [xs:string]</para>
              <para role="text">Name of the Rule.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>Data</term>
            <listitem>
              <para role="text">Data items are rule specific, except for the generic elements described here. For property events any change of the data items must be signaled with a changed event.
              Non-property events may have no data items at all.</para>
              <para role="param">ObjectId - optional [tt:StringList]</para>
              <para role="text">Optional list of objects triggering this rule.</para>
              <para role="param">ClassTypes - optional [tt:StringList]</para>
              <para role="text">Optional list of class types of the detected objects, one for each object, in the same order as object ids are listed.</para>
              <para role="param">Object - optional, unbounded  [tt:Object]</para>
              <para role="text">Optional description of objects triggering this rule.</para>
            </listitem>
          </varlistentry>
        </variablelist>
        <para>The data section contains the rule specific state or event information. Vendors are allowed to add vendor specific extensions to the data section, but must take care to do this in a future proof way by adding a vendor specific namespace prefix to the name.</para>
        <programlisting><![CDATA[<tt:Messages>
  <tt:Source>
    <tt:SimpleItemDescription Name="VideoSource" Type="tt:ReferenceToken"/>
    <tt:SimpleItemDescription Name="AnalyticsConfiguration" Type="tt:ReferenceToken"/>
    <tt:SimpleItemDescription Name="Rule" Type="xs:string"/>
  </tt:Source>
  <tt:Data>
    ...
    <tt:SimpleItemDescription Name="ObjectId" Type="tt:StringList"/>
    <tt:SimpleItemDescription Name="ClassTypes" Type="tt:StringList"/>
    <tt:ElementItemDescription Name="Object" Type="tt:Object"/>
    </tt:Data>
  <tt:ParentTopic>tns1:RuleEngine/Xxxx</tt:ParentTopic>
</tt:Messages>]]></programlisting>
        <para>Note that if the message includes Object information there is no need to include
          ObjectIds, because each Object includes its ID.</para>
      </section>
      <section>
        <title>Parameters</title>
        <para>Generally parameters are rule specific. Implementations may extend the ONVIF defined
          rules by providing additional parameters for e.g. object or other constraints. Note that
          these additional parameters are optional. Vendors should check the availability of ONVIF
          defined parameters like the class filter before defining own items.</para>
        <section>
          <title>Generic parameters</title>
          <para>The following section is reserved for ONVIF defined generic parameters.</para>
          <para>A device signals via GetSupportedRules which parameters may be applied to its various rules. For all parameters a device should also signal their valid ranges via GetRuleOptions whether a rule supports these.</para>

          <para>In case of setting up any region based detection rule for an event trigger (e.g. Field Detector, Loitering Detector, Declarative motion detector, Object Detection) rule should contain a parameter 'Field' ElementItem. The ElementItem identifies the region usually defined by a polygon for which the rule has been set up. The corresponding ElementItemDescription resembles the following:</para>
          <programlisting><![CDATA[<tt:ElementItemDescription Name="Field" Type="tt:Polygon">]]></programlisting>
		  <para>If the rule supports activation and deactivation, the rule should contain a parameter 'Armed' SimpleItem. The corresponding SimpleItemDescription resembles the following:</para>
          <programlisting><![CDATA[<<tt:SimpleItemDescription Name="Armed" Type="xs:boolean">]]></programlisting>

        </section>
      <section xml:id="_objectClass">
        <title>Object Classification</title>
        <para>Object classification can be utilized in rules to restrict generation of events to objects of one or more types. Items should be selected from the ObjectType enumeration. Examples for object types are</para>
        <itemizedlist>
          <listitem>
            <para>Animal</para>
          </listitem>
          <listitem>
            <para>HumanFace</para>
          </listitem>
          <listitem>
            <para>Human</para>
          </listitem>
          <listitem>
            <para>Bicycle</para>
          </listitem>
          <listitem>
            <para>Vehicle</para>
          </listitem>
          <listitem>
            <para>LicensePlate</para>
          </listitem>
        </itemizedlist>
        <para>The following example shows how to apply the ClassFilter to the line detector rule description.</para>
        <programlisting><![CDATA[<tt:RuleDescription Name="tt:LineDetector">
  <tt:Parameters>
    <tt:SimpleItemDescription Name="Direction" Type="tt:Direction"/>
    <tt:SimpleItemDescription Name="ClassFilter" Type="tt:StringList"/>
    <tt:ElementItemDescription Name="Segments" Type="tt:Polyline"/>
  </tt:Parameters>
  ...
</tt:Messages>
</tt:RuleDescription>]]></programlisting>
        <para>Note that the order of parameters is arbitrary as long as the simple items are listed before the complex element items.</para>
      </section>
    </section>
      <section xml:id="Annex-Rules-PTZ">
        <title>Moving cameras</title>
        <para>PTZ devices supporting these kinds of rules should remap the graphical primitives based on
          the current view port resulting from pan, title and zoom values so that these can be used
          independently from the view port. Of course rules with graphical elements located fully outside
          of the current view port will not be able to trigger any events.</para>
        <para>To realize this, the rules may include an element item called "PTZVector" that acts as a
          filter for activating the rule only when the view port matches the given values. The
          ElementItem identifies the position of the device for which the rule has been set up. The
          corresponding ElementItemDescription resembles the following:</para>
        <programlisting><![CDATA[<tt:ElementItemDescription Name="PTZVector" Type="tt:PTZVector">]]></programlisting>
        <para>As an alternative the rules may include a "PresetToken" that acts in the same way as the "PTZVector". The
          corresponding SimpleItemDescription resembles the following:</para>
        <programlisting><![CDATA[<tt:SimpleItemDescription Name="PresetToken" Type="tt:ReferenceToken">]]></programlisting>
        <para>Note that tolerances for matching are outside of the scope of this specification.
          However devices should strive to tolerate and compensate for small deviations.</para>
      </section>
    </section>
    <section>
      <title>Line Detector</title>
      <para>LineDetector is defined by a non-intersecting simple polyline. If an object crosses the polyline in the specified direction, the rule engine sends a Crossed event containing the name of the LineDetector and a reference to the object which has crossed the line. As directions, one can select between Left, Right, and Any, where directions Left and Right refer to the direction walking along the line from the first point to the second point and are the prohibited directions. The specific definition of the Left and Right direction can refer to the following <xref linkend="_Ref529526650" />, A is the first point and B is the second point.</para>
      <figure xml:id="_Ref529526650">
        <title>Direction – Left and Right</title>
        <mediaobject>
          <imageobject>
            <imagedata fileref="media/Analytics/image20.png" contentwidth="159.97mm" />
          </imageobject>
        </mediaobject>
      </figure>
      <variablelist role="op">
        <varlistentry>
          <term>Parameters</term>
          <listitem>
            <para role="param">Direction - optional [tt:Direction]</para>
            <para role="text">Optional restriction of direction sensitivity. Default is any.</para>
            <para role="param">Segments [tt:Polyline]</para>
            <para role="text">Graphical line definition in normalized coordinates.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Topic</term>
          <listitem>
            <para role="param">tns1:RuleEngine/LineDetector/Crossed</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Source</term>
          <listitem>
            <para role="text">See <xref linkend="_msgSource"/></para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Data</term>
          <listitem>
            <para role="text">See <xref linkend="_msgSource"/></para>
          </listitem>
        </varlistentry>
      </variablelist>
      <para>The following snippet shows the rule definition:</para>
      <programlisting><![CDATA[<tt:RuleDescription Name="tt:LineDetector">
  <tt:Parameters>
    <tt:SimpleItemDescription Name="Direction" Type="tt:Direction"/>
    <tt:ElementItemDescription Name="Segments" Type="tt:Polyline"/>
  </tt:Parameters>
  <tt:Messages>
    <tt:Source>
      ...
    </tt:Source>
    <tt:Data>
      ...
    </tt:Data>
    <tt:ParentTopic>tns1:RuleEngine/LineDetector/Crossed</tt:ParentTopic>
  </tt:Messages>
</tt:RuleDescription>
]]></programlisting>
    </section>
    <section>
      <title>Field Detector</title>
      <para>A FieldDetector is defined by a simple non-intersecting polygon. The FieldDetector determines if each object in the scene is inside or outside the polygon. This information is put into a property.</para>
      <variablelist role="op">
        <varlistentry>
          <term>Parameters</term>
          <listitem>
            <para role="param">Field [tt:Polygon]</para>
            <para role="text">Graphical field definition in normalized coordinates.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Topic</term>
          <listitem>
            <para role="param">tns1:RuleEngine/FieldDetector/ObjectsInside</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Source</term>
          <listitem>
            <para role="text">See <xref linkend="_msgSource"/></para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Data</term>
          <listitem>
            <para role="text">See <xref linkend="_msgSource"/></para>
            <para role="param">IsInside [xs:boolean]</para>
            <para role="text">True if one or more objects matching the parameters are inside.</para>
          </listitem>
        </varlistentry>
      </variablelist>
      <para>Note: a device signaling ObjectId shall emit changed events whenever the list of objects
        changes.</para>
      <para>See below example for a FieldDetector definition:</para>
      <programlisting><![CDATA[<tt:RuleDescription Name="tt:FieldDetector">
  <tt:Parameters>
    <tt:ElementItemDescription Name="Field" Type="tt:Polygon"/>
  </tt:Parameters>
  <tt:Messages IsProperty="true">
    <tt:Source>
      ...
    </tt:Source>
    <tt:Data>
      ...
      <tt:SimpleItemDescription Name="IsInside" Type="xs:boolean"/>
    </tt:Data >
    <tt:ParentTopic>
      tns1:RuleEngine/FieldDetector/ObjectsInside
    </tt:ParentTopic>
  </tt:Messages>
</tt:RuleDescription>
]]></programlisting>
    </section>
    <section>
      <title>Loitering Detector</title>
      <para>A LoiteringDetector is defined by a simple non-intersecting polygon as an area of
        interest and threshold loitering interval. The LoiteringDetector determines if each object
        in the scene inside the polygon longer than the given time threshold value. It publishes
        when the object started loitering.</para>
      <variablelist role="op">
        <varlistentry>
          <term>Parameters</term>
          <listitem>
            <para role="param">Field - optional [tt:Polygon]</para>
            <para role="text">Optional graphical field restricting the detection area.</para>
            <para role="param">TimeThreshold - [xs:duration]</para>
            <para role="text">Maximum duration before an object is judged to be loitering.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Topic</term>
          <listitem>
            <para role="param">tns1:RuleEngine/LoiteringDetector/ObjectIsLoitering</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Source</term>
          <listitem>
            <para role="text">See <xref linkend="_msgSource"/></para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Data</term>
          <listitem>
            <para role="text">See <xref linkend="_msgSource"/></para>
            <para role="param">Since [xs:dateTime]</para>
            <para role="text">Since when this object is loitering.</para>
          </listitem>
        </varlistentry>
      </variablelist>
      <para>LoiteringDetector is defined by the following code using the rule description
        language:</para>
      <programlisting><![CDATA[<tt:RuleDescription Name="tt:LoiteringDetector">
  <tt:Parameters>
    <tt:SimpleItemDescription  Name="TimeThreshold" Type="xs:duration"/>
    <tt:ElementItemDescription Name="Field" Type="tt:Polygon"/>
  </tt:Parameters>
  <tt:Messages IsProperty="true">
    <tt:Source>
      ...
    </tt:Source>
    <tt:Data>
      <tt:SimpleItemDescription Name="ObjectId" Type="tt:StringList"/>
      <tt:SimpleItemDescription Name="Since" Type="xs:dateTime"/>
    </tt:Data >
    <tt:ParentTopic>
      tns1:RuleEngine/LoiteringDetector/ObjectIsLoitering
    </tt:ParentTopic>
  </tt:Messages>
</tt:RuleDescription>
]]></programlisting>
    </section>
    <section>
      <title>Line crossing counting rule</title>
      <para>This rule counts the number of objects crossing a set of line segments.
        Optionally the line segments may only trigger counting when passed in a specific direction.
        The configuration parameters also include the time interval to report the events and time
        interval to reset its counter.</para>
      <variablelist role="op">
        <varlistentry>
          <term>Parameters</term>
          <listitem>
            <para role="param">Segments - unbounded [tt:Polyline]</para>
            <para role="text">One or more polylines used for detection.</para>
            <para role="param">PassAllPolylines - optional [xs:boolean]</para>
            <para role="text">Signals that an object must pass all polylines before being counted. By default any polyline passing counts separately.</para>
            <para role="param">Direction - optional [tt:Direction]</para>
            <para role="text">Optional restriction of direction sensitivity. Default is any. See definition in <xref
              xmlns:xlink="http://www.w3.org/1999/xlink" linkend="_Ref529526650"/></para>
            <para role="param">ReportTimeInterval - optional [xs:duration]</para>
            <para role="text">Optional time interval to reduce number of reported changes by reporting aggregated values.</para>
            <para role="param">ResetTime - optional, unbounded [xs:time]</para>
            <para role="text">Time or times of the day when the counter should be reset. The time value shall be interpreted as localtime.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Topic</term>
          <listitem>
            <para role="param">tns1:RuleEngine/CountAggregation/Counter</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Source</term>
          <listitem>
            <para role="text">See <xref linkend="_msgSource"/></para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Data</term>
          <listitem>
            <para role="param">Count [xs:int]</para>
            <para role="text">Number of objects counted since last reset.</para>
          </listitem>
        </varlistentry>
      </variablelist>
      <para>CountAggregation defined by the following code using the rule description language:</para>
      <programlisting><![CDATA[<tt:RuleDescription Name="tt:LineCounting">
  <tt:Parameters>
    <tt:SimpleItemDescription Name="ReportTimeInterval" Type="xs:duration"/>
    <tt:SimpleItemDescription Name="ResetTime" Type="xs:time"/>
    <tt:SimpleItemDescription Name="Direction" Type="tt:Direction"/>
    <tt:SimpleItemDescription Name="PassAllPolylines" Type="xs:boolean"/>
    <tt:ElementItemDescription Name="Segments" Type="tt:Polyline"/>
  </tt:Parameters>
  <tt:Messages IsProperty="true">
    <tt:Source>
      ...
    </tt:Source>
    <tt:Data>
      <tt:SimpleItemDescription Name="Count" Type="xs:int"/>
    </tt:Data >
    <tt:ParentTopic>
      tns1:RuleEngine/CountAggregation/Counter
    </tt:ParentTopic>
  </tt:Messages>
</tt:RuleDescription>
]]></programlisting>
    </section>
    <section>
      <title>Occupancy Counting rule</title>
      <para>The occupancy counting rule counts the number of objects inside an enclosure by counting
        objects passing in and out of a set of line segments (barriers). The counter increments when
        objects pass from left to right and decrements when objects pass from right to left.</para>
      <para>The configuration parameters also include the time interval to report the events and
        time interval to reset its counter.</para>
      <variablelist role="op">
        <varlistentry>
          <term>Parameters</term>
          <listitem>
            <para role="param">Segments - unbounded [tt:Polyline]</para>
            <para role="text">One or more polylines used for detection.</para>
            <para role="param">ReportTimeInterval - optional [xs:duration]</para>
            <para role="text">Optional time interval to reduce number of reported changes by
              reporting aggregated values.</para>
            <para role="param">ResetTime - optional, unbounded [xs:time]</para>
            <para role="text">Time or times of the day when the counter should be reset. The time value shall be interpreted as localtime.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Topic</term>
          <listitem>
            <para role="param">tns1:RuleEngine/CountAggregation/OccupancyCounter</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Source</term>
          <listitem>
            <para role="text">See <xref linkend="_msgSource"/></para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Data</term>
          <listitem>
            <para role="param">Count [xs:int]</para>
            <para role="text">Number of objects counted since last reset.</para>
          </listitem>
        </varlistentry>
      </variablelist>
      <para>CountAggregation defined by the following code using the rule description language:</para>
      <programlisting><![CDATA[<tt:RuleDescription Name="tt:OccupancyCounting">
  <tt:Parameters>
    <tt:ElementItemDescription Name="Segments" Type="tt:Polyline"/>
    <tt:SimpleItemDescription Name="ReportTimeInterval" Type="xs:duration"/>
    <tt:SimpleItemDescription Name="ResetTime" Type="xs:time"/>
  </tt:Parameters>
  <tt:Messages IsProperty="true">
    <tt:Source>
      ...
    </tt:Source>
    <tt:Data>
      <tt:SimpleItemDescription Name="Count" Type="xs:int"/>
    </tt:Data >
    <tt:ParentTopic>
      tns1:RuleEngine/CountAggregation/OccupancyCounter
    </tt:ParentTopic>
  </tt:Messages>
</tt:RuleDescription>
]]></programlisting>
    </section>
    <section>
      <title>Object Detection</title>
      <para>The object detection rule generates events when any of the configured object types are detected in the field of view. Whenever there is a change in the detected object types, a new event is notified, if none of the objects from the configured list is detected, an event with empty object list is notified.</para>
      <variablelist role="op">
        <varlistentry>
          <term>Parameters</term>
          <listitem>
            <para role="param">ClassFilter [tt:StringList]</para>
            <para role="text">List of classes to be detected.</para>
            <para role="param">ConfidenceLevel - optional [xs:float]</para>
            <para role="text">Minimum confidence level for accepting a classification.</para>
            <para role="param">DwellTime - optional [xs:duration]</para>
            <para role="text">Duration an object must be visible before accepting a classification.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Topic</term>
          <listitem>
            <para role="param">tns1:RuleEngine/ObjectDetection/Object</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Source</term>
          <listitem>
            <para role="text">See <xref linkend="_msgSource"/></para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Data</term>
          <listitem>
            <para role="param">ClassTypes [tt:StringList]</para>
            <para role="text">Matching class associations of the detected objects.</para>
          </listitem>
        </varlistentry>
      </variablelist>
      <para>Description of an object detector defined by the following code using the rule description language:</para>
      <programlisting><![CDATA[<tt:RuleDescription Name=“tt:ObjectDetection">
  <tt:Parameters>
    <tt:SimpleItemDescription Name="ClassFilter" Type=" tt:StringList"/>
    <tt:SimpleItemDescription Name=“ConfidenceLevel" Type="xs:float"/>
    <tt:SimpleItemDescription Name=“DwellTime" Type="xs:duration"/>
  </tt:Parameters>
  <tt:Messages>
    <tt:Source>
      ...
    </tt:Source>
    <tt:Data>
      <tt:SimpleItemDescription Type=“tt:StringList" Name=“ClassTypes"/>
    </tt:Data>
    <tt:ParentTopic>tns1:RuleEngine/ObjectDetection/Object</tt:ParentTopic>
  </tt:Messages>
</tt:RuleDescription>
]]></programlisting>
      <para>The object types may differ between devices. See below for example rule options, based on the description language parameter options defined in <xref linkend="_Toc529533198" />.</para>
      <programlisting><![CDATA[<tan:GetRuleOptionsResponse>
  <tan:RuleOptions Name="ClassFilter" RuleType="tt:ObjectDetection">
    <tt:StringList>Person Vehicle Face LicensePlate</tt:StringList>
  </tan:RuleOptions>
  <tan:RuleOptions Name="ConfidenceLevel" RuleType="tt:ObjectDetection">
    <tt:FloatRange>
      <tt:Min>0.0</tt:Min>
      <tt:Max>100.0</tt:Max>
    </tt:FloatRange>
  </tan:RuleOptions>
  <tan:RuleOptions Name=“DwellTime “ RuleType="tt:ObjectDetection">
    <tt:DurationRange >
      <tt:Min>PT1S</tt:Min>
      <tt:Max>PT1M</tt:Max>
    </tt:DurationRange>
  </tan:RuleOptions>
</tan:GetRuleOptionsResponse>
]]></programlisting>
    </section>
	<section>
      <title>Object Abandoned</title>
      <para>The Object Abandoned rule is defined by a simple non-intersecting polygon as an area of interest and abandoned time threshold interval. The Object Abandoned detector continuously monitors an area to detect objects or items that have been abandoned in the scene beyond a certain threshold time. The Object Abandoned module looks for objects that are not part of the “normal” scene and issues real-time alerts upon detecting exceptions.</para>
      <para>Object Abandoned can be deployed at airports, train stations, national infrastructure facilities, public places, and other secure areas to detect unattended baggage and suspicious looking objects left in the scene.</para>
	  <variablelist role="op">
        <varlistentry>
          <term>Parameters</term>
          <listitem>
            <para role="param">Field [tt:Polygon]</para>
            <para role="text">Graphical field definition in normalized coordinates.</para>
            <para role="param">TimeThreshold [xs:duration]</para>
            <para role="text">Minimum duration the object should stay in the scene before it is judged to be abandoned.</para>
            <para role="param">Sensitivity [xs:float]</para>
            <para role="text">This parameter allows to change the ratio between True and False detections. For "High" sensitivity value there are more True positive events as well as False positives.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Topic</term>
          <listitem>
            <para role="param">tns1:RuleEngine/ObjectAbandoned</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Source</term>
          <listitem>
            <para role="text">See <xref linkend="_msgSource"/></para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Data</term>
          <listitem>
            <para role="param">ObjectId [tt:StringList]</para>
            <para role="text">List of objects triggering this rule.</para>
          </listitem>
        </varlistentry>
      </variablelist>
      <para>See below example for an Object Abandoned definition:</para>
      <programlisting><![CDATA[<tt:RuleDescription Name="tt:ObjectAbandoned">
  <tt:Parameters>
    <tt:ElementItemDescription Name="Field" Type="tt:Polygon"/>
    <tt:SimpleItemDescription Name="TimeThreshold" Type="xs:duration"/>
    <tt:SimpleItemDescription Name="Sensitivity" Type="xs:float"/>
  </tt:Parameters>
  <tt:Messages>
    <tt:Source>
      ...
    </tt:Source>
    <tt:Data>
      <tt:SimpleItemDescription Name="ObjectId" Type="tt:StringList"/>
    </tt:Data >
    <tt:ParentTopic>
      tns1:RuleEngine/ObjectAbandoned
    </tt:ParentTopic>
  </tt:Messages>
</tt:RuleDescription>
]]></programlisting>
    </section>
	<section>
      <title>Object Removed</title>
      <para>The Object Removed rule is defined by a simple non-intersecting polygon as an area of interest and removed time threshold interval. Object Removed module continuously monitors a scene and detects and alarms when any valuable property is removed from the scene.</para>
      <para>For example, object removed rule can be used in loss prevention and securing valuable items in government, industrial, retail, corporate facilities, and public places such as museums and national landmarks.</para>
	  <variablelist role="op">
        <varlistentry>
          <term>Parameters</term>
          <listitem>
            <para role="param">Field [tt:Polygon]</para>
            <para role="text">Graphical field definition in normalized coordinates.</para>
            <para role="param">TimeThreshold [xs:duration]</para>
            <para role="text">Minimum duration the object should be out of the scene before it is judged to be removed.</para>
            <para role="param">Sensitivity [xs:float]</para>
            <para role="text">This parameter allows to change the ratio between True and False detections. For "High" sensitivity value there are more True positive events as well as False positives.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Topic</term>
          <listitem>
            <para role="param">tns1:RuleEngine/ObjectRemoved</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Source</term>
          <listitem>
            <para role="text">See <xref linkend="_msgSource"/></para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Data</term>
          <listitem>
            <para role="param">ObjectId [tt:StringList]</para>
            <para role="text">List of objects triggering this rule.</para>
          </listitem>
        </varlistentry>
      </variablelist>
      <para>See below example for an Object Removed definition:</para>
      <programlisting><![CDATA[<tt:RuleDescription Name="tt:ObjectRemoved">
  <tt:Parameters>
    <tt:ElementItemDescription Name="Field" Type="tt:Polygon"/>
    <tt:SimpleItemDescription Name="TimeThreshold" Type="xs:duration"/>
    <tt:SimpleItemDescription Name="Sensitivity" Type="xs:float"/>
  </tt:Parameters>
  <tt:Messages>
    <tt:Source>
      ...
    </tt:Source>
    <tt:Data>
      <tt:SimpleItemDescription Name="ObjectId" Type="tt:StringList"/>
    </tt:Data >
    <tt:ParentTopic>
      tns1:RuleEngine/ObjectRemoved
    </tt:ParentTopic>
  </tt:Messages>
</tt:RuleDescription>
]]></programlisting>
    </section>
    <section>
      <title>Object Track Aggregation</title>
      <para>This event is intended to describe an object throughout visible duration within a scene.
        The description should include aggregated or summarized information along with contextual
        data, such as images or bounding boxes, to assist clients in visualizing the object's
        trajectory. This event can complement per-frame, per-object scene description by providing a
        higher-level representation of the object’s trajectory, enhancing forensic analysis while
        optimizing bandwidth consumption.</para>
      <para>It is recommended to enable ObjectTrack data in sparsely crowded scenes to optimize data
        produced from the device.</para>
      <para>The process by which the device aggregates object track data for a given object is out of
        scope of this specification.</para>
      <para>The Object Track Aggregation rule generates an object track aggregation event for below
        listed scenarios</para>
      <itemizedlist>
        <listitem>
          <para> When an object appears in the field of view, an Initial aggregation event may be
            sent.</para>
        </listitem>
        <listitem>
          <para> While the object is present in the field of view,  an Intermediate aggregation may
            be sent.</para>
        </listitem>
        <listitem>
          <para> When the object is no longer visible in the field of view, a Final aggregation
            event shall be sent.</para>
        </listitem>
      </itemizedlist>
      <para>Optionally, device may include additional object track data for e.g. snapshot image as
        configured in ObjectTrackDataFilter parameter. Devices may prune track information for
        objects with complex or long lasting motion patterns.</para>
      <para>If an initial or intermediate aggregation is sent for an object, Final aggregation event
        for that object shall be sent even if final classification does not meet class or threshold
        filters in rule configuration.</para>
      <para>Device should fill in aggregated tt:Object structure with data qualified as
        classifications for e.g. Vehicle or License plate and should not fill in temporal data as
        they are not meaningful in the aggregation context.</para>
      <para>In order to reinforce aggregation data, Device should use ObjectTrack tt:Object
        structure to provide interesting observations captured at various time instances within the
        track duration like cropped object image etc.,</para>
      <para>Final aggregation event should include all the aggregated observations of the object,
        irrespective if such data is included in optional intermediate aggregation events.</para>
      <para>The data filled in ObjectTrack tt:Object can be sparse and can vary based on the data
        filter.</para>
      <variablelist role="op">
        <varlistentry>
          <term>Parameters</term>
          <listitem>
            <para role="param">ClassFilter [tt:StringList]</para>
            <para role="text">List of classes to be aggregated.</para>
            <para role="param">ConfidenceLevel - optional [xs:float]</para>
            <para role="text">Minimum confidence level of object classification for generating
              aggregation event.</para>
            <para role="param">EarlyReport - optional [xs:boolean]</para>
            <para role="text">Signals that a device shall send an intermediate report as soon as it has sufficient information.</para>
            <para role="param">ReportTimeInterval - optional [xs:duration]</para>
            <para role="text">Optional time interval to request intermediate updates at a recurring
              rate. Reports may be omitted if the information hasn’t significantly changed.
              Details are implementation dependent and outside of the scope of this specification.
              The time interval is not intended as an exact clock and devices may adapt durations.
            </para>
            <para role="param">ObjectTrackDataFilter - optional [tt:StringList]</para>
            <para role="text">Optional subset of XPath 1.0 filter relative to tt:Object for e.g.
              "Appearance/Image" so that device includes relevant elements in Object track data. If
              omitted, ObjectTrack shall not be provided.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Topic</term>
          <listitem>
            <para role="param">tns1:RuleEngine/ObjectTrack/Aggregation</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Source</term>
          <listitem>
            <para role="text">See <xref linkend="_msgSource"/></para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Data</term>
          <listitem>
            <para role="param">AggregationStart - mandatory [xs:dateTime]</para>
            <para role="text">All aggregation events shall set object track start time as the
              AggregationStart time.</para>
            <para role="param">Object - mandatory [tt:Object]</para>
            <para role="text">Track aggregation data of an object.</para>
            <para role="param">ObjectTrack - optional [tt:ObjectTrack]</para>
            <para role="text">Optional additional description as a sequence of samples of an object to provide enriched context.</para>
            <para role="param">Final - optional [xs:boolean]</para>
            <para role="text">Signals TRUE for final aggregation event for the detected
              object.</para>
          </listitem>
        </varlistentry>
      </variablelist>
      <para>See below example for an Object Track Aggregation definition:</para>
      <programlisting><![CDATA[<tt:RuleDescription Name="tt:ObjectTrackAggregation">
  <tt:Parameters>
    <tt:SimpleItemDescription Name="ClassFilter" Type="tt:StringList"/>
    <tt:SimpleItemDescription Name="ConfidenceLevel" Type="xs:float"/>
    <tt:SimpleItemDescription Name="ReportTimeInterval" Type="xs:float"/>
    <tt:SimpleItemDescription Name="ObjectTrackDataFilter" Type="tt:StringList"/>
  </tt:Parameters>
  <tt:Messages>
    <tt:Source>
      ...
    </tt:Source>
    <tt:Data>
      <tt:SimpleItemDescription Name="AggregationStart" Type="xs:dateTime"/>
      <tt:SimpleItemDescription Name="Final" Type="xs:boolean"/>
      <tt:ElementItemDescription Name="Object" Type="tt:Object"/>
      <tt:ElementItemDescription Name="ObjectTrack" Type="tt:ObjectTrack"/>
    </tt:Data>
    <tt:ParentTopic>tns1:RuleEngine/ObjectTrack/Aggregation</tt:ParentTopic>
  </tt:Messages>
</tt:RuleDescription>
]]></programlisting>
      <para>The object types may differ between devices. See below for example rule options, based on the description language parameter options defined in <xref linkend="_Toc529533198" />.</para>
      <programlisting><![CDATA[<tan:GetRuleOptionsResponse>
  <tan:RuleOptions Name="ClassFilter" RuleType="tt:ObjectTrackAggregation">
    <tt:StringList>Person Vehicle Face LicensePlate</tt:StringList>
  </tan:RuleOptions>
  <tan:RuleOptions Name="ConfidenceLevel" RuleType="tt:ObjectTrackAggregation">
    <tt:FloatRange>
      <tt:Min>0.0</tt:Min>
      <tt:Max>100.0</tt:Max>
    </tt:FloatRange>
  </tan:RuleOptions>
  <tan:RuleOptions Name="ReportTimeInterval" RuleType="tt:ObjectTrackAggregation">
    <tt:DurationRange >
      <tt:Min>PT1S</tt:Min>
      <tt:Max>PT1M</tt:Max>
    </tt:DurationRange>
  </tan:RuleOptions>
  <tan:RuleOptions Name="ObjectTrackDataFilter" RuleType="tt:ObjectTrackAggregation">
    <tt:StringList>Appearance/Image Appearance/Shape/BoundingBox</tt:StringList>
  </tan:RuleOptions>
</tan:GetRuleOptionsResponse>
]]></programlisting>
    </section>
  </appendix>
  <appendix>
    <title>Cell motion detection (informative)</title>
    <section>
      <title>Cell motion detector</title>
      <para>
        <phrase>Cell motion detector rules process the output of cell motion analytics engine. </phrase>The rule of type "tt:CellMotionDetector" consists of four parameters: "MinCount”, "AlarmOnDelay”, "AlarmOffDelay” and "ActiveCells” as listed in <xref linkend="_Ref522787428" />.</para>
      <para>The parameter "MinCount” describes the minimum number of adjacent cells that a moving object shall cover in order to generate an alarm event.</para>
      <para>AlarmOnDelay and AlarmOffDelay are delay times in milliseconds. These delays should prevent alarm state changes within a short time. An alarm has to be active for at least AlarmOnDelay time to trigger an alarm. AlarmOffDelay will delay the transition from an activated alarm to an inactive alarm. An alarm has to be inactive for at least AlarmOffDelay time to become inactive again.</para>
      <para>Each of the cells defined by the type "tt:CellLayout" in the AnalyticsModule, can be activated or deactivated individually. To exclude particular regions from being monitored owing to continuous movements (e.g. tree in the wind), the relevant cells can be deactivated. For a representation of the activated and deactivated cells a bitmask is used. For instance, if there are 1000 cells available, then 1000 bits need to be set. To efficiently encode this bitmask, the algorithm "Packbits” from ISO 12369 (TIFF, Version 6.0), which is a kind of run length encoder, is used. Afterwards the resulting output is stored as base64Binary.</para>
      <para>The rule definition is as follows:</para>
      <programlisting><![CDATA[<tt:RuleDescription Name="tt:CellMotionDetector">
  <tt:Parameters>
    <tt:SimpleItemDescription Name="MinCount" Type="xs:integer"/>
    <tt:SimpleItemDescription Name="AlarmOnDelay" Type="xs:integer"/>
    <tt:SimpleItemDescription Name="AlarmOffDelay" Type="xs:integer"/>
    <tt:SimpleItemDescription Name="ActiveCells" Type="xs:base64Binary"/>
  </tt:Parameters>
  <tt:Messages IsProperty="true">
    <tt:Source>
      <tt:SimpleItemDescription
        Name="VideoSourceConfigurationToken"
        Type="tt:ReferenceToken"/>
      <tt:SimpleItemDescription
        Name="VideoAnalyticsConfigurationToken"
        Type="tt:ReferenceToken"/>
      <tt:SimpleItemDescription Name="Rule" Type="xs:string"/>
    </tt:Source>
    <tt:Data>
      <tt:SimpleItemDescription Name="IsMotion" Type="xs:boolean"/>
    </tt:Data>
    <tt:ParentTopic>
      tns1:RuleEngine/CellMotionDetector/Motion
    </tt:ParentTopic>
  </tt:Messages>
</tt:RuleDescription>
]]></programlisting>
      <table xml:id="_Ref522787428">
        <title>Cell motion detector rule configuration parameters</title>
        <tgroup cols="2">
          <colspec colname="c1" colwidth="22*" />
          <colspec colname="c2" colwidth="78*" />
          <thead>
            <row>
              <entry>
                <para>Parameter Name</para>
              </entry>
              <entry>
                <para>Description</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry>
                <para>MinCount</para>
              </entry>
              <entry>
                <para>Minimum count of adjacent activated cells to trigger motion. This parameter allows suppressing false alarms.</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>AlarmOnDelay</para>
              </entry>
              <entry>
                <para>Minimum time in milliseconds which is needed to change the alarm state from off to on. This delay is intended to prevent very brief alarm events from triggering.</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>AlarmOffDelay</para>
              </entry>
              <entry>
                <para>Minimum time in milliseconds which is needed to change the alarm state from on to off. This delay is intended to prevent too many alarm changes.</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>ActiveCells</para>
              </entry>
              <entry>
                <para>A "1" denotes an active cell and a "0" an inactive cell.</para>
                <para>The first cell is in the upper left corner. Then the cell order goes first from left to right and then from up to down (see <xref linkend="_Ref272497397" />).</para>
                <para>If the number of cells is not a multiple of 8 the last byte is filled with zeros. The information is run length encoded according to Packbit coding in ISO 12369 (TIFF, Revision 6.0).</para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <para>The event contains the following fields given in <xref linkend="_Ref522787713" />.</para>
      <table xml:id="_Ref522787713">
        <title>Description of the Cell Motion detected event fields</title>
        <tgroup cols="2">
          <colspec colname="c1" colwidth="22*" />
          <colspec colname="c2" colwidth="78*" />
          <thead>
            <row>
              <entry>
                <para>Parameter Name</para>
              </entry>
              <entry>
                <para>Description</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry>
                <para>IsMotion</para>
              </entry>
              <entry>
                <para>True if motion is detected</para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <para>The following code snippet is for cell motion detector rule configuration.</para>
      <programlisting><![CDATA[<tt:VideoAnalyticsConfiguration>
  <tt:RuleEngineConfiguration>
    <tt:Rule Name="MyMotionDetector" Type="tt:CellMotionDetector">
      <tt:Parameters>
        <tt:SimpleItem Name="MinCount" Value="4"/>
        <tt:SimpleItem Name="AlarmOnDelay" Value="1000"/>
        <tt:SimpleItem Name="AlarmOffDelay" Value="1000"/>
        <tt:SimpleItem Name="ActiveCells" Value="/v/+8A=="/>
      </tt:Parameters>
    </tt:Rule>
  </tt:RuleEngineConfiguration>
</tt:VideoAnalyticsConfiguration>
]]></programlisting>
      <para>The activated cells are filled with gray and the deactivated cells are white. The active cells in hex coding are: <literal>"</literal><emphasis>ff ff ff f0 f0 f0</emphasis><literal>"</literal>. This is encoded with the Packbit algorithm: <literal>"</literal><emphasis>fe ff fe f0</emphasis><literal>"</literal>. Finally, this packed data is base64Binary encoded: <literal>"/v/+8A==".</literal></para>
    </section>
    <section>
      <title>Cell motion analytics engine</title>
      <para>A cell motion detector determines the motion in an image. For this, the image is subdivided into square or rectangle sensor fields, denoted as cells. A cell is based on a number of pixels, for example, an 5×5 cell is a cell of 25 pixels. The detector tries simply to estimate motion in each cell.</para>
      <para>A cell motion detector consists of two units: AnalyticsModule and Rule. AnalyticsModule consists of two parameters: "CellLayout" and "Sensitivity" as listed in <xref linkend="_Ref11058715" />. The latter can adjust the motion detector to the environment to which the camera is subjected. For lower sensitivity values higher variations of the luminance values are needed to be identified as motion. Hence, a low sensitivity can be used to suppress estimated motion due to noise.</para>
      <para>The subdivision of the sensor fields depends on the analytics engine and cannot be modified by the user. The type "tt:<phrase>CellLayout</phrase>", which describes the cell structure, consists of the following three <phrase>elements: "Columns", "Rows", and "Transformation". The first two parameters describe the number of cells in the X and Y directions. The first cell is located in the upper</phrase><phrase>left -hand corner and the last cell in the lower right-hand corner. The parameter "Transformation" maps the frame coordinate system (see</phrase><xref linkend="_Ref208712096" /><phrase>) to the cell grid. The origin of the new coordinate</phrase> system is the upper left-hand corner of the upper left-hand cell. The unit dimension in X direction corresponds to the cell width and the unit dimension in Y direction corresponds to the cell height.</para>
      <section>
        <title>Module configuration</title>
        <para>Cell motion analytics engine module configuration is described by analytics module description language;</para>
        <programlisting><![CDATA[<tt:AnalyticsModuleDescription Name="tt:CellMotionEngine">
  <tt:Parameters>
    <tt:SimpleItemDescription Name="Sensitivity"
      Type="xs:integer"/>
    <tt:ElementItemDescription Name="Layout" Type="tt:CellLayout"/>
  </tt:Parameters>
</tt:AnalyticsModuleDescription>
]]></programlisting>
        <table xml:id="_Ref11058715">
          <title>Module configuration parameters</title>
          <tgroup cols="2">
            <colspec colname="c1" colwidth="22*" />
            <colspec colname="c2" colwidth="78*" />
            <thead>
              <row>
                <entry>
                  <para>Parameter name</para>
                </entry>
                <entry>
                  <para>Description</para>
                </entry>
              </row>
            </thead>
            <tbody valign="top">
              <row>
                <entry>
                  <para>Sensitivity</para>
                </entry>
                <entry>
                  <para>The lower the value of the sensitivity is set, the higher the variations of the luminance values need to be in order to be identified as motion. Hence, a low sensitivity can be used to suppress estimated motion due to noise.</para>
                  <para>Range is 0 to 100</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>Layout</para>
                </entry>
                <entry>
                  <para>The layout is typically defined by the hardware of the motion detector.</para>
                  <para>It is fixed and cannot be altered. The layout structure defines the size of the cell array as well as their mapping to the video image.</para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <para>The definition uses tt:CellLayout data structure defined as;</para>
        <programlisting><![CDATA[<xs:complexType name="CellLayout">
  <xs:sequence>
    <xs:element name="Transformation" type="tt:Transformation"/>
    <xs:any namespace="##any" processContents="lax"
      minOccurs="0" maxOccurs="unbounded"/>
  </xs:sequence>
  <xs:attribute name="Columns"        type="xs:integer" use="required"/>
  <xs:attribute name="Rows"           type="xs:integer" use="required"/>
  <xs:anyAttribute processContents="lax"/>
</xs:complexType>
]]></programlisting>
        <table>
          <title>Description of CellLayout fields</title>
          <tgroup cols="2">
            <colspec colname="c1" colwidth="22*" />
            <colspec colname="c2" colwidth="78*" />
            <thead>
              <row>
                <entry>
                  <para>Parameter name</para>
                </entry>
                <entry>
                  <para>Description</para>
                </entry>
              </row>
            </thead>
            <tbody valign="top">
              <row>
                <entry>
                  <para>Columns</para>
                </entry>
                <entry>
                  <para>Number of columns of the cell grid (x dimension)</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>Rows</para>
                </entry>
                <entry>
                  <para>Number of rows of the cell grid (y dimension).</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>Transformation</para>
                </entry>
                <entry>
                  <para>Mapping of the cell grid to the Video frame.</para>
                  <para>The cell grid is starting from the upper left corner and x dimension is going from left to right and the y dimension from up to down.</para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <para>An example of a configuration of a CellMotionEngine is shown below where an 8x6-cell motion detector is depicted. The video image is assumed to have the size 180×150 pixels. The cells have a dimension of 15×15 pixels and the size of the working area of the cell motion detector is 120×90 pixels</para>
        <figure xml:id="_Ref272497397">
          <title>CellLayout of an 8×6 CellMotionEngine</title>
          <mediaobject>
            <imageobject>
              <imagedata fileref="media/Analytics/cellLayout.svg" contentwidth="160mm"></imagedata>
            </imageobject>
          </mediaobject>
        </figure>
        <programlisting><![CDATA[<tt:VideoAnalyticsConfiguration>
  <tt:AnalyticsEngineConfiguration>
    <tt:AnalyticsModule Name="MyCellMotion" Type="tt:CellMotionEngine">
      <tt:Parameters>
        <tt:SimpleItem Name="Sensitivity" Value="90"/>
        <tt:ElementItem Name="Layout">
          <tt:CellLayout Columns="8" Rows="6">
            <tt:Transformation>
              <tt:Translate x="-0.66666" y="0.6" />
              <tt:Scale x="0.1666666" y="-0.2" />
            </tt:Transformation>
          </tt:CellLayout>
        </tt:ElementItem>
      </tt:Parameters>
    </tt:AnalyticsModule>
  </tt:AnalyticsEngineConfiguration>
]]></programlisting>
      </section>
    </section>
  </appendix>
  <appendix>
    <title>Motion detection (normative)</title>
    <section>
      <title>Motion region detector</title>
      <para>The region motion detector detects any motion against the specified motion region. The rule is configured for an area (region of interest on the image source) which can be armed or disarmed. The region shall be defined by a Polygon structure. Although this rule is defined within the context of the analytics service, it is intended to allow configuration of hardware motion detection as opposed to motion detection from scene description data. For a description of the parameters see <xref linkend="_Ref522789617" />.</para>
      <programlisting><![CDATA[<tt:RuleDescription Name="tt:MotionRegionDetector">
  <tt:Parameters>
    <tt:ElementItemDescription Name="MotionRegion" Type="axt:MotionRegionConfig"/>
</tt:Parameters>
<tt:Messages IsProperty="true">
  <tt:Source>
    <tt:SimpleItemDescription Name="VideoSource" Type="tt:ReferenceToken"/>
    <tt:SimpleItemDescription Name="RuleName" Type="xs:string"/>
  </tt:Source>
  <tt:Key/>
  <tt:Data>
    <tt:SimpleItemDescription	Name="State" Type="xs:boolean"/>
  </tt:Data>
  <tt:ParentTopic>tns1:RuleEngine/MotionRegionDetector/Motion</tt:ParentTopic>
</tt:Messages>
</tt:RuleDescription>
]]></programlisting>
      <para>The above rule description defines that a rule instance produces an event attached to the topic tns1:RuleEngine/MotionRegionDetector/Motion with the state field defined in <xref linkend="_Ref522790105" />. Calling the GetRuleOptions operation with the tt:MotionRegionDetector type will return a axt:MotionRegionConfigOptions with parameters defined in <xref linkend="_Ref522789734" />.</para>
      <table xml:id="_Ref522789617">
        <title>Motion region detector rule configuration parameters</title>
        <tgroup cols="2">
          <colspec colname="c1" colwidth="22*" />
          <colspec colname="c2" colwidth="78*" />
          <thead>
            <row>
              <entry>
                <para>Parameter Name</para>
              </entry>
              <entry>
                <para>Description</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry>
                <para>Armed</para>
              </entry>
              <entry>
                <para>Indicates if the Motion Region is armed (detecting motion) or disarmed (motion is not being detected).</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Polygon</para>
              </entry>
              <entry>
                <para>Provides the points of a polygon that is specified within a region defined by Bounds element of VideoSourceConfiguration. If the device does not support polygons, the points in the polygon must represent a rectangle.</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Sensitivity</para>
              </entry>
              <entry>
                <para>Indicates the sensitivity level of the motion detector for this region. The sensitivity value is normalized where 0 represents the lower sensitivity where significant motion is required to trigger an alarm and 1 represents the higher sensitivity where very little motion is required to trigger an alarm.</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>PresetToken</para>
              </entry>
              <entry>
                <para>PTZ Preset position associated with the motion region defined by polygon. If no PresetToken is present the motion region shall behave as a screen element, and stay on the same screen coordinates as the PTZ moves (like a head up display mask). If PresetToken is present the motion region shall be active only when completely contained in the Field of View.</para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <table xml:id="_Ref522789734">
        <title>Motion region detector rule configuration options</title>
        <tgroup cols="2">
          <colspec colname="c1" colwidth="29*" />
          <colspec colname="c2" colwidth="71*" />
          <thead>
            <row>
              <entry>
                <para>Parameter Name</para>
              </entry>
              <entry>
                <para>Description</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry>
                <para>MaxRegions</para>
              </entry>
              <entry>
                <para>The total number of Motion Region Detector rules that can be created on the device. This element is deprecated. maxInstances in the GetSupportedRules shall be used instead.</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>DisarmSupport</para>
              </entry>
              <entry>
                <para>True if the device supports disarming a Motion Region Detector rule.</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>PolygonSupport</para>
              </entry>
              <entry>
                <para>True if the device supports defining a region using a Polygon instead of a rectangle. The rectangle points are still passed using a Polygon element if the device does not support polygon regions. In this case, the points provided in the Polygon element must represent a rectangle.</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>PolygonLimits</para>
              </entry>
              <entry>
                <para>For devices that support Polygons with limitations on the number of points, provides the minimum and maximum number of points that can be defined in the Polygon.</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>RuleNotification</para>
              </entry>
              <entry>
                <para>Indicates the device will supply the Name of the Rule that triggered the motion.</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>SingleSensitivitySupport</para>
              </entry>
              <entry>
                <para>Indicates the device can only support one sensitivity level for all defined motion detection regions. Changing the sensitivity for one region would be applied to all regions.</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>PTZPresetMotionSupport</para>
              </entry>
              <entry>
                <para>Indicates the support for PTZ preset based motion detection, if supported Preset token can be associated with a motion region.</para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <table xml:id="_Ref522790105">
        <title>Description of the motion region detector event fields</title>
        <tgroup cols="2">
          <colspec colname="c1" colwidth="22*" />
          <colspec colname="c2" colwidth="78*" />
          <thead>
            <row>
              <entry>
                <para>Parameter Name</para>
              </entry>
              <entry>
                <para>Description</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry>
                <para>State</para>
              </entry>
              <entry>
                <para>True (motion is detected) or False (motion is not detected)</para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
    </section>
  </appendix>
  <appendix>
    <title>Radiometry (normative)</title>
    <para>This Annex describes Analytics Modules and Rules used for Radiometry. These are supported by thermal imaging Devices that have been radiometrically calibrated, and thus can provide the absolute temperature values for points on the image. The Radiometry capability is indicated in the Thermal Service, as well as in the Get Service Capabilities Response of the Analytics Service.</para>
    <para>Radiometric video sources offer Analytics Configuration Modules for the Client to declare those points or areas on the image for which Temperature measurements shall be provided. These Temperature Measurements are provided by these Modules as streaming Metadata.</para>
    <para>In order to calculate the temperature for a point in the image, a number of parameters are needed. These <emphasis role="bold">Radiometry Parameters</emphasis> include distance to the object being measured, emissivity of its surface, ambient temperature, and optional parameters such as relative humidity, atmospheric transmittance, etc.</para>
    <para>To simplify the creation of new Analytics Modules, or the update of parameters that could be common to all the Active measurements, a set of <emphasis role="bold">Global Radiometry Parameters</emphasis> is defined for the Device, in the Thermal Service Configuration.</para>
    <para>This specification covers the two most common measurement modules offered by radiometric devices today: Spots and Boxes.</para>
    <para>A <emphasis role="bold">Spot Measurement Module</emphasis> shall provide the absolute temperature value for a point on the image (this could be a pixel, or small pixel cluster, depending on the lens/resolution of the device).</para>
    <para>A <emphasis role="bold">Box Measurement Module</emphasis> provides a number of different temperature values which are calculated based on the temperature values of the points contained in a rectangular area of the image. These <emphasis role="bold">BoxTemperatureTypes</emphasis> can be, for example, the Maximum temperature value for the points contained in the rectangular area, or the Minimum value, Average, Median, etc.</para>
	<para>A <emphasis role="bold">Temperature Measurement Module</emphasis> provides a generic configuration for Spot, Box and BodyTemperature measurement using the generic description language defined in section <xref linkend="_Ref515972960"/></para>
    <para>
      <emphasis role="bold">Radiometry Rules</emphasis> can be defined using the Rules Engine. These Rules trigger alarms based on <emphasis role="bold">TemperatureConditions</emphasis> of the output of their associated Analytics Module. Temperature Conditions supported by Devices can include, for example, LessThan (threshold), MoreThan, EqualTo, etc.</para>
    <para>This specification describes three very simple rules, the <emphasis role="bold">RadiometryTemperatureRule</emphasis>, a generic measurement rule <emphasis role="bold">TemperatureMeasurementRule</emphasis> and the <emphasis role="bold">BodyTemperatureRule</emphasis>. All these three rules are based on a single Measurement Analytics Module output. These rules shall provide an Event when the TemperatureCondition is met by the selected output (Temperature Value) of the Analytics Module on which they are defined.</para>
    <para>
      <emphasis role="bold">Radiometry Analytics Module Options</emphasis> are provided by the GetAnalyticsModuleOptions Response, as described in the Analytics Service. Options and Types are described in the <emphasis role="bold">Radiometry Schema</emphasis>, (radiometry.xsd), under /Analytics.</para>
    <para>
      <emphasis role="bold">Radiometry Rule Options</emphasis> are provided by the GetRuleOptions Response, as described in the Analytics Service. Options and Types for Radiometry Rules are also described in radiometry.xsd.</para>
    <para>The following diagram illustrates the different elements specified for Radiometry, and the relationships and data flows between the different Analytics Modules and Rules, Temperature Measurement Metadata and Temperature Alarm Events.</para>
    <figure>
      <title>Radiometry Analytics Modules, Rules, Metadata and Events</title>
      <mediaobject>
        <imageobject>
          <imagedata fileref="media/Analytics/image21.jpeg" contentwidth="154.42mm" />
        </imageobject>
      </mediaobject>
    </figure>
    <para>The current specification covers three different types of Analytics Modules for Radiometry: Spot, Box and Generic temperature measurement module.</para>
    <para>All three modules can be defined as “Screen” elements, fixed points/area on the image, or as “Geo-referenced” elements, points/area in a specific location in the PTZ space around the Device.</para>
    <para>“Screen” Spots are defined using an (x,y) tt:Vector, which describes a point on the image. Similarly, “Screen” Boxes are defined using a tt:Rectangle, which describes a rectangle on the image. Its coordinates assume a normalized screen [(-1.0,1.0), (-1.0,1.0)], with the center at (0.0,0.0). In PTZ Devices, when the PTZ moves, these screen elements shall behave as OSD masks, and remain on the same relative position of the image as the PTZ moves. Temperature measurements require the image to stabilize, so valid temperature values will normally only be produced and sent as Metadata a number of seconds after the PTZ stops. This acquisition time will vary among different Devices.</para>
    <para>“Geo-referenced” Spots can be defined using an (x,y) tt:Vector, together with a tt:PTZVector, and the “Distance to Object” radiometric parameter of the Analytics Module. “Geo-referenced” Boxes share the same definition, with a tt:Rectangle to define their shape and absolute position on the screen.</para>
    <para>For Geo-referenced Spot/Box creation, two use cases are contemplated:</para>
    <orderedlist numeration="lowerroman">
      <listitem>
        <para>Spot/Box is created in the current field of view: the Client shall provide the tt:Vector, or tt:Rectangle for Boxes, and query PTZStatus to provide the current PTZVector as Parameter. Specifying the PTZVector shall indicate the Device that this Spot/Box is “geo-referenced” to that location. The Device can then normalize this PTZVector to store the tt:Vector, or tt:Rectangle, referenced to the center of the image.</para>
      </listitem>
      <listitem>
        <para>Spot is created in a location outside the current field of view, or Box is not completely contained in the current field of view: the Client can either provide individually a tt:Vector, or tt:Rectangle, and a PTZVector (as in previous case), or just provide the PTZVector (and Distance) , assuming the tt:Vector, or tt:Rectangle, to be centered in the image.</para>
      </listitem>
    </orderedlist>
    <para>For Screen Spot or Box Module creation, the Client shall just provide the tt:Vector, or tt:Rectangle, which defines the position of the element on the image, independently of the PTZStatus.</para>
    <section>
      <title>Radiometry Analytics Modules</title>
      <para>Calling the GetAnalyticsModuleOptions operation with the ttr:RadiometryModule type shall return a ttr:RadiometryModuleConfigOptions, as well as ttr:RadiometrySpotModuleOptions and ttr:RadiometryBoxModuleOptions, if Spot and Box Modules are supported by the Device.</para>
      <table>
        <title>Radiometry Module configuration options</title>
        <tgroup cols="2">
          <colspec colname="c1" colwidth="33*" />
          <colspec colname="c2" colwidth="67*" />
          <thead>
            <row>
              <entry>
                <para>Parameter Name</para>
              </entry>
              <entry>
                <para>Description</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry>
                <para>MaxMeasurementModules</para>
              </entry>
              <entry>
                <para>The total number of Radiometry Analytics Modules that can be created on the device (Spots, Boxes, Geo or Screen).</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>MaxScreenSpots</para>
              </entry>
              <entry>
                <para>The total number of spot measurement modules that can be loaded simultaneously on the screen by the device. A value of 0 shall be used to indicate no support for Spots.</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>MaxScreenBoxes</para>
              </entry>
              <entry>
                <para>The total number of box measurement modules that can be loaded simultaneously on the screen by the device. A value of 0 shall be used to indicate no support for Boxes.</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>RadiometryParameterOptions</para>
              </entry>
              <entry>
                <para>Specifies valid ranges for the different radiometry parameters used for temperature calculation:</para>
                <itemizedlist>
                  <listitem>
                    <para>ReflectedAmbientTemperature</para>
                  </listitem>
                  <listitem>
                    <para>Emissivity</para>
                  </listitem>
                  <listitem>
                    <para>DistanceToObject</para>
                  </listitem>
                  <listitem>
                    <para>RelativeHumidity</para>
                  </listitem>
                  <listitem>
                    <para>AtmosphericTemperature</para>
                  </listitem>
                  <listitem>
                    <para>AtmosphericTransmittance</para>
                  </listitem>
                  <listitem>
                    <para>ExtOpticsTemperature</para>
                  </listitem>
                  <listitem>
                    <para>ExtOpticsTransmittance</para>
                  </listitem>
                </itemizedlist>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <section>
        <title>Spot Measurement Module</title>
        <para>A Spot Measurement Analytics Module provides the temperature value for a point on the image of its radiometrically calibrated Video Source.</para>
        <para>As described in the introduction of this Annex, Spot Measurement Modules can be defined as “Screen” elements, points on the image, or as “Geo-referenced” elements, points in the PTZ space around the Device. The use of the “AbsoluteCoords” item will allow to differentiate this behaviour.</para>
        <programlisting><![CDATA[<tt:AnalyticsModuleDescription Name="ttr:RadiometrySpot">
  <tt:Parameters>
    <tt:ElementItemDescription Name="RadiometrySpot"
                               Type="ttr:RadiometrySpotModuleConfig"/>
  </tt:Parameters>
  <tt:MessageDescription>
    <tt:Source>
      <tt:SimpleItemDescription Name="VideoSourceToken" Type="tt:ReferenceToken"/>
      <tt:SimpleItemDescription Name="VideoAnalyticsConfigurationToken"
                                Type="tt:ReferenceToken"/>
      <tt:SimpleItemDescription Name="AnalyticsModuleName" Type="xs:string"/>
    </tt:Source>
    <tt:Data>
      <tt:SimpleItemDescription Name="TimeStamp" Type="xs:dateTime"/>
      <tt:ElementItemDescription Name="Reading" Type="ttr:SpotTemperatureReading"/>
    </tt:Data>
    <tt:ParentTopic>
      tns1:VideoAnalytics/Radiometry/SpotTemperatureReading
    </tt:ParentTopic>
  </tt:MessageDescription>
</tt:AnalyticsModuleDescription>
]]></programlisting>
        <para>The above analytics module description defines that a Spot Module instance produces Measurement Events (when new temperature values are produced by the video source), attached to the topic <emphasis role="bold">tns1:</emphasis><emphasis role="bold">VideoAnalytics/Radiometry/SpotTemperatureReading</emphasis>. These <emphasis role="bold">Temperature Measurement Events</emphasis> shall contain the following data payload:</para>
        <programlisting><![CDATA[<xs:complexType name="SpotTemperatureReading">
  <xs:sequence>
    <xs:element name="RadiometryParameters" type="ttr:RadiometryParameters" minOccurs="0">
      <xs:annotation>
        <xs:documentation>
          Not present means Global Parameters from Thermal Service are being used.
        </xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
  </xs:sequence>
  <xs:attribute name="ItemID" type="tt:ReferenceToken"/>
  <xs:attribute name="SpotTemperature" type="xs:float" use="required"/>
  <xs:anyAttribute processContents="lax"/>
</xs:complexType>
]]></programlisting>
        <table>
          <title>RadiometrySpotModuleConfig</title>
          <tgroup cols="2">
            <colspec colname="c1" colwidth="26*" />
            <colspec colname="c2" colwidth="74*" />
            <thead>
              <row>
                <entry>
                  <para>Parameter Name</para>
                </entry>
                <entry>
                  <para>Description</para>
                </entry>
              </row>
            </thead>
            <tbody valign="top">
              <row>
                <entry>
                  <para>ItemID</para>
                </entry>
                <entry>
                  <para>Unique identifier for this Temperature Measurement Analytics Module.</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>Active</para>
                </entry>
                <entry>
                  <para>Indicates if the Temperature Measurement Item is enabled to provide temperature readings.</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>ScreenCoords</para>
                </entry>
                <entry>
                  <para>Screen coordinates, if spot is currently on screen. Assumes normalized screen limits (-1.0, 1.0).</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>AbsoluteCoords</para>
                </entry>
                <entry>
                  <para>Absolute orientation of the PTZ Vector with the Spot on screen. If no PTZVector is present the spot shall behave as a screen element, and stay on the same screen coordinates as the PTZ moves (like a head up display mask). If PTZVector is present the Spot element shall appear on display only when contained in the Field of View. In this case SpotScreenCoords shall be reported as relative to PTZVector.</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>RadiometryParameters</para>
                </entry>
                <entry>
                  <para>Not present parameter means the Device shall use its value from Global Parameters in Thermal Service.</para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <table>
          <title>Description of the Radiometry Spot Module event fields</title>
          <tgroup cols="2">
            <colspec colname="c1" colwidth="29*" />
            <colspec colname="c2" colwidth="71*" />
            <thead>
              <row>
                <entry>
                  <para>Parameter Name</para>
                </entry>
                <entry>
                  <para>Description</para>
                </entry>
              </row>
            </thead>
            <tbody valign="top">
              <row>
                <entry>
                  <para>SpotTemperatureReading</para>
                </entry>
                <entry>
                  <para>Data structure with the different measurement parameters and the actual temperature measurement:</para>
                  <para>ItemID</para>
                  <para>SpotTemperature: Actual value of the measured Temperature.</para>
                  <para>RadiometryParameters: Not present means Global Parameters from Thermal Service are being used.</para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </section>
      <section>
        <title>Box Measurement Module</title>
        <para>A Box Measurement Analytics Module provides several temperature values which are based on the temperature of the points contained within a rectangular region, defined on the image of its radiometrically calibrated Video Source.</para>
        <para>As Spots, Box Measurement Modules can also be defined as “Screen” elements, or fixed rectangle on the image, or as “Geo-referenced” elements, representing an area in the PTZ space around the Device. Again, the use of the tt:PTZVector shall define if the Box shall behave as a screen element, or if it is assigned to a specific PTZStatus.</para>
        <programlisting><![CDATA[<tt:AnalyticsModuleDescription Name="ttr:RadiometryBox">
  <tt:Parameters>
    <tt:ElementItemDescription Name="RadiometryBox"
                               Type="ttr:RadiometryBoxModuleConfig"/>
  </tt:Parameters>
  <tt:MessageDescription>
    <tt:Source>
      <tt:SimpleItemDescription Name="VideoSourceToken" Type="tt:ReferenceToken"/>
      <tt:SimpleItemDescription Name="VideoAnalyticsConfigurationToken"
                                Type="tt:ReferenceToken"/>
      <tt:SimpleItemDescription Name="AnalyticsModuleName" Type="xs:string"/>
    </tt:Source>
    <tt:Data>
      <tt:SimpleItemDescription Name="TimeStamp" Type="xs:dateTime"/>
      <tt:ElementItemDescription Name="Reading" Type="ttr:BoxTemperatureReading"/>
    </tt:Data>
    <tt:ParentTopic>
      tns1:VideoAnalytics/Radiometry/BoxTemperatureReading
    </tt:ParentTopic>
  </tt:MessageDescription>
</tt:AnalyticsModuleDescription>
]]></programlisting>
        <para>The above analytics module description defines that a Box Module instance produces Measurement Events (when new temperature values are produced by the video source), attached to the topic <emphasis role="bold">tns1:</emphasis><emphasis role="bold">VideoAnalytics/Radiometry/BoxTemperatureReading</emphasis>. These <emphasis role="bold">Temperature Measurement Events</emphasis> shall contain the following data payload:</para>
        <programlisting><![CDATA[<xs:complexType name="BoxTemperatureReading">
  <xs:sequence>
    <xs:element name="RadiometryParameters" type="ttr:RadiometryParameters"
                minOccurs="0">
      <xs:annotation>
        <xs:documentation>
          Not present means Global Parameters from Thermal Service are being used.
        </xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:any namespace="##any" processContents="lax" minOccurs="0"
            maxOccurs="unbounded"/>
  </xs:sequence>
  <xs:attribute name="ItemID" type="tt:ReferenceToken" use="required"/>
  <xs:attribute name="MaxTemperature" type="xs:float" use="required"/>
  <xs:attribute name="MinTemperature" type="xs:float" use="required"/>
  <xs:attribute name="AverageTemperature" type="xs:float"/>
  <xs:atrribute name="MedianTemperature" type="xs:float"/>
  <xs:anyAttribute processContents="lax"/>
</xs:complexType>
]]></programlisting>
        <table>
          <title>RadiometryBox Analytics Module configuration parameters in ttr:RadiometryBoxModuleConfig</title>
          <tgroup cols="2">
            <colspec colname="c1" colwidth="26*" />
            <colspec colname="c2" colwidth="74*" />
            <thead>
              <row>
                <entry>
                  <para>Parameter Name</para>
                </entry>
                <entry>
                  <para>Description</para>
                </entry>
              </row>
            </thead>
            <tbody valign="top">
              <row>
                <entry>
                  <para>ItemID</para>
                </entry>
                <entry>
                  <para>Unique identifier for this Temperature Measurement Analytics Module.</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>Active</para>
                </entry>
                <entry>
                  <para>Indicates if the Temperature Measurement Item is enabled to provide temperature readings.</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>ScreenCoords</para>
                </entry>
                <entry>
                  <para>Screen coordinates, if box is currently completely contained on the screen. Assumes normalized screen limits (-1.0, 1.0).</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>AbsoluteCoords</para>
                </entry>
                <entry>
                  <para>Absolute orientation of the PTZ Vector with the Box on screen. If no PTZVector is present the box shall behave as a screen element, and stay on the same screen coordinates as the PTZ moves (like a head up display mask). If PTZVector is present the Box element shall appear on display only when completely contained in the Field of View. In this case BoxScreenCoords shall be reported as relative to PTZVector.</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>RadiometryParameters</para>
                </entry>
                <entry>
                  <para>Not present parameter means the Device shall use its value from Global Parameters in Thermal Service.</para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <table>
          <title>Description of the Radiometry Box Module event fields</title>
          <tgroup cols="2">
            <colspec colname="c1" colwidth="28*" />
            <colspec colname="c2" colwidth="72*" />
            <thead>
              <row>
                <entry>
                  <para>Parameter Name</para>
                </entry>
                <entry>
                  <para>Description</para>
                </entry>
              </row>
            </thead>
            <tbody valign="top">
              <row>
                <entry>
                  <para>BoxTemperatureReading</para>
                </entry>
                <entry>
                  <para>Data structure with the different measurement parameters and the actual temperature measurement:</para>
                  <para>ItemID</para>
                  <para>Supported Temperature Values: MaxTemperature, MinTemperature, AverageTemperature, MedianTemperature.</para>
                  <para>RadiometryParameters: Not present means Global Parameters from Thermal Service are being used.</para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </section>
	  <section  xml:id="_refTempMeasurementModule">
        <title>Temperature Measurement Module</title>
        <para>Generic Temperature measurement module defined below can be used to configure any of the following: spot, box or body temperature. For new implementations it is recommended to use this configuration, to utilize the generic description language.</para>
        <para>For options this module refers to the generic description language defined in <xref linkend="_Ref515972960"/></para>
		 <programlisting><![CDATA[
	<tt:AnalyticsModuleDescription Name="tt:TemperatureMeasurement">
	<tt:Parameters>
	  <tt:SimpleItemDescription Name="Enable" Type="xs:boolean"/>
	  <tt:SimpleItemDescription Name="Mode" Type="xs:string"/>
	  <tt:SimpleItemDescription Name="ReflectedAmbientTemperature" Type="xs:float"/>
	  <tt:SimpleItemDescription name="Emissivity" type="xs:float"/>
	  <tt:SimpleItemDescription name="DistanceToObject" type="xs:float"/>
	  <tt:SimpleItemDescription name="RelativeHumidity" type="xs:float"/>
	  <tt:SimpleItemDescription name="AtmosphericTemperature" type="xs:float"/>
	  <tt:SimpleItemDescription name="AtmosphericTransmittance" type="xs:float"/>
	  <tt:SimpleItemDescription name="ExtOpticsTemperature" type="xs:float"/>
	  <tt:SimpleItemDescription name="ExtOpticsTransmittance" type="xs:float"/>
	  <tt:SimpleItemDescription name="PresetToken" type="xs:string"/>
	  <tt:ElementItemDescription Name="MeasurementPoint" Type="tt:Rectangle"/>
	  <tt:ElementItemDescription Name="MeasurementRegion" Type="tt:Polygon"/>
	</tt:Parameters>
	<tt:MessageDescription>
	<tt:Source>
	  <tt:SimpleItemDescription Name="VideoSource" Type="tt:ReferenceToken"/>
	  <tt:SimpleItemDescription Name="AnalyticsModuleName" Type="xs:string"/>
	</tt:Source>
	<tt:Data>
	  <tt:SimpleItemDescription Name="SpotReading" Type="xs:float"/>
	  <tt:SimpleItemDescription Name="MinTemperature" Type="xs:float"/>
	  <tt:SimpleItemDescription Name="MaxTemperature" Type="xs:float"/>
	  <tt:SimpleItemDescription Name="AverageTemperature" Type="xs:float"/>
	  <tt:SimpleItemDescription Name="MedianTemperature" Type="xs:float"/>
	</tt:Data>
	<tt:ParentTopic>
	  tns1:VideoAnalytics/Radiometry/TemperatureReading
	</tt:ParentTopic>
	</tt:MessageDescription>
</tt:AnalyticsModuleDescription>
]]></programlisting>

 <para>Temperature measurement module has the following parameters<xref linkend="GEN_TM_Fields"/>  and  TemperatureReading Event has following parameters <xref linkend="GEN_TR_EV_Fields" /> .</para>
      <table xml:id="GEN_TM_Fields">
        <title>Temperature measurement analytics module fields</title>
        <tgroup cols="3">
          <colspec colname="c1" colwidth="21*" />
          <colspec colname="c2" colwidth="54*" />
          <colspec colname="c3" colwidth="25*" />
          <thead>
            <row>
              <entry>
                <para>Field</para>
              </entry>
              <entry>
                <para>Description</para>
              </entry>
              <entry>
                <para>
                  <emphasis role="bold">Requirement Level</emphasis>
                </para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry>
                <para>Enable</para>
              </entry>
              <entry>
                <para>To enable or disable the measurement module</para>
              </entry>
              <entry>
                <para>Mandatory</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Mode</para>
              </entry>
              <entry>
                <para>Operating mode, eg., it can either operate as Spot, Box or BodyTemperature  modes,  actual supported modes would be listed in options</para>
              </entry>
              <entry>
                <para>Mandatory</para>
              </entry>
            </row>
			<row>
              <entry>
                <para><emphasis role="bold">Radiometry parameters:</emphasis>
				ReflectedAmbientTemperature,
				Emissivity,DistanceToObject,
				RelativeHumidity,
				AtmosphericTemperature,
				AtmosphericTransmittance,
				ExtOpticsTemperature,
				ExtOpticsTransmittance</para>
              </entry>
              <entry>
                <para>Radiometry parameters, if this is not supported global radiometry parameters are applicable</para>
              </entry>
              <entry>
                <para>Optional</para>
              </entry>
            </row>
			<row>
              <entry>
                <para>PresetToken</para>
              </entry>
              <entry>
                <para>PTZ Preset position associated with spot, box or bodytemperature measurement location. If no PresetToken is present measurement location behaves as a screen element, and stays on the same screen coordinates as the PTZ moves (like a head up display mask). If PresetToken is present the measurement location shall be active only when it's completely contained in the Field of View</para>
              </entry>
              <entry>
                <para>Optional</para>
              </entry>
            </row>
			<row>
              <entry>
                <para>MeasurementPoint</para>
              </entry>
              <entry>
                <para>Screen coordinates where temperature needs to be measured. Applicable when the mode is Spot temperature measurement.</para>
              </entry>
              <entry>
                <para>Optional</para>
              </entry>
            </row>
			<row>
              <entry>
                <para>MeasurementRegion</para>
              </entry>
              <entry>
                <para>Polygon region where temperature has to be measured. Applicable when the mode is box or body temperature measurement</para>
              </entry>
              <entry>
                <para>Optional</para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
	  <table xml:id="GEN_TR_EV_Fields">
          <title>Description of the TemperatureReading meta event fields</title>
          <tgroup cols="2">
            <colspec colname="c1" colwidth="28*" />
            <colspec colname="c2" colwidth="72*" />
            <thead>
              <row>
                <entry>
                  <para>Parameter Name</para>
                </entry>
                <entry>
                  <para>Description</para>
                </entry>
              </row>
            </thead>
            <tbody valign="top">
              <row>
                <entry>
                  <para>SpotReading</para>
                </entry>
                <entry>
                  <para>Provides the temperature of the configured screen coordinates in Kelvin, applicable only when the operating mode is set to Spot.</para>
                </entry>				
              </row>
			   <row>
			   <entry>
                  <para>MinTemperature</para>
                </entry>
                <entry>
                  <para>Provides the minimum temperature within the configured region in Kelvin, applicable only when the operating mode is set to Box.</para>
                </entry>
				 </row>
				  <row>
			   <entry>
                  <para>MaxTemperature</para>
                </entry>
                <entry>
                  <para>Provides the maximum temperature within the configured region in Kelvin, applicable only when the operating mode is set to Box.</para>
                </entry>
				 </row>
				  <row>
			   <entry>
                  <para>AverageTemperature</para>
                </entry>
                <entry>
                  <para>Provides the average temperature within the configured region in Kelvin, applicable only when the operating mode is set to Box.</para>
                </entry>
				 </row>
				  <row>
			   <entry>
                  <para>MedianTemperature</para>
                </entry>
                <entry>
                  <para>Provides the median temperature within the configured region in Kelvin, applicable only when the operating mode is set to Box.</para>
                </entry>
				 </row>
            </tbody>
          </tgroup>
        </table>
	</section>
    </section>
    <section>
      <title>Radiometry Rules</title>
      <para>The following radiometry rules are defined, RadiometryTemperatureRule and TemperatureMeasurementRule.</para>
      <section>
        <title>RadiometryTemperatureRule</title>
      <para>Calling the GetRuleOptions operation with the ttr:RadiometryRule type shall return an ttr:RadiometryRuleConfigOptions, as well as ttr:RadiometryTemperatureRuleConfig, if Radiometry Rules are supported by the Device.</para>
      <table>
        <title>Radiometry Rule configuration options</title>
        <tgroup cols="2">
          <colspec colname="c1" colwidth="37*" />
          <colspec colname="c2" colwidth="63*" />
          <thead>
            <row>
              <entry>
                <para>Parameter Name</para>
              </entry>
              <entry>
                <para>|Description</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry>
                <para>RadiometryRuleOptions</para>
              </entry>
              <entry>
                <para>Specifies valid ranges for the temperature condition parameters used for comparison in radiometric rules:</para>
                <itemizedlist>
                  <listitem>
                    <para>Threshold Temperature</para>
                  </listitem>
                  <listitem>
                    <para>ThresholdTime</para>
                  </listitem>
                  <listitem>
                    <para>HysteresisTemperature</para>
                  </listitem>
                </itemizedlist>
              </entry>
            </row>
            <row>
              <entry>
                <para>TemperatureConditionOptions</para>
              </entry>
              <entry>
                <para>Specifies valid rule conditions for temperature comparisons in radiometric rules:</para>
                <para>LessThan, MoreThan, EqualTo, Change</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>TemperatureTypeOptions</para>
              </entry>
              <entry>
                <para>Specifies temperature measurement types provided by box measurement modules in the device:</para>
                <para>MaxTemperature, MinTemperature, StdDeviation,    MedianTemperature, ISOCoverage</para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
        <para>A Temperature Rule is the most basic rule in Radiometry. It evaluates one of the output temperature values of a single Analytics Module, to trigger Temperature Alarm events when it meets a certain condition. The Rule shall only apply when its associated Analytics Module is Active, and providing valid readings.</para>
        <programlisting><![CDATA[<xs:RuleDescription Name="ttr:RadiometryTemperatureRule">
  <xs:Parameters>
    <xs:ElementItemDescription Name="RadiometryTemperatureRule"
                               Type="ttr:RadiometryTemperatureRuleConfig"/>
  </xs:Parameters>
  <xs:MessageDescription IsProperty="true">
    <xs:Source>
      <xs:SimpleItemDescription Name="VideoSourceToken" Type="tt:ReferenceToken"/>
      <xs:SimpleItemDescription Name="VideoAnalyticsConfigurationToken"
                                Type="tt:ReferenceToken"/>
      <xs:SimpleItemDescription Name="RuleName" Type="xs:string"/>
    </xs:Source>
    <xs:Key>
      <xs:SimpleItemDescription Name="RadiometryModuleID" Type="tt:ReferenceToken"/>
    </xs:Key>
    <xs:Data>
      <xs:SimpleItemDescription Name="AlarmActive" Type="xs:boolean"/>
      <tt:SimpleItemDescription Name="TimeStamp" Type="xs:dateTime"/>
      <xs:ElementItemDescription Name="AlarmGeoLocation" Type="tt:GeoLocation"
                                 minOccurs=0/>
    </xs:Data>
    <xs:ParentTopic>
      tns1:RuleEngine/Radiometry/TemperatureAlarm
    </xs:ParentTopic>
  </xs:MessageDescription>
</xs:RuleDescription>
]]></programlisting>
        <para>The above rule description defines that a Temperature Rule instance produces Temperature Alarm Events (when temperature conditions, as specified in the rule, are met), attached to the topic <emphasis role="bold">tns1:RuleEngine/Radiometry/TemperatureAlarm</emphasis>.</para>
        <table>
          <title>RadiometryTemperatureRule configuration parameters in
            ttr:RadiometryTemperatureRuleConfig</title>
          <tgroup cols="2">
            <colspec colname="c1" colwidth="27*" />
            <colspec colname="c2" colwidth="73*" />
            <thead>
              <row>
                <entry>
                  <para>Parameter Name</para>
                </entry>
                <entry>
                  <para>Description</para>
                </entry>
              </row>
            </thead>
            <tbody valign="top">
              <row>
                <entry>
                  <para>RadiometryModuleID</para>
                </entry>
                <entry>
                  <para>Reference Token to the Measurement Analytics Module on which output the rule is defined.</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>TemperatureType</para>
                </entry>
                <entry>
                  <para>Indicates which of the temperature values provided by the Analytics Module shall be used by the rule. For Analytics Modules that provide a single Temperature output, this parameter shall be ignored, and therefore is optional.</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>RuleCondition</para>
                </entry>
                <entry>
                  <para>Indicates the type of temperature condition to check.</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>ThresholdTemperature</para>
                </entry>
                <entry>
                  <para>Indicates the temperature value the rule shall be checked against.</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>ThresholdTime</para>
                </entry>
                <entry>
                  <para>Indicates the time interval during which the rule condition shall be met to trigger an event.</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>HysteresisTemperature</para>
                </entry>
                <entry>
                  <para>Indicates the width in Kelvin of the temperature hysteresis band to be considered by the rule.</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>Enabled</para>
                </entry>
                <entry>
                  <para>Indicates if the Temperature Rule is enabled to provide temperature alarms.</para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <table>
          <title>Description of the Radiometry Temperature Rule event fields</title>
          <tgroup cols="2">
            <colspec colname="c1" colwidth="22*" />
            <colspec colname="c2" colwidth="78*" />
            <thead>
              <row>
                <entry>
                  <para>Parameter Name</para>
                </entry>
                <entry>
                  <para>Description</para>
                </entry>
              </row>
            </thead>
            <tbody valign="top">
              <row>
                <entry>
                  <para>AlarmActive</para>
                </entry>
                <entry>
                  <para>True (temperature condition is met) or False (condition not met)</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>TimeStamp</para>
                </entry>
                <entry>
                  <para>Date and time at which the rule’s temperature condition was met.</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>AlarmGeoLocation</para>
                </entry>
                <entry>
                  <para>Geo Location of the measurement triggering the Alarm (if available)</para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </section>
	  <section>
	  <title>TemperatureMeasurementRule</title>
		  <para>TemperatureMeasurementRule is a basic rule that is applicable to both Spot and Box Temperature rules. This rule works on the output of Temperature Measurement Module (<xref linkend="_refTempMeasurementModule"/>), when the mode is configured as Spot or Box.</para>
		  <para>TemperatureMeasurementRule and options follow the generic description language defined in <xref linkend="_Ref515972960" />. For description of parameters refer to <xref linkend="_RefMeasurementRuleTable" />.</para>
		   <programlisting><![CDATA[<xs:RuleDescription Name="ttr:TemperatureMeasurementRule">
  <xs:Parameters>
	<tt:SimpleItemDescription Name="TemperatureType" Type="xs:string"/>
	<tt:SimpleItemDescription Name="RuleCondition" Type="xs:string"/>
	<tt:SimpleItemDescription Name="ThresholdTemperature" Type="xs:float"/>
	<tt:SimpleItemDescription Name="HysteresisTemperature" Type="xs:float"/>
	<tt:SimpleItemDescription Name="Duration" Type="xs:duration"/>
	<tt:SimpleItemDescription Name="TemperatureMeasurementModule" Type="xs:string"/>
  </xs:Parameters>
  <xs:MessageDescription IsProperty="true">
    <xs:Source>
      <xs:SimpleItemDescription Name="VideoSourceToken" Type="tt:ReferenceToken"/>
      <xs:SimpleItemDescription Name="RuleName" Type="xs:string"/>
    </xs:Source>
    <xs:Data>
      <xs:SimpleItemDescription Name="AlarmActive" Type="xs:boolean"/>
      <xs:ElementItemDescription Name="AlarmGeoLocation" Type="tt:GeoLocation"
                                 minOccurs=0/>
    </xs:Data>
    <xs:ParentTopic>
      tns1:RuleEngine/Radiometry/TemperatureMeasurementAlarm
    </xs:ParentTopic>
  </xs:MessageDescription>
</xs:RuleDescription>
]]>
		 </programlisting>
		  <table xml:id="_RefMeasurementRuleTable">
        <title>TemperatureMeasurementRule configuration parameters </title>
        <tgroup cols="2">
          <colspec colname="c1" colwidth="22*" />
          <colspec colname="c2" colwidth="78*" />
          <thead>
            <row>
              <entry>
                <para>Parameter Name</para>
              </entry>
              <entry>
                <para>Description</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry>
                <para>TemperatureType</para>
              </entry>
              <entry>
                <para>Indicates which of the temperature values provided by the input Analytics Module
						shall be used by the rule. In the case of Analytics Modules providing a single
						Temperature Value (e.g. Spot) this parameter is ignored, and is therefore optional.</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>RuleCondition</para>
              </entry>
              <entry>
                <para>Configures the condition to check eg, LessThan, EqualTo etc., Actual supported values would be provided in options.</para>
              </entry>
            </row>
			<row>
              <entry>
                <para>ThresholdTemperature</para>
              </entry>
              <entry>
                <para>Indicates the temperature reference value the rule shall be checked against. In Kelvin.</para>
              </entry>
            </row>
			<row>
              <entry>
                <para>HysteresisTemperature</para>
              </entry>
              <entry>
                <para>Indicates the width in Kelvin of the temperature hysteresis band to be considered by the rule.</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Duration</para>
              </entry>
              <entry>
                <para>How long the configured condition should stay in the same state to generate the event.</para>
              </entry>
            </row>
			<row>
              <entry>
                <para>TemperatureMeasurementModule</para>
              </entry>
              <entry>
                <para>Name of the analytics module providing the temperature on which rule is defined.</para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
	   <table>
          <title>Description of the TemperatureMeasurementAlarm event fields</title>
          <tgroup cols="2">
            <colspec colname="c1" colwidth="22*" />
            <colspec colname="c2" colwidth="78*" />
            <thead>
              <row>
                <entry>
                  <para>Parameter Name</para>
                </entry>
                <entry>
                  <para>Description</para>
                </entry>
              </row>
            </thead>
            <tbody valign="top">
              <row>
                <entry>
                  <para>AlarmActive</para>
                </entry>
                <entry>
                  <para>True (temperature condition is met) or False (condition not met)</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>AlarmGeoLocation</para>
                </entry>
                <entry>
                  <para>Geo Location of the measurement triggering the Alarm (if available)</para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
	  </section>
	   <section>
	  <title>BodyTemperatureRule</title>
		  <para>BodyTemperatureRule works on the output of Temperature Measurement Module (<xref linkend="_refTempMeasurementModule"/>), when the mode is configured as BodyTemperature.</para>
		  <para>BodyTemperatureRule and options follow the generic description language defined in <xref linkend="_Ref515972960" />. For description of parameters refer to <xref linkend="_RefBodMeasurementRuleTable" />.</para>
		   <programlisting><![CDATA[
<tt:RuleDescription Name="tt:BodyTemperatureAlarm">
<tt:Parameters>
  <tt:SimpleItemDescription Name="ThresholdTemperature" Type="xs:float"/>
  <tt:SimpleItemDescription Name="RuleCondition" Type="xs:string"/>
  <tt:SimpleItemDescription Name="Duration" Type="xs:duration"/>
  <tt:SimpleItemDescription Name="TemperatureMeasurementModule" Type="xs:string"/>
</tt:Parameters>
<tt:Messages>
  <tt:Source>
    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoSource"/>
    <tt:SimpleItemDescription Type="xs:string“ Name="RuleName" />
  </tt:Source>
  <tt:Data>
    <tt:SimpleItemDescription Type="xs:boolean" Name="State"/>
    <tt:SimpleItemDescription Type="xs:integer" Name="ObjectId"/>
    <tt:SimpleItemDescription Type="xs:float" Name="Temperature"/>
    <tt:SimpleItemDescription Type="xs:anyURI" Name="ImageUri"/>
    <tt:SimpleItemDescription Type="xs:anyURI" Name="SceneImageUri"/>
    <tt:ElementItemDescription Type="xs:base64Binary" Name="Image"/>
    <tt:ElementItemDescription Type="xs:base64Binary" Name="SceneImage"/>
    <tt:ElementItemDescription Type="tt:Rectangle" Name="BoundingBox"/>
  </tt:Data>
  <tt:ParentTopic>tns1:RuleEngine/Radiometry/BodyTemperatureAlarm</tt:ParentTopic>
</tt:Messages>
]]>
		 </programlisting>
		  <table xml:id="_RefBodMeasurementRuleTable">
        <title>BodyTemperatureRule configuration parameters </title>
        <tgroup cols="2">
          <colspec colname="c1" colwidth="22*" />
          <colspec colname="c2" colwidth="78*" />
          <thead>
            <row>
              <entry>
                <para>Parameter Name</para>
              </entry>
              <entry>
                <para>Description</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
			<row>
              <entry>
                <para>ThresholdTemperature</para>
              </entry>
              <entry>
                <para>Indicates the temperature reference value the rule shall be checked against. In Kelvin.</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>RuleCondition</para>
              </entry>
              <entry>
                <para>Configures the condition to check eg, LessThan, EqualTo etc., Actual supported values would be provided in options.</para>
              </entry>
            </row>			
            <row>
              <entry>
                <para>Duration</para>
              </entry>
              <entry>
                <para>How long the configured condition should stay in the same state to generate the event.</para>
              </entry>
            </row>
			<row>
              <entry>
                <para>TemperatureMeasurementModule</para>
              </entry>
              <entry>
                <para>Name of the analytics module providing the temperature on which rule is defined.</para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
	   <table>
          <title>Description of the BodyTemperature event fields</title>
          <tgroup cols="2">
            <colspec colname="c1" colwidth="22*" />
            <colspec colname="c2" colwidth="78*" />
            <thead>
              <row>
                <entry>
                  <para>Parameter Name</para>
                </entry>
                <entry>
                  <para>Description</para>
                </entry>
              </row>
            </thead>
            <tbody valign="top">
              <row>
                <entry>
                  <para>State</para>
                </entry>
                <entry>
                  <para>True (temperature condition is met) or False (condition not met)</para>
                </entry>
              </row>
              <row>
                <entry>
                  <para>ObjectId</para>
                </entry>
                <entry>
                  <para>Optional Object ID of the person, whose temperature meets the condition</para>
                </entry>
              </row>
			  <row>
                <entry>
                  <para>Temperature</para>
                </entry>
                <entry>
                  <para>Optional temperature of the object in Kelvin</para>
                </entry>
              </row>
			   <row>
                <entry>
                  <para>ImageUri</para>
                </entry>
                <entry>
                  <para>Optional, uri of the object image</para>
                </entry>
              </row>
			  <row>
                <entry>
                  <para>SceneImageUri</para>
                </entry>
                <entry>
                  <para>Optional, uri of the full scene image</para>
                </entry>
              </row>
			   <row>
                <entry>
                  <para>Image</para>
                </entry>
                <entry>
                  <para>Optional, base64encoded object image</para>
                </entry>
              </row>
			   <row>
                <entry>
                  <para>SceneImage</para>
                </entry>
                <entry>
                  <para>Optional, base64encoded scene image</para>
                </entry>
              </row>
	      <row>
                <entry>
                  <para>BoundingBox</para>
                </entry>
                <entry>
                  <para>Optional , bounding box information of the object as normalized screen coordinates (-1.0, 1.0)</para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
	  </section>
    </section>
  </appendix>
  <appendix>
    <title>Tampering Detection  (normative)</title>
    <section>
      <title>Tampering Detection</title>
      <para>Tampering detection rule detects any kind of tampering to the image sensor, the Mode parameter defines the tampering detection type, tampering detection rule and options follow the generic description language defined in <xref linkend="_Ref515972960" />. For description of parameters refer to <xref linkend="_Ref11144846" />.</para>
      <programlisting><![CDATA[<tt:RuleDescription Name=“tt:TamperingDetection">
  <tt:Parameters>
    <tt:SimpleItemDescription Name="Mode" Type="xs:string"/>
    <tt:SimpleItemDescription Name="Threshold" Type="xs:float"/>
    <tt:SimpleItemDescription Name=“Duration" Type="xs:duration"/>
  </tt:Parameters>
</tt:RuleDescription>
]]></programlisting>
      <para>It can generate any of the following events based on the Mode parameter,</para>
      <programlisting><![CDATA[<tt:Messages>
  <tt:Source>
    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoSource"/>
    <tt:SimpleItemDescription Type="xs:string“ Name=" RuleName" />
  </tt:Source>
  <tt:Data>
    <tt:SimpleItemDescription Type="xsd:boolean" Name="State"/>
  </tt:Data>
  <tt:ParentTopic>tns1:VideoSource/GlobalSceneChange/AnalyticsService</tt:ParentTopic>
</tt:Messages>
<tt:Messages>
  <tt:Source>
    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoSource"/>
    <tt:SimpleItemDescription Type="xs:string“ Name=" RuleName" />
  </tt:Source>
  <tt:Data>
    <tt:SimpleItemDescription Type="xsd:boolean" Name="State"/>
  </tt:Data>
  <tt:ParentTopic>tns1:VideoSource/ImageTooDark/AnalyticsService</tt:ParentTopic>
</tt:Messages>
<tt:Messages>
  <tt:Source>
    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoSource"/>
    <tt:SimpleItemDescription Type="xs:string“ Name=" RuleName" />
  </tt:Source>
  <tt:Data>
    <tt:SimpleItemDescription Type="xsd:boolean" Name="State"/>
  </tt:Data>
  <tt:ParentTopic>tns1:VideoSource/ImageTooBlurry/AnalyticsService</tt:ParentTopic>
</tt:Messages>
<tt:Messages>
  <tt:Source>
    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoSource"/>
    <tt:SimpleItemDescription Type="xs:string“ Name=" RuleName" />
  </tt:Source>
  <tt:Data>
    <tt:SimpleItemDescription Type="xsd:boolean" Name="State"/>
  </tt:Data>
  <tt:ParentTopic>tns1:VideoSource/ImageTooBright/AnalyticsService</tt:ParentTopic>
</tt:Messages>
<tt:Messages>
  <tt:Source>
    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoSource"/>
    <tt:SimpleItemDescription Type="xs:string“ Name=" RuleName" />
  </tt:Source>
  <tt:Data>
    <tt:SimpleItemDescription Type="xsd:boolean" Name="State"/>
  </tt:Data>
  <tt:ParentTopic>tns1:VideoSource/SignalLoss</tt:ParentTopic>
</tt:Messages>
]]></programlisting>
      <table xml:id="_Ref11144846">
        <title>Tampering rule configuration parameters </title>
        <tgroup cols="2">
          <colspec colname="c1" colwidth="22*" />
          <colspec colname="c2" colwidth="78*" />
          <thead>
            <row>
              <entry>
                <para>Parameter Name</para>
              </entry>
              <entry>
                <para>Description</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry>
                <para>Mode</para>
              </entry>
              <entry>
                <para>Indicates any of the supported modes listed in the GetRuleOptionsResponse.</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Threshold</para>
              </entry>
              <entry>
                <para>Indicates the threshold level of the tampering detection algorithm, when the threshold crosses the specified value, an event is generated. The value is set according to the limits specified in the GetRuleOptionsResponse.</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Duration</para>
              </entry>
              <entry>
                <para>How long the detection values stay over the threshold to generate the event. This duration value is set according to the DurationRange specified in the GetRuleOptionsResponse.</para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <para>Sample options for the tampering detection, based on description language parameter options defined in <xref linkend="_Toc529533198" />.</para>
      <programlisting><![CDATA[<tan:GetRuleOptionsResponse>
  <tan:RuleOptions Name="Mode" RuleType="tt:TamperingDetection">
    <tt:StringItems>
      <tt:Item>GlobalSceneChange</tt:Item>
      <tt:Item>ImageTooDark</tt:Item>
      <tt:Item>ImageTooBright</tt:Item>
      <tt:Item>SignalLoss</tt:Item>
      <tt:Item>ImageTooBlurry</tt:Item>
    </tt:StringItems>
  </tan:RuleOptions>
  <tan:RuleOptions Name="Threshold" RuleType="tt:TamperingDetection">
    <tt:FloatRange>
      <tt:Min>0.0</tt:Min>
      <tt:Max>100.0</tt:Max>
    </tt:FloatRange>
  </tan:RuleOptions>
  <tan:RuleOptions Name="Duration" RuleType="tt:TamperingDetection">
    <tt:DurationRange >
      <tt:Min>PT1S</tt:Min>
      <tt:Max>PT1M</tt:Max>
    </tt:DurationRange>
  </tan:RuleOptions>
</tan:GetRuleOptionsResponse>
]]></programlisting>
    </section>
  </appendix>
  <appendix>
    <title>Face metadata values samples (informative)</title>
    <section>
      <title>Face metadata values samples</title>
      <para>The main purpose for generating face descriptions is to be able to compare the output to manually generated characteristics. Note that these manually generated characteristics may differ between countries and are not calibrated by ONVIF.</para>
      <table>
        <title>Samples For FacialShape</title>
        <tgroup cols="3">
          <colspec colname="c1" colwidth="33*" />
          <colspec colname="c2" colwidth="33*" />
          <colspec colname="c3" colwidth="33*" align="center"/>
          <thead>
            <row>
              <entry>
                <para>Feature</para>
              </entry>
              <entry>
                <para>Value</para>
              </entry>
              <entry>
                <para>Sample</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry morerows="3">
                <para>FacialShape</para>
              </entry>
              <entry>
                <para>Long</para>
              </entry>
              <entry>
                <para>
                    <inlinemediaobject>
                      <imageobject>
                        <imagedata fileref="media/Analytics/image22.png" contentwidth="25mm" />
                      </imageobject>
                    </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Round</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image23.png" contentwidth="25mm" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Square</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image24.png" contentwidth="25mm" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Oval</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image25.png" contentwidth="25mm" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <table>
        <title>Samples For HairStyle</title>
        <tgroup cols="3">
          <colspec colname="c1" colwidth="33*" />
          <colspec colname="c2" colwidth="33*" />
          <colspec colname="c3" colwidth="33*" align="center"/>
          <thead>
            <row>
              <entry>
                <para>Feature</para>
              </entry>
              <entry>
                <para>Value</para>
              </entry>
              <entry>
                <para>Sample</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry morerows="6">
                <para>HairStyle</para>
              </entry>
              <entry>
                <para>Straight</para>
              </entry>
              <entry>
                <para>
                    <inlinemediaobject>
                      <imageobject>
                        <imagedata fileref="media/Analytics/image26.png" contentwidth="25mm" />
                      </imageobject>
                    </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Wave</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image27.png" contentwidth="25mm" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Curly</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image28.png" contentwidth="25mm" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>CrewCut</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image29.png" contentwidth="25mm" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Bald</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image30.png" contentwidth="25mm" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Ponytail</para>
              </entry>
              <entry>
                <para>
                  <emphasis role="bold">
                    <inlinemediaobject>
                      <imageobject>
                        <imagedata fileref="media/Analytics/image31.png" contentwidth="25mm" />
                      </imageobject>
                    </inlinemediaobject>
                  </emphasis>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Pigtail</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image32.png" contentwidth="25mm" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <table>
        <title>Samples For EyebrowSpace</title>
        <tgroup cols="3">
          <colspec colname="c1" colwidth="33*" />
          <colspec colname="c2" colwidth="33*" />
          <colspec colname="c3" colwidth="33*" align="center"/>
          <thead>
            <row>
              <entry>
                <para>Feature</para>
              </entry>
              <entry>
                <para>Value</para>
              </entry>
              <entry>
                <para>Sample</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry morerows="1">
                <para>EyebrowSpace</para>
              </entry>
              <entry>
                <para>Joint</para>
              </entry>
              <entry>
                <para>
                    <inlinemediaobject>
                      <imageobject>
                        <imagedata fileref="media/Analytics/image33.png" contentwidth="45mm" />
                      </imageobject>
                    </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Separate</para>
              </entry>
              <entry>
                <para>
                    <inlinemediaobject>
                      <imageobject>
                        <imagedata fileref="media/Analytics/image34.png" contentwidth="45mm" />
                      </imageobject>
                    </inlinemediaobject>
                </para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <table>
        <title>Samples For EyeShape</title>
        <tgroup cols="3">
          <colspec colname="c1" colwidth="33*" />
          <colspec colname="c2" colwidth="33*" />
          <colspec colname="c3" colwidth="33*" align="center"/>
          <thead>
            <row>
              <entry>
                <para>Feature</para>
              </entry>
              <entry>
                <para>Value</para>
              </entry>
              <entry>
                <para>Sample</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry morerows="1">
                <para>EyeShape</para>
              </entry>
              <entry>
                <para>Almond</para>
              </entry>
              <entry>
                <para>
                    <inlinemediaobject>
                      <imageobject>
                        <imagedata fileref="media/Analytics/image36.png" contentwidth="45mm"/>
                      </imageobject>
                    </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Round</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image37.png" contentwidth="45mm"/>
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <table>
        <title>Samples For Ear</title>
        <tgroup cols="3">
          <colspec colname="c1" colwidth="33*" />
          <colspec colname="c2" colwidth="33*" />
          <colspec colname="c3" colwidth="33*" align="center"/>
          <thead>
            <row>
              <entry>
                <para>Feature</para>
              </entry>
              <entry>
                <para>Value</para>
              </entry>
              <entry>
                <para>Sample</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry morerows="3">
                <para>Ear</para>
              </entry>
              <entry>
                <para>Round</para>
              </entry>
              <entry>
                <para>
                  <emphasis role="bold">
                    <inlinemediaobject>
                      <imageobject>
                        <imagedata fileref="media/Analytics/image38.png" contentwidth="25mm"/>
                      </imageobject>
                    </inlinemediaobject>
                  </emphasis>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Pointed</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image39.png" contentwidth="25mm" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Narrow</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image40.png" contentwidth="18mm" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>BroadLobe</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image41.png" contentwidth="25mm" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <table>
        <title>Samples For NoseEnd</title>
        <tgroup cols="3">
          <colspec colname="c1" colwidth="33*" />
          <colspec colname="c2" colwidth="33*" />
          <colspec colname="c3" colwidth="33*" align="center"/>
          <thead>
            <row>
              <entry>
                <para>Feature</para>
              </entry>
              <entry>
                <para>Value</para>
              </entry>
              <entry>
                <para>Sample</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry morerows="3">
                <para>NoseEnd</para>
              </entry>
              <entry>
                <para>Snub</para>
              </entry>
              <entry>
                <para>
                    <inlinemediaobject>
                      <imageobject>
                        <imagedata fileref="media/Analytics/image42.png" contentwidth="103" contentdepth="127" />
                      </imageobject>
                    </inlinemediaobject>
                    <inlinemediaobject>
                      <imageobject>
                        <imagedata fileref="media/Analytics/image43.png" contentwidth="101" contentdepth="127" />
                      </imageobject>
                    </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Turnedup</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image44.png" contentwidth="101" contentdepth="125" />
                    </imageobject>
                  </inlinemediaobject>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image45.png" contentwidth="104" contentdepth="124" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Flat</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image46.png" contentwidth="100" contentdepth="125" />
                    </imageobject>
                  </inlinemediaobject>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image47.png" contentwidth="104" contentdepth="126" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Hooked</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image48.png" contentwidth="104" contentdepth="125" />
                    </imageobject>
                  </inlinemediaobject>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image49.png" contentwidth="103" contentdepth="127" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <table>
        <title>Samples For FacialHair</title>
        <tgroup cols="3">
          <colspec colname="c1" colwidth="33*" />
          <colspec colname="c2" colwidth="33*" />
          <colspec colname="c3" colwidth="33*" align="center"/>
          <thead>
            <row>
              <entry>
                <para>Feature</para>
              </entry>
              <entry>
                <para>Value</para>
              </entry>
              <entry>
                <para>Sample</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry morerows="2">
                <para>FacialHair</para>
              </entry>
              <entry>
                <para>Mustache</para>
              </entry>
              <entry>
                <para>
                  <emphasis role="bold">
                    <inlinemediaobject>
                      <imageobject>
                        <imagedata fileref="media/Analytics/image50.png" contentwidth="138" contentdepth="94" />
                      </imageobject>
                    </inlinemediaobject>
                  </emphasis>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Beard</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image51.png" contentwidth="140" contentdepth="125" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Sideburn</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image52.png" contentwidth="140" contentdepth="125" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <table>
        <title>Samples For Chin</title>
        <tgroup cols="3">
          <colspec colname="c1" colwidth="33*" />
          <colspec colname="c2" colwidth="33*" />
          <colspec colname="c3" colwidth="33*" align="center"/>
          <thead>
            <row>
              <entry>
                <para>Feature</para>
              </entry>
              <entry>
                <para>Value</para>
              </entry>
              <entry>
                <para>Sample</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry morerows="2">
                <para>Chin</para>
              </entry>
              <entry>
                <para>Double</para>
              </entry>
              <entry>
                <para>
                    <inlinemediaobject>
                      <imageobject>
                        <imagedata fileref="media/Analytics/image53.png" contentwidth="25mm"/>
                      </imageobject>
                    </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Pointed</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image54.png" contentwidth="25mm" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Round</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image55.png" contentwidth="25mm" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <table>
        <title>Samples For Accessory</title>
        <tgroup cols="3">
          <colspec colname="c1" colwidth="33*" />
          <colspec colname="c2" colwidth="33*" />
          <colspec colname="c3" colwidth="33*" align="center"/>
          <thead>
            <row>
              <entry>
                <para>Feature</para>
              </entry>
              <entry>
                <para>Value</para>
              </entry>
              <entry>
                <para>Sample</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry morerows="6">
                <para>Accessory</para>
              </entry>
              <entry>
                <para>Opticals</para>
              </entry>
              <entry>
                <para>
                  <emphasis role="bold">
                    <inlinemediaobject>
                      <imageobject>
                        <imagedata fileref="media/Analytics/image56.png" contentwidth="25mm" />
                      </imageobject>
                    </inlinemediaobject>
                  </emphasis>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Hat</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image57.png" contentwidth="25mm" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Helmet</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image58.png" contentwidth="25mm" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Mask</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image59.png" contentwidth="25mm" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Hijab</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image60.png" contentwidth="25mm" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>RightEyePatch</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image61.png" contentwidth="25mm" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>LeftEyePatch</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image62.png" contentwidth="25mm" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <table>
        <title>Samples For AdditionalFeatures</title>
        <tgroup cols="3">
          <colspec colname="c1" colwidth="33*" />
          <colspec colname="c2" colwidth="33*" />
          <colspec colname="c3" colwidth="33*" align="center"/>
          <thead>
            <row>
              <entry>
                <para>Feature</para>
              </entry>
              <entry>
                <para>Value</para>
              </entry>
              <entry>
                <para>Sample</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry morerows="3">
                <para>AdditionalFeatures</para>
              </entry>
              <entry>
                <para>Scar</para>
              </entry>
              <entry>
                <para>
                  <emphasis role="bold">
                    <inlinemediaobject>
                      <imageobject>
                        <imagedata fileref="media/Analytics/image63.png" contentwidth="25mm" />
                      </imageobject>
                    </inlinemediaobject>
                  </emphasis>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Mole</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image64.png" contentwidth="25mm" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Tattoo</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image65.png" contentwidth="25mm" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Freckles</para>
              </entry>
              <entry>
                <para>
                  <inlinemediaobject>
                    <imageobject>
                      <imagedata fileref="media/Analytics/image66.png" contentwidth="25mm" />
                    </imageobject>
                  </inlinemediaobject>
                </para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
    </section>
  </appendix>
  <appendix>
    <title>Recognition rule engines (normative)</title>
    <para>This annex describes rule engines related to recognition in video analytics, e.g. Face Recognition and License Plate Recognition.</para>
    <para>For the definition of the message source refer to <xref linkend="_msgSource"/>.</para>
    <section>
      <title>Generic parameters for recognition rule engines</title>
      <para>This section describes generic parameters for configuration of a recognition rule engine. It also describes common event fields included in an event produced by a recognition rule engine. For concrete examples of how these parameters are used, please look at subsequent sections about Face Recognition and License Plate Recognition.</para>
      <table xml:id="OR_Gen_param">
        <title>Generic recognition rule configuration parameters</title>
        <tgroup cols="3">
          <colspec colname="c1" colwidth="24*" />
          <colspec colname="c2" colwidth="52*" />
          <colspec colname="c3" colwidth="24*" />
          <thead>
            <row>
              <entry>
                <para>Parameter Name</para>
              </entry>
              <entry>
                <para>Description</para>
              </entry>
              <entry>
                <para>
                  <emphasis role="bold">Requirement Level</emphasis>
                </para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry>
                <para>IncludeImage</para>
              </entry>
              <entry>
                <para>Configures how recognized images should be conveyed as type tt:ImageSendingType.</para>
                <itemizedlist>
                  <listitem>
                    <para>Embedded: Embed a recognized image into the event payload.</para>
                  </listitem>
                  <listitem>
                    <para>LocalStorage: Include a local URI for the recognized image.</para>
                  </listitem>
                  <listitem>
                    <para>RemoteStorage: Include a remote URI for the recognized image.</para>
                  </listitem>
                </itemizedlist>
              </entry>
              <entry>
                <para>Optional</para>
              </entry>
            </row>
			<row>
              <entry>
                <para>Threshold</para>
              </entry>
              <entry>
                <para>The level of confidence required for the detection/recognition.</para>
              </entry>
              <entry>
                <para>Optional</para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <para>Options for the rule parameters are described by the generic mechanism defined in section <xref linkend="_Ref9001629" />.</para>
      <table xml:id="OR_Gen_fields">
        <title>Generic recognition event fields</title>
        <tgroup cols="3">
          <colspec colname="c1" colwidth="21*" />
          <colspec colname="c2" colwidth="54*" />
          <colspec colname="c3" colwidth="25*" />
          <thead>
            <row>
              <entry>
                <para>Event Field</para>
              </entry>
              <entry>
                <para>Description</para>
              </entry>
              <entry>
                <para>Requirement Level</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry>
                <para>Likelihood</para>
              </entry>
              <entry>
                <para>Likelihood of accuracy of recognition between 0~1</para>
              </entry>
              <entry>
                <para>Mandatory</para>
              </entry>
            </row>
            <row>
              <entry>ObjectID</entry>
              <entry>ID of the recognized object of type tt:ObjectId</entry>
              <entry>Optional</entry>
            </row>
            <row>
              <entry>ParentObjectID</entry>
              <entry>Parent Object ID of the recognized object of type tt:ObjectId</entry>
              <entry>Optional</entry>
            </row>
            <row>
              <entry>
                <para>BoundingBox</para>
              </entry>
              <entry>
                <para>Recognized object bounding box details. Area of recognized object in normalized screen coordinates (-1.0, 1.0).</para>
              </entry>
              <entry>
                <para>Optional</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Label</para>
              </entry>
              <entry>
                <para>Information regarding matching list.</para>
                <para>Predefined values are:</para>
                <itemizedlist>
                  <listitem>
                    <para>Whitelisted</para>
                  </listitem>
                  <listitem>
                    <para>Blacklisted</para>
                  </listitem>
                </itemizedlist>
                <itemizedlist>
                  <listitem>
                    <para>Temporary</para>
                  </listitem>
                </itemizedlist>
              </entry>
              <entry>
                <para>Optional</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>Image</para>
              </entry>
              <entry>
                <para>Base64 encoded binary image data of the recognized object</para>
              </entry>
              <entry>
                <para>Optional</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>ImageUri</para>
              </entry>
              <entry>
                <para>URI to the image of the recognized object</para>
              </entry>
              <entry>
                <para>Optional</para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <para>If the IncludeImage configuration parameter is set to an empty string, device shall not include Image and ImageUri event fields in the event message.</para>
      <para>If the IncludeImage configuration parameter is set to Embedded, device shall include the Image event field in the event message.</para>
      <para>If the IncludeImage configuration parameter is set to LocalStorage or RemoteStorage, device shall include the ImageUri event field in the event message.</para>
    </section>
    <section>
      <title>Face Recognition</title>
      <para>This section describes the Face Recognition rule engine that produces an event with the topic “tns1:RuleEngine/Recognition/Face. The Face Recognition rule engine triggers the event when the identified face matches with a reference face image, which is described using the Rule Description Language as:</para>
      <programlisting><![CDATA[<tt:RuleDescription Name="tt:FaceRecognition">
  <tt:Parameters>
    <tt:SimpleItemDescription Name="IncludeImage" Type="xs:string"/>
  </tt:Parameters>
  <tt:Messages>
    <tt:Source>
      <tt:SimpleItemDescription Name="VideoSource" Type="tt:ReferenceToken"/>
      <tt:SimpleItemDescription Name="Rule" Type="xs:string"/>
    </tt:Source>
    <tt:Data>
      <tt:SimpleItemDescription Name="Likelihood" Type="xs:float"/>
      <tt:ElementItemDescription Name="ObjectId" Type="tt:ObjectId"/>
      <tt:ElementItemDescription Name="ParentObjectId" Type="tt:ObjectId"/>
      <tt:SimpleItemDescription Name="Label" Type="xs:string "/>
      <tt:SimpleItemDescription Name="ImageUri" Type="xs:anyURI"/>
      <tt:SimpleItemDescription Name="EnrollmentID" Type="xs:string"/>
      <tt:SimpleItemDescription Name="RefImageUri" Type="xs:anyURI"/>
      <tt:ElementItemDescription Name="Image" Type="xs:base64Binary"/>
      <tt:ElementItemDescription Name="BoundingBox" Type="tt:Rectangle"/>
    </tt:Data>
    <tt:ParentTopic>
      tns1:RuleEngine/Recognition/Face
    </tt:ParentTopic>
  </tt:Messages>
</tt:RuleDescription>
]]></programlisting>
      <para>The Face Recognition event consists of the generic event fields from <xref linkend="OR_Gen_fields"/> as well as the specific event fields listed in <xref linkend="OR_FR_fields"/> .</para>
      <table xml:id="OR_FR_fields">
        <title>Face Recognition event fields</title>
        <tgroup cols="3">
          <colspec colname="c1" colwidth="21*" />
          <colspec colname="c2" colwidth="54*" />
          <colspec colname="c3" colwidth="25*" />
          <thead>
            <row>
              <entry>
                <para>Event Field</para>
              </entry>
              <entry>
                <para>Description</para>
              </entry>
              <entry>
                <para>
                  <emphasis role="bold">Requirement Level</emphasis>
                </para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry>
                <para>EnrollmentID</para>
              </entry>
              <entry>
                <para>Unique ID to identify a person.</para>
              </entry>
              <entry>
                <para>Mandatory</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>RefImageUri</para>
              </entry>
              <entry>
                <para>URI of reference face image against which face recognition is successfully matched.</para>
              </entry>
              <entry>
                <para>Optional</para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
    </section>
    <section>
      <title>License Plate Recognition</title>
      <para>This section describes License Plate Recognition rule engine that produces an event with the topic “tns1:RuleEngine/Recognition/LicensePlate". License Plate Recognition detects vehicles’ features or behaviours against specified region or direction. The rule can be configured to detect vehicles in lane/region or driving direction of interest on the image source.</para>
      <para>License Plate Recognition rule engine triggers an event which is described using the Rule Description Language as :</para>
      <programlisting><![CDATA[<tt:RuleDescription Name="tt:LicensePlateRecognition">
  <tt:Parameters>
    <tt:SimpleItemDescription Name="IncludeImage" Type="xs:string"/>
    <tt:SimpleItemDescription Name="PlateLocation" Type="xs:string"/>
    <tt:ElementItemDescription Name="Region" Type="tt:Polygon"/>
    <tt:ElementItemDescription Name="SnapLine" Type="tt:Polyline"/>
    <tt:SimpleItemDescription Name="Country" Type="xs:string"/>
    <tt:SimpleItemDescription Name="Sensitivity" Type="xs:float"/>
    <tt:SimpleItemDescription Name="Threshold" Type="xs:float"/>
    <tt:SimpleItemDescription Name="PlateMinWidth" Type="xs:float"/>
    <tt:SimpleItemDescription Name="PlateMaxWidth" Type="xs:float"/>
    <tt:SimpleItemDescription Name="EventInterval" Type="xs:int"/>
  </tt:Parameters>
  <tt:Messages>
    <tt:Source>
      <tt:SimpleItemDescription Name="VideoSource" Type="tt:ReferenceToken"/>
      <tt:SimpleItemDescription Name="Rule" Type="xs:string"/>
    </tt:Source>
    <tt:Data>
      <tt:SimpleItemDescription name="Likelihood" Type="xs:float"/>
      <tt:ElementItemDescription Name="ObjectId" Type="tt:ObjectId"/>
      <tt:ElementItemDescription Name="ParentObjectId" Type="tt:ObjectId"/>
      <tt:SimpleItemDescription Name="Label" Type="xs:string"/>
      <tt:SimpleItemDescription Name="ImageURI" Type="xs:anyURI"/>
      <tt:SimpleItemDescription Name="VehicleImageURI" Type="xs:anyURI"/>
      <tt:ElementItemDescription Name="BoundingBox" Type="tt:Rectangle"/>
      <tt:ElementItemDescription Name="Image" Type="xs:base64Binary"/>
      <tt:ElementItemDescription Name="LicensePlateInfo" Type="tt:LicensePlateInfo"/>
      <tt:ElementItemDescription Name="VehicleInfo" Type="tt:VehicleInfo"/>
      <tt:ElementItemDescription Name="VehicleImage" Type="xs:base64Binary"/>
      <tt:SimpleItemDescription Name="Speed" Type="xs:float"/>
      <tt:SimpleItemDescription Name="Direction" Type="tt:Direction"/>
    </tt:Data>
    <tt:ParentTopic>
      tns1:RuleEngine/Recognition/LicensePlate
    </tt:ParentTopic>
  </tt:Messages>
</tt:RuleDescription>
]]></programlisting>
      <para>License Plate Recognition configuration parameters consist of the generic configuration parameters listed in <xref linkend="OR_Gen_param" /> as well as the specific configuration parameters listed in <xref linkend="OR_LPR_param"/>.</para>
      <table xml:id="OR_LPR_param">
        <title>License Plate Recognition rule configuration parameters</title>
        <tgroup cols="3">
          <colspec colname="c1" colwidth="21*" />
          <colspec colname="c2" colwidth="55*" />
          <colspec colname="c3" colwidth="24*" />
          <thead>
            <row>
              <entry>
                <para>Parameter Name</para>
              </entry>
              <entry>
                <para>Description</para>
              </entry>
              <entry>
                <para>
                  <emphasis role="bold">Requirement Level</emphasis>
                </para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry>
                <para>Region</para>
              </entry>
              <entry>
                <para>Defines a region that should be analyzed.</para>
              </entry>
              <entry>
                <para>Optional	</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>SnapLine</para>
              </entry>
              <entry>
                <para>Defines a polyline to indicate the best snap location in the camera’s field of view.</para>
              </entry>
              <entry>
                <para>Optional</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>PlateLocation</para>
              </entry>
              <entry>
                <para>License plate to be analyzed. Predefined values are 'Front' and 'Rear'.</para>
              </entry>
              <entry>
                <para>Optional</para>
              </entry>
            </row>
			<row>
              <entry>
                <para>Country</para>
              </entry>
              <entry>
                <para>Specifies the country for which LPR should be processed.</para>
              </entry>
              <entry>
                <para>Optional</para>
              </entry>
            </row>
			<row>
              <entry>
                <para>Sensitivity</para>
              </entry>
              <entry>
                <para>Detection sensitivity which provides a compromise between detection rate and false alarms.The higher the sensitivity, more License plates are detected at the cost of increasing false alarms number.</para>
              </entry>
              <entry>
                <para>Optional</para>
              </entry>
            </row>
			<row>
              <entry>
                <para>PlateMinWidth</para>
              </entry>
              <entry>
                <para>Minimum width of the license plate in percentage to be detected/recognized with respect to Scene Image.</para>
              </entry>
              <entry>
                <para>Optional</para>
              </entry>
            </row>
			<row>
              <entry>
                <para>PlateMaxWidth</para>
              </entry>
              <entry>
                <para>Maximum width of the license plate in percentage to be detected/recognized with respect to Scene Image.</para>
              </entry>
              <entry>
                <para>Optional</para>
              </entry>
            </row>
			<row>
              <entry>
                <para>EventInterval</para>
              </entry>
              <entry>
                <para>Minimum interval between event notifications when the same license plate is recognized.</para>
              </entry>
              <entry>
                <para>Optional</para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <para>Options for the rule parameters are described by the generic mechanism defined in section <xref linkend="_Ref9001629" />.</para>
      <para>The License Plate Recognition event consists of the generic event fields from <xref linkend="OR_Gen_fields"/> as well as the specific event fields listed in <xref linkend="OR_LPR_fields"/>.</para>
      <table xml:id="OR_LPR_fields">
        <title>License Plate Recognition event fields</title>
        <tgroup cols="3">
          <colspec colname="c1" colwidth="27*" />
          <colspec colname="c2" colwidth="48*" />
          <colspec colname="c3" colwidth="26*" />
          <thead>
            <row>
              <entry>
                <para>Event Field</para>
              </entry>
              <entry>
                <para>Description</para>
              </entry>
              <entry>
                <para>Requirement Level</para>
              </entry>
            </row>
          </thead>
          <tbody valign="top">
            <row>
              <entry>
                <para>LicensePlateInfo</para>
              </entry>
              <entry>
                <para>Provides information of the recognized license plate.</para>
              </entry>
              <entry>
                <para>Mandatory</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>VehicleInfo</para>
              </entry>
              <entry>
                <para>Provides information of the recognized vehicle.</para>
              </entry>
              <entry>
                <para>Optional</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>VehicleImage</para>
              </entry>
              <entry>
                <para>Image data of the recognized vehicle.</para>
              </entry>
              <entry>
                <para>Optional</para>
              </entry>
            </row>
            <row>
              <entry>
                <para>VehicleImageURI</para>
              </entry>
              <entry>
                <para>URI of recognized vehicle image.</para>
              </entry>
              <entry>
                <para>Optional</para>
              </entry>
            </row>
            <row>
              <entry>Speed</entry>
              <entry>Speed value of the recognized object in meters per second.</entry>
              <entry>Optional</entry>
            </row>
            <row>
              <entry>Direction</entry>
              <entry>Vehicle Moving Direction of type tt:Direction.</entry>
              <entry>Optional</entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <para>If the IncludeImage configuration parameter is set to an empty string, device shall not include VehicleImage and VehicleImageURI event fields in the event message.</para>
      <para>If the IncludeImage configuration parameter is set as Embedded, device shall include VehicleImage event field in the event message.</para>
      <para>If the IncludeImage configuration parameter is set as LocalStorage or RemoteStorage, device shall include VehicleImageURI event field in the event message.</para>
    </section>
  </appendix>
  <appendix xml:id="appendix_hw3_vnr_nwb">
    <title>Audio analytics (normative)</title>
    <section>
      <title>Audio Classification</title>
      <para>A rule engine can send the following event for detected audio classes.</para>
      <programlisting><![CDATA[<tt:RuleDescription Name="tt:AudioClassDetector">
  <tt:Parameters>
    <tt:SimpleItemDescription Name="ClassFilter" Type="tt:StringList"/>
    <tt:SimpleItemDescription Name="ConfidenceLevel" Type="xs:float"/>
  </tt:Parameters>
  <tt:Messages>
    <tt:MessageDescription IsProperty="false">
      <tt:Source>
        <tt:SimpleItemDescription Name="AudioSource" Type="tt:ReferenceToken"/>
        <tt:SimpleItemDescription Name="AnalyticsConfiguration"
                                  Type="tt:ReferenceToken"/>
        <tt:SimpleItemDescription Name="Rule" Type="xs:string"/>
      </tt:Source>
      <tt:Data>
        <tt:SimpleItemDescription Name="Class" Type="tt:StringList"/>
        <tt:SimpleItemDescription Name="Score" Type="tt:FloatList"/>
        <tt:SimpleItemDescription Name="Loudness" Type="xs:float"/>
      </tt:Data >
      <tt:ParentTopic>tns1:RuleEngine/AudioDetector/Class</tt:ParentTopic>
    </tt:MessageDescription>
  <tt:Messages>
</tt:RuleDescription>
]]></programlisting>
      <variablelist role="op">
        <varlistentry>
          <term>Parameters</term>
          <listitem>
            <para role="param">ClassFilter - optional [tt:StringList]</para>
            <para role="text">List of classes that the rule should operate on chosen from
              tt:AudioClassification.</para>
            <para role="param">ConfidenceLevel - optional [xs:float]</para>
            <para role="text">Minimum confidence level for accepting a classification.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Topic</term>
          <listitem>
            <para role="text">tns1:RuleEngine/AudioDetector/Class</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Source</term>
          <listitem>
            <para role="param">AudioSource [tt:ReferenceToken]</para>
            <para role="text">The token of the audio source.</para>
            <para role="param">AnalyticsConfiguration - optional [tt:ReferenceToken]</para>
            <para role="text">Optional token of the analytics configuration this rule belongs
              to.</para>
            <para role="param">Rule - optional [xs:string]</para>
            <para role="text">Optional name of the Rule that generated the event.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>Data</term>
          <listitem>
            <para role="param">Class [tt:StringList]</para>
            <para role="text">List of detected audio classifications of type tt:AudioClassification.</para>
            <para role="param">Score - optional [tt:FloatList]</para>
            <para role="text">Optional list of scores of detected audio classifications.</para>
            <para role="param">Loudness - optional [xs:float]</para>
            <para role="text">Optional loudness of the detected sound in dB.</para>
          </listitem>
        </varlistentry>
      </variablelist>
    </section>
  </appendix>
  <appendix role="revhistory">
    <title>Revision History</title>
    <para />
  </appendix>
</book>
