Skip to content

Commit

Permalink
read_screen读名字,OCR无结果时尝试SIFT
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoZuohong committed Oct 13, 2023
1 parent 5abc3a7 commit 10f5ba2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arknights_mower/solvers/base_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,8 @@ def read_screen(self, img, type="mood", limit=24, cord=None):
ret = rapidocr.engine(img, use_det=False, use_cls=False, use_rec=True)[0]
logger.debug(ret)
if not ret or not ret[0][0]:
if 'name' in type:
return character_recognize.agent_name(img, self.recog.h)
raise Exception("识别失败")
ret = ret[0][0]
if "赤金完成" in ret:
Expand Down

0 comments on commit 10f5ba2

Please sign in to comment.