chore.日志增加一个warn等级,调整部分日志为warn

This commit is contained in:
MistEO
2022-06-03 01:48:32 +08:00
parent 7f1e33bbd8
commit d6de65c1e5
3 changed files with 17 additions and 11 deletions

View File

@@ -99,19 +99,19 @@ void asst::MatchImageAnalyzer::set_task_info(MatchTaskInfo task_info) noexcept
bool asst::MatchImageAnalyzer::match_templ(const cv::Mat templ)
{
if (m_roi.x < 0) {
Log.info("roi is out of range", m_roi.to_string());
Log.warn("roi is out of range", m_roi.to_string());
m_roi.x = 0;
}
if (m_roi.y < 0) {
Log.info("roi is out of range", m_roi.to_string());
Log.warn("roi is out of range", m_roi.to_string());
m_roi.y = 0;
}
if (m_roi.x + m_roi.width > m_image.cols) {
Log.info("roi is out of range", m_roi.to_string());
Log.warn("roi is out of range", m_roi.to_string());
m_roi.width = m_image.cols - m_roi.x;
}
if (m_roi.y + m_roi.height > m_image.rows) {
Log.info("roi is out of range", m_roi.to_string());
Log.warn("roi is out of range", m_roi.to_string());
m_roi.height = m_image.rows - m_roi.y;
}