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

Pref: Reuse image array to improve memory performance

This commit is contained in:
LmeSzinc
2024-06-05 00:20:31 +08:00
parent 77d48937fc
commit 58202c6a40
34 changed files with 61 additions and 58 deletions

View File

@@ -52,7 +52,7 @@ class EquipmentChange(Equipment):
for index, button in enumerate(EQUIPMENT_GRID.buttons):
if index not in index_list:
continue
crop_image = self.image_crop(button)
crop_image = self.image_crop(button, copy=False)
edge_value = np.mean(np.abs(cv2.Sobel(crop_image, 3, 1, 1)))
# Nothing is 0.15~1
# +1 is 40