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:
@@ -280,7 +280,7 @@ class ModuleBase:
|
||||
Returns:
|
||||
Button: Or None if nothing matched.
|
||||
"""
|
||||
image = color_similarity_2d(self.image_crop(area), color=color)
|
||||
image = color_similarity_2d(self.image_crop(area, copy=False), color=color)
|
||||
points = np.array(np.where(image > color_threshold)).T[:, ::-1]
|
||||
if points.shape[0] < encourage ** 2:
|
||||
# Not having enough pixels to match
|
||||
|
||||
Reference in New Issue
Block a user