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