mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-17 02:55:25 +08:00
Revert "Merge branch 'dev' of https://github.com/LmeSzinc/AzurLaneAutoScript into dev"
This reverts commitbdc5aa0720, reversing changes made to6ee7a62edf.
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
from module.ocr.ocr import Ocr
|
||||
from module.statistics.assets import ENEMY_NAME
|
||||
|
||||
ENEMY_NAME_OCR = Ocr(ENEMY_NAME, lang='cnocr', threshold=128)
|
||||
|
||||
|
||||
class BattleStatusStatistics:
|
||||
def stats_battle_status(self, image):
|
||||
"""
|
||||
Args:
|
||||
image: Pillow image.
|
||||
|
||||
Returns:
|
||||
str: Enemy name, such as '中型主力舰队'.
|
||||
"""
|
||||
result = ENEMY_NAME_OCR.ocr(image)
|
||||
# Delete wrong OCR result
|
||||
for letter in '-一个―~(':
|
||||
result = result.replace(letter, '')
|
||||
|
||||
return result
|
||||
Reference in New Issue
Block a user