AbandClipAPI.cpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #include "StrategyAPI.h"
  2. #include "AbandClipStrategy.h"
  3. SDKAPI TZ_INT Initialize()
  4. {
  5. return 0;
  6. }
  7. SDKAPI TZ_INT Dispose()
  8. {
  9. return 0;
  10. }
  11. SDKAPI masd::Strategy * BuildStrategy()
  12. {
  13. masd::Strategy * stra = new masd::abandclip::AbandClipStrategy();
  14. return stra;
  15. }
  16. SDKAPI void DestroyStrategy(masd::Strategy * strategy)
  17. {
  18. TZ_delete(strategy);
  19. }
  20. SDKAPI TZ_INT GetInformation(TZ_CHAR * informatrion)
  21. {
  22. masd::StrategyInfo info;
  23. info.Key = "AbandClip";
  24. info.Name = "遗留物检测判定策略";
  25. info.Version = "V1.0.0-T-20241214R";
  26. info.Author = "杭州晨鹰军泰";
  27. info.UpdateDate = "2024-12-14 09:30:00";
  28. info.StraDets.emplace_back(0, -1, "AbandObj", "遗留物目标检测");
  29. info.StraDets.emplace_back(1, 0, "Clip", "Clip目标检测");
  30. info.StraCfgs.push_back({masd::DIT_DOUBLE, "FeatureThreshold",
  31. "特征匹配阈值", "10.0", "0.0", "100.0", "0.1",
  32. "设置特征匹配点积的阈值,点积值大于设置阈值时才判定为匹配成功。"});
  33. info.StraCfgs.push_back({masd::DIT_STRING, "FeatureFilePath",
  34. "特征文件路径", PROGRAM_ROOT_PATH "assets/textfeatures.json", "NAN", "NAN", "NAN",
  35. "设置存储文本特征的 JSON 文件的路径,用于加载特征数据。"});
  36. info.StraRsts.emplace_back(masd::SRT_ALARM, "检测到遗留物");
  37. strcpy(informatrion, info.toJson().c_str());
  38. return masd::MEC_OK;
  39. }