算法参数配置接口.txt 9.82 KB
1.获取算法配置
	POST : http://192.168.1.117:8081/SDCAPI/V1.0/VionSoftware/do/webclient/getAlgConfig
	请求参数:
	{
		"channelid": 1
	}
	返回结果:
	{
	  "success":1,
	  "describe":"算法设置查询成功",
	  "channelid": 1, //
	  "runtype": 1, //类型1-7 目前只支持三种 1.进出客流 4.区域 6.人脸
	  "algconfig":
	  {
		"resource":
		{
		  "total_resouce_free": 20,//总资源剩余 [0,100]
		  "resouce_usage": 20, //资源使用率,[0,100]
		},
		"roi":
		{
		  "imagepath": "../../../TEMP/1462519844378479.jpg", //画ROI的那张截图路径
		  "imagesize_H": 1280,
		  "imagesize_W": 1280,
		  "cameraheight": 500, //单位cm
		  "angle": 0,             //角度
		  "mode": 0,              //选择模式, 0:宽松 1:严格
		  "directioncount": 0,//方向个数
		  "linecount": 0, //进门线个数
		  "rectcount": 0, //检测框个数
		  "directionxysets"://方向线坐标
		  [
			{
			  "beginx":123,
			  "beginy":456,
			  "endx": 223,
			  "endy": 556
			},
			...
		  ],
		  "linexysets"://进门线坐标initRect
		  [
			{ //一条进门线
			  "coordinates":
			  [ //每条进门线含有N个坐标点
				{ //一个坐标点
				  "x":123,
				  "y":456
				}
				...
			  ]
			},
			...
		  ],
		  "recxysets"://检测框坐标
		  [
			{    //一个检测框
			  "coordinates":
			  [  //每个检测框含有N个坐标点
				{ //一个坐标点
				  "x":123,
				  "y":456
				}
				...
			  ]
			},
			...
		  ],
		},
		"config": //算法基本参数
		{
		  "inout"://进出客流
		  {
			"zoomscale": 3,   //人头尺寸 [0.5,4] step=0.01 alg:x100 表示传入算法时,该值要*100
			"zoomscalemin": 20,          //最小人头尺寸 [0,1000] step=5
			"zoomscalemax": 300,         //最大人头尺寸 [0,1000] step=5
			"sensitivity1": 20,   //敏感度1 [0,100] step=1
			"sensitivity2": 40,   //敏感度2 [0,100] step=1
			"sensitivity3": 20,   //敏感度3 [0,100] step=1
			"displaymode": 1,     //模式选择 0:录像 1:经典 2:调试 3:展示
			"tracethreshold": 3,  //轨迹跟踪阀值 [1,5] step=0.1  alg:x100
			"preframenum": 30,    //轨迹预测帧数 [1,100] step=1
			"trackmotionthreshold": 1,  //轨迹移动阀值  [0,10] step=0.1 alg:x100
			"trackshapethreshold": 0.5,  //轨迹形态阀值  [0,1] step=0.1 alg:x100
			"incoefficient": 0,   //走入参数 [0,2] step=0.1 alg:x100
			"outcoefficient": 0,  //走出参数 [0,2] step=0.1 alg:x100
		  },
		  "area"://区域客流
		  {
			"zoomscale": 3,   //人头尺寸 [0.5,4] step=0.01 alg:x100 表示传入算法时,该值要*100
			"zoomscalemin": 20,          //最小人头尺寸 [0,1000] step=5
			"zoomscalemax": 300,         //最大人头尺寸 [0,1000] step=5
			"sensitivity1": 20,   //敏感度1 [0,100] step=1
			"sensitivity2": 40,   //敏感度2 [0,100] step=1
			"sensitivity3": 20,   //敏感度3 [0,100] step=1
			"displaymode": 1,     //模式选择 0:录像 1:经典 2:调试 3:展示
			"tracethreshold": 3,  //轨迹跟踪阀值 [1,5] step=0.1  alg:x100
			"trackmotionthreshold": 1,  //轨迹移动阀值  [0,10] step=0.1 alg:x100
			"areacoefficient": 1,  //区域参数 [0.1,10] step=0.01 alg:x100
		  },
		  "face"://人脸客流
		  {
			"zoomscale": 3,   //人头尺寸 [0.5,4] step=0.01 alg:x100 表示传入算法时,该值要*100
			"zoomscalemin": 20,          //最小人头尺寸 [0,1000] step=5
			"zoomscalemax": 300,         //最大人头尺寸 [0,1000] step=5
			"sensitivity1": 20,   //敏感度1 [0,100] step=1
			"sensitivity2": 40,   //敏感度2 [0,100] step=1
			"sensitivity3": 20,   //敏感度3 [0,100] step=1
			"displaymode": 1,     //模式选择 0:录像 1:经典 2:调试 3:展示
			"tracethreshold": 3,  //轨迹跟踪阀值 [1,5] step=0.1  alg:x100
			"preframenum": 30,    //轨迹预测帧数 [1,100] step=1
			"trackmotionthreshold": 1,  //轨迹移动阀值  [0,10] step=0.1 alg:x100
			"trackshapethreshold": 0.5,  //轨迹形态阀值  [0,1] step=0.1 alg:x100
			"removesimilarity":75,      //去重相似度    [10,100] step=0.01 alg:x100
			"removetime":15,            //去重时间     [0,1200] step=1
			"facelum":0.5,               //人脸亮度     [0,1] step=0.01 alg:x100
			"facequalitythreshold": 3.5,  //人脸质量阀值   [0,5] step=0.1 alg:x100
			"maxage":70,                //最大年龄    [1,100] step=1
			"minage":1,                 //最小年龄    [1,100] step=1
			"genderthreshold":0.5,          //男女阀值     [0,1] step=0.01 alg:x100
			"facecaptureinterval":3,        //人脸抓取间隔 [1,20] step=1
			"incoefficient": 1,   //走入参数 [0.1,10] step=0.01 alg:x100
			"outcoefficient": 1,  //走出参数 [0.1,10] step=0.01 alg:x100
		  }
		}
	  }
	}


	
