1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-15 05:17:24 +08:00
This commit is contained in:
GH Action - Upstream Sync
2024-10-16 05:19:26 +00:00
15 changed files with 62 additions and 27 deletions

View File

@@ -5,6 +5,8 @@ from typing import Any, Dict, List, Tuple, Union
import cv2
import numpy as np
import module.config.server as server
from module.base.button import ButtonGrid
from module.base.utils import color_similar, crop, get_color, limit_in
from module.combat.level import LevelOcr
@@ -132,8 +134,12 @@ class EmotionScanner(Scanner):
super().__init__()
self._results = []
self.grids = CARD_EMOTION_GRIDS
self.ocr_model = EmotionDigit(self.grids.buttons,
if server.server != 'jp':
self.ocr_model = EmotionDigit(self.grids.buttons,
name='DOCK_EMOTION_OCR', threshold=176)
else:
self.ocr_model = EmotionDigit(self.grids.buttons,
name='DOCK_EMOTION_OCR', threshold=221)
def _scan(self, image) -> List:
return self.ocr_model.ocr(image)