milestone analytics events 2.0; developers...

20
Analytics Events 2.0 Developer’s Manual Milestone

Upload: doannhi

Post on 27-Apr-2018

224 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Milestone Analytics Events 2.0; Developers Manualdownload.milestonesys.com/MIPSDK/Milestone_AnalyticsEvents...Man… · Milestone Analytics Events 2.0; Developer’s Manual Page 2

Analytics Events 2.0 Developer’s Manual

Milestone

Page 2: Milestone Analytics Events 2.0; Developers Manualdownload.milestonesys.com/MIPSDK/Milestone_AnalyticsEvents...Man… · Milestone Analytics Events 2.0; Developer’s Manual Page 2

Milestone Analytics Events 2.0; Developer’s Manual

www.milestonesys.com Page 2 Target Audience for this Document

Target Audience for this Document

This document is intended for video content analysis system developers wishing to integrate with the Milestone Analytics Events feature. The content of this document is not relevant for regular surveillance

system users. Furthermore, this document is mainly intended for developers who are prevented from using the Milestone Integration Platform (MIP) Software Development Kit (SDK). The MIP SDK allows a more tight integration with Milestone XProtect products than what is described in this document. Among

other things, this includes programmatically defining new event types in a plug-in to the event server and posting these from any MIP environment, thus freeing end-users from adding these manually. The

MIP SDK however restricts your application to .NET on Windows. Please see the Analytics Integration and Access Control samples in the Plug-in Integration Application Catalog in the MIP SDK Documentation.

MAE-AnaEvent-dm-2-310111

Page 3: Milestone Analytics Events 2.0; Developers Manualdownload.milestonesys.com/MIPSDK/Milestone_AnalyticsEvents...Man… · Milestone Analytics Events 2.0; Developer’s Manual Page 2

Milestone Analytics Events 2.0; Developer’s Manual

www.milestonesys.com Page 3 Contents

Contents

COPYRIGHT, TRADEMARKS AND IMPORTANT INFORMATION............................................................ 4

INTRODUCTION .......................................................... 5

XProtext Corporate Alarms & Analytic Events ....................................... 5

XProtect Analytics & MAD Compatibility ............................................... 6

ARCHITECTURE AND DATA FLOW ............................... 7

Analytics Event XML .............................................................................. 8

PROTOCOL ................................................................ 10

INTEGRATING WITH ANALYTICS EVENTS ................. 11

APPENDIX A ............................................................. 13

Page 4: Milestone Analytics Events 2.0; Developers Manualdownload.milestonesys.com/MIPSDK/Milestone_AnalyticsEvents...Man… · Milestone Analytics Events 2.0; Developer’s Manual Page 2

Milestone Analytics Events 2.0; Developer’s Manual

www.milestonesys.com Page 4 Copyright, Trademarks and …

Copyright, Trademarks and Important

Information

Copyright © 2011 Milestone Systems A/S.

Trademarks XProtect is a registered trademark of Milestone Systems A/S. Microsoft and Windows are registered trademarks of Microsoft Corporation.

All other trademarks mentioned in this document are trademarks of their respective owners.

Disclaimer This document is intended for general information purposes only, and due care has been taken in

its preparation.

Any risk arising from the use of this information rests with the recipient, and nothing herein should be construed as constituting any kind of warranty. Milestone Systems A/S reserve the right to make adjustments without prior notification. All names of people and organizations used in this document's examples are fictitious. Any resemblance to any actual organization or person, living or dead, is purely coincidental and

unintended.

Page 5: Milestone Analytics Events 2.0; Developers Manualdownload.milestonesys.com/MIPSDK/Milestone_AnalyticsEvents...Man… · Milestone Analytics Events 2.0; Developer’s Manual Page 2

Milestone Analytics Events 2.0; Developer’s Manual

www.milestonesys.com Page 5 Introduction

Introduction

Video content analysis—VCA—functionality span from face recognition over advanced motion detection to complex behavioral analysis, where various types of abnormal behavior—both of

humans and vehicles—can be detected. Currently, there are roughly 35 important VCA players. This number keeps growing, and the increased competition will keep improving the functionality and performance of these systems.

With the Milestone Analytics Events feature, VCA systems can integrate with and hook into XProtect Corporate and the XProtect event server. Even multiple VCA systems can co-exist in a

Milestone environment at the same time and may work together to create an optimal solution for a given customer in a given situation.

