Commit 12587b06 by lvshi.gong

修改分类器优先级

parent 019a241a
......@@ -10,10 +10,10 @@ int pickPriorityValue(double xpred, double ypred, double zpred)
int y = qRound(ypred);
int z = qRound(zpred);
// 优先检查 1 → 2 → 3
if (x == 1 || y == 1 || z == 1) return 1;
if (x == 2 || y == 2 || z == 2) return 2;
// 优先检查 3 → 2 → 1
if (x == 3 || y == 3 || z == 3) return 3;
if (x == 2 || y == 2 || z == 2) return 2;
if (x == 1 || y == 1 || z == 1) return 1;
return 0; // 都没有
}
......@@ -454,6 +454,7 @@ int RamdomForestCalculate::Save_SACDATA(const Dc_SacData &sacdata)
int predRes = pickPriorityValue(xpred,ypred,zpred);
SPDLOG_LOGGER_DEBUG(spdlog::get("logger"),"报警类型: {}",predRes);
StreamInfo info(predRes,sacdata.target,sacdata.startIds,sacdata.endIds);
SendStreamAlarminfo(info);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment