diff --git a/util/image_util.py b/util/image_util.py index 4388dc1..8281be0 100644 --- a/util/image_util.py +++ b/util/image_util.py @@ -42,6 +42,8 @@ def split(img_path, ratio=1.414, overlap=0.05, x_compensation=3): wh_ratio = width / height img_name, img_ext = common_util.parse_save_path(img_path) + if img_ext == 'heic' or img_ext == 'HEIC': + img_ext = 'jpg' # cv2无法保存heic图片 if hw_ratio > ratio: # 纵向过长 new_img_height = width * ratio step = width * (ratio - overlap) # 偏移步长