Skip to content

«Scenarios» Section#

Scenarios are necessary for the formation of events and incidents. The scenarios must have a handler.

The Scenarios section allows you to customize scenarios and handlers.

The view of the section (Figure 33).

Scenarios section
Figure 33. Scenarios section

The main interface element of this section is a table with scenarios. The table includes the following columns:

  • Name – the name of the scenario;
  • Type – scenario type (event or incident);
  • Number – the number of recorded events or incidents;
  • Lists – a list with which the vehicle and LP attributes are compared;
  • Handlers – the name of the handler used for the scenario;
  • Creation date – time and date when the scenario was created;
  • Status – scenario activity status.

Search and filtering are possible by the columns "Name", "Creation date" and "Status".

Only the Administrator can create, fill, modify and delete lists.

Scenario Creation and Editing#

To create a new scenario, click the Add button. The general view of the scenario editing page (Figure 34).

Scenario creation view
Figure 34. Scenario creation view

To edit the Scenario, click on in the scenario line, and the scenario editing page opens (Figure 35).

Scenario editing window
Figure 35. Scenario editing window

The description of the scenario settings window is given in Table 10.

Table 10. Scenario options

Name Description Values Default value
General
Name Field for entering the scenario name. Can consist of 1-255 characters and can contain letters, numbers and symbols. -
Scenario type Scenario type. - Event; -
- Incident.
Event Type Appears only after selecting «events» as the scenario type. - Animal – animal detection; -
- Human – pedestrian detection;
- Transport – vehicle detection.
Incident type Appears only after selecting «incident» as the scenario type. - Informational - an incident that does not require special attention; -
- Alarming – an incident requiring separate consideration
Status Scenario activity status. - on; off
- off.
Handlers
Handler The handler determines how the event or incident will be stored. The handler setting see section 5.4. See section 5.4. -
Linked Lists
List Linked Lists Lists created by the Administrator, see section 6. -

To save the scenario, click the Save button in the upper right corner.

Deleting Scenario#

To delete a scenario, you must click on the scenario line, and a warning will appear (Figure 36), in which you must confirm the operation by clicking the «Delete» button.

Scenario deletion warning
Figure 36. Scenario deletion warning

Handlers#

The handler is needed to customize how the scenario works. There can be an unlimited number of handlers for one scenario.

To create and configure a handler, you need to connect a camera and set up recognition zones. Setting of recognition zones is given in section 7.3.

The handler management page (Figure 37).

Editing a handler
Figure 37. Editing a handler

Handler Creation and Editing#

The handler is created in the scenario settings window.

Click the «Add» button to create a handler, which will open the handler creation form (Figure 38).

Handler creation form
Figure 38. Handler creation form

To make changes to the handler, click on (Figure 39), and the handler editing window opens (Figure 40).

Handler editing form
Figure 39. Handler editing form

The description of filling the edit handler form is given in Table 11.

The parameters in the Camera settings block and detection zones and recognition zones change depending on the choice of the handler, see the description of the parameters of the handlers in section 5.4.4.

Table 11. Handler options

Name Description Values Default value
General
ID A unique identifier for the handler, generated automatically - Handler ID
Handler type Handler type For the list of available handlers, see section 5.4.4 -
Comment A field for specifying a comment about what function the handler performs. Can consist of 1-255 characters and can contain letters, numbers and symbols -
Status Handler activity status. If necessary, you can create several handlers within the same scenario and switch between them On/off Off
Camera and recognition zone settings
Camera Drop-down list for selecting a camera for which the scenario will be created. After selecting a camera, a preview of the camera with recognition zones will appear Camera and recognition zone settings -
Parameters Handler options are available after selecting the handler type Added cameras -

After entering the data in the form, click the «Save» button in the upper right corner. The created handler will appear in the list. If you need to cancel the creation of the list, press [Esc] on the keyboard or left-click on the zone around the form.

Deleting Handler#

To delete the handler, click on and a warning will appear (Figure 41), in which you must confirm the operation by clicking the «Delete» button.

Handler deletion warning
Figure 40. Handler deletion warning

Available Handlers#

Following handlers are available in CARS Analytics:

Handler Description
Entering the region Recognizing vehicle and LP attributes when entering the zone
Checkpoint Recognizing vehicle and LP attributes when stopping in the zone
Moving between zone Recognizing vehicle and LP attributes when vehicle moving between defined zones
Pedestrian entering the region Pedestrian detection in a specified zone
Animal entering the region Animal detection in a specified zone
Speed calculation Vehicle speed calculation between specified zones
ANPR camera Recognizing of vehicle and LP attributes using ANPR camera
LP entering the zone Recognizing LP attributes when entering in area
Counting vehicles Counting the number of vehicles in a specified zone
Smoke and fire detection Detecting fires in a specified zone

A license is required for the «Pedestrian entering the region» and «Animal entering the region» handlers to work. For more information, see «LUNA CARS. Installation Guide»

Entering the Region#

The Entering the Region (Figure 42) handler is required to create an event or incident when a vehicle or LP crosses the Region for intersection with a specified threshold.

Enter the Region handler parameters
Figure 41. Enter the Region handler parameters

An example of vehicle recognition using Entering the region handler (Figure 43).

Handler’s example

Element Description Intersection square with Region for intersection
BBox # BBox of the vehicle which coordinates and size will be compared with the Region for intersection -
Region for intersection -
Square of a Region for intersection overlapped with BBox 1 0,6
Square of a Region for intersection overlapped with BBox 2 0,1

In this example, only 1 vehicle will be detected as the intrsection threshold for the recognition zone is 0.5.

The purposes of use with the necessary parameters of the handler are given in Table 12.

Table 12. Purposes of use

Purpose of use Necessary to detect… Important parameters for this purpose Note
Logging of all vehicle passes on the road or along lanes (search, analysis, accounting, etc.) vehicle - camera Region for intersection should be set in the way when the vehicle is fully visible without any coverings
- region for intersection
- minimal threshold of intersection
LP - camera Region for intersection should be set in the way when the LP is fully visible without any coverings
- region for intersection
- minimal threshold of intersection
Fixing traffic violations – driving on the allotted lane, driving on the sidewalk, entry into a restricted area, etc. Vehicle in the restricted area and LP - camera Camera should be set in the way to view the restricted area.
- region for intersection
- minimal threshold of intersection
- full frames

