From d814500a5817702712937a593d28b150a114710f Mon Sep 17 00:00:00 2001 From: Benjamin Kiessling Date: Mon, 8 Apr 2024 19:15:50 +0200 Subject: [PATCH] Syntax error in polygonizer Small oversight from the new polygon extraction code --- kraken/lib/segmentation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kraken/lib/segmentation.py b/kraken/lib/segmentation.py index 3ab6008a1..d0b986fe0 100644 --- a/kraken/lib/segmentation.py +++ b/kraken/lib/segmentation.py @@ -498,7 +498,7 @@ def _calc_seam(baseline, polygon, angle, im_feats, bias=150): mask[line_locs] = 0 dist_bias = distance_transform_cdt(mask) # absolute mask - mask = np.array(make_polygonal_mask(polygon-(r_min, c_min)), patch.shape[1::-1]) > 128 + mask = np.array(make_polygonal_mask(polygon-(r_min, c_min), patch.shape[::-1])) > 128 # dilate mask to compensate for aliasing during rotation mask = binary_erosion(mask, border_value=True, iterations=2) # combine weights with features