This commit is contained in:
ABA2396
2022-07-20 22:46:41 +08:00
3 changed files with 6 additions and 6 deletions

View File

@@ -154,9 +154,9 @@ bool asst::BattleImageAnalyzer::opers_analyze()
Rect role_rect = flag_mrect.rect.move(role_move);
oper.role = oper_role_analyze(role_rect);
Rect cost_rect = flag_mrect.rect.move(cost_move);
// 费用识别的不太准暂时也没用上先注释掉TODO优化费用识别
//Rect cost_rect = flag_mrect.rect.move(cost_move);
//oper.cost = oper_cost_analyze(cost_rect);
oper.index = index++;
@@ -190,10 +190,10 @@ asst::BattleRole asst::BattleImageAnalyzer::oper_role_analyze(const Rect& roi)
if (!role_analyzer.analyze()) {
continue;
}
if (double cur_socre = role_analyzer.get_result().score;
max_score < cur_socre) {
if (double cur_score = role_analyzer.get_result().score;
max_score < cur_score) {
result = role;
max_score = cur_socre;
max_score = cur_score;
}
}

View File

@@ -264,7 +264,7 @@ bool asst::StageDropsImageAnalyzer::analyze_baseline()
for (int j = 0; j < bounding.rows; ++j) {
value = std::max(value, bounding.at<uchar>(j, i));
}
bool is_white = value > threshold && pre_value - value < threshold;
bool is_white = value > threshold && pre_value - value < 15;
pre_value = value;
if (in && !is_white) {

View File

@@ -26,7 +26,7 @@ namespace asst
const std::unordered_set<std::string>& get_templ_required() const noexcept;
template<typename TargetTaskInfoType = TaskInfo>
constexpr std::shared_ptr<TargetTaskInfoType> get(const std::string& name)
std::shared_ptr<TargetTaskInfoType> get(const std::string& name)
{
auto it = m_all_tasks_info.find(name);
if (it == m_all_tasks_info.cend()) {