提交 75b89ac2 authored 作者: blu's avatar blu

human detect: bugfix

上级 1f291f58
......@@ -605,7 +605,7 @@ private:
origin = origin(crop);
}
//imgScalor = w * h / (FRAME_SIZE * FRAME_SIZE * 1.0);
// imgScalor = w * h / (FRAME_SIZE * FRAME_SIZE * 1.0);
// cv::resize(origin, gray, cv::Size(FRAME_SIZE,FRAME_SIZE));
cv::Mat gray;
cv::cvtColor(origin, gray, cv::COLOR_BGR2GRAY);
......
......@@ -190,11 +190,11 @@ def getRegionConfig(ipcSN):
region = None
res = None
reqUrl = API_HOST + API_CAMERA_CFG_URI.format(ipcSN)
try:
if ipcSN in CAMERA_CONFIG_MAP and type(CAMERA_CONFIG_MAP[ipcSN]) is dict:
region = CAMERA_CONFIG_MAP[ipcSN]['region']
elif CAMERA_CONFIG_MAP.get(ipcSN) is None and API_HOST:
res = requests.get(reqUrl)
try:
if res.status_code == 200:
ret = res.json()
if 'data' in ret and 'region' in ret['data']:
......@@ -202,9 +202,9 @@ def getRegionConfig(ipcSN):
CAMERA_CONFIG_MAP[ipcSN] = ret["data"]
if CAMERA_CONFIG_MAP.get(ipcSN) is None:
CAMERA_CONFIG_MAP[ipCSN] = 0
print("getRegionConfig: {}, {}, {}: {}".format(ipcSN, reqUrl, res.text if res and (text in res) else None, json.dumps(region)))
except Exception as e:
print("failed to get camera config {}: {}".format(ipcSN, e))
print("getRegionConfig: {}, {}, {}: {}".format(ipcSN, reqUrl, res.text, json.dumps(region)))
return region
def take_task(task):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论