mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-25 10:01:10 +00:00
Fix: Typo in enlarge_canvas()
This commit is contained in:
parent
a54826aa94
commit
30958a36f9
@ -21,7 +21,7 @@ def enlarge_canvas(image):
|
||||
Also enlarge into the integer multiple of 32 cause PaddleOCR will downscale images to 1/32.
|
||||
"""
|
||||
height, width = image.shape[:2]
|
||||
length = int(max(width, width) // 32 * 32 + 32)
|
||||
length = int(max(width, height) // 32 * 32 + 32)
|
||||
border = (0, length - height, 0, length - width)
|
||||
if sum(border) > 0:
|
||||
image = cv2.copyMakeBorder(image, *border, borderType=cv2.BORDER_CONSTANT, value=(0, 0, 0))
|
||||
|
Loading…
Reference in New Issue
Block a user