From adee1dc55cb67ad20fa0d6eb4a8ebc9edfa6d64a Mon Sep 17 00:00:00 2001 From: vahidrezanezhad Date: Thu, 15 May 2025 00:45:22 +0200 Subject: [PATCH] enhancement for vertical textlines --- src/eynollah/eynollah.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/eynollah/eynollah.py b/src/eynollah/eynollah.py index 5a73ef3..2e54687 100644 --- a/src/eynollah/eynollah.py +++ b/src/eynollah/eynollah.py @@ -5626,8 +5626,8 @@ class Eynollah_ocr: if angle_degrees > 15: better_des_slope = self.get_orientation_moments(textline_coords) - img_crop = self.rotate_image_with_padding(img_crop, -abs(better_des_slope) ) - mask_poly = self.rotate_image_with_padding(mask_poly, -abs(better_des_slope) ) + img_crop = self.rotate_image_with_padding(img_crop, better_des_slope ) + mask_poly = self.rotate_image_with_padding(mask_poly, better_des_slope ) mask_poly = mask_poly.astype('uint8') #new bounding box