Examples of using the handler with specified Region for intersection are shown in Table 13.

Table 13. Examples of use

Description Image
Logging vehicles passes
Counting vehicles by lanes. 1 lane – 1 handler.
Fixing traffic violations – driving on the allotted lane, driving on the sidewalk, entry into a restricted area, etc.

The handler parameters are shown in Table 14.

Table 14. Handler parameters

Name Description Values Default value
Required parameters
Camera The handler will interact with the video stream of the selected camera. Cameras added to the system. -
Region for intersection A drop-down list for selecting the zone with which the vehicle intersections are checked for the scenario to work. Created zones for the selected camera. The process of creating recognition zones is described in section 7.3. -
Min threshold intersection The ratio of the zone of the BBox of the vehicle or the LP that crossed the Region for intersection to the non-crossed one (see section 7.3).It is not recommended to enter more than three decimal places. 0,01…1,00 -
- 0,01 – the event appears immediately when BBox appears in the Region for intersection
- 1,00 – the event appears only when BBox is completely overlapped with Region for intersection
Count of bestshots The minimum number of frames of the current track to select the best frame. When the minimum is reached, the probability of correct recognition of all attributes and symbols of the LP is higher. If there are fewer frames in the track than the minimum, then the best frame will be selected, but the probability of correct recognition of all attributes and symbols of the LP is lower. The more frames are collected to select the best, the more accurate the recognition of vehicle attributes will be. An increase in the number of frames can lead to a decrease in performance. 1…10 2
- 1 – high probability of getting incorrect recognition results
- 10 – the time to select the best frame increases, but the quality is higher
Max count of bestshots The maximum number of best frames for one track. When the maximum is reached, the selection of the best frames is completed. 1…10 4
- 1 – high probability of getting incorrect recognition results
- 10 – the time to select the best frame increases, but the quality is higher
Save full frames Storing the full frames received during the first and last detection of the vehicle for the track and the full frame of the selected best frame. They contain a display of the Vehicle Detection BBox for the following processing. Full frames are necessary when using LUNA CARS for the purposes of logging and fixing traffic violations. Constant saving of full frames can lead to server memory overflow. On/Off Off
Max delay first bestshot Pause between the start of the track and sending the first frame to the CARS API to determine the best frame. It is necessary to increase the pause if the vehicle in the first seconds of the track may not be in the optimal angle. 0…1000 0
- 0 – no delay
- 1…1000 – pause in ms
Max bestshot send periodicity Pause between sending track frames to determine the best frame. It is necessary to increase the pause so that the vehicle on neighboring frames has differences in quality. A set of different frames will increase the probability of choosing the best quality frame. 0…1000 0
- 0 – no delay
-1…1000 – pause in ms
Additional parameters
Use track area Using an additional Detection Zone to work with a part of the road (traffic lane, entrance/exit, stop, etc.). Forming a list of the best frames will only be available for vehicles that overlap the traffic area with a specified threshold. On/Off Off
Track area The detection zone with which the vehicle intersections are checked. The introduction of an additional zone will allow you to cut off events that do not need to be recorded. Created zones for the selected camera. The process of creating recognition zones is described in section 7.3 -
Track area threshold The relative area of the Track area overlapped by the BBox of the vehicle, when exceeding the threshold of which the vehicle will be taken into account to form the best frames. The higher the threshold, the more accurate the detection of the vehicle and LP will be, but the number of passes will also increase. It is not recommended to enter more than two decimal places. 0,01…1,00 0,25
- 0,01 – the event appears immediately when BBox appears in the recognition zone
- 1,00 – the event appears only when BBox is completely overlapped with the recognition zone
Use license plate area Using an additional Recognition Zone to work with the part of the road where the LP will be visible best. It is recommended to use: On/Off Off
- If there is a place in the path where the vehicle slows down and the number is least blurred;
- If the camera is installed in such a way that the LP is not visible on the part of the track inside the Recognition Zone and it is necessary to explicitly indicate the location of the LP fixation.
An example of using the area is shown in Figure 34.
License plate area A drop-down list for selecting the recognition zone from which the intersection of the LP is checked to form the best frame. The introduction of an additional zone will allow you to cut off events where the LP is of poor quality. Created zones for the selected camera. The process of creating recognition zones is described in section 7.3 -
License plate area threshold The relative area of the recognition Zone overlapped by the BBox of the vehicle, when exceeding the threshold of which the vehicle will be taken into account for the formation of the best LP frames. The higher the threshold, the more accurate the detection of LP will be, but the number of passes will also increase. It is not recommended to enter more than two decimal places. 0,01…1,00 0,25
- 0,01 – the event appears immediately when BBox appears in the recognition zone
- 1,00 – the event appears only when BBox is completely overlapped with the recognition zone
Priority of detection selection Selection of the algorithm by which the best detection will be selected and the best frame selected - Min distance to bottom – the best detection is the one closest to the lower border of the frame -
- Min detection area – the best detection is the one with the min area
- Max detection area – the best detection is the one with the max area
- Min frame ID – the best detection is the one with a minimum frame ID, i.e. detection where an object "enters" the frame
- Max frame ID – the best detection is the one with a max frame ID, i.e. detection where an object "leaves" the frame
- Min intersection – the best detection is the one with the minimum fraction of intersection with the area for intersection
- Max intersection – the best detection is the one with the max fraction of intersection with the area for intersection
Example of using a track area and a LP area
Figure 42. Example of using a track area and a LP area
Element Description
BBox BBox of the vehicle and LP, which coordinated and sizes will be compared with areas
Region for intersection
Track area
LP area

In this example, the vehicle will be detected only after passing an obstacle in the form of a road sign, to exclude the overlap of the LP sign by the rack. The best LP frame will be formed only when the LP is located in the LP Area.

Checkpoint#

The checkpoint handler (Figure 44) is required to create an event or incident when a vehicle stops in a given area, for example, in front of a barrier or in an inspection area.