XProtext Corporate Alarms & Analytics Events

In XProtect Corporate, the Analytics Events feature is handled by the Alarms feature. Based on functionality handled in the XProtect event server, the Alarms feature provides central overview, control and scalability of alarms in any number of federated XProtect Enterprise and XProtect Corporate installations. It can be configured to generate alarms based on either:

System related events; for example, motion, server responding/not responding,

archiving problems, lack of disk space, etc. VCA-based events (a.k.a. analytic events); typically data received from an external VCA-

based application. To ease overview, delegation and handling of alarms, these will appear in the XProtect Smart

Client’s alarm list and can, if relevant, be integrated with map functionality. The Alarms feature is thus a powerful monitoring tool, providing instant overview of alarms and possible technical problems. How does the XProtect Alarms feature and the XProtect event server work?

1. Surveillance System & Event Server

2. XProtect Corporate Management Client

3. Smart Client 4. Alarm Configuration 5. Alarm Data Flow

Later in this document, the architecture and data flow of the Analytics Events feature is described. Furthermore, how to integrate VCA systems with XProtect Corporate by sending events to the

XProtect event server, triggering alarms, and managing these in the Smart Client are discussed.

Page 6: Milestone Analytics Events 2.0; Developers Manualdownload.milestonesys.com/MIPSDK/Milestone_AnalyticsEvents...Man… · Milestone Analytics Events 2.0; Developer’s Manual Page 2

Milestone Analytics Events 2.0; Developer’s Manual

www.milestonesys.com Page 6 Introduction

XProtect Analytics & MAD Compatibility

The Milestone Alert Data (MAD) format was introduced with XProtect Analytics 2.0, and allowed the sending of analytics alerts directly to the analytics server over TCP/IP via the Generic VA interface.

With the Analytics Events feature it is possible to send MAD formatted alerts to the XProtect event server over TCP/IP in exactly the same way. Therefore, no changes are needed to current XProtect Analytics integrations in order for these to work with the XProtect event server. However, in the XProtect event server, all received alerts are treated as analytics events, and it is

therefore necessary to create an alarm definition in the XProtect Management Client before alarms

can be triggered and managed in the XProtect Smart Client. The analytics events format supports all the information of the MAD format, as well as some additional information. For developers who have not already implemented a solution using the MAD format it is recommended using the analytics events format instead.

Page 7: Milestone Analytics Events 2.0; Developers Manualdownload.milestonesys.com/MIPSDK/Milestone_AnalyticsEvents...Man… · Milestone Analytics Events 2.0; Developer’s Manual Page 2

Milestone Analytics Events 2.0; Developer’s Manual

www.milestonesys.com Page 7 Architecture and Data Flow

Architecture and Data Flow

VCA Server Data Flow

Camera with On-board VCA Data Flow

The overall data flow of the framework is as follows: the underlying analytic systems detects a predefined behavior (which is configured by setting up rules on the third-party VCA system), and sends out an analytics event to the XProtect event server using the protocol and format described

in this document. The address of the XProtect event server should be set up on the third-party VCA. The XProtect event server then matches the event message against a predefined alarm definition, and—if it matches—an alarm is triggered. This alarm appears in the XProtect Smart Client alongside any other alarms generated by the

XProtect event server, and is managed in exactly the same way.

Page 8: Milestone Analytics Events 2.0; Developers Manualdownload.milestonesys.com/MIPSDK/Milestone_AnalyticsEvents...Man… · Milestone Analytics Events 2.0; Developer’s Manual Page 2

Milestone Analytics Events 2.0; Developer’s Manual

www.milestonesys.com Page 8 Architecture and Data Flow

Screenshot from XProtect Smart Client: Effects of analytics events in the XProtect Smart Client with loaded data in the alert list

Analytics Event XML

Analytics events have the same ”status” as internal events and can generate alarms the same way. When sending analytics events to the XProtect event server, the analytics events should be formatted in XML, as defined by the XML Schema Definition (XSD) in Appendix A. The most important element in the analytics event format is the Message in the EventHeader, which

is used to match against the alarm definition created in the management client, and determines

whether or not an alarm should be triggered. Another important element in the analytics event format is the Source in the EventHeader. For VCA

systems, this will typically be a camera. If an alarm is triggered, the source camera will be displayed in the XProtect Smart Client when the alarm is selected. In addition, any overlay information specified in the ObjectList and RuleList will also be displayed on the camera, when

