裁切图片为a4纸比例

This commit is contained in:
2024-07-11 08:53:18 +08:00
parent 1eaa0558a9
commit d44a757f52
2 changed files with 2 additions and 2 deletions

View File

@@ -38,7 +38,7 @@ def open_image(img_path):
return image
def split_image(img, max_ratio=2.82, best_ration=1.41, overlap=0.05):
def split_image(img, max_ratio=1.41, best_ration=1.41, overlap=0.05):
split_result = []
# 获取图片的宽度和高度
height, width = img.shape[:2]

View File

@@ -54,7 +54,7 @@ def open_image(img_path):
# 分割大图片
def split_image(img_path, max_ratio=2.82, best_ration=1.41, overlap=0.05):
def split_image(img_path, max_ratio=1.41, best_ration=1.41, overlap=0.05):
split_result = []
# 打开图片
img = open_image(img_path)