Checkpoint handler
Figure 43. Checkpoint handler

Detection and tracking of the Vehicle and the LP occurs when entering the Region for Intersection. The formation of the best shots occurs only when stopping in the Stop Area.

The vehicle is considered to stop at a constant position on the frame for a certain number of frames, which is specified in the Number of frames field.

An example of vehicle recognition when using Checkpoint handler (Figure 45).

Handler’s example
Figure 44. Handler’s example
Element Description
BBox # BBox of the vehicle which coordinates and size will be compared with the Region for intersection
Region for intersection
Stop area

In this example, only those vehicles that remained stationary for a specified number of frames in the Stop Area will be detected. The best frames will be selected from the detections in the Recognition Zone.

The purposes of use with the necessary parameters of the handler are given in Table 15.

Table 15. Purposes of use

Purpose of use Necessary to detect… Important parameters for this purpose Note
Control of public transport and fixing traffic violations vehicle - camera Region for intersection should be set in the way when the vehicle is fully visible without any coverings
- region for intersection
- minimal threshold of intersection
LP - camera Region for intersection should be set in the way when the LP is fully visible without any coverings
- region for intersection
- minimal threshold of intersection

Examples of using a handler with drawn recognition zones are shown in Table 16.

Table 16. Examples of use

Description Image
Control of public transport and fixing traffic violations – stopping in the wrong place, monitoring a bus stop, etc.

The handler parameters are shown in Table 17.

Table 17. Handler parameters

Name Description Values Default value
General parameters
Camera The handler will interact with the video stream of the selected camera. Cameras added to the system. -
Track end aggregation Additional check of detections for entering the zone at the end of the track, if detections did not fall under the condition of the handler when receiving bestshot. On/Off On
Region for Intersection Drop-down list for selecting the zone with which the vehicle intersections are checked for the scenario to work. The process of creating zones see section 7.3. Created recognition are for the camera -
Detections threshold The minimum number of vehicle detections within one track for the scenario to trigger. It is necessary to increase the threshold when events occur with complex objects. 0...10 0
- 0 – disabling the parameter
- 1 – Registration of events upon receipt of 1 detection. High probability of receiving false events.
- 10 – Registration of events with at least 10 detections. High probability of missing events.
Parameters threshold The minimum number of recognized vehicle attributes (brand, model, emergency services, special transport, public transport, type, country and color) for one best shot to trigger the scenario. It is necessary to increase the threshold when events with false objects occur. 0...9 0
- 0 – all events are formed, there is a high probability of false events.
- 9 – the event is generated only when all vehicle attributes are recognized. High probability of missing events.
Min threshold intersection The ratio of the zone of the BBox of the vehicle or the LP that crossed the Region for intersection to the non-crossed one (see section 7.3). It is not recommended to enter more than three decimal places. 0,01…1,00 -
- 0,01 – the event appears immediately when BBox appears in the Region for intersection
- 1,00 – the event appears only when BBox is completely overlapped with the Region for intersection
Count of bestshots The minimum number of frames of the current track to select the best frame. When the minimum is reached, the probability of correct recognition of all attributes and symbols of the LP is higher. If there are fewer frames in the track than the minimum, then the best frame will be selected, but the probability of correct recognition of all attributes and symbols of the LP is lower. The more frames are collected to select the best, the more accurate the recognition of vehicle attributes will be. An increase in the number of frames can lead to a decrease in performance. 1…10 2
- 1 – high probability of getting incorrect recognition results
- 10 – the time to select the best frame increases, but the quality is higher
Max count of bestshots The maximum number of best frames for one track. When the maximum is reached, the selection of the best frames is completed. 1…10 4
- 1 – high probability of getting incorrect recognition results
- 10 – the time to select the best frame increases, but the quality is higher
Max delay first bestshot Pause between the start of the track and sending the first frame to the CARS API to determine the best frame. It is necessary to increase the pause if the vehicle in the first seconds of the track may not be in the optimal angle. 0…1000 0
- 0 – no delay
- 1…1000 – pause in ms
Max bestshot send periodicity Pause between sending track frames to determine the best frame. It is necessary to increase the pause so that the vehicle on neighboring frames has differences in quality. A set of different frames will increase the probability of choosing the best quality frame. 0…1000 0
- 0 – no delay
- 1…1000 – pause in ms
Save full frames Storing the full frames received during the first and last detection of the vehicle for the track and the full frame of the selected best frame. They contain a display of the Vehicle Detection BBox for the following processing. Full frames are necessary when using LUNA CARS for the purposes of logging and fixing traffic violations. Constant saving of full frames can lead to server memory overflow. On/Off Off
Check the direction of movement Activation of vehicle direction tracking. This parameter allows you to cut off vehicles moving from the stop area, for example, when leaving through a checkpoint. On/Off Off
Angle of direction of movement The angle of the vehicle movement direction relative to the frame in polar coordinates (Figure 46), where 0…359 -
- 0 – vehicle movement from left to right
- 90 - from bottom to top
- 180 - right to left
- 270 - top to bottom
It is used for rough separation of traffic flows, since the range of directions of movement of the vehicle relative to a given angle - +/- 90 degrees.
Stop area Drop-down list for selecting the zone in which the stop of the vehicle will be checked. The process of creating recognition zones see section 7.3. Created recognition are for the camera -
Min threshold intersection The ratio of the zone of the BBox of the vehicle or the LP that crossed the Stop area to the non-crossed one (see section 7.3). The higher the threshold, the more accurate will be the detection of vehicle and LP, but the number of gaps will also increase. It is not recommended to enter more than three decimal places. 0,01…1,00 0,1
- 0,01 – the event appears immediately when BBox appears in the Stop area
- 1,00 – the event appears only when BBox is completely overlapped with the Stop area
Number of frames The minimum number of track frames on which the vehicle is not moving to fix the fact of the vehicle stopping. 1...150 15
- 1 – The vehicle must be motionless for ~ 1 second.
- 150 – The vehicle must be motionless for ~10 seconds
Additional parameters
Use track area Using an additional Detection Zone to work with a part of the road (traffic lane, entrance/exit, stop, etc.). Forming a list of the best frames will only be available for vehicles that overlap the traffic area with a specified threshold. An example of using the area is shown in Figure 34. On/Off Off
Track area The detection zone with which the vehicle intersections are checked. The introduction of an additional zone will allow you to cut off events that do not need to be recorded. Created zones for the selected camera. The process of creating zones is described in section 7.3. -
Track area threshold The relative area of the Track area overlapped by the BBox of the vehicle, when exceeding the threshold of which the vehicle will be taken into account to form the best frames. The higher the threshold, the more accurate the detection of the vehicle and LP will be, but the number of passes will also increase. It is not recommended to enter more than two decimal places. 0,01…1,00 0,25
- 0,01 – the event appears immediately when BBox appears in the track area
- 1,00 – the event appears only when BBox is completely overlapped with the Track area
Use license plate area Using an additional Recognition Zone to work with the part of the road where the LP will be visible best. It is recommended to use: On/Off Off
- If there is a place in the path where the vehicle slows down and the number is least blurred;
- If the camera is installed in such a way that the LP is not visible on the part of the track inside the Recognition Zone and it is necessary to explicitly indicate the location of the LP fixation.
An example of using the area is shown in Figure 34.
License plate area A drop-down list for selecting the recognition zone from which the intersection of the LP is checked to form the best frame. The introduction of an additional zone will allow you to cut off events where the LP is of poor quality. Created zones for the selected camera. The process of creating recognition zones is described in section 7.3. -
License plate area threshold The relative area of the recognition Zone overlapped by the BBox of the vehicle, when exceeding the threshold of which the vehicle will be taken into account for the formation of the best LP frames. The higher the threshold, the more accurate the detection of LP will be, but the number of passes will also increase.It is not recommended to enter more than two decimal places. 0,01…1,00 0,25
- 0,01 – the event appears immediately when BBox appears in the recognition zone
- 1,00 – the event appears only when BBox is completely overlapped with the recognition zone
Priority of detection selection Selection of the algorithm by which the best detection will be selected and the best frame selected - Min distance to bottom – the best detection is the one closest to the lower border of the frame -
- Min detection area – the best detection is the one with the min area
- Max detection area – the best detection is the one with the max area
- Min frame ID – the best detection is the one with a minimum frame ID, i.e. detection where an object "enters" the frame
- Max frame ID – the best detection is the one with a max frame ID, i.e. detection where an object "leaves" the frame
- Min intersection – the best detection is the one with the minimum fraction of intersection with the area for intersection
Max intersection – the best detection is the one with the max fraction of intersection with the area for intersection
Polar coordinates of the frame (Example of a vehicle moving at an angle of 200°)
Figure 45. Polar coordinates of the frame (Example of a vehicle moving at an angle of 200°)

