fix: 修复水月肉鸽中,排异反应干员无法识别的问题

fix https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/2177
This commit is contained in:
MistEO
2022-10-11 23:03:12 +08:00
parent ada43862ad
commit ce3c338cee
3 changed files with 20 additions and 4 deletions

View File

@@ -7097,7 +7097,14 @@
26,
120,
23
]
],
"specificRect": [
100,
0,
0,
0
],
"specificRect_Doc": "x拿来当文字灰度二值化下限用"
},
"Roguelike1RecruitElite0": {
"roi": [
@@ -8118,10 +8125,17 @@
"text": [],
"roi": [
210,
10,
8,
120,
22
]
20
],
"specificRect": [
100,
0,
0,
0
],
"specificRect_Doc": "x拿来当文字灰度二值化下限用"
},
"Roguelike1SkillSelectionMove1": {
"algorithm": "JustReturn",

View File

@@ -12,6 +12,7 @@ bool asst::RoguelikeRecruitImageAnalyzer::analyze()
OcrWithFlagTemplImageAnalyzer analyzer(m_image);
analyzer.set_task_info("Roguelike1RecruitOcrFlag", "Roguelike1RecruitOcr");
analyzer.set_replace(Task.get<OcrTaskInfo>("CharsNameOcrReplace")->replace_map);
analyzer.set_threshold(Task.get("Roguelike1RecruitOcr")->specific_rect.x);
if (!analyzer.analyze()) {
return false;

View File

@@ -50,6 +50,7 @@ std::string asst::RoguelikeSkillSelectionImageAnalyzer::name_analyze(const Rect&
{
OcrWithPreprocessImageAnalyzer analyzer;
auto name_task_ptr = Task.get<OcrTaskInfo>("Roguelike1SkillSelectionName");
analyzer.set_threshold(name_task_ptr->specific_rect.x);
analyzer.set_task_info(name_task_ptr);
analyzer.set_image(m_image);
analyzer.set_roi(roi.move(name_task_ptr->roi));