From f2d36824f568d04ce3041a36c2cd6a14ab5d7dcc Mon Sep 17 00:00:00 2001 From: MistEO Date: Sat, 11 Sep 2021 14:18:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=BF=9B=E5=85=A5=E5=9F=BA?= =?UTF-8?q?=E5=BB=BA=EF=BC=8C=E8=AF=86=E5=88=AB=E7=BB=93=E6=9E=9C=E7=9A=84?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MeoAssistance/Identify.cpp | 1 + MeoAssistance/InfrastAbstractTask.cpp | 33 ++++++++++++++++----------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/MeoAssistance/Identify.cpp b/MeoAssistance/Identify.cpp index 40b7fa8695..181f5c522b 100644 --- a/MeoAssistance/Identify.cpp +++ b/MeoAssistance/Identify.cpp @@ -371,6 +371,7 @@ std::vector asst::Identify::find_all_images( cv::Mat draw_mat = image.clone(); for (const auto& info : results) { cv::rectangle(draw_mat, rect_2_cvrect(info.rect), cv::Scalar(0, 0, 255), 1); + cv::putText(draw_mat, std::to_string(info.score), cv::Point(info.rect.x, info.rect.y), 1, 1.0, cv::Scalar(0, 0, 255)); } #endif diff --git a/MeoAssistance/InfrastAbstractTask.cpp b/MeoAssistance/InfrastAbstractTask.cpp index 41bd5ef0c6..64684d01fe 100644 --- a/MeoAssistance/InfrastAbstractTask.cpp +++ b/MeoAssistance/InfrastAbstractTask.cpp @@ -1,5 +1,7 @@ #include "InfrastAbstractTask.h" +#include + #include #include "WinMacro.h" @@ -56,7 +58,7 @@ bool asst::InfrastAbstractTask::click_return_button() bool asst::InfrastAbstractTask::swipe(bool reverse) { -//#ifndef LOG_TRACE + //#ifndef LOG_TRACE bool ret = true; if (!reverse) { ret &= m_controller_ptr->swipe(m_swipe_begin, m_swipe_end, m_swipe_duration); @@ -68,9 +70,9 @@ bool asst::InfrastAbstractTask::swipe(bool reverse) } ret &= sleep(m_swipe_extra_delay); return ret; -//#else -// return sleep(SwipeExtraDelay); -//#endif + //#else + // return sleep(SwipeExtraDelay); + //#endif } std::vector