2.设置算法配置
	POST :http://192.168.1.117:8081/SDCAPI/V1.0/VionSoftware/do/webclient/modAlgConfig
	参数:
	
	{
    "channelid": 1,
    "runtype": 1, //类型1-7 目前只支持三种 1.进出客流 4.区域 6.人脸
    "roi":
    {
      "imagepath": "../../../TEMP/1462519844378479.jpg", //画ROI的那张截图路径
      "imagesize_H": 1280,
      "imagesize_W": 1280,
      "cameraheight": 500, //单位cm
      "angle": 0,             //角度
      "mode": 0,              //选择模式, 0:宽松 1:严格
      "directioncount": 0,//方向个数
      "linecount": 0, //进门线个数
      "rectcount": 0, //检测框个数
      "directionxysets"://方向线坐标
      [
        {
          "beginx":123,
          "beginy":456,
          "endx": 223,
          "endy": 556
        },
        ...
      ],
      "linexysets"://进门线坐标
      [
        { //一条进门线
          "coordinates":
          [ //每条进门线含有N个坐标点
            { //一个坐标点
              "x":123,
              "y":456
            }
            ...
          ]
        },
        ...
      ],
      "recxysets"://检测框坐标
      [
        {    //一个检测框
          "coordinates":
          [  //每个检测框含有N个坐标点
            { //一个坐标点
              "x":123,
              "y":456
            }
            ...
          ]
        },
        ...
      ]
    },
    "config": //算法基本参数
    {
      "inout"://进出客流
      {
        "zoomscale": 3,   //人头尺寸 [0.5,4] step=0.01 alg:x100 表示传入算法时,该值要*100
        "zoomscalemin": 20,          //最小人头尺寸 [0,1000] step=5
        "zoomscalemax": 300,         //最大人头尺寸 [0,1000] step=5
        "sensitivity1": 20,   //敏感度1 [0,100] step=1
        "sensitivity2": 40,   //敏感度2 [0,100] step=1
        "sensitivity3": 20,   //敏感度3 [0,100] step=1
        "displaymode": 1,     //模式选择 0:录像 1:经典 2:调试 3:展示
        "tracethreshold": 3,  //轨迹跟踪阀值 [1,5] step=0.1  alg:x100
        "preframenum": 30,    //轨迹预测帧数 [1,100] step=1
        "trackmotionthreshold": 1,  //轨迹移动阀值  [0,10] step=0.1 alg:x100
        "trackshapethreshold": 0.5,  //轨迹形态阀值  [0,1] step=0.1 alg:x100
        "incoefficient": 0,   //走入参数 [0,2] step=0.1 alg:x100
        "outcoefficient": 0,  //走出参数 [0,2] step=0.1 alg:x100
      },
      "area"://区域客流
      {
        "zoomscale": 3,   //人头尺寸 [0.5,4] step=0.01 alg:x100 表示传入算法时,该值要*100
        "zoomscalemin": 20,          //最小人头尺寸 [0,1000] step=5
        "zoomscalemax": 300,         //最大人头尺寸 [0,1000] step=5
        "sensitivity1": 20,   //敏感度1 [0,100] step=1
        "sensitivity2": 40,   //敏感度2 [0,100] step=1
        "sensitivity3": 20,   //敏感度3 [0,100] step=1
        "displaymode": 1,     //模式选择 0:录像 1:经典 2:调试 3:展示
        "tracethreshold": 3,  //轨迹跟踪阀值 [1,5] step=0.1  alg:x100
        "trackmotionthreshold": 1,  //轨迹移动阀值  [0,10] step=0.1 alg:x100
        "areacoefficient": 1,  //区域参数 [0.1,10] step=0.01 alg:x100
      },
      "face"://人脸客流
      {
        "zoomscale": 3,   //人头尺寸 [0.5,4] step=0.01 alg:x100 表示传入算法时,该值要*100
        "zoomscalemin": 20,          //最小人头尺寸 [0,1000] step=5
        "zoomscalemax": 300,         //最大人头尺寸 [0,1000] step=5
        "sensitivity1": 20,   //敏感度1 [0,100] step=1
        "sensitivity2": 40,   //敏感度2 [0,100] step=1
        "sensitivity3": 20,   //敏感度3 [0,100] step=1
        "displaymode": 1,     //模式选择 0:录像 1:经典 2:调试 3:展示
        "tracethreshold": 3,  //轨迹跟踪阀值 [1,5] step=0.1  alg:x100
        "preframenum": 30,    //轨迹预测帧数 [1,100] step=1
        "trackmotionthreshold": 1,  //轨迹移动阀值  [0,10] step=0.1 alg:x100
        "trackshapethreshold": 0.5,  //轨迹形态阀值  [0,1] step=0.1 alg:x100
        "removesimilarity":75,      //去重相似度    [10,100] step=0.01 alg:x100
        "removetime":15,            //去重时间     [0,1200] step=1
        "facelum":0.5,               //人脸亮度     [0,1] step=0.01 alg:x100
        "facequalitythreshold": 3.5,  //人脸质量阀值   [0,5] step=0.1 alg:x100
        "maxage":70,                //最大年龄    [1,100] step=1
        "minage":1,                 //最小年龄    [1,100] step=1
        "genderthreshold":0.5,          //男女阀值     [0,1] step=0.01 alg:x100
        "facecaptureinterval":3,        //人脸抓取间隔 [1,20] step=1
        "incoefficient": 1,   //走入参数 [0.1,10] step=0.01 alg:x100
        "outcoefficient": 1,  //走出参数 [0.1,10] step=0.01 alg:x100
      }
    }
	}


	响应:
	{
	  "success":1,
	  "describe":"算法参数修改成功",//可选
	  "errcode": 23,      //可选
	  "command": "modChannel" //可选
	}