0% found this document useful (0 votes)
107 views15 pages

VCA TaskScriptLanguage FW660 Technical Note

Uploaded by

summerhigh7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
107 views15 pages

VCA TaskScriptLanguage FW660 Technical Note

Uploaded by

summerhigh7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Bosch Security Systems | Video Systems 1 | 15

How to use the VCA Task Script Language


Including examples for several use cases

Data subject to change without notice | September 10, 2018 Security Systems / Video Systems
Bosch Security Systems | Video Systems 2 | 15

Table of contents

1 What is the VCA task script language? 4

1.1 When to use the VCA task scripts? ..................................................................................................................... 4

1.2 How to use VCA task scripts? ............................................................................................................................. 4

1.3 How to access the VCA task script language? ................................................................................................... 4

1.4 Task & object filter overview ................................................................................................................................ 5

1.5 Object state and event overview ......................................................................................................................... 5

1.6 Combining & converting object states and events .............................................................................................. 6

1.7 Temporary states for time evaluations ................................................................................................................ 6

1.8 Position descriptions ........................................................................................................................................... 6

2 Examples & Explanations 7

2.1 Understanding the VCA task script language: Line Crossing, GUI ..................................................................... 7

2.2 Understanding the VCA task script language: Polygonal lines ........................................................................... 7

2.3 Understanding the VCA task script language: Line crossing with object filters .................................................. 8

2.4 Understanding the VCA task script language: Fields .......................................................................................... 8

2.5 Understanding the VCA task script language: Routes ........................................................................................ 8

2.6 Example: Alarm if object enters a field and afterwards crosses the line ............................................................. 9

2.7 Example: Alarm if object enters first one field and then the other....................................................................... 9

2.8 Example: Perimeter protection with two fields .................................................................................................... 9

2.9 Example: Combining lines for counting ............................................................................................................. 10

2.10 Example: Crossing line1 with 60km/h and line 2 with 20km/h .......................................................................... 10

2.11 Example: Stopping in area after crossing line................................................................................................... 10

2.12 Example: Alarm When Object Touches Area .................................................................................................... 11

2.13 Example: Alarm when object enters an area at least 4 times ........................................................................... 11

2.14 Example: Alarm when a second object crosses a line within 3 seconds of the first ......................................... 11

2.15 Example: Alarm when at least 2 object are in an area ...................................................................................... 12

Data subject to change without notice | September 10, 2018 Security Systems / Video Systems
Bosch Security Systems | Video Systems 3 | 15

2.16 Example: Count the number of objects in an area ............................................................................................ 12

2.17 Example: Alarm on empty reception desk......................................................................................................... 12

2.18 Example: Alarm if one queue is empty and the other has at least 3 persons ................................................... 13

2.19 Example: Virtual room for counting with one in and one out line ...................................................................... 13

2.20 Example: Virtual room for counting with two in and one out line ...................................................................... 13

2.21 Example: Alarm on any object that is not yellow ............................................................................................... 14

2.22 Example: Count all red objects ......................................................................................................................... 14

2.23 Example: Debouncing object size by 5 seconds............................................................................................... 14

2.24 Example: Give 30 sec alarm on any object (aggregation time) ........................................................................ 14

15

Data subject to change without notice | September 10, 2018 Security Systems / Video Systems
Bosch Security Systems | Video Systems 4 | 15

1 What is the VCA task script language?


VCA stands for video content analysis. The VCA task script language
 describes every predefined and configured Intelligent Video Analytics,
Essential Video Analytics and MOTION+ task and task wizard
 can combine tasks to form more complex ones
 can NOT configure the metadata generation

1.1 When to use the VCA task scripts?


The VCA task scripts are used implicitly whenever an Intelligent Video Analytics, Essential Video Analytics or MOTION+ task is
configured via the GUI. However, manual configuration of the VCA task scripts is also possible and advised whenever the predefined
tasks are not enough:
 For backup and exchange of the configured tasks, the script can be copied from and pasted into the task script editor.
 When more than 8 alarm tasks are needed: 16 external alarm tasks are configurable via VCA task scripts.
 Fine tuning the position of lines and fields.
 Line combinations for counting with FW < 6.30.
 Don’t touch (museum mode) with FW < 6.10: Alarm needs to be triggered by any part of bounding box, not only by the object center.
 Logical combinations of predefined events are needed.

