1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 00:28:20 +08:00

Opt: Lazy load ambush and enhancement templates

- Opt: move letter preprocess functions to info_bar.py
This commit is contained in:
LmeSzinc
2020-12-16 19:57:57 +08:00
parent 8fd56e75ae
commit b497454edc
3 changed files with 53 additions and 58 deletions

View File

@@ -4,6 +4,22 @@ from module.handler.assets import *
from module.logger import logger
def info_letter_preprocess(image):
"""
Args:
image (np.ndarray):
Returns:
np.ndarray
"""
image = image.astype(float)
image = (image - 64) / 0.75
image[image > 255] = 255
image[image < 0] = 0
image = image.astype('uint8')
return image
class InfoHandler(ModuleBase):
"""
Class to handle all kinds of message.