mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 08:38:20 +08:00
Fix: Detect enemy_scale=1 because of map buff icons
This commit is contained in:
@@ -4,6 +4,7 @@ from scipy import optimize
|
||||
|
||||
from module.base.decorator import cached_property
|
||||
from module.base.mask import Mask
|
||||
from module.base.utils import crop
|
||||
|
||||
UI_MASK = Mask(file='./assets/mask/MASK_MAP_UI.png')
|
||||
TILE_CENTER = Mask(file='./assets/map_detection/TILE_CENTER.png')
|
||||
@@ -21,6 +22,13 @@ class Assets:
|
||||
image = cv2.erode(self.ui_mask, kernel).astype('uint8')
|
||||
return image
|
||||
|
||||
@cached_property
|
||||
def ui_mask_in_map(self):
|
||||
DETECTING_AREA = (123, 55, 1280, 720)
|
||||
area = np.append(np.subtract(0, DETECTING_AREA[:2]), self.ui_mask.shape[::-1])
|
||||
# area = (-123, -55, 1157, 665)
|
||||
return crop(self.ui_mask, area)
|
||||
|
||||
@cached_property
|
||||
def tile_center_image(self):
|
||||
return TILE_CENTER.image
|
||||
|
||||
Reference in New Issue
Block a user