From 559d001eefe71fbaac2b6ccd42e670da8d1967ec Mon Sep 17 00:00:00 2001 From: Robert Sachunsky Date: Wed, 2 Apr 2025 05:45:34 +0000 Subject: [PATCH] another fix to avoid frequent warnings --- README.md | 1 + src/eynollah/utils/separate_lines.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 37c7313..07253ee 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,7 @@ If the input file group is PAGE-XML (from a previous OCR-D workflow step), Eynol (because some other preprocessing step was in effect like `denoised`), then the output PAGE-XML will be based on that as new top-level (`@imageFilename`) + ocrd-eynollah-segment -I OCR-D-XYZ -O OCR-D-SEG -P models 2022-04-05 Still, in general, it makes more sense to add other workflow steps **after** Eynollah. diff --git a/src/eynollah/utils/separate_lines.py b/src/eynollah/utils/separate_lines.py index 111f58b..3499c29 100644 --- a/src/eynollah/utils/separate_lines.py +++ b/src/eynollah/utils/separate_lines.py @@ -1681,7 +1681,7 @@ def do_work_of_slopes_new_curved( textline_con_fil = filter_contours_area_of_image(img_int_p, textline_con, hierarchy, max_area=1, min_area=0.0008) - y_diff_mean = find_contours_mean_y_diff(textline_con_fil) + y_diff_mean = find_contours_mean_y_diff(textline_con_fil) if len(textline_con_fil) > 1 else np.NaN if np.isnan(y_diff_mean): slope_for_all = MAX_SLOPE else: