chore: breaking rename

This commit is contained in:
MistEO
2022-12-02 00:22:47 +08:00
parent 8ff2c5e1d0
commit d9dcbb6289
345 changed files with 374 additions and 372 deletions

View File

@@ -0,0 +1,39 @@
#include "DebugTask.h"
#include <filesystem>
#include "Utils/NoWarningCV.h"
// #include "Plugin/RoguelikeSkillSelectionTaskPlugin.h"
#include "Vision/Miscellaneous/DepotImageAnalyzer.h"
#include "Vision/Roguelike/StageDropsImageAnalyzer.h"
#include "Utils/ImageIo.hpp"
#include "Utils/Logger.hpp"
asst::DebugTask::DebugTask(const AsstCallback& callback, Assistant* inst)
: InterfaceTask(callback, inst, TaskType)
{
////auto task_ptr = std::make_shared<RoguelikeSkillSelectionTaskPlugin>(callback, inst, TaskType);
// auto task_ptr = std::make_shared<StageDropsTaskPlugin>(callback, inst, TaskType);
// m_subtasks.emplace_back(task_ptr);
}
bool asst::DebugTask::run()
{
size_t total = 0;
size_t success = 0;
for (const auto& entry : std::filesystem::directory_iterator("../../test/drops/screenshots/ja_jp")) {
cv::Mat image = asst::imread(entry.path());
if (image.empty()) {
continue;
}
total += 1;
cv::Mat resized;
cv::resize(image, resized, cv::Size(1280, 720), 0, 0, cv::INTER_AREA);
StageDropsImageAnalyzer analyzer(resized);
success += analyzer.analyze();
}
Log.info(__FUNCTION__, success, "/", total);
return true;
}