Skip to content

Commit

Permalink
#127 实训点数识别时 将字母O替换成数字0
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorReid committed Dec 25, 2023
1 parent 380f184 commit 9b8d275
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sr/operation/unit/guide/get_training_score.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ def _get_score(self, screen: Optional[MatLike] = None) -> Optional[int]:
if ocr_result.find(str(i)) != -1:
return i * 100

# 特殊处理 将出现的字母O转化成0
ocr_result = ocr_result.replace('o', '0').replace('O', '0')

if str_utils.get_positive_digits(ocr_result, None) is None:
return None
else:
Expand Down

0 comments on commit 9b8d275

Please sign in to comment.