the XProtect Smart Client is in playback mode. Cameras may be specified using the IP address in the Name element of the source.

Finally, the EventHeader ID must be specified. It is recommended to pass a zero GUID, as shown in

the examples, in which case a new GUID will be assigned by the XProtect event server.

This is an example of an analytics event with the IP address of a source camera, and a single object with a bounding box: <?xml version="1.0" encoding="utf-8"?> <AnalyticsEvent xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:milestone-systems"> <EventHeader> <ID>00000000-0000-0000-0000-000000000000</ID> <Timestamp>2011-01-26T15:19:39.7342498+01:00</Timestamp> <Message>My Analytics Event</Message> <Source> <Name>10.100.50.23</Name> </Source> </EventHeader> <ObjectList>

Page 9: Milestone Analytics Events 2.0; Developers Manualdownload.milestonesys.com/MIPSDK/Milestone_AnalyticsEvents...Man… · Milestone Analytics Events 2.0; Developer’s Manual Page 2

Milestone Analytics Events 2.0; Developer’s Manual

www.milestonesys.com Page 9 Architecture and Data Flow

<Object> <BoundingBox> <Top>0.2</Top> <Left>0.4</Left> <Bottom>0.9</Bottom> <Right>0.6</Right> </BoundingBox> </Object> </ObjectList> </AnalyticsEvent>

Furthermore, specific channels on video servers may be specified by appending the (0-indexed) channel number separated by a comma. This would therefore represent “Camera 4 on

10.100.50.23”: <Source> <Name>10.100.50.23,3</Name> </Source>

Alternatively, the source can be specified precisely using the “Fully Qualified ID” of the device in the Source FQID element. This is required for non-camera sources, but may also provide a small

performance gain. In this example, the device and server ID’s are used, as well as the static “kind” of a camera: <Source> <FQID> <ServerId> <Id>beef2f96-03db-4815-a33c-adcc9fcb8610</Id> </ServerId> <ObjectId>6832da9f-a09b-49c2-bbaa-d52f430b8a90</ObjectId> <Kind>5135ba21-f1dc-4321-806a-6ce2017343c0</Kind> </FQID> </Source>

Page 10: Milestone Analytics Events 2.0; Developers Manualdownload.milestonesys.com/MIPSDK/Milestone_AnalyticsEvents...Man… · Milestone Analytics Events 2.0; Developer’s Manual Page 2

Milestone Analytics Events 2.0; Developer’s Manual

www.milestonesys.com Page 10 Protocol

Protocol

XML formatted analytics event may be sent to the XProtect event server using the HTTP POST method or directly over a TCP/IP connection. A small performance gain may be achieved using

HTTP. When using HTTP, the content length must be specified. A minimal sample of an analytics event including an HTTP header is as follows: POST / HTTP/1.1 Content-Type: text/xml Content-Length: 426 Connection: Keep-Alive <?xml version=”1.0” encoding=”utf-8”?> <AnalyticsEvent xmlns:i=”http://www.w3.org/2001/XMLSchema-instance” xmlns=”urn:milestone-systems”> <EventHeader> <ID>00000000-0000-0000-0000-000000000000</ID> <Timestamp>2011-01-26T15:19:39.7342498+01:00</Timestamp> <Message>My Analytics Event</Message> <Source> <Name>10.100.50.23</Name> </Source> </EventHeader> </AnalyticsEvent>

The XProtect event server will respond with an HTTP response regardless of the method used to send the analytics event. The HTTP response will report on the success of the processing of the received data. The following HTTP responses may be expected:

HTTP Status Code Content Description

200 OK May contain a warning if the analytics event is unknown by the XProtect event server.

The analytics event was successfully received.

400 Bad Request Serialization exception message.

The received data is not in a valid format.

403 Forbidden None. The sender is not on the list of

allowed addresses.

500 Internal Server Error Error message. An internal error in the

XProtect event server. See the event server log for more information.

Page 11: Milestone Analytics Events 2.0; Developers Manualdownload.milestonesys.com/MIPSDK/Milestone_AnalyticsEvents...Man… · Milestone Analytics Events 2.0; Developer’s Manual Page 2

Milestone Analytics Events 2.0; Developer’s Manual

www.milestonesys.com Page 11 Integrating with Analytics Events

Integrating with Analytics Events

Configuring analytics events is done from the XProtect Corporate Management Client. The following screenshots offer a brief introduction to the configuration process. See the XProtect Corporate