Moving between zones#

The handler Move between zones (Figure 47) is required to create an event or incident when a vehicle passes through the specified zones, for example, in the inspection zone.

Move between zones
Figure 46. Move between zones

Detection and tracking of the Vehicle and the LP occurs when entering the Region for Intersiction. The formation of the best frames occurs only when the vehicle sequentially crosses the First checkpoint and the Second checkpoint in the track.

Handler’s example
Figure 44. Handler’s example
Element Description
BBox BBox of the vehicle which coordinates and size will be compared with the Region for intersection
Region for intersection
First checkpoint
Second checkpoint

In this example, events will be recorded only for vehicles moving towards the camera.

The purposes of use with the necessary parameters of the handler are given in Table 18.

Table 18. Purposes of use

Purpose of use Necessary to detect… Important parameters for this purpose Note
Determining the direction of movement – passing, oncoming, turn, U-turn Vehicle and LP - camera Region for intersection should be set in the way when the vehicle and LP are fully visible without any coverings.
- region for intersection
- minimal threshold of intersection
- first zone
- second zone
Opening of the barrier LP - camera The camera must be installed so that the barrier does not overlap the zones in the frame.
- region for intersection
- minimal threshold of intersection
- first zone
- second zone

Examples of using a handler with specified recognition zones are shown in Table 19.

Table 19. Examples of use

Description Image
Vehicle traffic control at intersections, closed territories, etc.
Opening of the barrier only for approaching vehicles

The handler parameters are shown in Table 20.

Table 20. Handler parameters

