1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 01:38:21 +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

@@ -36,7 +36,7 @@ class GetItemsStatistics:
Returns:
bool: If the number of items in row is odd.
"""
image = crop(image, GET_ITEMS_ODD.area)
image = crop(image, GET_ITEMS_ODD.area, copy=False)
return np.mean(rgb2gray(image) > 127) > 0.1
def _stats_get_items_load(self, image):