Zones Creation and Inquiry
This document serves as a comprehensive guide for utilizing the Eizen SDK to create Zones and retrieve their details. Zones are designated areas where sources, such as cameras or video streams, can be assigned for targeted analytics. Effectively managing these zones enhances the segmentation of environments, associates media sources, and provides access to zone-specific data for processing or display.
Function Name Overview
| Function Name | Description |
|---|---|
| add_zone | Creates a new Zone and associates it with an analytic. |
| get_zone | Retrieves details of a specific Zone by its ID. |
| get_analytic_zones | Fetches Zones linked to a specific analytic. |
| get_all_zones | Returns a list of all Zones available in the system. |
Adding Zones
To add a zone to analytics, utilize the add_zone method.
Description
This method creates a zone and links it to a specific analytic, making it ideal for assigning cameras or sources.
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | String | Yes | The name of the zone |
| analytics_id | Integer | Yes | The ID of the analytics instance |
Example
add_zone = sdk.add_zone(
name="Zone 2", # Zone Name
analytics_id=1 # Analytics Id
)
print(add_zone)
Fetching Zone Details
To obtain details of a specific zone, employ the get_zone method.
Description
This method retrieves information about a zone using its unique ID.
| Parameter | Type | Required | Description |
|---|---|---|---|
| zone_id | Integer | Yes | The ID of the zone |
Example
getZone = sdk.get_zone(zone_id=1) # Zone ID
print(getZone)
Fetching Zones for an Analysis
To retrieve zones associated with a specific analytic, use the get_analytic_zones method.
Description
This method returns a list of zones linked to the provided analytic_id, representing areas in a video where events or activities are monitored.
| Parameter | Type | Required | Description |
|---|---|---|---|
| analytic_id | Integer | Yes | The ID of the analytic to query |
Example
zones = sdk.get_analytic_zones(analytic_id=123)
print(zones)
Fetching All Zone Details
To retrieve all zones in the system, utilize the get_all_zones method.
Description
This method returns a complete list of all zones defined in the system.
Example
getAllZone = sdk.get_all_zones()
print(getAllZone)
Notes
- Ensure that the SDK is initialized properly with a valid User token before invoking these methods.
- All returned data is typically formatted as a dictionary or list.