Management Client documentation for more details.

Part one - enabling the service and setting up security. A list of allowed addresses can be used to control who can send event data to the system. Furthermore, in this example, the server will listen on port 9090.

Part two – creating the analytic event. It is also possible to create a description of the event and test it.

Page 12: Milestone Analytics Events 2.0; Developers Manualdownload.milestonesys.com/MIPSDK/Milestone_AnalyticsEvents...Man… · Milestone Analytics Events 2.0; Developer’s Manual Page 2

Milestone Analytics Events 2.0; Developer’s Manual

www.milestonesys.com Page 12 Integrating with Analytics Events

Part three – Using the analytics event in an alarm definition. The analytics event can now be used as a source for an alarm.

Page 13: Milestone Analytics Events 2.0; Developers Manualdownload.milestonesys.com/MIPSDK/Milestone_AnalyticsEvents...Man… · Milestone Analytics Events 2.0; Developer’s Manual Page 2

Milestone Analytics Events 2.0; Developer’s Manual

www.milestonesys.com Page 13 Appendix A

Appendix A

<?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:milestone-systems" targetNamespace="urn:milestone-systems" elementFormDefault="qualified" version="1.0"> <!-- The representation of a Milestone analytics event. --> <xs:element name="AnalyticsEvent"> <xs:complexType> <xs:sequence> <!-- The EventHeader, containing information common for all Milestone events. --> <xs:element minOccurs="1" maxOccurs="1" name="EventHeader" type="EventHeader" /> <!-- The description of the event. If specified, this will be visible in the Smart Client, when managing alarms based on this event. --> <xs:element minOccurs="0" maxOccurs="1" name="Description" type="xs:string" /> <!-- The start time of the event, if it takes plate over a period of time. --> <xs:element minOccurs="0" maxOccurs="1" name="StartTime" type="xs:dateTime" /> <!-- The end time of the event, if it takes plate over a period of time. --> <xs:element minOccurs="0" maxOccurs="1" name="EndTime" type="xs:dateTime" /> <!-- The location of the event (this will typically be the same as the camera's location). --> <xs:element minOccurs="0" maxOccurs="1" name="Location" type="xs:string" /> <!-- The count value, if the event is a counting event. Default: 0 (no count). --> <xs:element minOccurs="0" maxOccurs="1" name="Count" type="xs:unsignedInt" /> <!-- The RuleList, containing information contains information about the rule(s), which triggered the analytics event. --> <xs:element minOccurs="0" maxOccurs="1" name="RuleList" type="RuleList" /> <!-- The ObjectList, containing information about the detected object(s) in the scene --> <xs:element minOccurs="0" maxOccurs="1" name="ObjectList" type="AnalyticsObjectList" /> <!-- The ReferenceList, containing any number of references to other entities in the system, e.g. events or cameras by FQID. Any cameras listed here will be treated as “related cameras” in the Smart Client, when managing alarms based on this event. --> <xs:element minOccurs="0" maxOccurs="1" name="ReferenceList" type="ReferenceList" /> <!-- The SnapshotList, containing any number of images related to the event. If the Source is a camera, it is not neccesary to attach a snapshot from that camera at the time of the event. --> <xs:element minOccurs="0" maxOccurs="1" name="SnapshotList" type="SnapshotList" /> <!-- The Vendor, containing information about the analytics vendor including any custom data. --> <xs:element minOccurs="0" maxOccurs="1" name="Vendor" type="Vendor" /> </xs:sequence> </xs:complexType> </xs:element> <!-- The representation of an event header containing information common for all Milestone events. --> <xs:complexType name="EventHeader"> <xs:sequence> <!-- The unique ID of the event. --> <xs:element minOccurs="1" maxOccurs="1" name="ID" type="GUID" /> <!-- The time of the event. --> <xs:element minOccurs="1" maxOccurs="1" name="Timestamp" type="xs:dateTime" />

Page 14: Milestone Analytics Events 2.0; Developers Manualdownload.milestonesys.com/MIPSDK/Milestone_AnalyticsEvents...Man… · Milestone Analytics Events 2.0; Developer’s Manual Page 2

Milestone Analytics Events 2.0; Developer’s Manual

www.milestonesys.com Page 14 Appendix A