Name Description Values Default value
General parameters
Camera The handler will interact with the video stream of the selected camera. Cameras added to the system. -
Track end aggregation Additional check of detections for entering the zone at the end of the track, if detections did not fall under the condition of the handler when receiving bestshot. On/Off On
Region for Intersection Drop-down list for selecting the zone with which the vehicle intersections are checked for the scenario to work. The process of creating recognition zones see section 7.3. Created zones for the camera -
Min threshold intersection The ratio of the zone of the BBox of the vehicle or the LP that crossed the Region for intersection to the non-crossed one (see section 7.3). The higher the threshold, the more accurate will be the detection of vehicle and LP, but the number of gaps will also increase. It is not recommended to enter more than three decimal places. 0,01…1,00 -
- 0,01 – the event appears immediately when BBox appears in the Region for intersection
- 1,00 – the event appears only when BBox is completely overlapped with the Region for intersection
Detections threshold The minimum number of vehicle detections within one track for the scenario to trigger. It is necessary to increase the threshold when events occur with complex objects. 0...10 0
- 0 – disabling the parameter
- 1 – Registration of events upon receipt of 1 detection. High probability of receiving false events.
- 10 – Registration of events with at least 10 detections. High probability of missing events.
Parameters threshold The minimum number of recognized vehicle attributes (brand, model, emergency services, special transport, public transport, type, country and color) for one best shot to trigger the scenario. It is necessary to increase the threshold when events with false objects occur. 0...9 0
- 0 – all events are formed, there is a high probability of false events.
- 9 – the event is generated only when all vehicle attributes are recognized. High probability of missing events.
Count of bestshots The minimum number of frames of the current track to select the best frame. When the minimum is reached, the probability of correct recognition of all attributes and symbols of the LP is higher. If there are fewer frames in the track than the minimum, then the best frame will be selected, but the probability of correct recognition of all attributes and symbols of the LP is lower. The more frames are collected to select the best, the more accurate the recognition of vehicle attributes will be. An increase in the number of frames can lead to a decrease in performance. 1…10 2
- 1 – high probability of getting incorrect recognition results
- 10 – the time to select the best frame increases, but the quality is higher
Max count of bestshots The maximum number of best frames for one track. When the maximum is reached, the selection of the best frames is completed. 1…10 4
- 1 – high probability of getting incorrect recognition results
- 10 – the time to select the best frame increases, but the quality is higher
Max delay first bestshot Pause between the start of the track and sending the first frame to the CARS API to determine the best frame. It is necessary to increase the pause if the vehicle in the first seconds of the track may not be in the optimal angle. 0…1000 0
- 0 – no delay
- 1…1000 – pause in ms
Max bestshot send periodicity Pause between sending track frames to determine the best frame. It is necessary to increase the pause so that the vehicle on neighboring frames has differences in quality. A set of different frames will increase the probability of choosing the best quality frame. 0…1000 0
- 0 – no delay
- 1…1000 – pause in ms
Save full frames Storing the full frames received during the first and last detection of the vehicle for the track and the full frame of the selected best frame. They contain a display of the Vehicle Detection BBox for the following processing. Full frames are necessary when using LUNA CARS for the purposes of logging and fixing traffic violations. Constant saving of full frames can lead to server memory overflow. On/Off Off
First checkpoint Drop-down list for selecting the zone from which the vehicle intersections are checked to fix the initial checkpoint. A drop-down list for selecting the zone with which the vehicle intersections are checked for the script to work. -
Intersection with the first checkpoint The relative area of the First checkpoint covered by the BBox of the vehicle, when exceeding the threshold of which events will be generated. It is not recommended to enter more than two decimal places. 0,01…1,00 -
- 0,01 – the event appears immediately when BBox appears in the First checkpoint
- 1,00 – the event appears only when BBox is completely overlapped with the First checkpoint
Second checkpoint Drop-down list for selecting the zone from which the vehicle intersections are checked to fix the final checkpoint. A drop-down list for selecting the zone with which the vehicle intersections are checked for the script to work. -
Intersection with the second checkpoint The relative area of the Second checkpoint covered by the BBox of the vehicle, when exceeding the threshold of which events will be generated. It is not recommended to enter more than two decimal places. 0,01…1,00 -
- 0,01 – the event appears immediately when BBox appears in the Second checkpoint
- 1,00 – the event appears only when BBox is completely overlapped with the Second checkpoint
Min count of intersections with the checkpoint It is necessary to increase the value when false events occur. 1...10 1
Only first then second The best frames are sent when they get into the first checkpoint, without getting into the second, and after that they get into the second checkpoint, regardless of whether the vehicle is in the first checkpoint (Figure 48). Suitable for working with long vehicles – buses, trucks, etc One rule must be activated at one time. On/Off On
First then only second The best shots are sent when they hit the first checkpoint, regardless of hitting the second checkpoint, and after that they hit only the second checkpoint (Figure 49). Suitable for working with long vehicles – buses, trucks, etc. One rule must be activated at one time. On/Off On
Only first then only second The best shots are sent only when the first checkpoint is passed separately, and then the second. The zones should be spaced apart so that the vehicle is not in 2 checkpoint at the same time (Figure 50). One rule should be activated at one time On/Off On
Additional parameters
Use track area Using an additional Detection Zone to work with a part of the road (traffic lane, entrance/exit, stop, etc.). Forming a list of the best frames will only be available for vehicles that overlap the traffic area with a specified threshold. An example of using the area is shown in Figure 34. On/Off Off
Track area The detection zone with which the vehicle intersections are checked. The introduction of an additional zone will allow you to cut off events that do not need to be recorded. Created zones for the selected camera. The process of creating zones is described in section 7.3. -
Track area threshold The relative area of the Recognition Zone overlapped by the BBox of the vehicle, when exceeding the threshold of which the vehicle will be taken into account to form the best frames. The higher the threshold, the more accurate the detection of the vehicle and LP will be, but the number of passes will also increase. It is not recommended to enter more than two decimal places. 0,01…1,00 0,25
- 0,01 – the event appears immediately when BBox appears in the recognition zone
- 1,00 – the event appears only when BBox is completely overlapped with the recognition zone
Use license plate area Using an additional Recognition Zone to work with the part of the road where the LP will be visible best. It is recommended to use: On/Off Off
- If there is a place in the path where the vehicle slows down and the number is least blurred;
- If the camera is installed in such a way that the LP is not visible on the part of the track inside the Recognition Zone and it is necessary to explicitly indicate the location of the LP fixation.
An example of using the area is shown in Figure 34.
License plate area A drop-down list for selecting the recognition zone from which the intersection of the LP is checked to form the best frame. The introduction of an additional zone will allow you to cut off events where the LP is of poor quality. Created zones for the selected camera. The process of creating recognition zones is described in section 7.3. -
License plate area threshold The relative area of the recognition Zone overlapped by the BBox of the vehicle, when exceeding the threshold of which the vehicle will be taken into account for the formation of the best LP frames. The higher the threshold, the more accurate the detection of LP will be, but the number of passes will also increase. It is not recommended to enter more than two decimal places. 0,01…1,00 0,25
- 0,01 – the event appears immediately when BBox appears in the recognition zone
- 1,00 – the event appears only when BBox is completely overlapped with the recognition zone
Priority of detection selection Selection of the algorithm by which the best detection will be selected and the best frame selected - Min distance to bottom – the best detection is the one closest to the lower border of the frame -
- Min detection area – the best detection is the one with the min area
- Max detection area – the best detection is the one with the max area
- Min frame ID – the best detection is the one with a minimum frame ID, i.e. detection where an object "enters" the frame
- Max frame ID – the best detection is the one with a max frame ID, i.e. detection where an object "leaves" the frame
- Min intersection – the best detection is the one with the minimum fraction of intersection with the area for intersection
Max intersection – the best detection is the one with the max fraction of intersection with the area for intersection

