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

Refactor: Use numpy image cache instead of pillow image

This commit is contained in:
LmeSzinc
2022-01-23 15:50:15 +08:00
parent 6df7684a37
commit 65f166ad12
51 changed files with 286 additions and 228 deletions

View File

@@ -175,7 +175,7 @@ class GlobeCamera(GlobeOperation, ZoneManager):
screen = self.globe2screen(location).flatten().round()
screen = np.round(screen).astype(int).tolist()
# Average color of whirlpool center
center = np.array(self.image_area(screen))
center = np.array(self.image_crop(screen))
center = np.array([[cv2.mean(center), ], ]).astype(np.uint8)
h, s, v = rgb2hsv(center)[0][0]
# hsv usually to be (338, 74.9, 100)