1.2 How to use VCA task scripts?


(1) Define all tasks via task wizards as far as possible.
(2) Change to the VCA task script editor. The already defined tasks can be found there with all details.
(3) Make your modifications.
(4) Change the defined tasks into task type scripted so accidental use of the task wizards will not overwrite your changes.

1.3 How to access the VCA task script language?


Go to the Intelligent Video Analytics, Essential Video Analytics or MOTION+ configuration and open the task page. Right-click on the
video and select Advanced -> VCA Task Editor. A separate popup with the current VCA task script will appear:

Data subject to change without notice | September 10, 2018 Security Systems / Video Systems
Bosch Security Systems | Video Systems 5 | 15

1.4 Task & object filter overview


A task consists of
 A task primitive
 An object state or interaction with a task primitive
 A filter on the object properties if task is based on objects
Note that not all tasks and filters are available in every FW version.

MOTION+:
Task Primitives Tasks
Field Motion in Field
Image

Intelligent Video Analytics & Essential Video Analytics (the latter w/o flow tasks):
Task Primitives Tasks Flow Tasks Object Filter
Line Detect any object Flow in field Object area
Field Crossing line Counterflow in field Aspect ratio
Route Object in field Crowd detection Speed
Image Entering field Tampering Direction
Leaving field Color
Following route Head
Loitering Object class
Removed object
Idle object
Condition change
Similarity search
Counter
BEV people counter
Occupancy
Crowd detection
Tampering

1.5 Object state and event overview


From the task primitives, the tasks and the object filter as defined in the GUI via the task wizards, target object states and events are
derived. These can also be defined directly in the VCA task script language.

Events are always temporal relations


 Up to 8 external events can be shown in GUI
 Up to 16 external events can be defined in total
 Up to 32 events can be defined in total

States can be, amongst others, spatial relations, object properties, tamper states, counter values
 Up to 16 external states can be defined
 Up to 32 states in total can be defined

Events and states can be internal or external. Only external events and states are outputted.

Simple states are used whenever a property has no corresponding objects. Examples are Motion+, Flow,
counter values and tamper states.

Data subject to change without notice | September 10, 2018 Security Systems / Video Systems
Bosch Security Systems | Video Systems 6 | 15

Object Object States Object events TamperStates Other SimpleStates


Properties
Direction InsideField CrossedLine SignalTooNoisy DetectedMotion
Velocity ObjectsInField EnteredField SignalTooDark DetectedFlow
AspectRatio IsLoitering LeftField SignalTooBright EstimatedCrowdDensity
ObjecSize SimilarToColor FollowedRoute SignalLoss Counter
FaceWidth HasDirection Appeared GlobalChange ObjectsOnScreen
MaxFaceWidth HasVelocity Disappeared RefImageCheckFailed ObjectsInField
HasAspectRatio Idle ObjectsInState
HasObjectSize Removed
HasColor
HasFace
HadFace
HasClass
HadClass

1.6 Combining & converting object states and events


The combinations of object states and events listed below are possible. Object states can be also converted into events, but only the
onset or leaving of an object state is an actual event, not the actual duration of the object in this state.

Logical combination of states / conditions:


Event conditions:
 and
where
 or

Event combination via temporal relations: State changes as events:


 before  OnChange
 before (<from>,<to>)  OnSet
 not before  OnClear

1.7 Temporary states for time evaluations


Starting with FW 6.60 and in order to create temporary states triggered by an event, the keyword within can used after an event. This
can be used to
- delay or debounce an alarm based on an object state: <event> within(0,<time>)
- to extend an alarm state similarly to the aggregation time: <event> within(<time>,*)
- debouncing object properties: By checking the target values is currently met, and has not changed during the debounce time
- temporarily combine an event with other states

1.8 Position descriptions


