活动室user改为头像识别
This commit is contained in:
parent
b42b052e29
commit
3d0621c84b
1 changed files with 4 additions and 7 deletions
|
@ -1,12 +1,9 @@
|
|||
import cv2
|
||||
|
||||
from mower.solvers.fight.battle_choose.battle_fill_choose import BattleFillChooseSolver
|
||||
from mower.solvers.infra.base_mixin import BaseMixin
|
||||
from mower.utils import config
|
||||
from mower.utils.character_recognize import match_portrait
|
||||
from mower.utils.character_recognize import match_avatar
|
||||
from mower.utils.recognize import Scene
|
||||
from mower.utils.solver import BaseSolver
|
||||
from mower.utils.vector import ss
|
||||
|
||||
from .enter_activity import EnterActivitySolver
|
||||
|
||||
|
@ -26,9 +23,9 @@ class SwitchActivityUsersSolver(BaseSolver, BaseMixin):
|
|||
super().run()
|
||||
|
||||
def detect_oper(self) -> str:
|
||||
return match_portrait(
|
||||
cv2.resize(config.recog.gray, (int(1920 / 1.5), int(1080 / 1.5))),
|
||||
segment=[ss(2 / 3, 2 / 3, ((1450, 400), (1670, 530)))],
|
||||
return match_avatar(
|
||||
config.recog.gray,
|
||||
segment=[((20, 935), (135, 1015))],
|
||||
)[0][0]
|
||||
|
||||
def transition(self) -> bool:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue