mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-11 20:58:19 +08:00
Refactor: Digit ocr white list
This commit is contained in:
@@ -24,15 +24,9 @@ OCR_META_DAMAGE = Digit(META_DAMAGE, name='OCR_META_DAMAGE')
|
||||
|
||||
|
||||
class MetaDigitCounter(DigitCounter):
|
||||
def __init__(self, *args, **kwargs):
|
||||
kwargs['alphabet'] = '0123456789/I'
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
def after_process(self, result):
|
||||
result = super().after_process(result)
|
||||
|
||||
# I00/200 -> 100/200
|
||||
result = result.replace('I', '1')
|
||||
# 00/200 -> 100/200
|
||||
if result.startswith('00/'):
|
||||
result = '100/' + result[3:]
|
||||
|
||||
Reference in New Issue
Block a user