From ef3ccd0d5f4bae25774309a50f6b114cde08c99c Mon Sep 17 00:00:00 2001 From: Konstantin Baierer Date: Fri, 5 Feb 2021 18:59:29 +0100 Subject: [PATCH] fix special case where num_col_classifier was unbound --- sbb_newspapers_org_image/eynollah.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbb_newspapers_org_image/eynollah.py b/sbb_newspapers_org_image/eynollah.py index 0bf46ed..10b9e50 100644 --- a/sbb_newspapers_org_image/eynollah.py +++ b/sbb_newspapers_org_image/eynollah.py @@ -2154,6 +2154,7 @@ class eynollah: img_only_regions_with_sep = img_only_regions_with_sep.astype(np.uint8) img_only_regions = cv2.erode(img_only_regions_with_sep[:, :], self.kernel, iterations=6) + num_col_classifier = None try: num_col, peaks_neg_fin = find_num_col(img_only_regions, multiplier=6.0) if not num_column_is_classified: @@ -2161,7 +2162,6 @@ class eynollah: except: num_col = None peaks_neg_fin = [] - num_col_classifier = None return num_col, num_col_classifier, img_only_regions, page_coord, image_page, mask_images, mask_lines def run_enhancement(self):