# Configuration

## Management of your devices

To access the device configuration page, simply click on the respective device in the "Devices" list view.

{% hint style="warning" %}
We recommend a **logical naming scheme** for the devices at this point.
{% endhint %}

## Camera settings

Clicking on one of the displayed cameras opens its settings. Once you've configured the camera connection, you'll see a live image.

<figure><img src="https://3137934538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6neI97pS6uo6iV2GbQ0y%2Fuploads%2Fgit-blob-97f47cbd89b5a274c44066644a866e582d1007ed%2Fimage%20(124).png?alt=media" alt=""><figcaption><p>Camera Configuration</p></figcaption></figure>

## Data transmission

Your devices send events to an MQTT broker when a trigger is triggered. The standard configuration sends data to the data center.

**Custom-MQTT** allows to send events to an MQTT broker provided by you, the definition of the event format can be found [here](https://github.com/hal9000-swarm/swarm-event-schema).

* Use the ssl:// prefix for the broker address to use transport encryption.
* Message compression can save up to 50% bandwidth used to send events to the MQTT broker. Please note that the broker and application must support decompression of [zlib / inflate](https://en.wikipedia.org/wiki/Deflate).

## Models & Event-Triggers

In the configuration, you can select the model suitable for your use case and configure event triggers. Please consult the corresponding section in the solution areas.

{% content-ref url="../../solution-areas" %}
[solution-areas](../../solution-areas)
{% endcontent-ref %}

<figure><img src="https://3137934538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6neI97pS6uo6iV2GbQ0y%2Fuploads%2Fgit-blob-bc5a0f0957bbad98161771eed457b5c199218616%2Fimage%20(125).png?alt=media" alt="" width="563"><figcaption><p>Configuration of event trigger and the model</p></figcaption></figure>

### Models

Below you will find a brief description of each model. Different models are recommended depending on the solution area.

{% tabs %}
{% tab title="Traffic & Parking" %}
* Traffic & Parking (standard): Recognition of 12+1 object classes in the context of traffic and parking.
* Traffic & Parking (Accuracy+): Recognition of 12+1 object classes in the context of traffic and parking. Optimized for higher accuracy at a processing speed of about half (measured in FPS) compared to “Traffic & Parking (Standard)”

See class definition for a detailed description of the classes.
{% endtab %}

{% tab title="People: Full Body" %}
The entire body of a person is recognized.

Note: When recognizing and tacking people, we do not perform facial recognition at any time. No sensitive personal information is processed.
{% endtab %}

{% tab title="People: Head" %}
The head of a person is detected. This is advantageous if the entire body is not visible and the distance to the objects is less than 5 meters.

Note: When recognizing and tacking people, we do not perform facial recognition at any time. No sensitive personal information is processed.
{% endtab %}
{% endtabs %}

### Event triggers

Event triggers trigger an event when a defined condition is met.

{% tabs %}
{% tab title="Counting Line (CL)" %}
A **Crossing Line (CL)** triggers an event as soon as the center point of an object crosses the line.

<figure><img src="https://3137934538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6neI97pS6uo6iV2GbQ0y%2Fuploads%2Fgit-blob-a42e7d83f80d3a0f6389f940cf8f536d247334f4%2Fimage%20(126).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

The CL also logs the **direction of travel** in which the object crossed the line, distinguishing between **In and Out directions**. You can swap the In and Out directions at any time. Furthermore, a custom name can be assigned to both directions.

**By default, a CL counts each object only once.** If every crossing is to be counted, there is an option to activate events for repeated CL crossings, with the caveat that counts are only considered if there's a five-second interval between them.

<figure><img src="https://3137934538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6neI97pS6uo6iV2GbQ0y%2Fuploads%2FCCpb9nDknQEgyymUgPUM%2Fimage.png?alt=media&#x26;token=7773b80c-0cad-42e8-b0be-1a4bc6a49a10" alt=""><figcaption><p>Crossing-Line options</p></figcaption></figure>

**Speed estimation** can be activated as a trigger option for a CL. To do this, configure the physical distance in meters between the lines. For optimal results, we recommend a straight section without curves or inclines.

<figure><img src="https://3137934538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6neI97pS6uo6iV2GbQ0y%2Fuploads%2Fgit-blob-f529f20c25b1179a70a4a1d393935cd52a0e9196%2Fimage%20(129).png?alt=media" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Region of Interest (RoI)" %}
A **Region-of-Interest (ROI)** consists of 4 points that form an area. An ROI triggers an event after a fixed defined time interval or when the occupancy changes from occupied to unoccupied (or vice versa).

<figure><img src="https://3137934538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6neI97pS6uo6iV2GbQ0y%2Fuploads%2FtqpizXVd0sGNczAYzM0x%2Fimage.png?alt=media&#x26;token=10c9c804-2802-4d00-bc99-d7ad3a2ddb0a" alt=""><figcaption></figcaption></figure>



| Optionen           | Beschreibung                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **ROI type**       | <ul><li><strong>Generic</strong>: In use by default.</li><li><strong>Parking</strong>: Obsolete and not supported by the Data Center.</li></ul>                                                                                                                                                                                                                                                                                                                                                                                           |
| **Trigger action** | <ul><li><strong>Time</strong>: By default, an event is generated every 10 seconds. The time can be adjusted.</li><li><strong>Occupancy</strong>: An event is generated when the ROI's occupancy changes. If the number of detected objects in the ROI reaches the defined maximum capacity, the ROI is considered occupied.</li><li><strong>Rule</strong>: If a rule has been defined for the ROI, this field becomes active. By default, an event is generated at most every 10 seconds; this cooldown period can be adjusted.</li></ul> |
{% endtab %}

{% tab title="Origin Destination Zone (OD)" %}
An event is triggered when an object's trajectory has moved across at least two **OD zones**, with the first and last zones of the event being used.

The first zone an object passes through is called the **Origin** zone, and the last zone the object passes through is called the **Destination** zone. The event is triggered when the object's sighting ends, for example, when the object moves beyond the edge of the image.
{% endtab %}
{% endtabs %}

## Focus Zone

A **Focus Zone** defines an image area where object detection for tracks is considered. Object detection is active even outside the Focus Zone, but objects detected outside it aren't used for creating tracks. This means objects are pixelated throughout the entire image, regardless of the Focus Zone.

Classification and license plate recognition (if activated) only occur for objects detected _within_ the defined Focus Zone.

Using Focus Zones allows for targeted system optimization:

* **Improved Tracks:** The Focus Zone can limit where tracks are formed. For instance, Focus Zones can be defined to exclude the image's border areas, preventing unwanted merging of tracks.
* **Improved Classification:** The Focus Zone can restrict the area where classification takes place. For example, areas where vehicles are too small for successful classification can be excluded by Focus Zones.
* **Increased Performance:** Concentrating on essential image sections reduces the computational effort for classification and license plate recognition (if activated) for objects. This positively impacts the accuracy of object tracking, classification, and potentially license plate recognition.

<figure><img src="https://3137934538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6neI97pS6uo6iV2GbQ0y%2Fuploads%2F0oFcNidFUmWdybifqw1n%2Fimage.png?alt=media&#x26;token=d8829609-2a22-480a-b6eb-80dc634ab2ba" alt=""><figcaption></figcaption></figure>

## Calibration

### Track Calibration

The **Track Calibration** is an important tool for **optimal positioning** of the **Event Triggers**: It displays a live camera image and overlays it with the last 100 tracks, where each track visualizes the trajectory of a detected object.

<figure><img src="https://3137934538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6neI97pS6uo6iV2GbQ0y%2Fuploads%2FABuC56qLgOj4DXNpApHa%2Fimage.png?alt=media&#x26;token=33395d35-1a2e-4533-805a-db7013f89c60" alt=""><figcaption></figcaption></figure>

Track Calibration helps to determine:

* How objects and their tracks were classified.
* If tracks are continuous or interrupted, for example by obstructions.
* From what point objects are large enough for classification.

### ANPR Calibration

The **ANPR calibration** is used for **visual verification** and **fine-tuning** of automatic license plate recognition. ANPR calibration enables:

* **Optimization of device mounting and alignment** for optimal automatic license plate recognition.
* **Optimal positioning of Crossing-Lines** for optimal results.
* **Diagnosis of the data quality** of license plate acquisition.

{% hint style="success" %}
Set the crossing line at the end of the green tracks in the direction of travel
{% endhint %}

<figure><img src="https://3137934538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6neI97pS6uo6iV2GbQ0y%2Fuploads%2FOqRSTojQuw9yTBv2SDAG%2Fimage.png?alt=media&#x26;token=6e6c1247-c26a-46c9-8ef5-7b6eb6b2a4d1" alt=""><figcaption></figcaption></figure>

#### ANPR overlay description

**The most recently recognized license plates (top-left in the image):**

* The **Crossing-Line name, direction of travel, and time** of the last five recognized license plates are displayed.
* The **recognized license plate text and image cutout** are shown, allowing for manual verification of the results.

**Color-coded trajectories in the focus area (center of the image):**

* Real-time camera image with **color-coded trajectories** for vehicle movements and ANPR recognition quality.
  * 🟢 **Best ANPR**: Optimal recognition – license plates were read correctly.
  * 🟠 **Inconsistent ANPR**: Ambiguous or unstable recognition.
  * 🔴 **License plate not detected**: Vehicle detected, but no license plate found.
  * 🔵 **Object too small for ANPR**: Vehicle too far away or too small, ANPR not possible.
  * ⚫ **Class not relevant for ANPR**: Object detected, but the vehicle class is not relevant for ANPR (e.g., pedestrians, bicycles, scooters, trams).

**Focus Area**: A rectangular detection area with an orange border, within which ANPR recognition occurs.

