debug: 自动战斗遇到干员名识别失败时保留截图

This commit is contained in:
uye
2026-02-11 15:33:15 +08:00
parent 0ea2845b5b
commit 3782fb1fcb

View File

@@ -1016,7 +1016,12 @@ std::string asst::BattleHelper::analyze_detail_page_oper_name(const cv::Mat& ima
sort_by_score_(*det_result_opt);
const auto& det_name = det_result_opt->front().text;
return BattleData.is_name_invalid(det_name) ? std::string() : det_name;
if (!BattleData.is_name_invalid(det_name)) {
return det_name;
}
det_analyzer.save_img(utils::path("debug") / utils::path("battle"));
return std::string();
}
std::optional<asst::Rect> asst::BattleHelper::get_oper_rect_on_deployment(const std::string& name) const