Draw static video AOIS

Specifiy the AOIs points and video frames to draw the static AOIs

Pre-requisites

You must have an existing video with an associated media_id and the prediction status as done.

Use the media_id to send the PUT request to the endpoint /predict/v2/videos/media_id/aois/static

Expected request payload

For each Area of Interest (AOI), there need to be , at least, 3 points, with both x (horizontal) and y (vertical) coordinates, so that a triangle, rectangle, or polygon can be set as the AOI.

Note: The coordinates for the points must be values within the interval 0 and 1, because it corresponds to the position relative to the with or height of the image, so values like -0.3 or 1.56 will not be valid.

{
  "aois": [
    {
      "points": [
        {
          "x": 0.7,
          "y": 0.2
        },
        {
          "x": 0.7,
          "y": 0.5
        },
        {
          "x": 0.9,
          "y": 0.5
        },
        {
          "x": 0.9,
          "y": 0.2
        }
      ],
      "name": "Static_Video_AOI_1",
      "start_frame": 10,
      "end_frame": 13
    }
  ]
}

Example of a successful response

Upon updating the AOIs in your image, the successful response look should look like the snippet below.

NOTE: Every time you call this endpoint, it will completely overwrite the AOIs in your video so, if you want to append an AOI or edit an existing one, make sure to pass the current AOIs object with the appropriate changes.

{
  "detail": "AOI detection started"
}

NOTE: In case the AOI status is currently as started then no new calculation will be triggered and the response will be as below:

{
  "detail": "AOI detection already started"
}
Language
Credentials
Header
Click Try It! to start a request and see the response here!