fix.添加图片为空时的一些日志打印

This commit is contained in:
MistEO
2021-09-25 23:40:39 +08:00
parent f6b4b7b50d
commit 16378c5aa4
3 changed files with 9 additions and 1 deletions

View File

@@ -34,6 +34,7 @@ bool ProcessTask::run()
Rect rect;
task_info_ptr = match_image(&rect);
if (!task_info_ptr) {
m_callback(AsstMsg::ProcessTaskNotMatched, task_start_json, m_callback_arg);
return false;
}
@@ -134,6 +135,7 @@ std::shared_ptr<TaskInfo> ProcessTask::match_image(Rect* matched_rect)
{
const cv::Mat& cur_image = m_controller_ptr->get_image();
if (cur_image.empty() || cur_image.rows < 100) {
m_callback(AsstMsg::ImageIsEmpty, json::value(), m_callback_arg);
return nullptr;
}