视频智能分析服务 VIAS-创建云上河道标定水尺识别作业:请求示例

时间:2024-09-25 18:58:46

请求示例

  • 云上河道标定水尺识别作业创建,使用输入源为video_source,输出为dis。

    POST /v2/{project_id}/services/cali-water-ruler-river-cloud/tasks
    
    {
      "name" : "water-ruler-task",
      "description" : "water-ruler 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" : {
          "report_interval" : 1,
          "image_compression_ratio" : 90,
          "target_roi" : "{\"polygons\":[{\"data\":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}",
          "calibration_info" : "{\"lines\":[{\"data\":[[460,741],[660,741]],\"scale\":110},{\"data\":[[460,420],[660,420]],\"scale\":71},{\"data\":[[460,190],[660,190]],\"scale\":22}]}",
          "render_result_sw" : 1,
          "render_roi_sw" : 1,
          "render_calibration_sw" : 1
        }
      }
    }
  • 云上河道标定水尺识别作业创建,使用输入源为url,输出为dis。

    POST /v2/{project_id}/services/cali-water-ruler-river-cloud/tasks
    
    {
      "name" : "water-ruler-task",
      "description" : "water-ruler task test",
      "input" : {
        "type" : "url",
        "data" : [ {
          "url" : "https://obs_test/test.mp4",
          "index" : 0
        } ]
      },
      "output" : {
        "dis" : {
          "stream_name" : "dis-test"
        }
      },
      "service_version" : "3.0",
      "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e",
      "config" : {
        "common" : {
          "report_interval" : 1,
          "image_compression_ratio" : 90,
          "target_roi" : "{\"polygons\":[{\"data\":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}",
          "calibration_info" : "{\"lines\":[{\"data\":[[460,741],[660,741]],\"scale\":110},{\"data\":[[460,420],[660,420]],\"scale\":71},{\"data\":[[460,190],[660,190]],\"scale\":22}]}",
          "render_result_sw" : 1,
          "render_roi_sw" : 1,
          "render_calibration_sw" : 1
        }
      }
    }
  • 云上河道标定水尺识别作业创建,使用输入源为obs,输出为dis。

    POST /v2/{project_id}/services/cali-water-ruler-river-cloud/tasks
    
    {
      "name" : "water-ruler-task",
      "description" : "water-ruler task test",
      "input" : {
        "type" : "obs",
        "data" : [ {
          "bucket" : "obs_test_video",
          "path" : "test.mp4",
          "index" : 0
        } ]
      },
      "output" : {
        "dis" : {
          "stream_name" : "dis-test"
        }
      },
      "service_version" : "3.0",
      "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e",
      "config" : {
        "common" : {
          "report_interval" : 1,
          "image_compression_ratio" : 90,
          "target_roi" : "{\"polygons\":[{\"data\":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}",
          "calibration_info" : "{\"lines\":[{\"data\":[[460,741],[660,741]],\"scale\":110},{\"data\":[[460,420],[660,420]],\"scale\":71},{\"data\":[[460,190],[660,190]],\"scale\":22}]}",
          "render_result_sw" : 1,
          "render_roi_sw" : 1,
          "render_calibration_sw" : 1
        }
      }
    }
support.huaweicloud.com/vias-api/CreateWaterRulerTasksCloud.html