Skip to content

Commit

Permalink
fix:招募券数量识别异常
Browse files Browse the repository at this point in the history
  • Loading branch information
EightyDollars committed Oct 16, 2023
1 parent 07201d6 commit 87040e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arknights_mower/solvers/recruit.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ def transition(self) -> bool:

if self.permit_count is None:
recruit_ticket_img = self.recog.img[20:80, 1290:1380]
recruit_ticket_binary = cv2.threshold(refresh_gray, 220, 255, cv2.THRESH_BINARY)[1]
recruit_ticket_gray = cv2.cvtColor(recruit_ticket_img, cv2.COLOR_BGR2GRAY)
try:
res = rapidocr.engine(recruit_ticket_binary, use_det=False, use_cls=False, use_rec=True)[0][0][0]
res = rapidocr.engine(recruit_ticket_gray, use_det=False, use_cls=False, use_rec=True)[0][0][0]
if res == '0' or res == 'o' or res == 'O':
res = 0
if str(res).isdigit():
Expand Down

0 comments on commit 87040e8

Please sign in to comment.