-
Notifications
You must be signed in to change notification settings - Fork 112
Update counting rule based on new rule structure #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ce016de
5206941
2a9dd85
fdf7b8c
13bbb62
0710608
6db0969
9aea6e6
71b87a0
aa6162a
bfa536d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3430,128 +3430,131 @@ | |
]]></programlisting> | ||
</section> | ||
<section> | ||
<title>Counting rule</title> | ||
<para>Counting rule counts the number of motion object passing through the set of line segments (barrier) and optional direction attribute. The configuration parameters also include the time interval to report the events and time interval to reset its counter. </para> | ||
<programlisting><![CDATA[<tt:RuleDescription Name="tt:CountAggregation"> | ||
<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:ElementItemDescription Name="LineSegments" | ||
Type="tt:PolylineArrayConfiguration"/> | ||
<tt:SimpleItemDescription Name="ReportTimeInterval" Type="xs:duration"/> | ||
<tt:SimpleItemDescription Name="ResetTimeInterval" Type="xs:duration"/> | ||
<tt:SimpleItemDescription Name="Direction" Type="tt:Direction"/> | ||
<tt:ElementItemDescription Name="Segments" Type="tt:Polyline"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it tt:Polyline or tt:PolylineArray ? if its segments polyline array makes sense. Other option is to change this segments to just segment. How can we notify the number of segments supported, using generic options ? Instead of segments, from hanwha side we prefer just single line segment. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer to keep Segments as also used in LineDetector. My understanding is that one Polyline consists of a number of segments and hence the name Segments was chosen back in 2008. |
||
<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: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:Key> | ||
<tt:SimpleItemDescription Name="ObjectId" Type="xs:integer"/> | ||
</tt:Key> | ||
<tt:Data> | ||
<tt:SimpleItemDescription Name="Count" Type="xs:nonNegativeInteger"/> | ||
<tt:SimpleItemDescription Name="Count" Type="xs:int"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change back to xs:nonNegativeInteger to emphasize it only counts upwards? |
||
</tt:Data > | ||
<tt:ParentTopic> | ||
tns1:RuleEngine/CountAggregation/Counter | ||
</tt:ParentTopic> | ||
</tt:Messages> | ||
</tt:RuleDescription> | ||
]]></programlisting> | ||
<para>The above rule description defines that a rule instance produces a count event of topic tns1:RuleEngine/CountAggregation/Counter. Configuration parameters are given in <xref linkend="_Ref522787002" />.</para> | ||
<table xml:id="_Ref522787002"> | ||
<title>Counting 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>LineSegments</para> | ||
</entry> | ||
<entry> | ||
<para>Array of lines used for detecting that object passed all of them for counting</para> | ||
</entry> | ||
</row> | ||
<row> | ||
<entry> | ||
<para>ReportTimeInterval</para> | ||
</entry> | ||
<entry> | ||
<para>Time interval to report count information</para> | ||
</entry> | ||
</row> | ||
<row> | ||
<entry> | ||
<para>ResetTimeInterval</para> | ||
</entry> | ||
<entry> | ||
<para>Periodic count reset time</para> | ||
</entry> | ||
</row> | ||
<row> | ||
<entry> | ||
<para>Direction</para> | ||
</entry> | ||
<entry> | ||
<para>Count direction </para> | ||
</entry> | ||
</row> | ||
</tbody> | ||
</tgroup> | ||
</table> | ||
<para>The event contains the fields given in <xref linkend="_Ref522787034" />.</para> | ||
<table xml:id="_Ref522787034"> | ||
<title>Description of counting event fields</title> | ||
<tgroup cols="2"> | ||
<colspec colname="c1" colwidth="22*" /> | ||
<colspec colname="c2" colwidth="78*" /> | ||
<thead> | ||
<row> | ||
<entry> | ||
<para> | ||
<emphasis role="bold">Parameter Name</emphasis> | ||
</para> | ||
</entry> | ||
<entry> | ||
<para> | ||
<emphasis role="bold">Description</emphasis> | ||
</para> | ||
</entry> | ||
</row> | ||
</thead> | ||
<tbody valign="top"> | ||
<row> | ||
<entry> | ||
<para>ObjectId</para> | ||
</entry> | ||
<entry> | ||
<para>Object Identifier of last counted object</para> | ||
</entry> | ||
</row> | ||
<row> | ||
<entry> | ||
<para>Count</para> | ||
</entry> | ||
<entry> | ||
<para>Value of counter</para> | ||
</entry> | ||
</row> | ||
</tbody> | ||
</tgroup> | ||
</table> | ||
</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</ter 8000 m> | ||
<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> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to xs:nonNegativeInteger to emphasize it only counts upwards?