Knowledge Base Article
Article Type: How To
Product: Embedded Outdoor Object Tracker
Product Version:
Component:
Device Brands:
Created: 9-Apr-2015 10:48:10 AM
Last Updated:

How to Integrate Senstar Outdoor Object Tracker Events Using Axis Metadata Stream

Senstar Outdoor Object Tracker (OOT) is an analytics engine that can be embedded on an AXIS camera. OOT Events are useful for getting real-time analytics metadata or tripwire/area notifications based on rules set up on the camera.

OOT provides three event topics, based on what is selected in the OOT web interface. Please refer to AXIS documentation on Event Data Streaming (part of VAPIX version 3) for instructions on how to subscribe to these events.

1 Tripwire Alarm*

The tripwire alarm uses the Topic Name:  tnsaxis:CameraApplicationPlatform/RuleEngine/LineDetector

This event topic name is available if the tripwire alarm is configured through the OOT web interface. AXIS event streams follow the ONVIF standard and the LineDetector event topic is described in Annex A.1 of [1].

OOT's implementation of the ONVIF FieldDetector differs from the ONVIF standard in the following manner:

-          The <tt:Source> tag is left empty for the OOT messages.

Here is an example message for the LineDetector event with OOT specific information highlighted. The UtcTime indicates the time this alarm occurred. The AXIS Metadata Monitoring tool (Fig. 1) was used to obtain this message.

<tt:MetadataStream xmlns:tt="http://www.onvif.org/ver10/schema">

  <tt:Event xmlns:tt="http://www.onvif.org/ver10/schema">

    <wsnt:NotificationMessage xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tnsaxis="http://www.axis.com/2009/event/topics" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wsa5="http://www.w3.org/2005/08/addressing">

      <wsnt:Topic Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple">  tnsaxis:CameraApplicationPlatform/RuleEngine/LineDetector </wsnt:Topic>

      <wsnt:ProducerReference>

        <wsa5:Address>uri://d40cd230-982f-48da-8e39-4ec8b51e2d3a/ProducerReference</wsa5:Address>

      </wsnt:ProducerReference>

      <wsnt:Message>

        <tt:Message UtcTime="2015-04-07T12:44:34.942511Z">

          <tt:Source>

          </tt:Source>

          <tt:Data>

            <tt:SimpleItem Name="ObjectId" Value="522" />

          </tt:Data>

        </tt:Message>

      </wsnt:Message>

    </wsnt:NotificationMessage>

  </tt:Event>

</tt:MetadataStream>

metadata
Figure 1: AXIS Metadata Monitor Tool for viewing events received from AXIS Cameras. This tool was provided by Axis.

2 Mask Alarm*

The mask alarm uses the Topic Name:  tnsaxis:CameraApplicationPlatform/RuleEngine/FieldDetector

This event Topic Name is available if the mask alarm is configured through the OOT web interface. AXIS event streams follow the ONVIF standard and the FieldDetector event type is described in Annex A.2 of [1].

OOT's implementation of the ONVIF FieldDetector differs from the ONVIF standard in the following manner:

-          The <tt:Source> tag is left empty for the OOT messages.

-          The object ID is not provided within the <tt:Key> tag

-          The <tt:Data> tag named IsInside is set to 1 when the first object enters the alarm mask region (as configured in the OOT web interface) and will remain in that state till all objects that passed through the mask region have left the scene. This means even if there is no object within the mask region the IsInside state would be 1 if the scene contains an object that passed through the mask region in the past.

Here is an example message for the FieldDetector event with OOT specific information highlighted. Please note the UtcTime indicates the time this alarm occurred. The Axis Metadata Monitoring tool (Fig. 1) was used to obtain this message.

<tt:MetadataStream xmlns:tt="http://www.onvif.org/ver10/schema">

  <tt:Event xmlns:tt="http://www.onvif.org/ver10/schema">

    <wsnt:NotificationMessage xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tnsaxis="http://www.axis.com/2009/event/topics" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wsa5="http://www.w3.org/2005/08/addressing">

      <wsnt:Topic Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple">  tnsaxis:CameraApplicationPlatform/RuleEngine/FieldDetector </wsnt:Topic>

      <wsnt:ProducerReference>

        <wsa5:Address>uri://d40cd230-982f-48da-8e39-4ec8b51e2d3a/ProducerReference</wsa5:Address>

      </wsnt:ProducerReference>

      <wsnt:Message>

        <tt:Message UtcTime="2015-04-07T12:48:04.031769Z">

          <tt:Source>

          </tt:Source>

          <tt:Data>

            <tt:SimpleItem Name="IsInside" Value="1" />

          </tt:Data>

        </tt:Message>

      </wsnt:Message>

    </wsnt:NotificationMessage>

  </tt:Event>

</tt:MetadataStream>

3 Scene Description (Per-Frame Tracking Information)

The tracking information (bounding box, object class, etc.) is sent via the Topic Name:  tnsaxis:CameraApplicationPlatform/VideoAnalytics/Frame

This event topic name is always available and will be sent on every frame that is analyzed by the embedded algorithm. The event <tt:Data> tag contains a SimpleItem of type string with Name="xml" The value of this xml tag is the scene description as defined in section 5.1 of [1]. 

OOT's implementation of the ONVIF scene descriptors differs from the ONVIF standard in the following manner:

-          An additional behaviour type is used in OOT. This tag is <tt:Alarmed> (highlighted in Example 2 below) and it will be added to any object that has caused an alarm (i.e. moved through an alarm mask or crossed a tripwire).

