Introduction
Step 1: Registering a free account on the Postman Website
Step 2: Adding 3dEYE API library into Postman
Note: the API menu is accessible only from https://admin.3deye.me↗️ it is not visible from branded pages.
Step 3: Obtaining API Key for access and generating Token
Step 4: Using the generated Token
Step 5: Adding Event info for using API
Then in the Params provide the information in the value section. The camera ID can be retrieved from the Camera tab under the customer account. The dateFrom and dateTo should be in this format YYYY-MM-DDThh:mm:ssZ for example: 2023-11-28T13:55:11Z. For the event type, the user can choose from Motion, LPR, or Analytics for object detection data. For Analytic, the user needs to input the subtype as well such as Person, car, or Animal.
⚠️Note: at this time special subtypes like luggage, fire, smoke, hardhat or LPR are not supported. To obtain these event subtypes do a request for type "Analytics" and filter the results using 3rd party applications.
To view the return data from the 3dEYE website, click on the body section. Then user can select the returned data type from the dropdown menu. To copy the returned data, simply click on the copy icon on the middle left of the screen.
Identifying and counting objects found in Event Data
import json
data = {
"data":
[
{
"id": 561sad99,
"type": "Analytic",
"description": null,
"tags": null,
"customerData": null,
"data": "{\"ThumbnailUrl\":\"https://thumbnails-request-listener.3deye.me/api/extract/thumbnail_exact?key=analytics-thumbnails/25183/525005380906s8529.jpg&AWSAccessKeyId=AdasdasdasdXGRIL7BQ&Expires=1738297&Signature=bMGQyc%3D\",
\"ThumbnailSize\":{\"Width\":1920,\"Height\":1080},\"FoundObjects\":[{\"Type\":\"Car\",\"Box\":{\"Left\":0.7171876,\"Top\":0.105555534,\"Right\":0.75781256,\"Bottom\":0.17499995},\"Probability\":0.879683,\"Colors\":[{\"Color\":\"blue\",\"Rate\":1.0}]}]}",
"startTimeUtc": "2023-11-28T14:37:43Z",
"endTimeUtc": "2023-11-28T14:37:43Z"
}
]
}
null = ''
type_list = []
for i in data['data']:
thumb_data = json.loads(i['data'])
object_type = thumb_data['FoundObjects'][0]['Type']
type_list.append(object_type)
def count_items(lst):
item_count = {}
for item in lst:
if item in item_count:
item_count[item] += 1
else:
item_count[item] = 1
return item_count
result = count_items(type_list)
print(result)
{'Car': 54, 'Person': 32}