<!-- The class of the event, e.g. "Analytics" or "Central" --> <xs:element minOccurs="0" maxOccurs="1" name="Class" type="xs:string" /> <!-- The type - a sub-classification - of the event, if applicable, e.g. "License Plate Recognition" --> <xs:element minOccurs="0" maxOccurs="1" name="Type" type="xs:string" /> <!-- The version of this document schema. --> <xs:element minOccurs="0" maxOccurs="1" name="Version" type="xs:string" /> <!-- The priority of the event. --> <xs:element minOccurs="0" maxOccurs="1" name="Priority" type="xs:unsignedShort" /> <!-- The event name. --> <xs:element minOccurs="0" maxOccurs="1" name="Name" type="xs:string" /> <!-- The event message. This must match the event message in an alarm definition for the event server to trigger an alarm. --> <xs:element minOccurs="1" maxOccurs="1" name="Message" type="xs:string" /> <!-- A custom tag set by the user to filter triggered alarms in the Smart Client. --> <xs:element minOccurs="0" maxOccurs="1" name="CustomTag" type="xs:string" /> <!-- The source of the event. This can represent e.g. a camera, a microphone, a user-defined event, etc. This must also match the source in an alarm definition for the event server to trigger an alarm. --> <xs:element minOccurs="0" maxOccurs="1" name="Source" type="EventSource" /> </xs:sequence> </xs:complexType> <!-- The representation of a GUID, generally the id of an element. --> <xs:simpleType name="GUID"> <xs:restriction base="xs:string"> <xs:pattern value="[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"/> </xs:restriction> </xs:simpleType> <!-- The source of the event. This can represent e.g. a camera, a microphone, a user-defined event, etc. --> <xs:complexType name="EventSource"> <xs:sequence> <!-- The name of the source. --> <xs:element minOccurs="0" maxOccurs="1" name="Name" type="xs:string" /> <!-- A description of the source. --> <xs:element minOccurs="0" maxOccurs="1" name="Description" type="xs:string" /> <!-- The Fully Qualified ID of the source. --> <xs:element minOccurs="0" maxOccurs="1" name="FQID" type="FQID" /> </xs:sequence> </xs:complexType> <!-- The Fully Qualified ID contains a complete set of fields to contact a server and get further details. --> <xs:complexType name ="FQID"> <xs:sequence> <!-- Id of the server that owns the item. --> <xs:element name="ServerId" minOccurs="0"> <xs:complexType> <xs:sequence> <!-- The server type, e.g. "XPCO" or "XPE" --> <xs:element minOccurs="0" maxOccurs="1" name="Type" type="xs:string" /> <!-- The server hostname. --> <xs:element minOccurs="0" maxOccurs="1" name="Hostname" type="xs:string" /> <!-- The server port. --> <xs:element minOccurs="0" maxOccurs="1" name="Port" type="xs:int" /> <!-- The server ID. -->

Page 15: Milestone Analytics Events 2.0; Developers Manualdownload.milestonesys.com/MIPSDK/Milestone_AnalyticsEvents...Man… · Milestone Analytics Events 2.0; Developer’s Manual Page 2

Milestone Analytics Events 2.0; Developer’s Manual

www.milestonesys.com Page 15 Appendix A

