mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-20 02:55:38 +08:00
fix.修复两个肉鸽闪退的问题
https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/669
This commit is contained in:
@@ -98,8 +98,6 @@ void asst::MatchImageAnalyzer::set_task_info(MatchTaskInfo task_info) noexcept
|
||||
}
|
||||
bool asst::MatchImageAnalyzer::match_templ(const cv::Mat templ)
|
||||
{
|
||||
cv::Mat matched;
|
||||
|
||||
if (m_roi.x < 0) {
|
||||
Log.info("roi is out of range", m_roi.to_string());
|
||||
m_roi.x = 0;
|
||||
@@ -124,6 +122,8 @@ bool asst::MatchImageAnalyzer::match_templ(const cv::Mat templ)
|
||||
"templ size:", templ.cols, templ.rows);
|
||||
return false;
|
||||
}
|
||||
|
||||
cv::Mat matched;
|
||||
if (m_mask_range.first == 0 && m_mask_range.second == 0) {
|
||||
cv::matchTemplate(image_roi, templ, matched, cv::TM_CCOEFF_NORMED);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user