Simd Library Documentation.

Home | Release Notes | Download | Documentation | Issues | GitHub

An event generated by Simd::Motion::Detector on the current frame. More...

#include <SimdMotion.hpp>

Public Types

enum  Type {
  ObjectIn ,
  ObjectOut ,
  SabotageOn ,
  SabotageOff
}
 

Public Member Functions

 Event (Type type_, const String &text_=String(), Id objectId_=-1)
 

Data Fields

enum Simd::Motion::Event::Type type
 Event type. Typical usage is a switch for annotation text.
 
String text
 Event text. Detector sets "ObjectIn", "ObjectOut", "SabotageOn" or "SabotageOff".
 
Id objectId
 Object::id for ObjectIn/ObjectOut, or -1 for sabotage events.
 

Detailed Description

An event generated by Simd::Motion::Detector on the current frame.

NextFrame clears Metadata::events and then appends events of this frame. Typical usage switches on Type to print "in N" / "out N" / "SABOTAGE ON" / "SABOTAGE OFF" and keeps a scrolling list of recent events.

ObjectIn is emitted when a track is classified as moving. ObjectOut is emitted when a classified object is removed (absent longer than Options::TrackingRemoveTime, or dropped during background init). SabotageOn / SabotageOff are emitted when the total motion area crosses Options::StabilityRegionAreaMax. Sabotage events use objectId -1.

Member Enumeration Documentation

◆ Type

enum Type

Type of event generated by Detector::NextFrame.

Enumerator
ObjectIn 

A new object was classified as moving. text is "ObjectIn"; objectId is Object::id.

ObjectOut 

A classified object disappeared. text is "ObjectOut"; objectId is Object::id.

SabotageOn 

Motion area exceeded Options::StabilityRegionAreaMax. text is "SabotageOn"; objectId is -1.

SabotageOff 

Motion area fell back below Options::StabilityRegionAreaMax. text is "SabotageOff"; objectId is -1.

Constructor & Destructor Documentation

◆ Event()

Event ( Type  type_,
const String text_ = String(),
Id  objectId_ = -1 
)

Constructs Event.

Detector constructs events internally. Typical usage reads type, text and objectId from Metadata::events.

Parameters
[in]type_- a type of a new event.
[in]text_- a text description of the event. It is equal to empty string by default.
[in]objectId_- an ID of object concerned with this event. It is equal to -1 by default.