Create an analytics cases for counting people
Creating analytics cases
Creating an analytics case with the “Counting objects in an area” type. A tool for automatically localizing and establishing the exact number of people in a designated area of a video stream. Event: detection and counting of the number of objects (people) located in the detection zone of the selected camera.
{
"title": "Counting objects in an area",
"type": "person-counting",
"cameras": [
{
"id": 10,
"analytic_case_camera_user_status": null,
"scripts": [
{
"id": 20,
"is_enabled": true
}
],
"meta": {
"figures": [
{
"name": "Figure 1",
"coords": [
{
"x": 0.153125,
"y": 0.31666666666666665
},
{
"x": 0.3421875,
"y": 0.7361111111111112
},
{
"x": 0.86875,
"y": 0.6472222222222223
},
{
"x": 0.78125,
"y": 0.125
}
]
}
],
"reaction_after_value": 3
}
},
{
"id": 7,
"analytic_case_camera_user_status": null,
"scripts": [
{
"id": 20,
"is_enabled": false
}
],
"meta": {
"figures": [
{
"name": "Figure 1",
"coords": [
{
"x": 0.153125,
"y": 0.31666666666666665
},
{
"x": 0.3421875,
"y": 0.7361111111111112
},
{
"x": 0.86875,
"y": 0.6472222222222223
},
{
"x": 0.78125,
"y": 0.125
}
]
}
],
"reaction_after_value": 3
}
}
]
}
POST /api/v1/analytic-case |
Parameters
string
title, Analytics case title
string
type, For this type of case, you must always send the value person-counting
array
cameras, An array of camera objects indicating the event and reaction
int
cameras.
REQUIRED
, .meta.reaction_after_value The number of people in the area at which the reaction will be triggered.
int
cameras.
REQUIRED
, .meta.reaction_after_value The number of people in the area at which the reaction will be triggered.
int
cameras.
REQUIRED
, .meta.reaction_after_value The number of people in the area at which the reaction will be triggered.
int
cameras.
REQUIRED
, .meta.reaction_after_value The number of people in the area at which the reaction will be triggered.
int
cameras.
REQUIRED
, .meta.reaction_after_value The number of people in the area at which the reaction will be triggered.
int
cameras.
REQUIRED
, .meta.reaction_after_value The number of people in the area at which the reaction will be triggered.
201 |
Returns the analytics case
JSON
|
401 |
Authorization token not sent or not valid |
402 |
The license limit for the selected analytics case has been exceeded |
422 |
Returns a JSON object with an error.
JSON
|
curl -k --request POST \
--url 'https://your-domain/api/v1/analytic-case' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"title": "string",
"type": "string",
"cameras": {
"": 0
},
"cameras.": "void"
}'
$data = array (
'title' => 'string',
'type' => 'string',
'cameras' =>
array (
'' => 0,
),
'cameras.' => 'void',
);
$context = stream_context_create([
'ssl'=>['verify_peer' => false],
'http' => [
'method' => 'POST',
'header' => "Content-Type: application/json\r
Accept: application/json",
'content'=>json_encode($data)
]
]);
$result = file_get_contents('https://your-domain/api/v1/analytic-case', false, $context);