revert: 回滚战斗干员标记 模板阈值

This commit is contained in:
MistEO
2023-04-09 15:19:48 +08:00
parent 1b6aa2ac1e
commit 3e6a8344ef
4 changed files with 14 additions and 13 deletions

View File

@@ -6,6 +6,7 @@
#include "Utils/ImageIo.hpp"
#include "Utils/Logger.hpp"
#include "Vision/Battle/BattleImageAnalyzer.h"
#include "Vision/Battle/BattleSkillReadyImageAnalyzer.h"
#include "Vision/Miscellaneous/DepotImageAnalyzer.h"
#include "Vision/Miscellaneous/StageDropsImageAnalyzer.h"
@@ -14,7 +15,7 @@ asst::DebugTask::DebugTask(const AsstCallback& callback, Assistant* inst) : Inte
bool asst::DebugTask::run()
{
test_drops();
test_battle_image();
return true;
}
@@ -59,3 +60,13 @@ void asst::DebugTask::test_skill_ready()
}
Log.info(__FUNCTION__, correct, "/", total, ",", double(correct) / total);
}
void asst::DebugTask::test_battle_image()
{
cv::Mat image = asst::imread(utils::path("1.png"));
cv::Mat resized;
cv::resize(image, resized, cv::Size(1280, 720), 0, 0, cv::INTER_AREA);
BattleImageAnalyzer analyzer(resized);
analyzer.set_target(BattleImageAnalyzer::Target::Oper);
analyzer.analyze();
}