1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 09:48:20 +08:00

Fix: 修复

- 优化章节名OCR, 防止地图特效影响识别
- 修复等待精英移动
- 修复回到出击界面
This commit is contained in:
LmeSzinc
2020-04-24 17:57:40 +08:00
parent bea05d396e
commit 604cdf4005
5 changed files with 14 additions and 8 deletions

View File

@@ -45,6 +45,9 @@ def separate_name(name):
elif name[0] in 'abcdef':
return name[0], name[-1]
logger.warning(f'Unknown stage name: {name}')
return name[0], name[1:]
class CampaignOcr:
stage = {}
@@ -137,7 +140,7 @@ class CampaignOcr:
self.stage = {}
buttons = self.extract_campaign_name_image(image)
ocr = Ocr(buttons, lang='stage')
ocr = Ocr(buttons, lang='stage', letter=(255, 255, 255), back=(102, 102, 102), threshold=180)
result = ocr.ocr(image)
if not isinstance(result, list):
result = [result]