mirror of
https://github.com/283375/arcaea-offline-pyside-ui.git
synced 2025-04-19 09:10:18 +00:00
fix: cv2.Mat
type annotation
This commit is contained in:
parent
7dee8114bf
commit
00f680edd3
@ -7,7 +7,7 @@ import numpy as np
|
|||||||
from arcaea_offline_ocr.phash_db import phash_opencv
|
from arcaea_offline_ocr.phash_db import phash_opencv
|
||||||
|
|
||||||
|
|
||||||
def preprocess_char_icon(img_gray: cv2.Mat):
|
def preprocess_char_icon(img_gray: np.ndarray):
|
||||||
h, w = img_gray.shape[:2]
|
h, w = img_gray.shape[:2]
|
||||||
img = cv2.fillPoly(
|
img = cv2.fillPoly(
|
||||||
img_gray,
|
img_gray,
|
||||||
@ -23,7 +23,7 @@ def preprocess_char_icon(img_gray: cv2.Mat):
|
|||||||
|
|
||||||
|
|
||||||
def build_image_phash_database(
|
def build_image_phash_database(
|
||||||
images: list[cv2.Mat],
|
images: list[np.ndarray],
|
||||||
labels: list[str],
|
labels: list[str],
|
||||||
*,
|
*,
|
||||||
hash_size: int = 16,
|
hash_size: int = 16,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user