#include "StrategyAPI.h" #include "AbandClipStrategy.h" SDKAPI TZ_INT Initialize() { return 0; } SDKAPI TZ_INT Dispose() { return 0; } SDKAPI masd::Strategy * BuildStrategy() { masd::Strategy * stra = new masd::abandclip::AbandClipStrategy(); return stra; } SDKAPI void DestroyStrategy(masd::Strategy * strategy) { TZ_delete(strategy); } SDKAPI TZ_INT GetInformation(TZ_CHAR * informatrion) { masd::StrategyInfo info; info.Key = "AbandClip"; info.Name = "遗留物检测判定策略"; info.Version = "V1.0.0-T-20241214R"; info.Author = "杭州晨鹰军泰"; info.UpdateDate = "2024-12-14 09:30:00"; info.StraDets.emplace_back(0, -1, "AbandObj", "遗留物目标检测"); info.StraDets.emplace_back(1, 0, "Clip", "Clip目标检测"); info.StraCfgs.push_back({masd::DIT_DOUBLE, "FeatureThreshold", "特征匹配阈值", "10.0", "0.0", "100.0", "0.1", "设置特征匹配点积的阈值,点积值大于设置阈值时才判定为匹配成功。"}); info.StraCfgs.push_back({masd::DIT_STRING, "FeatureFilePath", "特征文件路径", PROGRAM_ROOT_PATH "assets/textfeatures.json", "NAN", "NAN", "NAN", "设置存储文本特征的 JSON 文件的路径,用于加载特征数据。"}); info.StraRsts.emplace_back(masd::SRT_ALARM, "检测到遗留物"); strcpy(informatrion, info.toJson().c_str()); return masd::MEC_OK; }