Counting API
Health
health
GET
https://counting.traces.cloud/api/v1/health
This endpoint allows to test that service is up
Path Parameters
X-Traces-API-Key
string
Authorization API key to access Traces Counting API
Example
Operations
For a successful usage of Traces Counting API, it is required to do the following step:
Register a camera by providing coordinates of counting triangles. It should be done only once for every unique camera. Read more about counting triangles here.
If the placement of a camera or areas of interest has changed, just update the coordinates of counting triangles by sending a new POST request with the same 'camera id'.
object-counting-settings
POST
https://counting.traces.cloud/api/v1/object-counting-settings
Defines areas of interest (counting triangles) for a given camera. Counting triangles are used to calculate the number of objects that passed by.
Headers
X-Traces-API-Key*
string
Authorization API key to access Traces Counting API
Request Body
counting_options*
object
Dictionary with a camera_id
key and a list of counting_triangles
defined for every unique camera. See example data.json
below
Example
object-counting
POST
https://counting.traces.cloud/api/v1/object-counting
Calculates the number of objects that passed every area of interest in a given video. Returns a detailed report about how many objects of each type entered and exited every area of interest.
Headers
X-Traces-API-Key*
string
Authorization API key to access Traces Counting API
Request Body
counting_options*
object
Dictionary with "classes
" and "count_by_frames
" keys.
Example: { "classes": [ "people", "vehicle" ], "count_by_frames": false }
.
Classes
are the types of objects that will be calculated.
Count_by_frames
defines the granularity level of response. If True,
the number of objects will be shown for every frame of an input video.
video*
string
video file ($binary)
metadata*
object
Dictionary with a "camera_id
" key.
Example: { "camera_id": "b5271b30-aecd-4897-bc95-ff25c8466b9e" }
Example
dwell-time-settings
POST
https://counting.traces.cloud/api/v1/dwell-time-settings
Defines spaces for dwell time calculation for a given camera.
Headers
X-Traces-API-Key*
string
Authorization API key to access Traces Counting API
Request Body
counting_options*
object
Dictionary with a list of spaces where a dwell time should be calculated. See example data.json
below
Example
dwell-time-summary
POST
https://counting.traces.cloud/api/v1/dwell-time-summary
Calculates statistics about customer's dwell time in the defined spaces. Returns the number of people who entered a perimeter of every space; average, median, total, maximum, and minimum of dwell time in the given video.
Path Parameters
X-Traces-API-Key*
string
Authorization API key to access Traces Counting API
Request Body
video*
string
video file ($binary)
metadata*
object
Dictionary with "camera_id"
key. Example: { "camera_id": "b5271b30-aecd-4897-bc95-ff25c8466b9e" }
Example
dwell-time-detailed
POST
https://counting.traces.cloud/api/v1/dwell-time-detailed
Calculates dwell-time for every customer who entered the perimeter. It provides detailed information about every customer who entered any space, that includes every frame where the customer appeared, their coordinates in each frame for correct localization, and a total dwell time.
Path Parameters
X-Traces-API-Key*
string
Authorization API key to access Traces Counting API
Request Body
video*
string
video file ($binary)
metadata*
object
Dictionary with "camera_id"
key. Example: { "camera_id": "b5271b30-aecd-4897-bc95-ff25c8466b9e" }
Example
Last updated