There are two different ways to describe the position information of lines, fields and routes:
 Absolute pixel position, e.g. Point(103, 30). You need to know exactly which resolution is used in the video analytics for that.
 Relative coordinates, e.g. specifying
Resolution := { Min(-1, -1) Max(1, 1) };
Line #1 := { Point(-0.85, 0.95) Point(-0,6, 0.4)};
Here, the coordinates are defined within the specified resolution and transferred automatically to the real resolution used in the
video analytics.

Data subject to change without notice | September 10, 2018 Security Systems / Video Systems
Bosch Security Systems | Video Systems 7 | 15

2 Examples & Explanations


2.1 Understanding the VCA task script language: Line Crossing, GUI

//Definition of task primitives Line: 2 end points


Line #1 := { Point(103, 30) Point(159, 77)};
Line #2 := { Point(26, 65) Point(82, 122) Direction of Line :
DebounceTime(0.50) Direction(1) }; // any
Direction(1) //forward
//Definition of alarm task shown in GUI Direction(2) //backward
//@Task T:2 V:0 I:1 "Crossing line 1" {
//[1.a=s1:1;1.b=1;1.c=32;1.d=31;4.a=i:1;] DebounceTime of Line/Field is optional
external Event#1 :={CrossedLine#1};
//@} CrossedLine #x is an event that triggers when an object
crosses Line #x in the specified way
//Definition of self-defined task shown in GUI
//@Task T:0 V:0 I:2 "Crossing line 2" { external is keyword for alarms / statistics
external Event#2 :={CrossedLine#2};
//@} Task wizard definition:
//@Task T:x V:y I:z
//Definition of alarm task not shown in GUI T:x describes the task number (Object in Field, Line
external Event#3 :={CrossedLine#2}; Crossing,… see icon for correct task!)
T:0 describes a self-defined task. Use this for your own
scripts to avoid the task wizards overwriting it
V:0 is the version number, currently always 0 I:z is the
slot in the tasks page
I:1 describes the occupied slot in the GUI task list. For
the slot to change to red in case of alarms, the external
event / state defined in the task needs to have the same
number as the task
[1.a=s1:1;….] describes the task wizard values

2.2 Understanding the VCA task script language: Polygonal lines


//Definition of task primitives
Polygonal Line: 2-16 vertices
Resolution := { Min(-1, -1) Max(1, 1) };
Line #1 := { Point(-0.85, 0.95) Point(-0.6, 0.4)
Point(0.6, 0.4) Point(0.85, 0.95) Available from FW 6.30 onwards
DebounceTime(0.50) Direction(2)
TriggerPoint(FootPoint) }; Relative description of line points via Resolution

//Definition of alarm task shown in GUI TriggerPoint of Line:


//@Task T:2 V:0 I:1 "Crossing line 1" { // center point
//[1.a=s1:1;1.b=1;1.c=32;1.d=31;4.a=i:1;] FootPoint //FootPoint from FW 6.30 onwards
external Event#1 :={CrossedLine#1};
//@}

Data subject to change without notice | September 10, 2018 Security Systems / Video Systems
Bosch Security Systems | Video Systems 8 | 15

2.3 Understanding the VCA task script language: Line crossing with object filters

where restricts events by object properties


//Definition of task primitives and / or combine properties
Line #1 := { Point(103, 30) Point(159, 77)}; within restricts to value range

//@Task T:2 V:0 I:1 "Crossing line 1" {