Figures 49-51 show examples of how different rules work. In the first frame, there is a hit in the first checkpoint (Zone 1), and in the second – a hit in the second checkpoint (Zone 2) and the subsequent formation of the best frame of the vehicle and LP.

Rule Only first then second
Figure 48. Rule Only first then second
Rule First then only second
Figure 49. Rule First then only second
Rule Only first then only second
Figure 50. Rule Only first then only second

Pedestrian entering the region#

Handler Pedestrian entering the region (Figure 51) is necessary to create an event or incident when a person crosses the Region for intersection with a specified threshold.

Handler Pedestrian entering the region
Figure 51. Handler Pedestrian entering the region

An example of pedestrian recognition using Pedestrian entering the region handler (Figure 52).

Handler’s example
Figure 44. Handler’s example
Element Description Intersection square with Region for intersection
BBox # BBox of a pedestrian which coordinates and size will be compared with the Region for intersection -
Region for intersection -
Square of a Region for intersection overlapped with BBox 1 0,6

The purposes of use with the necessary parameters of the handler are given in Table 21.

Table 21. Purposes of use

Purpose of use Necessary to detect… Important parameters for this purpose Note
Control of people in restricted areas Pedestrian - camera Region for intersection should be set in the way when the human is fully visible without any coverings.
- region for intersection
- minimal threshold of intersection
Analysis and accounting human stream crossing specified area Pedestrian - camera Region for intersection should be set in the way when the human is fully visible without any coverings.
- region for intersection
- minimal threshold of intersection

Examples of using a handler with specified recognition zones are shown in Table 22.

Table 22. Example of use

Description Image
Control of people in restricted areas
Analysis and accounting human stream crossing specified area

The parameters of the handler are given in Table 23.

Table 23. Handler parameters

Name Description Values Default value
Camera The handler will interact with the video stream of the selected camera. Cameras added to the system. -
Min threshold intersection The ratio of the zone of the BBox of the pedestrian that crossed the Region for intersection to the non-crossed one (see section 7.3).It is not recommended to enter more than three decimal places. 0,01…1,00 -
- 0,01 – the event appears immediately when BBox appears in the Region for intersection
- 1,00 – the event appears only when BBox is completely overlapped with the Region for intersection
Count of bestshots The minimum number of frames of the current track to select the best frame. An increase in the number of frames can lead to a decrease in performance. 1…10 2
- 1 – high probability of getting incorrect recognition results
- 10 – the time to select the best frame increases, but the quality is higher
Max count of bestshots The maximum number of best frames for one track. When the maximum is reached, the selection of the best frames is completed. 1…10 4
- 1 – high probability of getting incorrect recognition results
- 10 – the time to select the best frame increases, but the quality is higher
Save full frames Storing the full frames received during the first and last detection of the pedestrian for the track and the full frame of the selected best frame. They contain a display of the Pedestrian Detection BBox for the following processing. Full frames are necessary when using LUNA CARS for the purposes of logging and fixing traffic violations. Constant saving of full frames can lead to server memory overflow. On/Off Off
Region for intersection A drop-down list for selecting the zone with which the pedestrian intersections are checked for the scenario to work. Created zones for the selected camera. The process of creating zones is described in section 7.3. -
Animal entering the region#

Handler Animal entering the region (Figure 53) is necessary to create an event or incident when an animal crosses the Region for intersection with a specified threshold.

Handler Animal entering the region
Figure 53. Handler Animal entering the region

An example of animal recognition using Animal entering the region handler (Figure 54).

Handler’s example
Figure 44. Handler’s example
Element Description Intersection square with Region for intersection
BBox # BBox of an animal which coordinates and size will be compared with the Region for intersection -
Region for intersection -
Square of a Region for intersection overlapped with BBox 1 0,5

The purposes of use with the necessary parameters of the handler are given in Table 24.

Table 24. Purposes of use

Purpose of use Necessary to detect… Important parameters for this purpose Note
Control of animals in restricted areas Animal - camera Region for intersection should be set in the way when the animal is fully visible without any coverings.
- region for intersection
- minimal threshold of intersection

Examples of using a handler with specified recognition zones are shown in Table 25.

Table 25. Example of use

Description Image
Control of animals in restricted areas

The parameters of the handler are given in Table 26.

Table 26. Handler parameters

Name Description Values Default value
Camera The handler will interact with the video stream of the selected camera. Cameras added to the system. -
Min threshold intersection The ratio of the zone of the BBox of the pedestrian that crossed the Region for intersection to the non-crossed one (see section 7.3).It is not recommended to enter more than three decimal places. 0,01…1,00 -
- 0,01 – the event appears immediately when BBox appears in the Region for intersection
- 1,00 – the event appears only when BBox is completely overlapped with the Region for intersection
Count of bestshots The minimum number of frames of the current track to select the best frame. An increase in the number of frames can lead to a decrease in performance. 1…10 2
- 1 – high probability of getting incorrect recognition results
- 10 – the time to select the best frame increases, but the quality is higher
Max count of bestshots The maximum number of best frames for one track. When the maximum is reached, the selection of the best frames is completed. 1…10 4
- 1 – high probability of getting incorrect recognition results
- 10 – the time to select the best frame increases, but the quality is higher
Save full frames Storing the full frames received during the first and last detection of the pedestrian for the track and the full frame of the selected best frame. They contain a display of the Pedestrian Detection BBox for the following processing. Full frames are necessary when using LUNA CARS for the purposes of logging and fixing traffic violations. Constant saving of full frames can lead to server memory overflow. On/Off Off
Region for intersection A drop-down list for selecting the zone with which the pedestrian intersections are checked for the scenario to work. Created zones for the selected camera. The process of creating zones is described in section 7.3. -

Speed calculation#

Speed calculation handler (Figure 55) is similar to «Entering the region» handler, but it also registers vehicle’s speed.

Incident or event creation happens right after the vehicle enters Region for intersection, and the speed calculation happens right after vehicle crossing Start and End Regions consistently.

Speed calculation handler
Figure 55. Speed calculation handler

Detection and tracking of the vehicle and LP start upon vehicle entering the Region for intersection. The system defines the vehicle’s BBox and finds its midpoint. The intersection with Start and Finish regions is determined by the midpoint.

