| | |
| | | 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 == FaceSdk) continue; |
| | | |
| | | 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()); |