//[1.a=s1:1;1.b=1;1.c=32;1.d=31;3.o=(b1:1, The wildcard * describes undefined values
b2:0.1,b3:500, c1:1,c2:0.02,c3:34.00,d1:1,
d2:0,d3:27.78,e1:1,e2:315, e3:45,f1:1,f2:135, Example for modeling via object state:
f3:225);4.a=(c:2b19,i:1,pr:2);5.a=(c:1,p:1); ObjectState#1 := Velocity within (30.0,*);
6.a=(d1:8,d2:33,r:2,u:1);]
ColorHistogram #1:= { HSV(60,38,100,25)
Similarity(75) Outlier(75) }; ColorHistogram uses HSV color space with hue (0-360),
external Event#1:={CrossedLine#1 saturation (0-100), intensity (0-100). In addition, a weight
can be specified in the HSV.
where ObjectSize within(0.1,500)
Similarity (0-100) specifies how similar a color histogram
and AspectRatio within(0.02,34.00) must be in order to be regarded as a match, with higher
and Velocity within(0,27.78) numbers for closer colors.
and (Direction within(315,405) or Direction within(135,225)) Outliers (1-100) specifies how much of the object needs
and SimilarToColor #1 to have the target colors, and how much is ignored as
and HadFace and MaxFaceWidth within(8,33)}; outlier, with higher numbers allowing more differences.
//@}
SimilarToColor#x compares the color histogram of the
object to the specified ColorHistogram#x

2.4 Understanding the VCA task script language: Fields


Field: 3-16 vertices
//Definition of task primitives
Field #1 := { Point(56, 24) Point(106, 24)
DebounceTime of Field is optional
Point(106, 74)};
Field #2 := { Point(56, 24) Point(106, 24)
ObjectSet of Field:
Point(106, 74) Point(56, 74) ObjectSet(BaryCenter) #default
DebounceTime(0.50) ObjectSet(BoundingBox)
ObjectSet(BoundingBox)
SetRelation(Covering)}; SetRelation for BountingBox:
SetRelation(Intersection) #default
//@Task T:1 V:0 I:1 "Object in field 1" { SetRelation(Covering)
//[1.a=1;1.b=1;3.a=i:1;]
external ObjectState #1 := InsideField #1; States of Field:
//@} InsideField#x
ObjectsInField#x

Events of Field:
EnteredField#x
LeftField#x

2.5 Understanding the VCA task script language: Routes

//Definition of task primitives Route: 2-8 vertices


+distance
Route #1 := { Point(34, 111) Distance(5)
Point(92, 125) Distance(5)
Point(140, 104) Distance(5) Direction of Line / Route:
# any
Point(143, 72) Distance(5)
Direction(1) #forward
MinPercentage(80) MaxGap(10) }; Direction(2) #backward

//@Task T:6 V:0 I:1 "Follow route 1" {


FollowedRoute #x is an event that triggers when an
//[1.a=id:1;1.b=1;3.a=i:1;]
object follows Route #x in the specified way
external Event #1 := { FollowedRoute #1 };
//@}

Data subject to change without notice | September 10, 2018 Security Systems / Video Systems
Bosch Security Systems | Video Systems 9 | 15

2.6 Example: Alarm if object enters a field and afterwards crosses the line
Application: Reduction of false alarms, especially for
//Definition of task primitives insects attracted by infrared illumination
Resolution := { Min(-1, -1) Max(1, 1) };
Field #1 := { Point(-0.6, 0.95) Point(-0.25, -0.95)
Point(0.25, -0.95) Point(0.6, 0.95)
DebounceTime(0.50) };
Line #1 := { Point(0.0, -0.95) Point(0.0, 0.95)
DebounceTime(0.50) };
//@Task T:0 V:0 I:1 "Enter Field and Line" {
external Event#1:={EnteredField #1 before(*,30) means the object needs to cross the line 0-
30 seconds after entering the field. As the object needs
before (*,30) CrossedLine #1 to enter the field in order to cross the line, the other
where first.oid == second.oid }; temporal direction is not checked.
//@}
The same object has to trigger both events. Thus using
where first.oid==second.oid

2.7 Example: Alarm if object enters first one field and then the other
//Definition of task primitives
Application: Reduction of false alarms, especially for
Resolution := { Min(-1, -1) Max(1, 1) }; insects attracted by infrared illumination
Field #1 := { Point(-0.6, 0.95) Point(-0.25, -0.95)
Point(-0.1, -0.95) Point(-0.1, 0.95)
DebounceTime(0.50) };
Field #2 := { Point(0.6, 0.95) Point(0.25, -0.95)
Point(0.1, -0.95) Point(0.1, 0.95)
DebounceTime(0.50) };
//@Task T:0 V:0 I:1 "Enter Field and Line" { before(*,30) means the object needs to cross the line 0-
external Event#1:={EnteredField #1 30 seconds after entering the field. As the object needs
before (*,30) EnteredField#2 to enter the field in order to cross the line, the other
temporal direction need not be checked.
where first.oid == second.oid };
//@}
The same object has to trigger both events. Thus using
where first.oid==second.oid

