From a89689b92b07cf1830ad8b46521eda92e7f927c0 Mon Sep 17 00:00:00 2001
From: pansen <pansen626@sina.com>
Date: 星期三, 30 一月 2019 16:37:45 +0800
Subject: [PATCH] 修改bug
---
QiaoJiaSystem/VideoAnalysFromHC/RtspAnalysElement.cpp | 32 +++++++++++++++++++++++++++-----
1 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/QiaoJiaSystem/VideoAnalysFromHC/RtspAnalysElement.cpp b/QiaoJiaSystem/VideoAnalysFromHC/RtspAnalysElement.cpp
index f64710f..25b961b 100644
--- a/QiaoJiaSystem/VideoAnalysFromHC/RtspAnalysElement.cpp
+++ b/QiaoJiaSystem/VideoAnalysFromHC/RtspAnalysElement.cpp
@@ -81,13 +81,35 @@
item.str_password.toStdString(), item.str_brand.toStdString());
SdkRuleMap ruleMap = m_lDBTool->searchSdkRuleByCamId(item.str_cam_dev_id);
for (auto &rule:ruleMap) {
- if (rule.second.nThreshold < 5 || rule.second.nThreshold > 95) {
- rule.second.nThreshold = 75;
- }
- rule.second.fSensitivity = (float) (rule.second.nThreshold) / 100;
- DBG("fSensitivity" << rule.second.fSensitivity);
+
rule.second.strAddr = item.str_addr;
rule.second.weekRuleVec = m_lDBTool->searchCameraWeekRuleByCamId(item.str_cam_dev_id, rule.first);
+
+ if(rule.second.nSdkType == PerStaticSdk)
+ {
+ float temp=1-(float)(rule.second.nThreshold)/100;
+ rule.second.fSensitivity=(75+25*temp)/100;
+
+ }
+ else if(rule.second.nSdkType != FaceSdk)
+ {
+ float temp=1-(float)(rule.second.nThreshold)/100;
+ rule.second.fSensitivity=(5+90*temp)/100;
+ }
+// if (rule.second.nThreshold < 5 )
+// {
+// rule.second.fSensitivity=0.95;
+// }
+// else if(rule.second.nThreshold > 95)
+// {
+// rule.second.fSensitivity=0.05;
+// }
+// else
+// {
+// rule.second.fSensitivity = 1-(float) (rule.second.nThreshold) / 100;
+// }
+
+ DBG("fSensitivity" << rule.second.fSensitivity);
}
appPref.setStringData(t_camIdex + "rtsp", rtsp_url);
// appPref.setStringData(t_camIdex+"addr", item.str_addr.toStdString());
--
Gitblit v1.8.0