SafeZone.2d

Advanced motion detection based on the award winning SafeZone.edge.

$ curl -X POST -L -H "Authorization: Basic XXXX" -F video=@somevideo.avi  http://api.videoai.net/safezone_2d
Parameter Description Values
min_size Minimum size of detected faces (pixels) Minimum 0 (default 100)
max_frames Do this many frames of the video Minimum 0 (default 0 - do all)
sensitivity Sensitivity 0.0 to 1.0 (default 0.5)

Output

The output of a SafeZone.2d process includes

  • A link to a video which contains an overlay of detections
  • A link to an XML file which contains very detailed information about all the motion detection, with links to the frame and location within that frame.

Note, all links are only available for up-to 24 hours after the job has finished.

Request SafeZone.2d

Perform SafeZone.2d on the supplied video clip.

POST /safezone_2d
POST /safezone_2d/ HTTP/1.1
Host: api.videoai.net
Authorization: Basic XXXXX

Example request:

$ curl -L -H "Authorization: Basic XXXX" -F video=@alarm.avi  http://api.videoai.net/safezone_2d

Example response:

HTTP/1.0 200 OK
Content-Type: application/json
Content-Length: 217
Server: Werkzeug/0.10.4 Python/2.7.6
Date: Mon, 14 Sep 2015 14:32:14 GMT
{
  "status": "success",
  "task": {
    "analytic": "safezone_2d",
    "complete": false,
    "job_id": "eSdKt94LyGXEYukKM4sQdP",
    "message": "In progress.",
    "start_time": "Mon, 14 Sep 2015 14:32:14 GMT"
  }
}

Check Job Status

Get the status of a particular SafeZone.2d job.

GET /safezone_2d/(string: job_id)
GET /safezone_2d/(string:job_id) HTTP/1.1
Host: api.videoai.net
Authorization: Basic XXXXX

Example request:

$ curl -L -H "Authorization: Basic XXXX" http://api.videoai.net/safezone_2d/eSdKt94LyGXEYukKM4sQdP

Example response:

HTTP/1.0 200 OK
Content-Type: application/json
Content-Length: 693
Server: Werkzeug/0.10.4 Python/2.7.6
Date: Mon, 14 Sep 2015 14:32:23 GMT
{
  "status": "success",
  "task": {
    "analytic": "safezone_2d",
    "complete": true,
    "finish_time": "Mon, 14 Sep 2015 14:32:23 GMT",
    "frames": 669,
    "frames_processed": 668,
    "input_video": "vegetation.avi",
    "job_id": "eSdKt94LyGXEYukKM4sQdP",
    "message": "SafeZone.2D task complete.",
    "resolution": "352x200@12.0fps",
    "results_video": "https://api.videoai.net/results/257/eSdKt94LyGXEYukKM4sQdP/safezone_2d_eSdKt94LyGXEYukKM4sQdP.avi",
    "results_xml": "https://api.videoai.net/results/257/eSdKt94LyGXEYukKM4sQdP/safezone_2d_eSdKt94LyGXEYukKM4sQdP.xml",
    "start_frame": 0,
    "start_time": "Mon, 14 Sep 2015 14:32:14 GMT",
    "success": true
  }
}

Job History

Get the status of the last 50 Alarm Verification tasks submitted.

GET /safezone_2d
GET /safezone_2d HTTP/1.1
Host: api.videoai.net
Authorization: Basic XXXXX

Example request:

$ curl -L -H "Authorization: Basic XXXX" http://api.videoai.net/safezone_2d

Example response:

HTTP/1.0 200 OK
Content-Type: application/json
Content-Length: 25920
Server: Werkzeug/0.10.4 Python/2.7.6
Date: Mon, 14 Sep 2015 14:35:29 GMT
{
  "status": "success",
  "tasks": [
    {
      "analytic": "safezone_2d",
      "complete": true,
      "finish_time": "Mon, 14 Sep 2015 14:32:23 GMT",
      "frames": 669,
      "frames_processed": 668,
      "input_video": "vegetation.avi",
      "job_id": "eSdKt94LyGXEYukKM4sQdP",
      "message": "SafeZone.2D task complete.",
      "resolution": "352x200@12.0fps",
      "results_video": "http://api.videoai.net/results/257/eSdKt94LyGXEYukKM4sQdP/safezone_2d_eSdKt94LyGXEYukKM4sQdP.avi",
      "results_xml": "http://api.videoai.net/results/257/eSdKt94LyGXEYukKM4sQdP/safezone_2d_eSdKt94LyGXEYukKM4sQdP.xml",
      "start_frame": 0,
      "start_time": "Mon, 14 Sep 2015 14:32:14 GMT",
      "success": true
    },
    {
      "analytic": "safezone_2d",
      "complete": true,
      "finish_time": "Mon, 14 Sep 2015 14:32:17 GMT",
      "frames": 669,
      "frames_processed": 668,
      "input_video": "vegetation.avi",
      "job_id": "rficv7amzyUq7ZSrXWx8pB",
      "message": "SafeZone.2D task complete.",
      "resolution": "352x200@12.0fps",
      "results_video": "http://api.videoai.net/results/257/rficv7amzyUq7ZSrXWx8pB/safezone_2d_rficv7amzyUq7ZSrXWx8pB.avi",
      "results_xml": "http://api.videoai.net/results/257/rficv7amzyUq7ZSrXWx8pB/safezone_2d_rficv7amzyUq7ZSrXWx8pB.xml",
      "start_frame": 0,
      "start_time": "Mon, 14 Sep 2015 14:32:09 GMT",
      "success": true
    }, ...
  ]
}