From 6fb304d0106b2fc55675878fc243356f5b8a6081 Mon Sep 17 00:00:00 2001 From: Nicolae Buta Date: Mon, 22 May 2023 18:27:46 +0300 Subject: [PATCH] Detect/Split Scanned photos fixes --- scripts/split_photos.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/split_photos.py b/scripts/split_photos.py index 13f44043..939a333e 100644 --- a/scripts/split_photos.py +++ b/scripts/split_photos.py @@ -126,9 +126,9 @@ if __name__ == "__main__": input_file = sys.argv[1] output_directory = sys.argv[2] - tolerance = int(sys.argv[3]) if len(sys.argv) > 3 else 20 - min_area = int(sys.argv[4]) if len(sys.argv) > 4 else 8000 - min_contour_area = int(sys.argv[5]) if len(sys.argv) > 5 else 500 - angle_threshold = int(sys.argv[6]) if len(sys.argv) > 6 else 60 - border_size = int(sys.argv[7]) if len(sys.argv) > 7 else 0 + tolerance = int(sys.argv[6]) if len(sys.argv) > 3 else 20 + min_area = int(sys.argv[8]) if len(sys.argv) > 4 else 8000 + min_contour_area = int(sys.argv[10]) if len(sys.argv) > 5 else 500 + angle_threshold = int(sys.argv[4]) if len(sys.argv) > 6 else 60 + border_size = int(sys.argv[12]) if len(sys.argv) > 7 else 0 split_photos(input_file, output_directory, tolerance=tolerance, min_area=min_area, min_contour_area=min_contour_area, angle_threshold=angle_threshold, border_size=border_size)