From 8f0455590ad75742e5cc109d1ac887819439862c Mon Sep 17 00:00:00 2001 From: Konstantin Baierer Date: Mon, 1 Feb 2021 12:55:54 +0100 Subject: [PATCH] fix signature of calculate_width_height_by_columns --- sbb_newspapers_org_image/eynollah.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sbb_newspapers_org_image/eynollah.py b/sbb_newspapers_org_image/eynollah.py index 15ecce2..6b71b32 100644 --- a/sbb_newspapers_org_image/eynollah.py +++ b/sbb_newspapers_org_image/eynollah.py @@ -273,7 +273,7 @@ class eynollah: dpi = os.popen('identify -format "%x " ' + self.image_filename).read() return int(float(dpi)) - def calculate_width_height_by_columns(self, img, num_col, width_early): + def calculate_width_height_by_columns(self, img, num_col, width_early, label_p_pred): if num_col == 1 and width_early < 1100: img_w_new = 2000 img_h_new = int(img.shape[0] / float(img.shape[1]) * 2000) @@ -370,7 +370,7 @@ class eynollah: gc.collect() # sys.exit() - img_new, num_column_is_classified = self.calculate_width_height_by_columns(img, num_col, width_early) + img_new, num_column_is_classified = self.calculate_width_height_by_columns(img, num_col, width_early, label_p_pred) if img_new.shape[1] > img.shape[1]: img_new = self.predict_enhancement(img_new) @@ -428,7 +428,7 @@ class eynollah: if dpi < 298: # sys.exit() - img_new, num_column_is_classified = self.calculate_width_height_by_columns(img, num_col, width_early) + img_new, num_column_is_classified = self.calculate_width_height_by_columns(img, num_col, width_early, label_p_pred) # img_new=resize_image(img,img_h_new,img_w_new) image_res = self.predict_enhancement(img_new)