Skip to content

Commit

Permalink
Merge pull request #347 from EightyDollars/dev_shawn
Browse files Browse the repository at this point in the history
fix:招募券数量识别异常
  • Loading branch information
ZhaoZuohong authored Oct 16, 2023
2 parents b06b01d + 87040e8 commit 15e21cf
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 15e21cf

Please sign in to comment.