裁切图片为a4纸比例
This commit is contained in:
@@ -38,7 +38,7 @@ def open_image(img_path):
|
|||||||
return image
|
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 = []
|
split_result = []
|
||||||
# 获取图片的宽度和高度
|
# 获取图片的宽度和高度
|
||||||
height, width = img.shape[:2]
|
height, width = img.shape[:2]
|
||||||
|
|||||||
@@ -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 = []
|
split_result = []
|
||||||
# 打开图片
|
# 打开图片
|
||||||
img = open_image(img_path)
|
img = open_image(img_path)
|
||||||
|
|||||||
Reference in New Issue
Block a user