优化图片分割和拓展方法,兼容横向过长的图片
This commit is contained in:
@@ -56,7 +56,7 @@ def visual_model_test(model_type, test_img, task_path, schema):
|
||||
# angle = image_util.parse_rotation_angles(img["img"])[0]
|
||||
angle = 0
|
||||
rotated_img = image_util.rotate(img["img"], angle)
|
||||
rotated_img, offset_x, offset_y = image_util.expand_to_a4_size(rotated_img, True)
|
||||
rotated_img, offset_x, offset_y = image_util.expand_to_a4_size(rotated_img)
|
||||
cv2.imwrite(temp_file.name, rotated_img)
|
||||
|
||||
img["x_offset"] -= offset_x
|
||||
|
||||
Reference in New Issue
Block a user