How to Receive Real-Time Recognition Events from CAMMRA Using VAPIX or ONVIF

Real-time Events API (VAPIX or ONVIF)

To receive real-time recognition events from the camera, you can utilize either the VAPIX or ONVIF protocol.
These protocols allow you to access event data packets containing relevant information without the actual image.
The packet structure for real-time recognition events is as follows:

Supported events


Event

Description 

Example

LPR

General event with metadata

Available always


Event contains all data from LPR engine 

 

Event  can be send several times per one license plate 

 

NEW  - first license plate detection

UPDATE - if some  changed in LPR package

LOST - when  vehicle left the frame  (+10 s after the latest detection )

<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/LPR</wsnt:Topic>

      <wsnt:ProducerReference>

        <wsa5:Address>uri://c37d4bf5-fa69-498d-8294-e0c8ade51ded/ProducerReference</wsa5:Address>

      </wsnt:ProducerReference>

      <wsnt:Message>

        <tt:Message UtcTime="2023-05-17T13:40:12.509000Z">

          <tt:Source>

          </tt:Source>

          <tt:Data>

            <tt:SimpleItem Name="consumedTime" Value="104" />

            <tt:SimpleItem Name="frame_timestamp" Value="1039287603" />

            <tt:SimpleItem Name="carMoveDirection" Value="unknown" />

            <tt:SimpleItem Name="carState" Value="new" />

            <tt:SimpleItem Name="action" Value="No action" />

            <tt:SimpleItem Name="capture_timestamp" Value="1621258812509" />

            <tt:SimpleItem Name="width" Value="192" />

            <tt:SimpleItem Name="carID" Value="1087595" />

            <tt:SimpleItem Name="top" Value="564" />

            <tt:SimpleItem Name="country" Value="PRT" />

            <tt:SimpleItem Name="left" Value="625" />

            <tt:SimpleItem Name="height" Value="32" />

            <tt:SimpleItem Name="listName" Value="" />

            <tt:SimpleItem Name="text" Value="RZ3160" />

          </tt:Data>

        </tt:Message>

      </wsnt:Message>

    </wsnt:NotificationMessage>

  </tt:Event>

</tt:MetadataStream>

LPR.BlackList

LPR.WhiteList

LPR.NotInList

ALPV.NotinList




Triggered events 

Name of the events depend on the list name in the application 

Available only when any relay is connected 

<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/ALPV.NotInList</wsnt:Topic>

      <wsnt:ProducerReference>

        <wsa5:Address>uri://c37d4bf5-fa69-498d-8294-e0c8ade51ded/ProducerReference</wsa5:Address>

      </wsnt:ProducerReference>

      <wsnt:Message>

        <tt:Message UtcTime="2023-05-17T15:42:54.961154Z" PropertyOperation="Changed">

          <tt:Source>

          </tt:Source>

          <tt:Key>

          </tt:Key>

          <tt:Data>

            <tt:SimpleItem Name="active" Value="0" />

          </tt:Data>

        </tt:Message>

      </wsnt:Message>

    </wsnt:NotificationMessage>

  </tt:Event>

</tt:MetadataStream>

LPR.PlateIN

LPR.PlateOUT

Triggered events 

Available only when any relay  is connected 

<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/ALPV.PlateIn</wsnt:Topic>

      <wsnt:ProducerReference>

        <wsa5:Address>uri://c37d4bf5-fa69-498d-8294-e0c8ade51ded/ProducerReference</wsa5:Address>

      </wsnt:ProducerReference>

      <wsnt:Message>

        <tt:Message UtcTime="2023-05-17T16:24:19.596468Z" PropertyOperation="Changed">

          <tt:Source>

          </tt:Source>

          <tt:Key>

          </tt:Key>

          <tt:Data>

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

          </tt:Data>

        </tt:Message>

      </wsnt:Message>

    </wsnt:NotificationMessage>

  </tt:Event>

</tt:MetadataStream>

VMMCR

VMMCR.Truck