2.8 Example: Perimeter protection with two fields


//Definition of task primitives
Application: Reduction of false alarms, especially for
Resolution := { Min(-1, -1) Max(1, 1) }; insects attracted by infrared illumination
Field #1 := { Point(0.406, -0.644) Point(0.250, -0.656)
Point(-0.213, 1.000) Point(0.400, 1.000)
DebounceTime(0.10) };
Field #2 := { Point(0.181, -0.667) Point(-0.388, 1.000)
Point(-0.588, 1.000) Point(0.088, -0.678)
DebounceTime(0.10) };
//@Task T:0 V:0 I:1 " Field combination" {
ObjectState #16 := InsideField #1 and ObjectSize within(0.7,10) ; Restricting object size to further filter false alarms
ObjectState #17 := InsideField #2 and ObjectSize within(0.7,10) ;
external Event #1 := { OnSet ObjectState #16
before OnSet ObjectState #17
The same object has to trigger both events. Thus using
where first.oid==second.oid}; where first.oid==second.oid
//@}

Data subject to change without notice | September 10, 2018 Security Systems / Video Systems
Bosch Security Systems | Video Systems 10 | 15

2.9 Example: Combining lines for counting

From FW 6.30 onwards lines support up to 16 vertices.


//Definition of task primitives
Manual line combination is not necessary.
Line #1 := { Point(0, 90) Point(60, 90)
DebounceTime(0.10) Direction(1) }; Make sure that one lines end point is the start of the next
Line #2 := { Point(60, 90) Point(90, 60) line to leave no gaps
DebounceTime(0.10) Direction(1) };
Line #3 := { Point(90, 60) Point(90, 0) Set the same debounce time the same for all lines
DebounceTime(0.10) Direction(1) };
Combining line crossing line events via or
//@Task T:0 V:0 I:1 "Counter 1" {
Event#32 :=CrossedLine#1 or CrossedLine#2 Counter defines the counter task. The event on which it
or CrossedLine#3; counts is configured as well as the placement and label
external Counter#1 := { Event#32 Text("Corner Count1:") for the count text. The mode selected here says that
when reaching max count, the counter then starts from
TopLeft(4,4) Mode(Wraparound) 0 again.
within(0,999999999) };
//@}

2.10 Example: Crossing line1 with 60km/h and line 2 with 20km/h
Actually alarming when velocity on first line between 50
//Definition of task primitives km/h and 70 km/h and on second line between 10 km/h
Line #1 := {Point(50,0) Point(50,144)}; and 30 km/h.
Line #2 := {Point(120,0) Point(120,144)};

//Definition of line crossing events The velocity range is not in km/h here, therefore the
Event#11 :={CrossedLine#1 where conditions were generated with GUI default line crossing
Velocity within(13.89,19.44) }; tasks
Event#12 :={CrossedLine#2 where
Velocity within(2.778,5.556) }; Approach:
(1) Defined two line crossings via GUI with velocity
//Combination of line crossing events filters
//@Task T:0 V:0 I:1 "Two Line Speed Check" { (2) Removed all external keywords and task
external Event#1 :={Event#11 before Event#12 definitions, keeping task primitives and event
where first.oid==second.oid}; definitions
(3) Added combination of both line crossing events
//@}
as user-defined task

The same object has to trigger both line crossings. Thus


using where first.oid==second.oid

2.11 Example: Stopping in area after crossing line