<xs:element minOccurs="1" maxOccurs="1" name="Id" type="GUID" /> </xs:sequence> </xs:complexType> </xs:element> <!-- The ID of the parent if applicable, e.g. recorder ID for cameras, or camera ID for PTZ Presets. --> <xs:element minOccurs="0" maxOccurs="1" name="ParentId" type="GUID" /> <!-- The ID of the item itself (except for Presets, see below). --> <xs:element minOccurs="0" maxOccurs="1" name="ObjectId" type="GUID" /> <!-- The ID of the item, when the ID is not a GUID, e.g. a preset. --> <xs:element minOccurs="0" maxOccurs="1" name="ObjectIdString" type="xs:string" /> <!-- Defines if this object is a folder, e.g. contains children: 0: No 1: SystemDefined 2: UserDefined --> <xs:element minOccurs="1" maxOccurs="1" name="FolderType" type="xs:unsignedByte" /> <!-- The type identifier of this item. The most common item kinds have been predefined in VideoOS.Platform.Kind: 3B25FE94-7C2F-499a-86DF-2FA68AA3E1B5: Server 5135BA21-F1DC-4321-806A-6CE2017343C0: Camera B77D68FC-B231-441b-8EB5-901C89234111: Speaker DF6284F6-18EE-4506-B8C4-65B5F31A140C: Microphone 5FC737A9-BBF6-4473-A421-7E8075D45D9C: InputEvent C9BDAC3F-41DC-4afa-B057-61767A3914B7: TriggerEvent CBAAA726-A089-4db6-8F0D-48772E595B1B: Output 083A635C-8412-4ea2-8DD9-9223FCA35AB6: Preset 9A1492D1-FCA0-44d7-BA9C-3699C99063A7: TransactSource F0E91DE0-4E81-4f00-8BB6-B9C932D5B598: Folder B4F8C44A-84B4-4333-8B8D-4B621A149C0B: Matrix 84ED10D8-D5BC-4785-9C8E-F84440218F24: View 15DA80D4-7595-431f-9866-674D2B80ACC5: Window BBB64F9C-E3C7-41d4-A77E-D488390D7FCB: Screen --> <xs:element minOccurs="1" maxOccurs="1" name="Kind" type="GUID" /> </xs:sequence> </xs:complexType> <!-- A list of rules. --> <xs:complexType name="RuleList"> <xs:sequence> <!-- A rule, which triggered the event. --> <xs:element minOccurs="0" maxOccurs="unbounded" name="Rule" type="Rule" /> </xs:sequence> </xs:complexType> <!-- The representation of a rule, which triggered the event. --> <xs:complexType name="Rule"> <xs:sequence> <!-- The ID of the rule. --> <xs:element minOccurs="0" maxOccurs="1" name="ID" type="GUID" /> <!-- The name of the rule. --> <xs:element minOccurs="0" maxOccurs="1" name="Name" type="xs:string" /> <!-- The type of the rule. --> <xs:element minOccurs="0" maxOccurs="1" name="Type" type="xs:string" /> <!-- A list of polygons illustrating the rule within the scene (tripwires, areas, etc.). --> <xs:element minOccurs="0" maxOccurs="1" name="PolygonList" type="PolygonList" /> </xs:sequence> </xs:complexType> <!-- A list of polygons. --> <xs:complexType name="PolygonList"> <xs:sequence> <!-- A polygon. --> <xs:element minOccurs="0" maxOccurs="unbounded" name="Polygon" type="TPolygon" /> </xs:sequence>

Page 16: Milestone Analytics Events 2.0; Developers Manualdownload.milestonesys.com/MIPSDK/Milestone_AnalyticsEvents...Man… · Milestone Analytics Events 2.0; Developer’s Manual Page 2

Milestone Analytics Events 2.0; Developer’s Manual

www.milestonesys.com Page 16 Appendix A

</xs:complexType> <!-- The representation of a polygon describing a set of normalized coordiantes and color. --> <xs:complexType name="TPolygon"> <xs:sequence> <!-- A flag indicating whether the polygon is open or closed. --> <xs:element minOccurs="0" maxOccurs="1" name="Closed" type="xs:boolean" /> <!-- The preferred color of the polygon. --> <xs:element minOccurs="0" maxOccurs="1" name="Color" type="TColor" /> <!-- The preferred fill color of a closed polygon, if any. --> <xs:element minOccurs="0" maxOccurs="1" name="FillColor" type="TColor" /> <!-- A list of points, describing the polygon. --> <xs:element minOccurs="0" maxOccurs="1" name="PointList" type="PointList" /> </xs:sequence> </xs:complexType> <!-- A list of points --> <xs:complexType name="PointList"> <xs:sequence> <!-- A point. --> <xs:element minOccurs="0" maxOccurs="unbounded" name="Point" type="TPoint" /> </xs:sequence> </xs:complexType> <!-- The representation of a point described by a set of normalized coordinates. --> <xs:complexType name="TPoint"> <xs:sequence> <!-- The normalized X coordinate [0;1]. --> <xs:element minOccurs="1" maxOccurs="1" name="X" type="xs:double" /> <!-- The normalized Y coordinate [0;1]. --> <xs:element minOccurs="1" maxOccurs="1" name="Y" type="xs:double" /> </xs:sequence> </xs:complexType> <!-- The representation of an ARGB color. --> <xs:complexType name="TColor"> <xs:sequence> <!-- The alpha channel [0;255]. 0 represents a fully transparent color, and 255 represents a fully opaque color. --> <xs:element minOccurs="1" maxOccurs="1" name="A" type="xs:unsignedByte" /> <!-- The red color channel [0;255]. --> <xs:element minOccurs="1" maxOccurs="1" name="R" type="xs:unsignedByte" /> <!-- The green color channel [0;255]. --> <xs:element minOccurs="1" maxOccurs="1" name="G" type="xs:unsignedByte" /> <!-- The blue color channel [0;255]. --> <xs:element minOccurs="1" maxOccurs="1" name="B" type="xs:unsignedByte" /> </xs:sequence> </xs:complexType> <!-- A list of snapshots. --> <xs:complexType name="SnapshotList"> <xs:sequence> <!-- A snapshot. --> <xs:element minOccurs="0" maxOccurs="unbounded" name="Snapshot" type="Snapshot" /> </xs:sequence> </xs:complexType> <!-- The representation of a snapshot associated with the event with time offset relative to the event timestamp. --> <xs:complexType name="Snapshot"> <xs:sequence> <!-- The time offset in milliseconds relative to the event timestamp. --> <xs:element minOccurs="1" maxOccurs="1" name="TimeOffset" type="xs:int"/>

