mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 09:50:40 +08:00
Merge branch 'dev' of https://github.com/MaaAssistantArknights/MaaAssistantArknights into dev
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user