//Definition of task primitives Using loitering instead of idle for demonstration purposes
Line #1 := { Point(130, 0) Point(130, 144) };
Field #2 := { Point(50, 0) Point(115, 0)
Point(115, 144) Point(50, 144)};
Note that only Event #1 is external and thus generating
alarms!
//@Task T:0 V:0 I:1 "Loitering after Line Crossing" {
Event#11 :={CrossedLine #1};
Loitering #13 := { Radius (15) Time (10) };
ObjectState #14 := InsideField #2 and IsLoitering #13; The same object has to trigger both the line crossing and
external Event #1 := {Event #11 before OnSet ObjectState #14 the loitering. Thus using where first.oid==second.oid
where first.oid==second.oid};
//@}

Data subject to change without notice | September 10, 2018 Security Systems / Video Systems
Bosch Security Systems | Video Systems 11 | 15

2.12 Example: Alarm When Object Touches Area

//Definition of task primitives


Field #1 := { Point(100, 0) Point(175, 0) Alarm on object touch instead of center of gravity of the
Point(175, 144) Point(100, 144) object via ObjectSet(BoundingBox)
ObjectSet(BoundingBox)};

//@Task T:0 V:0 I:1 "Object Touches Field" { Events and States are enumerated separately, thus both
ObjectState and Event may have #1
ObjectState #1 := InsideField #1;
external Event #1 := OnSet ObjectState #1;
//@}
Using state InsideField when objects appearing in the
field shall also trigger the alarm
//Alternative, objects have to come from the outside of the field:
//@Task T:0 V:0 I:2 "Object Touches Field" {
external Event #2 := EnteredField #1; Using event EnteredField when alarming only on objects
//@} which have been outside before

2.13 Example: Alarm when object enters an area at least 4 times

//Definition of task primitives


Resolution := { Min(-1, -1) Max(1, 1) };
Field #1 := { Point(-0.244, -0.922) Point(0.325, -0.944)
Point(0.350, 0.944) Point(-0.231, 0.944)
DebounceTime(0.50) };

//@Task T:0 V:0 I:1 "Thieve detection" {


Event #11 :={EnteredField #1 before EnteredField #1
where first.oid==second.oid};
Event #12 :={Event #11 before EnteredField #1
Application: protecting parked cars
where first.oid==second.oid};
external Event#1 :={Event #12 before EnteredField #1
where first.oid==second.oid}; Using before to concatenate events
//@}
Using an alternative way to define coordinates by setting
a resolution range

2.14 Example: Alarm when a second object crosses a line within 3 seconds of the first
//Definition of task primitives
Resolution := { Min(-1, -1) Max(1, 1) };
Line #1 := { Point(-0.187, -0.967) Point(-0.156, 0.911)
DebounceTime(0.50) Direction(2) TriggerPoint(FootPoint) };
//@Task T:0 V:0 I:1 "Tailgaiting" {
Event#21:={CrossedLine#1}; Using before(0,3) for “within 3 seconds”
Event#22:={CrossedLine#1};
external Event#1:={Event#21 before(0,3) Event#22 Two different objects have to trigger the line crossing.
where first.oid!=second.oid}; Thus using where first.oid!=second.oid
//@}

Data subject to change without notice | September 10, 2018 Security Systems / Video Systems
Bosch Security Systems | Video Systems 12 | 15

2.15 Example: Alarm when at least 2 object are in an area

//Definition of task primitives


From FW 6.30 onwards, the occupancy task offers this
Resolution := { Min(-1, -1) Max(1, 1) }; functionality directly via the GUI.
Field #1 := { Point(-0.656, -0.700) Point(0.350, -0.767)
Point(0.469, 0.644) Point(-0.694, 0.644)
DebounceTime(0.10) };
ObjectsInField#1 returns the number of objects in field 1.
Here, the range for the alarm is set from 2 to infinity.
//@Task T:0 V:0 I:1 "Alarm on more than two objects" {
external ObjectState #1:= ObjectsInField#1 within (2,*);
//@}

2.16 Example: Count the number of objects in an area

//Definition of task primitives


Resolution := { Min(-1, -1) Max(1, 1) };
Field #1 := { Point(-0.656, -0.700) Point(0.350, -0.767)
Point(0.469, 0.644) Point(-0.694, 0.644)
DebounceTime(0.10) }; ObjectsInField can be used as input for a counter as well

//@Task T:0 V:0 I:1 "Count of objects in field " {