It is recommended to create Start and Finish regions’ zones with sufficient width for the handler to work properly.

Speed is calculated after the system receives a track end.

Handler’s example (Figure 56).

Handler’s example
Figure 44. Handler’s example
Element Description
BBox # BBox of a vehicle which coordinates and size will be compared with the Region for intersection
Region for intersection
Start region
Finish region

The purposes of use with the necessary parameters of the handler are given in Table 27.

Table 27. Purposes of use

Purpose of use Necessary to detect… Important parameters for this purpose Note
Vehicle speed monitoring in a specified area (collection, accounting and analysis of information about vehicle speed) Vehicle - camera Region for intersection should be set in the way when the vehicle is fully visible without any coverings, and start and finish regions have sufficient width to intersect with geometric midpoint of vehicle BBox.
- region for intersection
- minimal threshold of intersection
- start region
- finish region
- distance between regions

Examples of using a handler with specified recognition zones are shown in Table 28.

Table 28. Example of use

Description Image
Vehicle speed monitoring in a specified area (collection, accounting and analysis of information about vehicle speed)

The handler works in accordance with individual parameters specified in speed calculation groups created inside of the handler (Figure 57). Several speed calculation groups can be created for one video stream within one handler (for example, groups for passing and oncoming traffics, etc.).

Speed calculation group
Figure 57. Speed calculation group

The parameters of the handler are given in Table 29.

Table 29. Handler parameters

Name Description Values Default value
Camera The handler will interact with the video stream of the selected camera. Cameras added to the system. -
Min threshold intersection The ratio of the zone of the BBox of the vehicle that crossed the r Region for intersection to the non-crossed one (see section 7.3). It is not recommended to enter more than three decimal places. 0,01…1,00 -
- 0,01 – the event appears immediately when BBox appears in the Region for intersection
- 1,00 – the event appears only when BBox is completely overlapped with the Region for intersection
Count of bestshots The minimum number of frames of the current track to select the best frame. An increase in the number of frames can lead to a decrease in performance. 1…10 2
- 1 – high probability of getting incorrect recognition results
- 10 – the time to select the best frame increases, but the quality is higher
Max count of bestshots The maximum number of best frames for one track. When the maximum is reached, the selection of the best frames is completed. 1…10 4
- 1 – high probability of getting incorrect recognition results
- 10 – the time to select the best frame increases, but the quality is higher
Region for intersection A drop-down list for selecting the zone with which the vehicle intersections are checked for the scenario to work. Created zones for the selected camera. The process of creating zones is described in section 7.3. -
Use track area Using an additional Detection Zone to work with a part of the road (traffic lane, entrance/exit, stop, etc.). Forming a list of the best frames will only be available for vehicles that overlap the traffic area with a specified threshold. An example of using the area is shown in Figure 34. On/Off Off
Track area The detection zone with which the vehicle intersections are checked. The introduction of an additional zone will allow you to cut off events that do not need to be recorded. Created zones for the selected camera. The process of creating zones is described in section Recognition zone creation. -
Track area threshold The relative area of the Recognition Zone overlapped by the BBox of the vehicle, when exceeding the threshold of which the vehicle will be taken into account to form the best frames. The higher the threshold, the more accurate the detection of the vehicle and LP will be, but the number of passes will also increase. It is not recommended to enter more than two decimal places. 0,01…1,00 0,25
- 0,01 – the event appears immediately when BBox appears in the recognition zone
- 1,00 – the event appears only when BBox is completely overlapped with the recognition zone
Use license plate area Using an additional Recognition Zone to work with the part of the road where the LP will be visible best. It is recommended to use:
- If there is a place in the path where the vehicle slows down and the number is least blurred;
- If the camera is installed in such a way that the LP is not visible on the part of the track inside the Recognition Zone and it is necessary to explicitly indicate the location of the LP fixation. An example of using the area is shown in Figure 34. On/Off
License plate area A drop-down list for selecting the recognition zone from which the intersection of the LP is checked to form the best frame. The introduction of an additional zone will allow you to cut off events where the LP is of poor quality. Created zones for the selected camera. The process of creating recognition zones is described in section 7.3. -
License plate area threshold The relative area of the recognition Zone overlapped by the BBox of the vehicle, when exceeding the threshold of which the vehicle will be taken into account for the formation of the best LP frames. The higher the threshold, the more accurate the detection of LP will be, but the number of passes will also increase. It is not recommended to enter more than two decimal places. 0,01…1,00 0,25
- 0,01 – the event appears immediately when BBox appears in the recognition zone
- 1,00 – the event appears only when BBox is completely overlapped with the recognition zone
Priority of detection selection Selection of the algorithm by which the best detection will be selected and the best frame selected - Min distance to bottom – the best detection is the one closest to the lower border of the frame -
- Min detection area – the best detection is the one with the min area
- Max detection area – the best detection is the one with the max area
- Min frame ID – the best detection is the one with a minimum frame ID, i.e. detection where an object "enters" the frame
- Max frame ID – the best detection is the one with a max frame ID, i.e. detection where an object "leaves" the frame
- Min intersection – the best detection is the one with the minimum fraction of intersection with the area for intersection
Max intersection – the best detection is the one with the max fraction of intersection with the area for intersection
Speed calculation group parameters
Line title Title of the speed calculation group - -
Start region A drop-down list for selecting the zone with which the vehicle intersections are checked for fixing the initial control point. Created zones for the selected camera. The process of creating zones is described in section 7.3. -
Finish region A drop-down list for selecting the zone with which the vehicle intersections are checked for fixing the final control point. Created zones for the selected camera. The process of creating zones is described in section 7.3. -
Distance Distance between Start and Finish regions in meters 0,01…- -
Track area The detection zone with which the vehicle intersections are checked. The introduction of an additional zone will allow you to cut off events that do not need to be recorded. Created zones for the selected camera. The process of creating zones is described in section 7.3. -
Track area threshold The relative area of the Recognition Zone overlapped by the BBox of the vehicle, when exceeding the threshold of which the vehicle will be taken into account to form the best frames. The higher the threshold, the more accurate the detection of the vehicle and LP will be, but the number of passes will also increase. It is not recommended to enter more than two decimal places. 0,01…1,00 0,25
- 0,01 – the event appears immediately when BBox appears in the recognition zone
1,00 – the event appears only when BBox is completely overlapped with the recognition zone

