fix signature of calculate_width_height_by_columns

pull/19/head
Konstantin Baierer 4 years ago
parent 0bd9a10525
commit 8f0455590a

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

Loading…
Cancel
Save