external Counter#1 := { ObjectsInField#1 Text("Counter:")
TopLeft(-0.975,-0.844) };
//@}

//@Task T:18 V:0 I:2 "Count of objects in field " {


//[1.a=1;1.b=1;1.c=32;2.a=(,b3:1);]
ObjectState #32 := InsideField #1;
From FW 6.30 onwards, the occupancy task offers this
external Counter#2 := { ObjectsInState#32 Text("Occupancy:") functionality directly via the GUI.
TopLeft(-0.975,-0.744) };
//@}

2.17 Example: Alarm on empty reception desk


//Definition of task primitives
Resolution:= { Min(-1, -1) Max(1, 1) };
Field #1:= { Point(-0.150, -0.700) Point(0.250, -0.700)
Point(0.250, 0.600) Point(-0.150, 0.600)
DebounceTime(0.10) };
Field #2:= { Point(-0.600, -0.700) Point(-0.200, -0.700)
Point(-0.200, 0.600) Point(-0.600, 0.600) By using a state for the alarm, it will be active as long
as that situation occurs. For an example where the
DebounceTime(0.10) };
alarm is only send shortly at the onset of that situation,
see 2.18.
//@Task T:0 V:0 I:1 "Unmanned reception" {
external SimpleState #1:= ObjectsInField#1 within (1,*) ObjectsInField#2 within (0,0) is a simple state as it
and ObjectsInField#2 within (0,0); refers to an amount of objects, not to an object itself.
//@}

Data subject to change without notice | September 10, 2018 Security Systems / Video Systems
Bosch Security Systems | Video Systems 13 | 15

2.18 Example: Alarm if one queue is empty and the other has at least 3 persons

//Definition of task primitives


Resolution:= { Min(-1, -1) Max(1, 1) };
Field #1:= { Point(-0.150, -0.700) Point(0.250, -0.700)
Point(0.250, 0.600) Point(-0.150, 0.600)
DebounceTime(0.10) };
Field #2:= { Point(-0.600, -0.700) Point(-0.200, -0.700)
Point(-0.200, 0.600) Point(-0.600, 0.600)
DebounceTime(0.10) }; By using an event for the alarm, it will only be active
shortly at the onset of that situation. For an example
//@Task T:0 V:0 I:1 "Only one queue" { with an ongoing alarm see 2.17.
ObjectState #1:= ObjectsInField#1 within (3,*);
external Event #1:= {OnSet ObjectState #1 ObjectsInField#2 within (0,0) is a simple state as it
where ObjectsInField#2 within (0,0)}; refers to an amount of objects, not to an object itself.
//@}

// To see the results of the no object check, use the following:


//@Task T:0 V:0 I:2 "No object" {
external SimpleState #2:= ObjectsInField#2 within (0,0);
//@}

2.19 Example: Virtual room for counting with one in and one out line

//Definition of task primitives


Resolution:= { Min(-1, -1) Max(1, 1) };
Line #1 := { Point(-0.1, -0.8) Point(-0.1, 0.8) DebounceTime(0.10) Direction(1) };
Line #2 := { Point(0.1, 0.8) Point(0.1, -0.8) DebounceTime(0.10) Direction(1) };
//@Task T:0 V:0 I:1 "Virtual Room" {
Event#31:={CrossedLine#1};
Event#30:={CrossedLine#2};
external Counter#1 := { Event#31 Text("Linie 1:") TopLeft(4,4) }; Counters can be added and subtracted
external Counter#2 := { Event#30 Text("Linie 2:") TopLeft(4,14) };
external Counter#4 := { Counter#1 - Counter#2 Text("Virtual Room:") TopLeft(4,34) };
//@}