The results of the speed calculation are displayed in the event or incident card under the «Additional Information» section.

LP entering the zone#

LP entering the zone (Figure 58) handler is required to create an event or incident when a license plate crosses the area to intersect with a specified threshold.

LP entering the zone handler parameters
Figure 58. LP entering the zone handler parameters

An example of LP detection using LP entering the zone handler (Figure 59).

Handler’s example
Figure 44. Handler’s example

The purposes of use with the necessary parameters of the handler are given in Table 31.

Table 31. Purposes of use

Purpose of use Necessary to detect… Important parameters for this purpose Note
License plate fixation in a section with a stop or barrier checkpoint to prioritize license plate events. LP - camera; The area to be crossed shall be selected so that the license plate can be seen in its entirety, clearly and without overlap.
- region for intersection;
- minimal threshold of intersection.

The handler parameters are shown in Table 32.

Table 32. Handler parameters

Name Description Values Default value
Required parameters
Camera The handler will interact with the video stream of the selected camera. Cameras added to the system. -
Region for intersection A drop-down list for selecting the zone with which the LP intersections are checked for the scenario to work. Created zones for the selected camera. The process of creating recognition zones is described in section 7.3. -
Min threshold intersection Relative area of the Region for the intersection, crossed by the LP, when the threshold is exceeded, events will be generated. 0,01…1,00 -
- 0,01 – the event is generated when a LP crosses the Region for the intersection
- 1,00 – the event is generated only when the LP is fully located in the Region for intersection
Bestshot send periodicity Frequency of sending bestshots 0…60000 1000
- 0 – no delay
- 1…60000 – pause in ms
Time of event uniqueness Maximum duration at which two identical LP received will be counted for the same event 0…60000 1000

Counting vehicles#

Counting vehicles handler (Figure 60) is required to create an event or incident when counting the number of vehicles in the specified region with the specified threshold.

Counting vehicles handler
Figure 60. Counting vehicles handler

The results of counting the number of vehicles in the selected monitoring area are displayed in the event or incident card below the «Additional Information» block (Figure 61).

Handler’s example
Figure 44. Handler’s example

The purposes of use with the necessary parameters of the handler are given in Table 33.

Table 33. Purposes of use

Purpose of use Necessary to detect… Important parameters for this purpose Note
Detection of the number of vehicles in the control zone, without taking into account other attributes. Vehicle - camera; The event will be generated only when the specified value of the number of vehicles in the monitoring area is reached.
- monitoring region;
- minimal threshold of intersection;
- number of vehicles.

The handler parameters are shown in Table 34.

Table 34. Handler parameters

Name Description Values Default value
Required parameters
Camera The handler will interact with the video stream of the selected camera. Cameras added to the system. -
Monitoring region A drop-down list for selecting the zone with which the vehicle intersections are checked for the scenario to work. Created zones for the selected camera. The process of creating recognition zones is described in section 7.3. -
Min threshold intersection The ratio of the zone of the BBox of the vehicle that crossed the Monitoring region to the non-crossed one (see section 7.3). It is not recommended to enter more than three decimal places. 0,01…1,00 -
- 0,01 – the event appears immediately when BBox appears in the Monitoring region
- 1,00 – the event appears only when BBox is completely overlapped with the Monitoring region
Number of vehicles Minimum number of vehicles for which the event is generated 0…10000 2
Bestshot send periodicity Frequency of sending bestshots 0…3600000 1000
- 0 – no delay
- 1…3600000 – pause in ms

In case of event registration with exceeding the parameter "Number of vehicles" in the control zone, the next event is registered only if the number of vehicles in the control zone increases. An example of the Counting vehicles handler operation is given in Table 35.

Table 35. Handler’s example

Frame processing stage Event description Event status
(1) There are more than X number of cars in the control zone Registered
(2) At a defined interval, when counting vehicles in the control zone, X vehicles Not registered
(3) At a defined interval, when counting vehicles in the control zone, X - 1 vehicles Not registered
(4) At a defined interval, when counting the vehicles in the control zone, X vehicles Registered
(5) At a defined interval, when counting vehicles in the control zone, X + 1 vehicles Registered

Smoke and fire detection#

Smoke and fire detection handler (Figure 62) is required to create an event or incident when smoke and/or fire is detected in a specified region with a specified threshold.

Smoke and fire detection handler
Figure 62. Smoke and fire detection handler

The results of smoke and fire detection in the selected monitoring area are displayed in the event or incident card below the «Additional Information» block (Figure 63).

Handler’s example
Figure 44. Handler’s example

The purposes of use with the necessary parameters of the handler are given in Table 36.

Table 36. Purposes of use

Purpose of use Necessary to detect… Important parameters for this purpose Note
Logging of alarm events in case of smoke and/or fire detection. - Fire - camera; The input image is divided into 6 zones, each of which detects one of the incident attributes. See section 3.1, Table 4 Event card description.
- Black smoke - monitoring region;
- White smoke - minimal threshold of intersection;

The handler parameters are shown in Table 37.

Table 37. Handler parameters

Name Description Values Default value
Required parameters
Camera The handler will interact with the video stream of the selected camera. Cameras added to the system. -
Monitoring region A drop-down list for selecting the zone with which the vehicle intersections are checked for the scenario to work. Created zones for the selected camera. The process of creating recognition zones is described in section 7.3. -
Min threshold intersection The ratio of the zone the Monitoring region crossed by the smoke and fire monitoring region, if the threshold is exceeded, events will be generated. 0,01…1,00 -
- 0,01 – the event is generated immediately when smoke and fire appear in the Monitoring region
- 1,00 – the event is generated only when the smoke and fire Monitoring region are completely crossed
Bestshot send periodicity Frequency of sending bestshots 0…60000 1000
- 0 – no delay
- 1…60000 – pause in ms