Here is an example message for the VideoAnalytics/Frame event with OOT specific information highlighted. Please note the UtcTime indicates the time this frame was analyzed. The Axis Metadata Monitoring tool (Fig. 1) was used to obtain this message.

<tt:MetadataStream xmlns:tt="http://www.onvif.org/ver10/schema">

  <tt:Event xmlns:tt="http://www.onvif.org/ver10/schema">

    <wsnt:NotificationMessage xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tnsaxis="http://www.axis.com/2009/event/topics" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wsa5="http://www.w3.org/2005/08/addressing">

      <wsnt:Topic Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple">  tnsaxis:CameraApplicationPlatform/VideoAnalytics/Frame</wsnt:Topic>

      <wsnt:ProducerReference>

        <wsa5:Address>uri://d40cd230-982f-48da-8e39-4ec8b51e2d3a/ProducerReference</wsa5:Address>

      </wsnt:ProducerReference>

      <wsnt:Message>

        <tt:Message UtcTime="2015-04-07T12:48:03.431575Z">

          <tt:Source>

          </tt:Source>

          <tt:Data>

            <tt:SimpleItem Name="xml" Value="&lt;tt:Object ObjectId=&quot;575&quot;&gt;&lt;tt:Appearance&gt;&lt;tt:Shape&gt;&lt;tt:BoundingBox left=&quot;-0.200012&quot; top=&quot;-0.0666809&quot; right=&quot;-0.175018&quot; bottom=&quot;-0.133347&quot;/&gt;&lt;tt:CenterOfGravity x=&quot;-0.187515&quot; y=&quot;-0.11668&quot;/&gt;&lt;/tt:Shape&gt;&lt;tt:Class&gt;&lt;tt:ClassCandidate&gt;&lt;tt:Type&gt;Vehicle&lt;/tt:Type&gt;&lt;tt:Likelihood&gt;1&lt;/tt:Likelihood&gt;&lt;/tt:ClassCandidate&gt;&lt;/tt:Class&gt;&lt;/tt:Appearance&gt;&lt;/tt:Object&gt;" />

          </tt:Data>

        </tt:Message>

      </wsnt:Message>

    </wsnt:NotificationMessage>

  </tt:Event>

</tt:MetadataStream>

We will look at two further examples of the SimpleItem tag named xml which contains the scene description xml. The value of the xml SimpleItem presented here has been formatted for human readability, before formatting it will look like the example above.

Example 1:

<tt:Object ObjectId="3">

   <tt:Appearance>

     <tt:Shape>

        <tt:BoundingBox left="-0.0444489" top="0.555542" right="-1.52588e-005" bottom="0.5"/>

        <tt:CenterOfGravity x="-0.0222321" y="0.513885"/>

     </tt:Shape>

     <tt:Class>

        <tt:ClassCandidate>

          <tt:Type>Other</tt:Type>

          <tt:Likelihood>1</tt:Likelihood>

        </tt:ClassCandidate>

     </tt:Class>

   </tt:Appearance>

</tt:Object>

<tt:Object ObjectId="5">

   <tt:Appearance>

     <tt:Shape>

        <tt:BoundingBox left="0.288879" top="0.305542" right="0.488876" bottom="-0.166672"/>

        <tt:CenterOfGravity x="0.388878" y="-0.0486183"/>

     </tt:Shape>

     <tt:Class>

        <tt:ClassCandidate>

          <tt:Type>Human</tt:Type>

          <tt:Likelihood>1</tt:Likelihood>

        </tt:ClassCandidate>

     </tt:Class>

   </tt:Appearance>

   <tt:Behaviour>

     <tt:Alarmed/>

   </tt:Behaviour>

</tt:Object>

Example 2:

<tt:Object ObjectId="5">

   <tt:Appearance>

     <tt:Shape>

        <tt:BoundingBox left="0.333328" top="0.305542" right="0.488876" bottom="-0.194458"/>

        <tt:CenterOfGravity x="0.411102" y="-0.069458"/>

     </tt:Shape>

     <tt:Class>

        <tt:ClassCandidate>

          <tt:Type>Human</tt:Type>

          <tt:Likelihood>1</tt:Likelihood>

        </tt:ClassCandidate>

     </tt:Class>

   </tt:Appearance>

   <tt:Behaviour>

     <tt:Alarmed/>

   </tt:Behaviour>

</tt:Object>

<tt:ObjectTree>

   <tt:Delete ObjectId="3"/>

</tt:ObjectTree>

4 Accessing Metadata

Axis Event Streams are sent via RTSP stream. As shown in Fig. 1, the Axis Metadata Monitor can be used to view all events coming from the camera, including the events from OOT. Alternatively, openRTSPTM [2], an open source project, can be used to access the event streams. For example the following command can be used to receive all events from the camera (including OOT events):

openRTSP "rtsp://root:toor@10.234.7.162/axis-media/media.amp?video=0&audio=0&event=on"

or if you want to subscribe only to the scene description:

openRTSP "rtsp://root:toor@10.234.7.162/axis-media/media.amp?video=0&audio=0&event=on&eventtopic= axis:CameraApplicationPlatform/VideoAnalytics//."

To use the above commands, first enable anonymous viewer login on the camera (Camera Web Interface -> Setup -> System Options -> Security -> Users).

References

[1] ONVIF Analytics Service Specification Version 2.5, December 2014. http://www.onvif.org/specs/srv/analytics/ONVIF-Analytics-Service-Spec-v250.pdf

[2] openRTSP http://www.live555.com/openRTSP/

Average rating:
Please log in to rate.
Rated by 0, Viewed by 5865