视频智能分析服务 VIAS-创建边缘高点超速检测作业:请求示例

时间:2024-04-19 18:20:03

请求示例

  • 边缘高点超速检测作业创建,使用输入源为video_source,输出为dis。

    POST /v2/{project_id}/services/c-highpoint-overspeed-edge/tasks
    
    {
      "name" : "highpoint-overspeed-task",
      "description" : "highpoint-overspeed task test",
      "input" : {
        "type" : "video_source",
        "data" : [ {
          "video_source_id" : "xxxxxxx-xxxxxxx-xxxxxxx-xxxxx-xxxxxx"
        } ]
      },
      "output" : {
        "dis" : {
          "stream_name" : "dis-test"
        }
      },
      "service_version" : "3.0",
      "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e",
      "config" : {
        "common" : {
          "target_roi" : "{\"polygons\":[{\"data\":[[268,361],[386,556],[539, 506],[364,332]]},{\"data\":[[474,689],[758,1070],[1183,1070],[668,627]]}]}",
          "camera_calibration" : "[75.318722,63.472760,3372.332762,-20.421955,0.031882]",
          "speed_threshold" : 40,
          "render_result_sw" : 1,
          "render_roi_sw" : 1,
          "image_compression_ratio" : 100
        }
      }
    }
  • 边缘高点超速检测作业创建,使用输入源为restful,输出为webhook。

    POST /v2/{project_id}/services/c-highpoint-overspeed-edge/tasks
    
    {
      "name" : "highpoint-overspeed-task",
      "description" : "highpoint-overspeed task test",
      "input" : {
        "type" : "restful",
        "data" : [ {
          "index" : 0,
          "url" : "http://xxx.xxx.xxx.xxx:xxx/test/data",
          "certificate_check" : false,
          "rtsp_path_in_response" : "data/url"
        } ]
      },
      "output" : {
        "webhook" : {
          "url" : "https://apigw.huawei.com/xxx/xxx/callback",
          "headers" : {
            "content-type" : "application/json"
          }
        }
      },
      "service_version" : "3.0",
      "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e",
      "config" : {
        "common" : {
          "target_roi" : "{\"polygons\":[{\"data\":[[268,361],[386,556],[539, 506],[364,332]]},{\"data\":[[474,689],[758,1070],[1183,1070],[668,627]]}]}",
          "camera_calibration" : "[75.318722,63.472760,3372.332762,-20.421955,0.031882]",
          "speed_threshold" : 40,
          "render_result_sw" : 1,
          "render_roi_sw" : 1,
          "image_compression_ratio" : 100
        }
      }
    }
  • 边缘高点超速检测作业创建,使用输入源为边缘摄像头,输出为dis。

    POST /v2/{project_id}/services/c-highpoint-overspeed-edge/tasks
    
    {
      "name" : "highpoint-overspeed-task",
      "description" : "highpoint-overspeed task test",
      "input" : {
        "type" : "edgecamera",
        "data" : [ {
          "id" : "aec5857c-222f-4aa9-be39-23654e118886",
          "index" : 0
        } ]
      },
      "output" : {
        "dis" : {
          "stream_name" : "dis-test"
        }
      },
      "service_version" : "3.0",
      "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e",
      "config" : {
        "common" : {
          "target_roi" : "{\"polygons\":[{\"data\":[[268,361],[386,556],[539, 506],[364,332]]},{\"data\":[[474,689],[758,1070],[1183,1070],[668,627]]}]}",
          "camera_calibration" : "[75.318722,63.472760,3372.332762,-20.421955,0.031882]",
          "speed_threshold" : 40,
          "render_result_sw" : 1,
          "render_roi_sw" : 1,
          "image_compression_ratio" : 100
        }
      }
    }
  • 边缘高点超速检测作业创建,使用输入源为VCN,输出为dis。

    POST /v2/{project_id}/services/c-highpoint-overspeed-edge/tasks
    
    {
      "name" : "highpoint-overspeed-task",
      "description" : "highpoint-overspeed task test",
      "input" : {
        "type" : "vcn",
        "vcn" : {
          "ip" : "xxx.xxx.xxx.xxx",
          "password" : "CQeNfcRLwyMvH77AkDBaPS+BKXdFu/1bAXtIMNTx3QPbVewjipNq06nNodxWI28I1lCUsvv2+wB1joepzynLVW3g2nz0k9vaCRDoK6=",
          "port" : "xxx",
          "username" : "testname"
        },
        "data" : [ {
          "index" : 0,
          "stream_type" : 1,
          "device_id" : "07211540881586160101#f7964493ff764bbf9294d58b22e63de6"
        } ]
      },
      "output" : {
        "dis" : {
          "stream_name" : "dis-test"
        }
      },
      "service_version" : "3.0",
      "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e",
      "config" : {
        "common" : {
          "target_roi" : "{\"polygons\":[{\"data\":[[268,361],[386,556],[539, 506],[364,332]]},{\"data\":[[474,689],[758,1070],[1183,1070],[668,627]]}]}",
          "camera_calibration" : "[75.318722,63.472760,3372.332762,-20.421955,0.031882]",
          "speed_threshold" : 40,
          "render_result_sw" : 1,
          "render_roi_sw" : 1,
          "image_compression_ratio" : 100
        }
      }
    }
support.huaweicloud.com/vias-api/CreateHighpointOverspeedTasksEdge.html