2.20 Example: Virtual room for counting with two in and one out line
//Definition of task primitives
Resolution:= { Min(-1, -1) Max(1, 1) };
Line #1 := { Point(-0.7, -0.7) Point(0.7, -0.7) DebounceTime(0.10) Direction(1) };
Line #2 := { Point(-0.7, -0.7) Point(-0.7, 0.7) DebounceTime(0.10) Direction(1) };
Line #3 := { Point(-0.7, 0.7) Point(0.7, 0.7) DebounceTime(0.10) Direction(1) };
//@Task T:0 V:0 I:1 "Virtual Room" {
Event#31:={CrossedLine#1};
Event#30:={CrossedLine#2};
Event#29:={CrossedLine#3};
external Counter#1 := { Event#31 Text("Linie 1:") TopLeft(4,4) };
external Counter#2 := { Event#30 Text("Linie 2:") TopLeft(4,14) }; Counters can be added and subtracted
external Counter#3 := { Event#29 Text("Linie 3:") TopLeft(4,24) };
Counter#32 := { Counter#1 + Counter#2};
external Counter#4 := { Counter#32 - Counter#3 Text("Virtual Room:") TopLeft(-0.9,-0.9) };
//@}

Data subject to change without notice | September 10, 2018 Security Systems / Video Systems
Bosch Security Systems | Video Systems 14 | 15

2.21 Example: Alarm on any object that is not yellow


//@Task T:0 V:0 I:1 "No yellow object" {
ColorHistogram uses HSV color space with hue (0-360),
ColorHistogram #1:= { HSV(60,100,100,20) HSV(60,100,60,20) saturation (0-100), intensity (0-100). In addition, a weight
HSV(60,100,30,20) can be specified in the HSV.
Similarity (0-100) specifies how similar a color histogram
Similarity(75) Outlier(55) };
must be in order to be regarded as a match, with higher
external ObjectState #1 := not SimilarToColor #1; numbers for closer colors.
external Event #1 := OnSet ObjectState #1; Outliers (1-100) specifies how much of the object needs
//@} to have the target colors, and how much is ignored as
outlier, with higher numbers allowing more differences.

SimilarToColor#x compares the color histogram of the


object to the specified ColorHistogram#x

2.22 Example: Count all red objects

//Definition of task primitives


Resolution:= { Min(-1, -1) Max(1, 1) };
Line #1 := { Point(-0.1, -0.8) Point(-0.1, 0.8) DebounceTime(0.10) Direction(1) };

//@Task T:0 V:0 I:1 "Count red objects" {


ColorHistogram #1:= { HSV(0,100,100,20) HSV(0,100,60,20) HSV(0,100,30,20)
Similarity(75) Outlier(55) };
Event#31:={CrossedLine#1 where SimilarToColor #1};
external Counter#1 := { Event#31 Text("Linie 1:") TopLeft (-0.9,-0.9) };
//@} Color description see 2.21

2.23 Example: Debouncing object size by 5 seconds

//Definition of task primitives


Resolution:= { Min(-1, -1) Max(1, 1) };
Field #1 := { Point(-0.7, -0.7) Point(0.7, -0.7) Point(0.7, 0.7) Point(-0.7, 0.7)
DebounceTime(5.00) ObjectSet(FootPoint) };
OnChange … within: Checking whether
//@Task T:0 V:0 I:1 "Debounce Size" { ObjectState#21 changed within the last 5 seconds
ObjectState#21 := ObjectSize within(5,500); Available in this combination from FW 6.60 onwards.
ObjectState#22:=OnChange ObjectState#21 within (0,5);
external ObjectState#1:=InsideField#1 and ObjectState#21 and !ObjectState#22;
//@}

2.24 Example: Give 30 sec alarm on any object (aggregation time)


Resolution:= { Min(-1, -1) Max(1, 1) };
Available from FW 6.60 onwards.
//@Task T:0 V:0 I:1 "30 sec alarm" {
external SimpleState#1:= Appeared within(0,30);
//@}

Data subject to change without notice | September 10, 2018 Security Systems / Video Systems
Bosch Security Systems | Video Systems 15 | 15

Bosch Sicherheitssysteme GmbH


Robert-Bosch-Ring 5
85630 Grasbrunn
Germany
www.boschsecurity.com
© Bosch Sicherheitssysteme GmhH, 2018

Author: Julia Ebling, Product Manager Video Analytics

Data subject to change without notice | September 10, 2018 Security Systems / Video Systems

You might also like