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")