Page 17: Milestone Analytics Events 2.0; Developers Manualdownload.milestonesys.com/MIPSDK/Milestone_AnalyticsEvents...Man… · Milestone Analytics Events 2.0; Developer’s Manual Page 2

Milestone Analytics Events 2.0; Developer’s Manual

www.milestonesys.com Page 17 Appendix A

<!-- The width of the image in pixels. --> <xs:element minOccurs="0" maxOccurs="1" name="Width" type="xs:unsignedInt" /> <!-- The height of the image in pixels. --> <xs:element minOccurs="0" maxOccurs="1" name="Height" type="xs:unsignedInt" /> <!-- A flag indicating whether the image has overlay rendered into the image. --> <xs:element minOccurs="0" maxOccurs="1" name="HasOverlay" type="xs:boolean" /> <!-- The size in bytes of the binary image. --> <xs:element minOccurs="0" maxOccurs="1" name="SizeInBytes" type="xs:unsignedInt" /> <!-- A (base64) binary JPEG image, if the image is stored in the alarm database. --> <xs:element minOccurs="0" maxOccurs="1" name="Image" type="xs:base64Binary" /> <!-- A path to the image on the server, if the image is stored on the central server. --> <xs:element minOccurs="0" maxOccurs="1" name="Path" type="xs:string" /> <!-- A FQID to a camera, if the snaphort referes to the recorded image on the recording server. --> <xs:element minOccurs="0" maxOccurs="1" name="FQID" type="FQID" /> </xs:sequence> </xs:complexType> <!-- A list of analytics objects. --> <xs:complexType name="AnalyticsObjectList"> <xs:sequence> <!-- An analytics object. --> <xs:element name="Object" type="AnalyticsObject" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> </xs:complexType> <!-- The representation of an analytics object. --> <xs:complexType name="AnalyticsObject"> <xs:sequence> <!-- The ID of the object. --> <xs:element minOccurs="0" maxOccurs="1" name="ID" type="GUID" /> <!-- The name of the object. --> <xs:element minOccurs="0" maxOccurs="1" name="Name" type="xs:string" /> <!-- The type of the object. --> <xs:element minOccurs="0" maxOccurs="1" name="Type" type="xs:string" /> <!-- A description of the object. --> <xs:element minOccurs="0" maxOccurs="1" name="Description" type="xs:string" /> <!-- Normalized confidence of the detection [0;1]. --> <xs:element minOccurs="0" maxOccurs="1" name="Confidence" type="xs:double" /> <!-- A value associated with the object. This could be a detected license plate, or the number of people in a detected crowd, etc. --> <xs:element minOccurs="0" maxOccurs="1" name="Value" type="xs:string" /> <!-- A flag indicating whether the object is the cause of the event. --> <xs:element minOccurs="0" maxOccurs="1" name="AlarmTrigger" type="xs:boolean" /> <!-- A flag indicating whether this object referes to a removed object. --> <xs:element minOccurs="0" maxOccurs="1" name="Removed" type="xs:boolean" /> <!-- Human-readable color of the object. --> <xs:element minOccurs="0" maxOccurs="1" name="Color" type="xs:string" /> <!-- Human-readable size of the object in the unit given SizeUnit. --> <xs:element minOccurs="0" maxOccurs="1" name="Size" type="xs:double" /> <!-- The unit of the object's Size. --> <xs:element minOccurs="0" maxOccurs="1" name="SizeUnit" type="xs:string" /> <!-- The bounding box of the object. --> <xs:element minOccurs="0" maxOccurs="1" name="BoundingBox" type="BoundingBox" />

