diff --git a/source/MaaFramework/Task/Recognizer.cpp b/source/MaaFramework/Task/Recognizer.cpp index b39c2e4ff..219737adf 100644 --- a/source/MaaFramework/Task/Recognizer.cpp +++ b/source/MaaFramework/Task/Recognizer.cpp @@ -29,7 +29,7 @@ std::optional Recognizer::recognize(const cv::Mat& image, co std::optional result; switch (task_data.rec_type) { case Type::DirectHit: - result = direct_hit(); + result = direct_hit(task_data.name); break; case Type::TemplateMatch: @@ -77,8 +77,9 @@ std::optional Recognizer::recognize(const cv::Mat& image, co return result; } -std::optional Recognizer::direct_hit() +std::optional Recognizer::direct_hit(const std::string& name) { + LogDebug << name; return Result { .box = cv::Rect(), .detail = json::array() }; } diff --git a/source/MaaFramework/Task/Recognizer.h b/source/MaaFramework/Task/Recognizer.h index 63b4b02d6..5027ad825 100644 --- a/source/MaaFramework/Task/Recognizer.h +++ b/source/MaaFramework/Task/Recognizer.h @@ -32,7 +32,7 @@ class Recognizer std::optional recognize(const cv::Mat& image, const TaskData& task_data); private: - std::optional direct_hit(); + std::optional direct_hit(const std::string& name); std::optional template_match(const cv::Mat& image, const MAA_VISION_NS::TemplateMatcherParam& param, const std::string& name); std::optional feature_match(const cv::Mat& image, const MAA_VISION_NS::FeatureMatcherParam& param,