mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-27 14:25:38 +08:00
Opt: Remove redundant converts from pillow to numpy
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import time
|
||||
|
||||
import numpy as np
|
||||
from PIL import Image, ImageDraw, ImageOps
|
||||
from PIL import ImageDraw, ImageOps
|
||||
|
||||
from module.base.utils import *
|
||||
from module.config.config import AzurLaneConfig
|
||||
@@ -152,13 +152,12 @@ class Homography:
|
||||
def detect(self, image):
|
||||
"""
|
||||
Args:
|
||||
image: Screenshot.
|
||||
image (np.ndarray): Screenshot.
|
||||
|
||||
Returns:
|
||||
bool: If success.
|
||||
"""
|
||||
start_time = time.time()
|
||||
image = np.array(image)
|
||||
self.image = image
|
||||
|
||||
# Image initialization
|
||||
|
||||
Reference in New Issue
Block a user