From fa8340dbb4a54799a6770e024dfe44f2c3fec4f2 Mon Sep 17 00:00:00 2001 From: Robert Sachunsky Date: Tue, 21 Apr 2026 21:21:32 +0200 Subject: [PATCH] -cl: also filter textregions without textlines here --- src/eynollah/eynollah.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/eynollah/eynollah.py b/src/eynollah/eynollah.py index d718809..3448dc0 100644 --- a/src/eynollah/eynollah.py +++ b/src/eynollah/eynollah.py @@ -2502,11 +2502,6 @@ class Eynollah: all_found_textline_polygons, None, None, type_contour="textline") all_found_textline_polygons_marginals = dilate_textline_contours( all_found_textline_polygons_marginals) - polygons_of_textregions, all_found_textline_polygons, \ - polygons_of_textregions_d, conf_textregions = \ - self.filter_contours_without_textline_inside( - polygons_of_textregions, all_found_textline_polygons, - polygons_of_textregions_d, conf_textregions) else: scale_param = 1 textline_mask_tot_ea_erode = cv2.erode(textline_mask_tot_ea, kernel=KERNEL, iterations=2) @@ -2524,6 +2519,11 @@ class Eynollah: num_col_classifier, scale_param, slope_deskew, image['name']) all_found_textline_polygons_marginals = small_textlines_to_parent_adherence2( all_found_textline_polygons_marginals, textline_mask_tot_ea, num_col_classifier) + (polygons_of_textregions, all_found_textline_polygons, + polygons_of_textregions_d, conf_textregions) = \ + self.filter_contours_without_textline_inside( + polygons_of_textregions, all_found_textline_polygons, + polygons_of_textregions_d, conf_textregions) (polygons_of_marginals_left, polygons_of_marginals_right,