From 3b70b11ea6e18b00e70ec0169ebe4963d91fd364 Mon Sep 17 00:00:00 2001 From: Robert Sachunsky Date: Wed, 11 Dec 2024 18:36:20 +0000 Subject: [PATCH] avoid deskewing patches if binary-empty --- src/eynollah/utils/separate_lines.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/eynollah/utils/separate_lines.py b/src/eynollah/utils/separate_lines.py index 48e1c5b..788a510 100644 --- a/src/eynollah/utils/separate_lines.py +++ b/src/eynollah/utils/separate_lines.py @@ -1515,9 +1515,9 @@ def separate_lines_new2(img_path, thetha, num_col, slope_region, logger=None, pl # img_patch = img[index_y_d:index_y_u, index_x_d:index_x_u, :] img_xline = img_patch_ineterst[:, index_x_d:index_x_u] - sigma = 2 try: - slope_xline = return_deskew_slop(img_xline, sigma, plotter=plotter) + assert img_xline.any() + slope_xline = return_deskew_slop(img_xline, 2, logger=logger, plotter=plotter) except: slope_xline = 0