mirror of
https://github.com/283375/arcaea-offline-ocr.git
synced 2025-04-19 05:20:17 +00:00
fix: preprocess_char_icon copyMakeBorder edge case
This commit is contained in:
parent
854d5558cf
commit
3f6c08b2ad
@ -110,7 +110,7 @@ class DeviceOcr:
|
||||
@staticmethod
|
||||
def preprocess_char_icon(img_gray: Mat):
|
||||
h, w = img_gray.shape[:2]
|
||||
img = cv2.copyMakeBorder(img_gray, w - h, 0, 0, 0, cv2.BORDER_REPLICATE)
|
||||
img = cv2.copyMakeBorder(img_gray, max(w - h, 0), 0, 0, 0, cv2.BORDER_REPLICATE)
|
||||
h, w = img.shape[:2]
|
||||
img = cv2.fillPoly(
|
||||
img,
|
||||
|
Loading…
x
Reference in New Issue
Block a user