Page 18: Milestone Analytics Events 2.0; Developers Manualdownload.milestonesys.com/MIPSDK/Milestone_AnalyticsEvents...Man… · Milestone Analytics Events 2.0; Developer’s Manual Page 2

Milestone Analytics Events 2.0; Developer’s Manual

www.milestonesys.com Page 18 Appendix A

<!-- An outline of the object. For complex objects, it is not recommended setting the polygon due to verbosity. Use BoundingBox or Mask instead. --> <xs:element minOccurs="0" maxOccurs="1" name="Polygon" type="TPolygon" /> <!-- The motion of the object (speed and path). --> <xs:element minOccurs="0" maxOccurs="1" name="Motion" type="ObjectMotion" /> <!-- A binary mask of the object within the boudingbox. --> <xs:element minOccurs="0" maxOccurs="1" name ="Mask" type="xs:base64Binary" /> </xs:sequence> </xs:complexType> <!-- The representation of a bounding box, describing a rectangle in normalized coordinates within the scene. --> <xs:complexType name="BoundingBox"> <xs:sequence> <!-- The top of the bounding box. --> <xs:element minOccurs="1" maxOccurs="1" name="Top" type="xs:double" /> <!-- The left side of the bounding box. --> <xs:element minOccurs="1" maxOccurs="1" name="Left" type="xs:double" /> <!-- The bottom of the bounding box. --> <xs:element minOccurs="1" maxOccurs="1" name="Bottom" type="xs:double" /> <!-- The right side of the bounding box. --> <xs:element minOccurs="1" maxOccurs="1" name="Right" type="xs:double" /> <!-- The preferred color of the boudnig box. --> <xs:element minOccurs="0" maxOccurs="1" name="Color" type="TColor" /> </xs:sequence> </xs:complexType> <!-- The representation of an objects tracked motion through the scene. --> <xs:complexType name="ObjectMotion"> <xs:sequence> <!-- Human-reable speed of the object in the units given by SpeedUnit. --> <xs:element minOccurs="0" maxOccurs="1" name="Speed" type="xs:double" /> <!-- The unit of the object's Speed. --> <xs:element minOccurs="0" maxOccurs="1" name="SpeedUnit" type="xs:string" /> <!-- The path of tracked the object. The polygon should typically be defined as Open. --> <xs:element minOccurs="0" maxOccurs="1" name="Path" type="TPolygon" /> </xs:sequence> </xs:complexType> <!-- A list of references. --> <xs:complexType name="ReferenceList"> <xs:sequence> <!-- A reference to another entity in the system - e.g. another device or event. --> <xs:element minOccurs="0" maxOccurs="unbounded" name="Reference" type="Reference" /> </xs:sequence> </xs:complexType> <!-- The representation of a reference to another entity in the system - e.g. another device or event. --> <xs:complexType name="Reference"> <xs:sequence> <!-- The Fully Quallified --> <xs:element minOccurs="0" maxOccurs="1" name="FQID" type="FQID" /> </xs:sequence> </xs:complexType> <!-- Information about the analytics vendor including any custom data. --> <xs:complexType name="Vendor"> <xs:sequence> <!-- The name of the vendor --> <xs:element minOccurs="0" maxOccurs="1" name="Name" type="xs:string" />

Page 19: Milestone Analytics Events 2.0; Developers Manualdownload.milestonesys.com/MIPSDK/Milestone_AnalyticsEvents...Man… · Milestone Analytics Events 2.0; Developer’s Manual Page 2

Milestone Analytics Events 2.0; Developer’s Manual

www.milestonesys.com Page 19 Appendix A

<!-- Custom vendor data. XML should be wrapped in '<![CDATA[', ']]>' or use '&lt;', '&gt;' for '<', '>'. Note that custom data will not be indexed; therefore retrieving it will not be optimized. --> <xs:element minOccurs="0" maxOccurs="1" name="CustomData" type="xs:string" /> </xs:sequence> </xs:complexType> </xs:schema>

Page 20: Milestone Analytics Events 2.0; Developers Manualdownload.milestonesys.com/MIPSDK/Milestone_AnalyticsEvents...Man… · Milestone Analytics Events 2.0; Developer’s Manual Page 2

Milestone Systems offices are located across the world. For details about office addresses, phone and fax numbers, visit

www.milestonesys.com.