mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-21 11:25:36 +08:00
Opt: Remove redundant converts from pillow to numpy
This commit is contained in:
@@ -107,12 +107,11 @@ class GlobeDetection:
|
||||
def load(self, image):
|
||||
"""
|
||||
Args:
|
||||
image: Pillow image.
|
||||
image (np.ndarray):
|
||||
"""
|
||||
self.load_globe_map()
|
||||
start_time = time.time()
|
||||
|
||||
image = np.array(image)
|
||||
local = self.find_peaks(self.perspective_transform(image), para=self.config.OS_LOCAL_FIND_PEAKS_PARAMETERS)
|
||||
local = local.astype(np.uint8)
|
||||
local = cv2.resize(local, None, fx=self.config.OS_GLOBE_IMAGE_RESIZE, fy=self.config.OS_GLOBE_IMAGE_RESIZE)
|
||||
|
||||
Reference in New Issue
Block a user