mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 12:08:21 +08:00
Opt: Improve memory performance in map detection
This commit is contained in:
@@ -168,8 +168,9 @@ class Perspective:
|
||||
Returns:
|
||||
np.ndarray
|
||||
"""
|
||||
image = rgb2gray(crop(image, self.config.DETECTING_AREA))
|
||||
image = cv2.subtract(255, cv2.bitwise_and(image, ASSETS.ui_mask))
|
||||
image = rgb2gray(crop(image, self.config.DETECTING_AREA, copy=False))
|
||||
cv2.bitwise_and(image, ASSETS.ui_mask, dst=image)
|
||||
cv2.subtract(255, image, dst=image)
|
||||
return image
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user