fix: cv2.Mat type annotation

This commit is contained in:
283375 2023-10-23 13:28:33 +08:00
parent 7dee8114bf
commit 00f680edd3
Signed by: 283375
SSH Key Fingerprint: SHA256:UcX0qg6ZOSDOeieKPGokA5h7soykG61nz2uxuQgVLSk

View File

@ -7,7 +7,7 @@ import numpy as np
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]
img = cv2.fillPoly(
img_gray,
@ -23,7 +23,7 @@ def preprocess_char_icon(img_gray: cv2.Mat):
def build_image_phash_database(
images: list[cv2.Mat],
images: list[np.ndarray],
labels: list[str],
*,
hash_size: int = 16,