From c5f990d06505a07e80e9942644c897b6d38fc5a9 Mon Sep 17 00:00:00 2001 From: localhorst Date: Tue, 25 Jul 2023 20:46:24 +0200 Subject: [PATCH] update photo count and remove break --- extract_photos.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/extract_photos.py b/extract_photos.py index f2db369..883bd3e 100644 --- a/extract_photos.py +++ b/extract_photos.py @@ -8,7 +8,7 @@ import sys import os import subprocess -number_of_photos_in_scan = 3 +number_of_photos_in_scan = 4 crop_height = 2.0 # offset in percent crop_width = 2.0 # offset in percent @@ -54,7 +54,7 @@ def auto_crop_scan(src_path, output_dir): if img_gray is None: raise Exception("unable to convert image to grayscale") - # apply thresholding on the gray image to create a binary image + # apply threshold on the gray image to create a binary image ret, thresh = cv2.threshold(img_gray, 127, 255, 0) # find the contours @@ -103,7 +103,6 @@ def auto_crop_scan(src_path, output_dir): cv2.imwrite(export_file_path, img_crop) index = index + 1 - break else: raise Exception("unable to find all photos in scan")